@vkontakte/vkui-tokens 4.0.0-rc.9 → 4.0.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/index.js +3 -1
- package/build/compilers/styles/compileStyles.d.ts +2 -1
- package/build/compilers/styles/compileStyles.js +15 -3
- package/build/compilers/styles/compileStyles.test.js +43 -1
- package/build/compilers/styles/helpers/tokenRecognition.d.ts +1 -0
- package/build/compilers/styles/helpers/tokenRecognition.js +6 -1
- package/build/expandTheme.test.js +4 -4
- package/build/helpers/convertCamelToSnake.js +1 -1
- package/build/helpers/convertCamelToSnake.test.js +3 -0
- package/build/helpers/cssHelpers.d.ts +12 -1
- package/build/helpers/cssHelpers.js +35 -2
- package/build/helpers/cssHelpers.test.js +12 -0
- package/build/helpers/getAllButSizes.d.ts +1 -0
- package/build/helpers/getAllButSizes.js +17 -0
- package/build/helpers/getAllButSizes.test.d.ts +1 -0
- package/build/helpers/getAllButSizes.test.js +22 -0
- package/build/helpers/getOnlyColors.test.d.ts +1 -0
- package/build/helpers/getOnlyColors.test.js +17 -0
- package/build/themeProcessors/expandColors/expandColors.d.ts +4 -1
- package/build/themeProcessors/expandColors/expandColors.js +24 -14
- package/build/themeProcessors/expandColors/overlayColors.d.ts +4 -0
- package/build/themeProcessors/expandColors/overlayColors.js +27 -0
- package/build/themeProcessors/expandColors/overlayColors.test.d.ts +1 -0
- package/build/themeProcessors/expandColors/overlayColors.test.js +37 -0
- package/build/themeProcessors/pixelifyValues/pixelifyValues.js +2 -2
- package/build/themeProcessors/pixelifyValues/pixelifyValues.test.js +5 -0
- package/interfaces/general/colors/index.d.ts +26 -13
- package/interfaces/general/index.d.ts +1 -0
- package/interfaces/general/toneValues/index.d.ts +1 -0
- package/interfaces/namespaces/paradigm/index.d.ts +4 -33
- package/interfaces/themes/calendar/index.d.ts +11 -3
- package/interfaces/themes/calls/index.d.ts +4 -4
- package/interfaces/themes/cloud/index.d.ts +4 -4
- package/interfaces/themes/home/index.d.ts +20 -9
- package/interfaces/themes/media/index.d.ts +28 -11
- package/interfaces/themes/mediaDark/index.d.ts +4 -0
- package/interfaces/themes/mediaDark/index.js +2 -0
- package/interfaces/themes/octavius/index.d.ts +177 -4
- package/interfaces/themes/octaviusVK/index.d.ts +4 -0
- package/interfaces/themes/octaviusVK/index.js +2 -0
- package/interfaces/themes/octaviusVKDark/index.d.ts +4 -0
- package/interfaces/themes/octaviusVKDark/index.js +2 -0
- package/interfaces/themes/octaviusWhite/index.d.ts +4 -0
- package/interfaces/themes/octaviusWhite/index.js +2 -0
- package/interfaces/themes/paradigmBase/index.d.ts +4 -4
- package/interfaces/themes/paradigmBaseDark/index.d.ts +4 -4
- package/interfaces/themes/pharma/index.d.ts +2 -2
- package/interfaces/themes/vkBaseDark/index.d.ts +7 -0
- package/interfaces/themes/vkBaseDark/index.js +2 -0
- package/interfaces/themes/vkCom/index.d.ts +1 -0
- package/interfaces/themes/vkCom/index.js +2 -0
- package/interfaces/themes/vkIOS/index.d.ts +1 -0
- package/interfaces/themes/vkIOS/index.js +2 -0
- package/package.json +4 -1
- package/themeDescriptions/base/paradigm.d.ts +7 -2
- package/themeDescriptions/base/paradigm.js +318 -102
- package/themeDescriptions/base/vk.d.ts +2 -0
- package/themeDescriptions/base/vk.js +171 -49
- package/themes/calendar/cssVars/declarations/index.css +174 -240
- package/themes/calendar/cssVars/declarations/noSizes.css +268 -0
- package/themes/calendar/cssVars/declarations/onlyColors.css +156 -228
- package/themes/calendar/cssVars/declarations/onlyColors.js +2 -2
- package/themes/calendar/cssVars/declarations/onlyMedia.css +4 -2
- package/themes/calendar/cssVars/declarations/onlyVariables.css +170 -238
- package/themes/calendar/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/calendar/cssVars/theme/fallbacks/index.css +172 -240
- package/themes/calendar/cssVars/theme/fallbacks/index.less +172 -240
- package/themes/calendar/cssVars/theme/fallbacks/index.pcss +172 -240
- package/themes/calendar/cssVars/theme/fallbacks/index.scss +172 -240
- package/themes/calendar/cssVars/theme/fallbacks/index.styl +172 -240
- package/themes/calendar/cssVars/theme/index.js +578 -890
- package/themes/calendar/cssVars/theme/index.json +578 -890
- package/themes/calendar/index.css +170 -238
- package/themes/calendar/index.js +221 -334
- package/themes/calendar/index.json +221 -334
- package/themes/calendar/index.less +170 -238
- package/themes/calendar/index.pcss +170 -238
- package/themes/calendar/index.scss +170 -238
- package/themes/calendar/index.styl +170 -238
- package/themes/calendarDark/cssVars/declarations/index.css +186 -252
- package/themes/calendarDark/cssVars/declarations/noSizes.css +268 -0
- package/themes/calendarDark/cssVars/declarations/onlyColors.css +168 -240
- package/themes/calendarDark/cssVars/declarations/onlyColors.js +2 -2
- package/themes/calendarDark/cssVars/declarations/onlyMedia.css +4 -2
- package/themes/calendarDark/cssVars/declarations/onlyVariables.css +182 -250
- package/themes/calendarDark/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/calendarDark/cssVars/theme/fallbacks/index.css +184 -252
- package/themes/calendarDark/cssVars/theme/fallbacks/index.less +184 -252
- package/themes/calendarDark/cssVars/theme/fallbacks/index.pcss +184 -252
- package/themes/calendarDark/cssVars/theme/fallbacks/index.scss +184 -252
- package/themes/calendarDark/cssVars/theme/fallbacks/index.styl +184 -252
- package/themes/calendarDark/cssVars/theme/index.js +584 -896
- package/themes/calendarDark/cssVars/theme/index.json +584 -896
- package/themes/calendarDark/index.css +182 -250
- package/themes/calendarDark/index.js +251 -364
- package/themes/calendarDark/index.json +251 -364
- package/themes/calendarDark/index.less +182 -250
- package/themes/calendarDark/index.pcss +182 -250
- package/themes/calendarDark/index.scss +182 -250
- package/themes/calendarDark/index.styl +182 -250
- package/themes/calls/cssVars/declarations/index.css +197 -258
- package/themes/calls/cssVars/declarations/noSizes.css +268 -0
- package/themes/calls/cssVars/declarations/onlyColors.css +168 -240
- package/themes/calls/cssVars/declarations/onlyColors.js +2 -2
- package/themes/calls/cssVars/declarations/onlyMedia.css +9 -3
- package/themes/calls/cssVars/declarations/onlyVariables.css +188 -255
- package/themes/calls/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/calls/cssVars/theme/fallbacks/index.css +190 -257
- package/themes/calls/cssVars/theme/fallbacks/index.less +190 -257
- package/themes/calls/cssVars/theme/fallbacks/index.pcss +190 -257
- package/themes/calls/cssVars/theme/fallbacks/index.scss +190 -257
- package/themes/calls/cssVars/theme/fallbacks/index.styl +190 -257
- package/themes/calls/cssVars/theme/index.js +593 -901
- package/themes/calls/cssVars/theme/index.json +593 -901
- package/themes/calls/index.css +188 -255
- package/themes/calls/index.js +257 -369
- package/themes/calls/index.json +257 -369
- package/themes/calls/index.less +188 -255
- package/themes/calls/index.pcss +188 -255
- package/themes/calls/index.scss +188 -255
- package/themes/calls/index.styl +188 -255
- package/themes/cloud/cssVars/declarations/index.css +174 -240
- package/themes/cloud/cssVars/declarations/noSizes.css +268 -0
- package/themes/cloud/cssVars/declarations/onlyColors.css +156 -228
- package/themes/cloud/cssVars/declarations/onlyColors.js +2 -2
- package/themes/cloud/cssVars/declarations/onlyMedia.css +4 -2
- package/themes/cloud/cssVars/declarations/onlyVariables.css +170 -238
- package/themes/cloud/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/cloud/cssVars/theme/fallbacks/index.css +172 -240
- package/themes/cloud/cssVars/theme/fallbacks/index.less +172 -240
- package/themes/cloud/cssVars/theme/fallbacks/index.pcss +172 -240
- package/themes/cloud/cssVars/theme/fallbacks/index.scss +172 -240
- package/themes/cloud/cssVars/theme/fallbacks/index.styl +172 -240
- package/themes/cloud/cssVars/theme/index.js +578 -890
- package/themes/cloud/cssVars/theme/index.json +578 -890
- package/themes/cloud/index.css +170 -238
- package/themes/cloud/index.js +221 -334
- package/themes/cloud/index.json +221 -334
- package/themes/cloud/index.less +170 -238
- package/themes/cloud/index.pcss +170 -238
- package/themes/cloud/index.scss +170 -238
- package/themes/cloud/index.styl +170 -238
- package/themes/home/cssVars/declarations/index.css +374 -274
- package/themes/home/cssVars/declarations/noSizes.css +286 -0
- package/themes/home/cssVars/declarations/onlyColors.css +171 -228
- package/themes/home/cssVars/declarations/onlyColors.js +2 -2
- package/themes/home/cssVars/declarations/onlyMedia.css +132 -30
- package/themes/home/cssVars/declarations/onlyVariables.css +212 -244
- package/themes/home/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/home/cssVars/theme/fallbacks/index.css +244 -246
- package/themes/home/cssVars/theme/fallbacks/index.less +238 -246
- package/themes/home/cssVars/theme/fallbacks/index.pcss +231 -247
- package/themes/home/cssVars/theme/fallbacks/index.scss +275 -247
- package/themes/home/cssVars/theme/fallbacks/index.styl +238 -246
- package/themes/home/cssVars/theme/index.js +746 -878
- package/themes/home/cssVars/theme/index.json +746 -878
- package/themes/home/index.css +242 -244
- package/themes/home/index.js +293 -346
- package/themes/home/index.json +293 -346
- package/themes/home/index.less +236 -244
- package/themes/home/index.pcss +229 -245
- package/themes/home/index.scss +273 -245
- package/themes/home/index.styl +236 -244
- package/themes/homeDark/cssVars/declarations/index.css +429 -329
- package/themes/homeDark/cssVars/declarations/noSizes.css +286 -0
- package/themes/homeDark/cssVars/declarations/onlyColors.css +225 -282
- package/themes/homeDark/cssVars/declarations/onlyColors.js +2 -2
- package/themes/homeDark/cssVars/declarations/onlyMedia.css +132 -30
- package/themes/homeDark/cssVars/declarations/onlyVariables.css +267 -299
- package/themes/homeDark/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/homeDark/cssVars/theme/fallbacks/index.css +299 -301
- package/themes/homeDark/cssVars/theme/fallbacks/index.less +293 -301
- package/themes/homeDark/cssVars/theme/fallbacks/index.pcss +286 -302
- package/themes/homeDark/cssVars/theme/fallbacks/index.scss +330 -302
- package/themes/homeDark/cssVars/theme/fallbacks/index.styl +293 -301
- package/themes/homeDark/cssVars/theme/index.js +747 -879
- package/themes/homeDark/cssVars/theme/index.json +747 -879
- package/themes/homeDark/index.css +297 -299
- package/themes/homeDark/index.js +370 -423
- package/themes/homeDark/index.json +370 -423
- package/themes/homeDark/index.less +291 -299
- package/themes/homeDark/index.pcss +284 -300
- package/themes/homeDark/index.scss +328 -300
- package/themes/homeDark/index.styl +291 -299
- package/themes/media/cssVars/declarations/index.css +789 -2049
- package/themes/media/cssVars/declarations/noSizes.css +365 -0
- package/themes/media/cssVars/declarations/onlyAdaptiveGroups.css +89 -59
- package/themes/media/cssVars/declarations/onlyColors.css +177 -228
- package/themes/media/cssVars/declarations/onlyColors.js +2 -2
- package/themes/media/cssVars/declarations/onlyMedia.css +167 -900
- package/themes/media/cssVars/declarations/onlyVariables.css +307 -520
- package/themes/media/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/media/cssVars/theme/fallbacks/index.css +544 -1101
- package/themes/media/cssVars/theme/fallbacks/index.less +339 -605
- package/themes/media/cssVars/theme/fallbacks/index.pcss +339 -599
- package/themes/media/cssVars/theme/fallbacks/index.scss +487 -1563
- package/themes/media/cssVars/theme/fallbacks/index.styl +339 -605
- package/themes/media/cssVars/theme/index.js +1135 -1991
- package/themes/media/cssVars/theme/index.json +1135 -1991
- package/themes/media/index.css +525 -1082
- package/themes/media/index.js +435 -728
- package/themes/media/index.json +435 -728
- package/themes/media/index.less +321 -587
- package/themes/media/index.pcss +321 -581
- package/themes/media/index.scss +501 -1577
- package/themes/media/index.styl +321 -587
- package/themes/mediaDark/cssVars/declarations/index.css +1570 -0
- package/themes/mediaDark/cssVars/declarations/noSizes.css +365 -0
- package/themes/mediaDark/cssVars/declarations/onlyAdaptiveGroups.css +153 -0
- package/themes/mediaDark/cssVars/declarations/onlyColors.css +317 -0
- package/themes/mediaDark/cssVars/declarations/onlyColors.d.ts +3 -0
- package/themes/mediaDark/cssVars/declarations/onlyColors.js +11 -0
- package/themes/mediaDark/cssVars/declarations/onlyMedia.css +467 -0
- package/themes/mediaDark/cssVars/declarations/onlyVariables.css +620 -0
- package/themes/mediaDark/cssVars/declarations/onlyVariables.d.ts +3 -0
- package/themes/mediaDark/cssVars/declarations/onlyVariables.js +11 -0
- package/themes/mediaDark/cssVars/theme/fallbacks/index.css +949 -0
- package/themes/mediaDark/cssVars/theme/fallbacks/index.less +720 -0
- package/themes/mediaDark/cssVars/theme/fallbacks/index.pcss +701 -0
- package/themes/mediaDark/cssVars/theme/fallbacks/index.scss +957 -0
- package/themes/mediaDark/cssVars/theme/fallbacks/index.styl +720 -0
- package/themes/mediaDark/cssVars/theme/index.d.ts +4 -0
- package/themes/mediaDark/cssVars/theme/index.js +3880 -0
- package/themes/mediaDark/cssVars/theme/index.json +3877 -0
- package/themes/mediaDark/index.css +949 -0
- package/themes/mediaDark/index.d.ts +4 -0
- package/themes/mediaDark/index.js +1157 -0
- package/themes/mediaDark/index.json +1154 -0
- package/themes/mediaDark/index.less +720 -0
- package/themes/mediaDark/index.pcss +701 -0
- package/themes/mediaDark/index.scss +957 -0
- package/themes/mediaDark/index.styl +720 -0
- package/themes/mycom/cssVars/declarations/index.css +728 -1988
- package/themes/mycom/cssVars/declarations/noSizes.css +368 -0
- package/themes/mycom/cssVars/declarations/onlyAdaptiveGroups.css +89 -59
- package/themes/mycom/cssVars/declarations/onlyColors.css +177 -228
- package/themes/mycom/cssVars/declarations/onlyColors.js +2 -2
- package/themes/mycom/cssVars/declarations/onlyMedia.css +160 -893
- package/themes/mycom/cssVars/declarations/onlyVariables.css +290 -503
- package/themes/mycom/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/mycom/cssVars/theme/fallbacks/index.css +493 -1050
- package/themes/mycom/cssVars/theme/fallbacks/index.less +323 -589
- package/themes/mycom/cssVars/theme/fallbacks/index.pcss +323 -583
- package/themes/mycom/cssVars/theme/fallbacks/index.scss +442 -1518
- package/themes/mycom/cssVars/theme/fallbacks/index.styl +323 -589
- package/themes/mycom/cssVars/theme/index.js +1112 -1968
- package/themes/mycom/cssVars/theme/index.json +1112 -1968
- package/themes/mycom/index.css +463 -1020
- package/themes/mycom/index.js +399 -692
- package/themes/mycom/index.json +399 -692
- package/themes/mycom/index.less +288 -554
- package/themes/mycom/index.pcss +288 -548
- package/themes/mycom/index.scss +443 -1519
- package/themes/mycom/index.styl +288 -554
- package/themes/octavius/cssVars/declarations/index.css +496 -188
- package/themes/octavius/cssVars/declarations/noSizes.css +620 -0
- package/themes/octavius/cssVars/declarations/onlyColors.css +441 -174
- package/themes/octavius/cssVars/declarations/onlyColors.js +2 -2
- package/themes/octavius/cssVars/declarations/onlyMedia.css +15 -3
- package/themes/octavius/cssVars/declarations/onlyVariables.css +481 -185
- package/themes/octavius/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/octavius/cssVars/theme/fallbacks/index.css +483 -187
- package/themes/octavius/cssVars/theme/fallbacks/index.less +483 -187
- package/themes/octavius/cssVars/theme/fallbacks/index.pcss +483 -187
- package/themes/octavius/cssVars/theme/fallbacks/index.scss +483 -187
- package/themes/octavius/cssVars/theme/fallbacks/index.styl +483 -187
- package/themes/octavius/cssVars/theme/index.js +2153 -747
- package/themes/octavius/cssVars/theme/index.json +2153 -747
- package/themes/octavius/index.css +481 -185
- package/themes/octavius/index.js +704 -215
- package/themes/octavius/index.json +704 -215
- package/themes/octavius/index.less +481 -185
- package/themes/octavius/index.pcss +481 -185
- package/themes/octavius/index.scss +481 -185
- package/themes/octavius/index.styl +481 -185
- package/themes/octaviusCompact/cssVars/declarations/index.css +487 -184
- package/themes/octaviusCompact/cssVars/declarations/noSizes.css +620 -0
- package/themes/octaviusCompact/cssVars/declarations/onlyColors.css +441 -174
- package/themes/octaviusCompact/cssVars/declarations/onlyColors.js +2 -2
- package/themes/octaviusCompact/cssVars/declarations/onlyMedia.css +10 -2
- package/themes/octaviusCompact/cssVars/declarations/onlyVariables.css +477 -182
- package/themes/octaviusCompact/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/octaviusCompact/cssVars/theme/fallbacks/index.css +479 -184
- package/themes/octaviusCompact/cssVars/theme/fallbacks/index.less +479 -184
- package/themes/octaviusCompact/cssVars/theme/fallbacks/index.pcss +479 -184
- package/themes/octaviusCompact/cssVars/theme/fallbacks/index.scss +479 -184
- package/themes/octaviusCompact/cssVars/theme/fallbacks/index.styl +479 -184
- package/themes/octaviusCompact/cssVars/theme/index.js +2145 -743
- package/themes/octaviusCompact/cssVars/theme/index.json +2145 -743
- package/themes/octaviusCompact/index.css +477 -182
- package/themes/octaviusCompact/index.js +700 -212
- package/themes/octaviusCompact/index.json +700 -212
- package/themes/octaviusCompact/index.less +477 -182
- package/themes/octaviusCompact/index.pcss +477 -182
- package/themes/octaviusCompact/index.scss +477 -182
- package/themes/octaviusCompact/index.styl +477 -182
- package/themes/octaviusCompactDark/cssVars/declarations/index.css +499 -196
- package/themes/octaviusCompactDark/cssVars/declarations/noSizes.css +620 -0
- package/themes/octaviusCompactDark/cssVars/declarations/onlyColors.css +453 -186
- package/themes/octaviusCompactDark/cssVars/declarations/onlyColors.js +2 -2
- package/themes/octaviusCompactDark/cssVars/declarations/onlyMedia.css +10 -2
- package/themes/octaviusCompactDark/cssVars/declarations/onlyVariables.css +489 -194
- package/themes/octaviusCompactDark/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/octaviusCompactDark/cssVars/theme/fallbacks/index.css +491 -196
- package/themes/octaviusCompactDark/cssVars/theme/fallbacks/index.less +491 -196
- package/themes/octaviusCompactDark/cssVars/theme/fallbacks/index.pcss +491 -196
- package/themes/octaviusCompactDark/cssVars/theme/fallbacks/index.scss +491 -196
- package/themes/octaviusCompactDark/cssVars/theme/fallbacks/index.styl +491 -196
- package/themes/octaviusCompactDark/cssVars/theme/index.js +2142 -740
- package/themes/octaviusCompactDark/cssVars/theme/index.json +2142 -740
- package/themes/octaviusCompactDark/index.css +489 -194
- package/themes/octaviusCompactDark/index.js +736 -248
- package/themes/octaviusCompactDark/index.json +736 -248
- package/themes/octaviusCompactDark/index.less +489 -194
- package/themes/octaviusCompactDark/index.pcss +489 -194
- package/themes/octaviusCompactDark/index.scss +489 -194
- package/themes/octaviusCompactDark/index.styl +489 -194
- package/themes/octaviusDark/cssVars/declarations/index.css +512 -204
- package/themes/octaviusDark/cssVars/declarations/noSizes.css +620 -0
- package/themes/octaviusDark/cssVars/declarations/onlyColors.css +453 -186
- package/themes/octaviusDark/cssVars/declarations/onlyColors.js +2 -2
- package/themes/octaviusDark/cssVars/declarations/onlyMedia.css +15 -3
- package/themes/octaviusDark/cssVars/declarations/onlyVariables.css +497 -201
- package/themes/octaviusDark/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/octaviusDark/cssVars/theme/fallbacks/index.css +499 -203
- package/themes/octaviusDark/cssVars/theme/fallbacks/index.less +499 -203
- package/themes/octaviusDark/cssVars/theme/fallbacks/index.pcss +499 -203
- package/themes/octaviusDark/cssVars/theme/fallbacks/index.scss +499 -203
- package/themes/octaviusDark/cssVars/theme/fallbacks/index.styl +499 -203
- package/themes/octaviusDark/cssVars/theme/index.js +2151 -745
- package/themes/octaviusDark/cssVars/theme/index.json +2151 -745
- package/themes/octaviusDark/index.css +497 -201
- package/themes/octaviusDark/index.js +740 -251
- package/themes/octaviusDark/index.json +740 -251
- package/themes/octaviusDark/index.less +497 -201
- package/themes/octaviusDark/index.pcss +497 -201
- package/themes/octaviusDark/index.scss +497 -201
- package/themes/octaviusDark/index.styl +497 -201
- package/themes/octaviusVK/cssVars/declarations/index.css +1505 -0
- package/themes/octaviusVK/cssVars/declarations/noSizes.css +620 -0
- package/themes/octaviusVK/cssVars/declarations/onlyAdaptiveGroups.css +123 -0
- package/themes/octaviusVK/cssVars/declarations/onlyColors.css +587 -0
- package/themes/octaviusVK/cssVars/declarations/onlyColors.d.ts +3 -0
- package/themes/octaviusVK/cssVars/declarations/onlyColors.js +11 -0
- package/themes/octaviusVK/cssVars/declarations/onlyMedia.css +282 -0
- package/themes/octaviusVK/cssVars/declarations/onlyVariables.css +850 -0
- package/themes/octaviusVK/cssVars/declarations/onlyVariables.d.ts +3 -0
- package/themes/octaviusVK/cssVars/declarations/onlyVariables.js +11 -0
- package/themes/octaviusVK/cssVars/theme/fallbacks/index.css +1099 -0
- package/themes/octaviusVK/cssVars/theme/fallbacks/index.less +911 -0
- package/themes/octaviusVK/cssVars/theme/fallbacks/index.pcss +904 -0
- package/themes/octaviusVK/cssVars/theme/fallbacks/index.scss +1076 -0
- package/themes/octaviusVK/cssVars/theme/fallbacks/index.styl +911 -0
- package/themes/octaviusVK/cssVars/theme/index.d.ts +4 -0
- package/themes/octaviusVK/cssVars/theme/index.js +4824 -0
- package/themes/octaviusVK/cssVars/theme/index.json +4821 -0
- package/themes/octaviusVK/index.css +1099 -0
- package/themes/octaviusVK/index.d.ts +4 -0
- package/themes/octaviusVK/index.js +1514 -0
- package/themes/octaviusVK/index.json +1511 -0
- package/themes/octaviusVK/index.less +911 -0
- package/themes/octaviusVK/index.pcss +904 -0
- package/themes/octaviusVK/index.scss +1076 -0
- package/themes/octaviusVK/index.styl +911 -0
- package/themes/octaviusVKDark/cssVars/declarations/index.css +1505 -0
- package/themes/octaviusVKDark/cssVars/declarations/noSizes.css +620 -0
- package/themes/octaviusVKDark/cssVars/declarations/onlyAdaptiveGroups.css +123 -0
- package/themes/octaviusVKDark/cssVars/declarations/onlyColors.css +587 -0
- package/themes/octaviusVKDark/cssVars/declarations/onlyColors.d.ts +3 -0
- package/themes/octaviusVKDark/cssVars/declarations/onlyColors.js +11 -0
- package/themes/octaviusVKDark/cssVars/declarations/onlyMedia.css +282 -0
- package/themes/octaviusVKDark/cssVars/declarations/onlyVariables.css +850 -0
- package/themes/octaviusVKDark/cssVars/declarations/onlyVariables.d.ts +3 -0
- package/themes/octaviusVKDark/cssVars/declarations/onlyVariables.js +11 -0
- package/themes/octaviusVKDark/cssVars/theme/fallbacks/index.css +1099 -0
- package/themes/octaviusVKDark/cssVars/theme/fallbacks/index.less +911 -0
- package/themes/octaviusVKDark/cssVars/theme/fallbacks/index.pcss +904 -0
- package/themes/octaviusVKDark/cssVars/theme/fallbacks/index.scss +1076 -0
- package/themes/octaviusVKDark/cssVars/theme/fallbacks/index.styl +911 -0
- package/themes/octaviusVKDark/cssVars/theme/index.d.ts +4 -0
- package/themes/octaviusVKDark/cssVars/theme/index.js +4824 -0
- package/themes/octaviusVKDark/cssVars/theme/index.json +4821 -0
- package/themes/octaviusVKDark/index.css +1099 -0
- package/themes/octaviusVKDark/index.d.ts +4 -0
- package/themes/octaviusVKDark/index.js +1514 -0
- package/themes/octaviusVKDark/index.json +1511 -0
- package/themes/octaviusVKDark/index.less +911 -0
- package/themes/octaviusVKDark/index.pcss +904 -0
- package/themes/octaviusVKDark/index.scss +1076 -0
- package/themes/octaviusVKDark/index.styl +911 -0
- package/themes/octaviusWhite/cssVars/declarations/index.css +1434 -0
- package/themes/octaviusWhite/cssVars/declarations/noSizes.css +620 -0
- package/themes/octaviusWhite/cssVars/declarations/onlyAdaptiveGroups.css +110 -0
- package/themes/octaviusWhite/cssVars/declarations/onlyColors.css +587 -0
- package/themes/octaviusWhite/cssVars/declarations/onlyColors.d.ts +3 -0
- package/themes/octaviusWhite/cssVars/declarations/onlyColors.js +11 -0
- package/themes/octaviusWhite/cssVars/declarations/onlyMedia.css +269 -0
- package/themes/octaviusWhite/cssVars/declarations/onlyVariables.css +837 -0
- package/themes/octaviusWhite/cssVars/declarations/onlyVariables.d.ts +3 -0
- package/themes/octaviusWhite/cssVars/declarations/onlyVariables.js +11 -0
- package/themes/octaviusWhite/cssVars/theme/fallbacks/index.css +1054 -0
- package/themes/octaviusWhite/cssVars/theme/fallbacks/index.less +895 -0
- package/themes/octaviusWhite/cssVars/theme/fallbacks/index.pcss +888 -0
- package/themes/octaviusWhite/cssVars/theme/fallbacks/index.scss +1041 -0
- package/themes/octaviusWhite/cssVars/theme/fallbacks/index.styl +895 -0
- package/themes/octaviusWhite/cssVars/theme/index.d.ts +4 -0
- package/themes/octaviusWhite/cssVars/theme/index.js +4720 -0
- package/themes/octaviusWhite/cssVars/theme/index.json +4717 -0
- package/themes/octaviusWhite/index.css +1054 -0
- package/themes/octaviusWhite/index.d.ts +4 -0
- package/themes/octaviusWhite/index.js +1501 -0
- package/themes/octaviusWhite/index.json +1498 -0
- package/themes/octaviusWhite/index.less +895 -0
- package/themes/octaviusWhite/index.pcss +888 -0
- package/themes/octaviusWhite/index.scss +1041 -0
- package/themes/octaviusWhite/index.styl +895 -0
- package/themes/otvet/cssVars/declarations/index.css +174 -240
- package/themes/otvet/cssVars/declarations/noSizes.css +268 -0
- package/themes/otvet/cssVars/declarations/onlyColors.css +156 -228
- package/themes/otvet/cssVars/declarations/onlyColors.js +2 -2
- package/themes/otvet/cssVars/declarations/onlyMedia.css +6 -4
- package/themes/otvet/cssVars/declarations/onlyVariables.css +168 -236
- package/themes/otvet/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/otvet/cssVars/theme/fallbacks/index.css +170 -238
- package/themes/otvet/cssVars/theme/fallbacks/index.less +170 -238
- package/themes/otvet/cssVars/theme/fallbacks/index.pcss +170 -238
- package/themes/otvet/cssVars/theme/fallbacks/index.scss +170 -238
- package/themes/otvet/cssVars/theme/fallbacks/index.styl +170 -238
- package/themes/otvet/cssVars/theme/index.js +576 -888
- package/themes/otvet/cssVars/theme/index.json +576 -888
- package/themes/otvet/index.css +168 -236
- package/themes/otvet/index.js +219 -332
- package/themes/otvet/index.json +219 -332
- package/themes/otvet/index.less +168 -236
- package/themes/otvet/index.pcss +168 -236
- package/themes/otvet/index.scss +168 -236
- package/themes/otvet/index.styl +168 -236
- package/themes/otvetDark/cssVars/declarations/index.css +186 -252
- package/themes/otvetDark/cssVars/declarations/noSizes.css +268 -0
- package/themes/otvetDark/cssVars/declarations/onlyColors.css +168 -240
- package/themes/otvetDark/cssVars/declarations/onlyColors.js +2 -2
- package/themes/otvetDark/cssVars/declarations/onlyMedia.css +6 -4
- package/themes/otvetDark/cssVars/declarations/onlyVariables.css +180 -248
- package/themes/otvetDark/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/otvetDark/cssVars/theme/fallbacks/index.css +182 -250
- package/themes/otvetDark/cssVars/theme/fallbacks/index.less +182 -250
- package/themes/otvetDark/cssVars/theme/fallbacks/index.pcss +182 -250
- package/themes/otvetDark/cssVars/theme/fallbacks/index.scss +182 -250
- package/themes/otvetDark/cssVars/theme/fallbacks/index.styl +182 -250
- package/themes/otvetDark/cssVars/theme/index.js +582 -894
- package/themes/otvetDark/cssVars/theme/index.json +582 -894
- package/themes/otvetDark/index.css +180 -248
- package/themes/otvetDark/index.js +249 -362
- package/themes/otvetDark/index.json +249 -362
- package/themes/otvetDark/index.less +180 -248
- package/themes/otvetDark/index.pcss +180 -248
- package/themes/otvetDark/index.scss +180 -248
- package/themes/otvetDark/index.styl +180 -248
- package/themes/paradigmBase/cssVars/declarations/index.css +619 -145
- package/themes/paradigmBase/cssVars/declarations/noSizes.css +268 -0
- package/themes/paradigmBase/cssVars/declarations/onlyAdaptiveGroups.css +18 -0
- package/themes/paradigmBase/cssVars/declarations/onlyColors.css +159 -129
- package/themes/paradigmBase/cssVars/declarations/onlyColors.js +2 -2
- package/themes/paradigmBase/cssVars/declarations/onlyMedia.css +263 -0
- package/themes/paradigmBase/cssVars/declarations/onlyVariables.css +278 -144
- package/themes/paradigmBase/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/paradigmBase/cssVars/theme/fallbacks/index.css +340 -146
- package/themes/paradigmBase/cssVars/theme/fallbacks/index.less +310 -146
- package/themes/paradigmBase/cssVars/theme/fallbacks/index.pcss +303 -147
- package/themes/paradigmBase/cssVars/theme/fallbacks/index.scss +365 -147
- package/themes/paradigmBase/cssVars/theme/fallbacks/index.styl +310 -146
- package/themes/paradigmBase/cssVars/theme/index.js +1471 -509
- package/themes/paradigmBase/cssVars/theme/index.json +1471 -509
- package/themes/paradigmBase/index.css +338 -144
- package/themes/paradigmBase/index.js +469 -180
- package/themes/paradigmBase/index.json +469 -180
- package/themes/paradigmBase/index.less +308 -144
- package/themes/paradigmBase/index.pcss +301 -145
- package/themes/paradigmBase/index.scss +363 -145
- package/themes/paradigmBase/index.styl +308 -144
- package/themes/paradigmBaseDark/cssVars/declarations/index.css +635 -161
- package/themes/paradigmBaseDark/cssVars/declarations/noSizes.css +268 -0
- package/themes/paradigmBaseDark/cssVars/declarations/onlyAdaptiveGroups.css +18 -0
- package/themes/paradigmBaseDark/cssVars/declarations/onlyColors.css +171 -141
- package/themes/paradigmBaseDark/cssVars/declarations/onlyColors.js +2 -2
- package/themes/paradigmBaseDark/cssVars/declarations/onlyMedia.css +263 -0
- package/themes/paradigmBaseDark/cssVars/declarations/onlyVariables.css +294 -160
- package/themes/paradigmBaseDark/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/paradigmBaseDark/cssVars/theme/fallbacks/index.css +356 -162
- package/themes/paradigmBaseDark/cssVars/theme/fallbacks/index.less +326 -162
- package/themes/paradigmBaseDark/cssVars/theme/fallbacks/index.pcss +319 -163
- package/themes/paradigmBaseDark/cssVars/theme/fallbacks/index.scss +381 -163
- package/themes/paradigmBaseDark/cssVars/theme/fallbacks/index.styl +326 -162
- package/themes/paradigmBaseDark/cssVars/theme/index.js +1471 -509
- package/themes/paradigmBaseDark/cssVars/theme/index.json +1471 -509
- package/themes/paradigmBaseDark/index.css +354 -160
- package/themes/paradigmBaseDark/index.js +502 -213
- package/themes/paradigmBaseDark/index.json +502 -213
- package/themes/paradigmBaseDark/index.less +324 -160
- package/themes/paradigmBaseDark/index.pcss +317 -161
- package/themes/paradigmBaseDark/index.scss +379 -161
- package/themes/paradigmBaseDark/index.styl +324 -160
- package/themes/pharma/cssVars/declarations/index.css +797 -2025
- package/themes/pharma/cssVars/declarations/noSizes.css +368 -0
- package/themes/pharma/cssVars/declarations/onlyAdaptiveGroups.css +89 -59
- package/themes/pharma/cssVars/declarations/onlyColors.css +177 -228
- package/themes/pharma/cssVars/declarations/onlyColors.js +2 -2
- package/themes/pharma/cssVars/declarations/onlyMedia.css +174 -882
- package/themes/pharma/cssVars/declarations/onlyVariables.css +308 -514
- package/themes/pharma/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/pharma/cssVars/theme/fallbacks/index.css +545 -1095
- package/themes/pharma/cssVars/theme/fallbacks/index.less +340 -599
- package/themes/pharma/cssVars/theme/fallbacks/index.pcss +340 -593
- package/themes/pharma/cssVars/theme/fallbacks/index.scss +488 -1557
- package/themes/pharma/cssVars/theme/fallbacks/index.styl +340 -599
- package/themes/pharma/cssVars/theme/index.js +1143 -1965
- package/themes/pharma/cssVars/theme/index.json +1143 -1965
- package/themes/pharma/index.css +526 -1076
- package/themes/pharma/index.js +440 -724
- package/themes/pharma/index.json +440 -724
- package/themes/pharma/index.less +322 -581
- package/themes/pharma/index.pcss +322 -575
- package/themes/pharma/index.scss +502 -1571
- package/themes/pharma/index.styl +322 -581
- package/themes/promo/cssVars/declarations/index.css +172 -238
- package/themes/promo/cssVars/declarations/noSizes.css +268 -0
- package/themes/promo/cssVars/declarations/onlyColors.css +156 -228
- package/themes/promo/cssVars/declarations/onlyColors.js +2 -2
- package/themes/promo/cssVars/declarations/onlyMedia.css +4 -2
- package/themes/promo/cssVars/declarations/onlyVariables.css +168 -236
- package/themes/promo/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/promo/cssVars/theme/fallbacks/index.css +170 -238
- package/themes/promo/cssVars/theme/fallbacks/index.less +170 -238
- package/themes/promo/cssVars/theme/fallbacks/index.pcss +170 -238
- package/themes/promo/cssVars/theme/fallbacks/index.scss +170 -238
- package/themes/promo/cssVars/theme/fallbacks/index.styl +170 -238
- package/themes/promo/cssVars/theme/index.js +576 -888
- package/themes/promo/cssVars/theme/index.json +576 -888
- package/themes/promo/index.css +168 -236
- package/themes/promo/index.js +217 -330
- package/themes/promo/index.json +217 -330
- package/themes/promo/index.less +168 -236
- package/themes/promo/index.pcss +168 -236
- package/themes/promo/index.scss +168 -236
- package/themes/promo/index.styl +168 -236
- package/themes/todo/cssVars/declarations/index.css +181 -242
- package/themes/todo/cssVars/declarations/noSizes.css +268 -0
- package/themes/todo/cssVars/declarations/onlyColors.css +156 -228
- package/themes/todo/cssVars/declarations/onlyColors.js +2 -2
- package/themes/todo/cssVars/declarations/onlyMedia.css +9 -3
- package/themes/todo/cssVars/declarations/onlyVariables.css +172 -239
- package/themes/todo/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/todo/cssVars/theme/fallbacks/index.css +174 -241
- package/themes/todo/cssVars/theme/fallbacks/index.less +174 -241
- package/themes/todo/cssVars/theme/fallbacks/index.pcss +174 -241
- package/themes/todo/cssVars/theme/fallbacks/index.scss +174 -241
- package/themes/todo/cssVars/theme/fallbacks/index.styl +174 -241
- package/themes/todo/cssVars/theme/index.js +583 -891
- package/themes/todo/cssVars/theme/index.json +583 -891
- package/themes/todo/index.css +172 -239
- package/themes/todo/index.js +223 -335
- package/themes/todo/index.json +223 -335
- package/themes/todo/index.less +172 -239
- package/themes/todo/index.pcss +172 -239
- package/themes/todo/index.scss +172 -239
- package/themes/todo/index.styl +172 -239
- package/themes/vkBase/cssVars/declarations/index.css +218 -160
- package/themes/vkBase/cssVars/declarations/noSizes.css +248 -0
- package/themes/vkBase/cssVars/declarations/onlyAdaptiveGroups.css +14 -5
- package/themes/vkBase/cssVars/declarations/onlyColors.css +141 -123
- package/themes/vkBase/cssVars/declarations/onlyColors.js +2 -2
- package/themes/vkBase/cssVars/declarations/onlyVariables.css +168 -138
- package/themes/vkBase/cssVars/declarations/onlyVariables.js +2 -2
- package/themes/vkBase/cssVars/theme/fallbacks/index.css +206 -156
- package/themes/vkBase/cssVars/theme/fallbacks/index.less +170 -140
- package/themes/vkBase/cssVars/theme/fallbacks/index.pcss +170 -140
- package/themes/vkBase/cssVars/theme/fallbacks/index.scss +189 -148
- package/themes/vkBase/cssVars/theme/fallbacks/index.styl +170 -140
- package/themes/vkBase/cssVars/theme/index.js +629 -465
- package/themes/vkBase/cssVars/theme/index.json +629 -465
- package/themes/vkBase/index.css +204 -154
- package/themes/vkBase/index.js +222 -181
- package/themes/vkBase/index.json +222 -181
- package/themes/vkBase/index.less +168 -138
- package/themes/vkBase/index.pcss +168 -138
- package/themes/vkBase/index.scss +187 -146
- package/themes/vkBase/index.styl +168 -138
- package/themes/vkBaseDark/cssVars/declarations/index.css +665 -0
- package/themes/vkBaseDark/cssVars/declarations/noSizes.css +248 -0
- package/themes/vkBaseDark/cssVars/declarations/onlyAdaptiveGroups.css +102 -0
- package/themes/vkBaseDark/cssVars/declarations/onlyColors.css +236 -0
- package/themes/vkBaseDark/cssVars/declarations/onlyColors.d.ts +3 -0
- package/themes/vkBaseDark/cssVars/declarations/onlyColors.js +11 -0
- package/themes/vkBaseDark/cssVars/declarations/onlyVariables.css +373 -0
- package/themes/vkBaseDark/cssVars/declarations/onlyVariables.d.ts +3 -0
- package/themes/vkBaseDark/cssVars/declarations/onlyVariables.js +11 -0
- package/themes/vkBaseDark/cssVars/theme/fallbacks/index.css +562 -0
- package/themes/vkBaseDark/cssVars/theme/fallbacks/index.less +405 -0
- package/themes/vkBaseDark/cssVars/theme/fallbacks/index.pcss +406 -0
- package/themes/vkBaseDark/cssVars/theme/fallbacks/index.scss +521 -0
- package/themes/vkBaseDark/cssVars/theme/fallbacks/index.styl +405 -0
- package/themes/vkBaseDark/cssVars/theme/index.d.ts +4 -0
- package/themes/vkBaseDark/cssVars/theme/index.js +2226 -0
- package/themes/vkBaseDark/cssVars/theme/index.json +2223 -0
- package/themes/vkBaseDark/index.css +562 -0
- package/themes/vkBaseDark/index.d.ts +4 -0
- package/themes/vkBaseDark/index.js +657 -0
- package/themes/vkBaseDark/index.json +654 -0
- package/themes/vkBaseDark/index.less +405 -0
- package/themes/vkBaseDark/index.pcss +406 -0
- package/themes/vkBaseDark/index.scss +521 -0
- package/themes/vkBaseDark/index.styl +405 -0
- package/themes/vkCom/cssVars/declarations/index.css +665 -0
- package/themes/vkCom/cssVars/declarations/noSizes.css +248 -0
- package/themes/vkCom/cssVars/declarations/onlyAdaptiveGroups.css +102 -0
- package/themes/vkCom/cssVars/declarations/onlyColors.css +236 -0
- package/themes/vkCom/cssVars/declarations/onlyColors.d.ts +3 -0
- package/themes/vkCom/cssVars/declarations/onlyColors.js +11 -0
- package/themes/vkCom/cssVars/declarations/onlyVariables.css +373 -0
- package/themes/vkCom/cssVars/declarations/onlyVariables.d.ts +3 -0
- package/themes/vkCom/cssVars/declarations/onlyVariables.js +11 -0
- package/themes/vkCom/cssVars/theme/fallbacks/index.css +562 -0
- package/themes/vkCom/cssVars/theme/fallbacks/index.less +405 -0
- package/themes/vkCom/cssVars/theme/fallbacks/index.pcss +406 -0
- package/themes/vkCom/cssVars/theme/fallbacks/index.scss +521 -0
- package/themes/vkCom/cssVars/theme/fallbacks/index.styl +405 -0
- package/themes/vkCom/cssVars/theme/index.d.ts +4 -0
- package/themes/vkCom/cssVars/theme/index.js +2226 -0
- package/themes/vkCom/cssVars/theme/index.json +2223 -0
- package/themes/vkCom/index.css +562 -0
- package/themes/vkCom/index.d.ts +4 -0
- package/themes/vkCom/index.js +657 -0
- package/themes/vkCom/index.json +654 -0
- package/themes/vkCom/index.less +405 -0
- package/themes/vkCom/index.pcss +406 -0
- package/themes/vkCom/index.scss +521 -0
- package/themes/vkCom/index.styl +405 -0
- package/themes/vkIOS/cssVars/declarations/index.css +665 -0
- package/themes/vkIOS/cssVars/declarations/noSizes.css +248 -0
- package/themes/vkIOS/cssVars/declarations/onlyAdaptiveGroups.css +102 -0
- package/themes/vkIOS/cssVars/declarations/onlyColors.css +236 -0
- package/themes/vkIOS/cssVars/declarations/onlyColors.d.ts +3 -0
- package/themes/vkIOS/cssVars/declarations/onlyColors.js +11 -0
- package/themes/vkIOS/cssVars/declarations/onlyVariables.css +373 -0
- package/themes/vkIOS/cssVars/declarations/onlyVariables.d.ts +3 -0
- package/themes/vkIOS/cssVars/declarations/onlyVariables.js +11 -0
- package/themes/vkIOS/cssVars/theme/fallbacks/index.css +562 -0
- package/themes/vkIOS/cssVars/theme/fallbacks/index.less +405 -0
- package/themes/vkIOS/cssVars/theme/fallbacks/index.pcss +406 -0
- package/themes/vkIOS/cssVars/theme/fallbacks/index.scss +521 -0
- package/themes/vkIOS/cssVars/theme/fallbacks/index.styl +405 -0
- package/themes/vkIOS/cssVars/theme/index.d.ts +4 -0
- package/themes/vkIOS/cssVars/theme/index.js +2226 -0
- package/themes/vkIOS/cssVars/theme/index.json +2223 -0
- package/themes/vkIOS/index.css +562 -0
- package/themes/vkIOS/index.d.ts +4 -0
- package/themes/vkIOS/index.js +657 -0
- package/themes/vkIOS/index.json +654 -0
- package/themes/vkIOS/index.less +405 -0
- package/themes/vkIOS/index.pcss +406 -0
- package/themes/vkIOS/index.scss +521 -0
- package/themes/vkIOS/index.styl +405 -0
- package/utils/common/colors/socialColors.d.ts +11 -0
- package/utils/common/colors/socialColors.js +12 -0
- package/utils/common/index.d.ts +2 -1
- package/utils/common/index.js +3 -1
package/build/compilers/index.js
CHANGED
|
@@ -72,11 +72,13 @@ function writeCssVarsSourceFile(themePath, theme, cssWarsTheme) {
|
|
|
72
72
|
{ mode: 'onlyVariables', fileName: 'onlyVariables.css' },
|
|
73
73
|
{ mode: 'onlyColors', fileName: 'onlyColors.css' },
|
|
74
74
|
{ mode: 'onlyAdaptiveGroups', fileName: 'onlyAdaptiveGroups.css' },
|
|
75
|
+
{ mode: 'noSizes', fileName: 'noSizes.css' },
|
|
75
76
|
].forEach(function (_a) {
|
|
77
|
+
var _b;
|
|
76
78
|
var mode = _a.mode, fileName = _a.fileName;
|
|
77
79
|
var filePath = path_1.default.resolve(themePath, fileName);
|
|
78
80
|
var content = mode === 'default'
|
|
79
|
-
? compileStyles_1.compileStyles('css', theme, 'withAdaptiveGroups') + "\n\n" + compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration(cssWarsTheme)
|
|
81
|
+
? compileStyles_1.compileStyles('css', theme, 'withAdaptiveGroups') + "\n\n" + ((_b = compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration(cssWarsTheme)) !== null && _b !== void 0 ? _b : '')
|
|
80
82
|
: compileStyles_1.compileStyles('css', theme, mode);
|
|
81
83
|
fs_extra_1.default.writeFileSync(filePath, content);
|
|
82
84
|
console.log("\u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0437\u0430\u043F\u0438\u0441\u0430\u043B\u0438 \u0444\u0430\u0439\u043B " + fileName);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import 'css.escape';
|
|
1
2
|
import { PixelifyTheme } from '../../../interfaces/general';
|
|
2
3
|
import { Formats } from './helpers/tokenProcessors';
|
|
3
4
|
export declare const serviceKeys: string[];
|
|
4
|
-
export declare type CompileStylesMode = 'default' | 'onlyVariables' | 'onlyColors' | 'withAdaptiveGroups' | 'onlyAdaptiveGroups';
|
|
5
|
+
export declare type CompileStylesMode = 'default' | 'onlyVariables' | 'onlyColors' | 'withAdaptiveGroups' | 'onlyAdaptiveGroups' | 'noSizes';
|
|
5
6
|
/**
|
|
6
7
|
* Компиллирует строку со стилями (в разных форматах), на основе темы
|
|
7
8
|
*/
|
|
@@ -5,12 +5,14 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.compileStyles = exports.serviceKeys = void 0;
|
|
8
|
+
require("css.escape");
|
|
8
9
|
var common_tags_1 = require("common-tags");
|
|
10
|
+
var getAllButSizes_1 = require("../../helpers/getAllButSizes");
|
|
9
11
|
var getOnlyColors_1 = require("../../helpers/getOnlyColors");
|
|
10
12
|
var unCamelcasify_1 = require("../../helpers/unCamelcasify");
|
|
11
13
|
var tokenProcessors_1 = require("./helpers/tokenProcessors");
|
|
12
14
|
var tokenRecognition_1 = require("./helpers/tokenRecognition");
|
|
13
|
-
exports.serviceKeys = ['breakpoints', 'prefix', '
|
|
15
|
+
exports.serviceKeys = ['breakpoints', 'prefix', 'themeType'];
|
|
14
16
|
/**
|
|
15
17
|
* Компиллирует строку со стилями (в разных форматах), на основе темы
|
|
16
18
|
*/
|
|
@@ -30,8 +32,13 @@ var compileStyles = function (format, theme, mode) {
|
|
|
30
32
|
var result = '';
|
|
31
33
|
var variables = '';
|
|
32
34
|
var groupTokens = '';
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
switch (mode) {
|
|
36
|
+
case 'onlyColors':
|
|
37
|
+
theme = getOnlyColors_1.getOnlyColors(theme);
|
|
38
|
+
break;
|
|
39
|
+
case 'noSizes':
|
|
40
|
+
theme = getAllButSizes_1.getAllButSizes(theme, theme.themeNameBase);
|
|
41
|
+
break;
|
|
35
42
|
}
|
|
36
43
|
Object.keys(theme).forEach(function (key) {
|
|
37
44
|
// пропускаем служебные ключи
|
|
@@ -39,6 +46,11 @@ var compileStyles = function (format, theme, mode) {
|
|
|
39
46
|
return;
|
|
40
47
|
}
|
|
41
48
|
var token = theme[key];
|
|
49
|
+
// если переменная — строка (например, имя темы)
|
|
50
|
+
if (tokenRecognition_1.isString(token, key)) {
|
|
51
|
+
variables += getVariableStatement(getDeclaration(key, prefix), "'" + CSS.escape(token) + "'");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
42
54
|
// если переменная — цвет
|
|
43
55
|
if (tokenRecognition_1.isColor(token)) {
|
|
44
56
|
Object.keys(token).forEach(function (colorState) {
|
|
@@ -160,6 +160,48 @@ var testData = [
|
|
|
160
160
|
styl: common_tags_1.stripIndent(templateObject_40 || (templateObject_40 = __makeTemplateObject(["\n\t\t\tfont-text--regular() {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tline-height: 20px;\n\t\t\t\tfont-family: Arial;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\t\t\tfont-text--compact() {\n\t\t\t\tfont-size: 16px;\n\t\t\t\tline-height: 24px;\n\t\t\t\tfont-family: Arial;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\t\t\t"], ["\n\t\t\tfont-text--regular() {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tline-height: 20px;\n\t\t\t\tfont-family: Arial;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\t\t\tfont-text--compact() {\n\t\t\t\tfont-size: 16px;\n\t\t\t\tline-height: 24px;\n\t\t\t\tfont-family: Arial;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\t\t\t"]))),
|
|
161
161
|
},
|
|
162
162
|
},
|
|
163
|
+
{
|
|
164
|
+
name: 'should compile onlyColors',
|
|
165
|
+
mode: 'onlyColors',
|
|
166
|
+
descriptionTheme: {
|
|
167
|
+
sizeBasePadding: {
|
|
168
|
+
regular: 20,
|
|
169
|
+
},
|
|
170
|
+
colorBackground: {
|
|
171
|
+
normal: '#FFF',
|
|
172
|
+
hover: '#AAA',
|
|
173
|
+
active: '#CCC',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
result: {
|
|
177
|
+
css: common_tags_1.stripIndent(templateObject_41 || (templateObject_41 = __makeTemplateObject(["\n\t\t\t\t:root {\n\t\t\t\t\t--vkui--color_background: #FFF;\n\t\t\t\t\t--vkui--color_background--hover: #AAA;\n\t\t\t\t\t--vkui--color_background--active: #CCC;\n\t\t\t\t}\n\t\t\t"], ["\n\t\t\t\t:root {\n\t\t\t\t\t--vkui--color_background: #FFF;\n\t\t\t\t\t--vkui--color_background--hover: #AAA;\n\t\t\t\t\t--vkui--color_background--active: #CCC;\n\t\t\t\t}\n\t\t\t"]))),
|
|
178
|
+
scss: common_tags_1.stripIndent(templateObject_42 || (templateObject_42 = __makeTemplateObject(["\n\t\t\t\t$color-background: #FFF;\n\t\t\t\t$color-background--hover: #AAA;\n\t\t\t\t$color-background--active: #CCC;\n\t\t\t"], ["\n\t\t\t\t$color-background: #FFF;\n\t\t\t\t$color-background--hover: #AAA;\n\t\t\t\t$color-background--active: #CCC;\n\t\t\t"]))),
|
|
179
|
+
pcss: common_tags_1.stripIndent(templateObject_43 || (templateObject_43 = __makeTemplateObject(["\n\t\t\t\t:root {\n\t\t\t\t\t--color-background: #FFF;\n\t\t\t\t\t--color-background--hover: #AAA;\n\t\t\t\t\t--color-background--active: #CCC;\n\t\t\t\t}"], ["\n\t\t\t\t:root {\n\t\t\t\t\t--color-background: #FFF;\n\t\t\t\t\t--color-background--hover: #AAA;\n\t\t\t\t\t--color-background--active: #CCC;\n\t\t\t\t}"]))),
|
|
180
|
+
less: common_tags_1.stripIndent(templateObject_44 || (templateObject_44 = __makeTemplateObject(["\n\t\t\t\t@color-background: #FFF;\n\t\t\t\t@color-background--hover: #AAA;\n\t\t\t\t@color-background--active: #CCC;\n\t\t\t"], ["\n\t\t\t\t@color-background: #FFF;\n\t\t\t\t@color-background--hover: #AAA;\n\t\t\t\t@color-background--active: #CCC;\n\t\t\t"]))),
|
|
181
|
+
styl: common_tags_1.stripIndent(templateObject_45 || (templateObject_45 = __makeTemplateObject(["\n\t\t\t\t$color-background = #FFF;\n\t\t\t\t$color-background--hover = #AAA;\n\t\t\t\t$color-background--active = #CCC;\n\t\t\t"], ["\n\t\t\t\t$color-background = #FFF;\n\t\t\t\t$color-background--hover = #AAA;\n\t\t\t\t$color-background--active = #CCC;\n\t\t\t"]))),
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'should compile noSizes',
|
|
186
|
+
mode: 'noSizes',
|
|
187
|
+
descriptionTheme: {
|
|
188
|
+
sizeBasePadding: {
|
|
189
|
+
regular: 20,
|
|
190
|
+
},
|
|
191
|
+
colorBackground: {
|
|
192
|
+
normal: '#FFF',
|
|
193
|
+
hover: '#AAA',
|
|
194
|
+
active: '#CCC',
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
result: {
|
|
198
|
+
css: common_tags_1.stripIndent(templateObject_46 || (templateObject_46 = __makeTemplateObject(["\n\t\t\t\t:root {\n\t\t\t\t\t--vkui--color_background: #FFF;\n\t\t\t\t\t--vkui--color_background--hover: #AAA;\n\t\t\t\t\t--vkui--color_background--active: #CCC;\n\t\t\t\t}\n\t\t\t"], ["\n\t\t\t\t:root {\n\t\t\t\t\t--vkui--color_background: #FFF;\n\t\t\t\t\t--vkui--color_background--hover: #AAA;\n\t\t\t\t\t--vkui--color_background--active: #CCC;\n\t\t\t\t}\n\t\t\t"]))),
|
|
199
|
+
scss: common_tags_1.stripIndent(templateObject_47 || (templateObject_47 = __makeTemplateObject(["\n\t\t\t\t$color-background: #FFF;\n\t\t\t\t$color-background--hover: #AAA;\n\t\t\t\t$color-background--active: #CCC;\n\t\t\t"], ["\n\t\t\t\t$color-background: #FFF;\n\t\t\t\t$color-background--hover: #AAA;\n\t\t\t\t$color-background--active: #CCC;\n\t\t\t"]))),
|
|
200
|
+
pcss: common_tags_1.stripIndent(templateObject_48 || (templateObject_48 = __makeTemplateObject(["\n\t\t\t\t:root {\n\t\t\t\t\t--color-background: #FFF;\n\t\t\t\t\t--color-background--hover: #AAA;\n\t\t\t\t\t--color-background--active: #CCC;\n\t\t\t\t}"], ["\n\t\t\t\t:root {\n\t\t\t\t\t--color-background: #FFF;\n\t\t\t\t\t--color-background--hover: #AAA;\n\t\t\t\t\t--color-background--active: #CCC;\n\t\t\t\t}"]))),
|
|
201
|
+
less: common_tags_1.stripIndent(templateObject_49 || (templateObject_49 = __makeTemplateObject(["\n\t\t\t\t@color-background: #FFF;\n\t\t\t\t@color-background--hover: #AAA;\n\t\t\t\t@color-background--active: #CCC;\n\t\t\t"], ["\n\t\t\t\t@color-background: #FFF;\n\t\t\t\t@color-background--hover: #AAA;\n\t\t\t\t@color-background--active: #CCC;\n\t\t\t"]))),
|
|
202
|
+
styl: common_tags_1.stripIndent(templateObject_50 || (templateObject_50 = __makeTemplateObject(["\n\t\t\t\t$color-background = #FFF;\n\t\t\t\t$color-background--hover = #AAA;\n\t\t\t\t$color-background--active = #CCC;\n\t\t\t"], ["\n\t\t\t\t$color-background = #FFF;\n\t\t\t\t$color-background--hover = #AAA;\n\t\t\t\t$color-background--active = #CCC;\n\t\t\t"]))),
|
|
203
|
+
},
|
|
204
|
+
},
|
|
163
205
|
];
|
|
164
206
|
describe('compileStyles', function () {
|
|
165
207
|
Object.values(tokenProcessors_1.EStyleTypes).forEach(function (format) {
|
|
@@ -173,4 +215,4 @@ describe('compileStyles', function () {
|
|
|
173
215
|
});
|
|
174
216
|
});
|
|
175
217
|
});
|
|
176
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40;
|
|
218
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40, templateObject_41, templateObject_42, templateObject_43, templateObject_44, templateObject_45, templateObject_46, templateObject_47, templateObject_48, templateObject_49, templateObject_50;
|
|
@@ -2,6 +2,7 @@ import { ColorWithStates } from '../../../../interfaces/general/colors';
|
|
|
2
2
|
import { Adaptive } from '../../../../interfaces/general/tools';
|
|
3
3
|
import { CustomMediaByViewportUnion } from '../../../../interfaces/general/tools/customMedia';
|
|
4
4
|
import { ViewportsTuple } from '../../../../interfaces/general/tools/viewports';
|
|
5
|
+
export declare function isString(token: any, key: string): token is string;
|
|
5
6
|
export declare function isColor(token: any): token is ColorWithStates;
|
|
6
7
|
export declare function isGroupToken(token: any): token is Record<string, any>;
|
|
7
8
|
export declare function isAdaptiveFlatToken(token: any): token is Adaptive<any>;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isCustomMediaToken = exports.isAdaptiveFlatToken = exports.isGroupToken = exports.isColor = void 0;
|
|
3
|
+
exports.isCustomMediaToken = exports.isAdaptiveFlatToken = exports.isGroupToken = exports.isColor = exports.isString = void 0;
|
|
4
4
|
var customMedia_1 = require("../../../themeProcessors/customMedia/customMedia");
|
|
5
|
+
var stringKeys = ['themeName', 'themeNameBase'];
|
|
6
|
+
function isString(token, key) {
|
|
7
|
+
return typeof token === 'string' && stringKeys.includes(key);
|
|
8
|
+
}
|
|
9
|
+
exports.isString = isString;
|
|
5
10
|
function isColor(token) {
|
|
6
11
|
if (typeof token !== 'object') {
|
|
7
12
|
return false;
|
|
@@ -102,9 +102,9 @@ describe('expandTheme', function () {
|
|
|
102
102
|
value: 'var(--vkui--colors_scheme, light)',
|
|
103
103
|
},
|
|
104
104
|
someNewRandomToken: {
|
|
105
|
-
name: '--vkui--
|
|
105
|
+
name: '--vkui--some_new_random_token',
|
|
106
106
|
originalValue: '3',
|
|
107
|
-
value: 'var(--vkui--
|
|
107
|
+
value: 'var(--vkui--some_new_random_token, 3)',
|
|
108
108
|
},
|
|
109
109
|
themeType: 'cssVarsWide',
|
|
110
110
|
});
|
|
@@ -137,8 +137,8 @@ describe('expandTheme', function () {
|
|
|
137
137
|
value: 'var(--vkui--colors_scheme, light)',
|
|
138
138
|
},
|
|
139
139
|
someNewRandomToken: {
|
|
140
|
-
name: '--vkui--
|
|
141
|
-
value: 'var(--vkui--
|
|
140
|
+
name: '--vkui--some_new_random_token',
|
|
141
|
+
value: 'var(--vkui--some_new_random_token, 3)',
|
|
142
142
|
},
|
|
143
143
|
themeType: 'cssVars',
|
|
144
144
|
});
|
|
@@ -6,7 +6,7 @@ exports.convertCamelToSnake = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
function convertCamelToSnake(str) {
|
|
8
8
|
return str
|
|
9
|
-
.replace(/
|
|
9
|
+
.replace(/([A-Z])/g, function (letter) { return "_" + letter.toLowerCase(); })
|
|
10
10
|
.replace(/^_/, '');
|
|
11
11
|
}
|
|
12
12
|
exports.convertCamelToSnake = convertCamelToSnake;
|
|
@@ -17,4 +17,7 @@ describe('convertCamelToSnake', function () {
|
|
|
17
17
|
it('should convert many words string', function () {
|
|
18
18
|
expect(convertCamelToSnake_1.convertCamelToSnake('helloWorldMyFriend')).toBe('hello_world_my_friend');
|
|
19
19
|
});
|
|
20
|
+
it('should convert special case 1', function () {
|
|
21
|
+
expect(convertCamelToSnake_1.convertCamelToSnake('octaviusShadowLetterList')).toBe('octavius_shadow_letter_list');
|
|
22
|
+
});
|
|
20
23
|
});
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { ColorDescription, ColorDescriptionCallable, ColorDescriptionStatic, ColorWithStates } from '../../interfaces/general/colors';
|
|
2
|
+
export declare function isColorWithStates(value: unknown): value is ColorWithStates;
|
|
3
|
+
export declare function isColorDescriptionCallable(value: unknown): value is ColorDescriptionCallable<any>;
|
|
4
|
+
export declare function isColorDescriptionStatic(value: unknown): value is ColorDescriptionStatic;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* use toneOpacity
|
|
8
|
+
* TODO: remove
|
|
9
|
+
*/
|
|
10
|
+
export declare function getRGBA(color: ColorDescription, opacity: number): ColorDescription;
|
|
11
|
+
export declare function toneOpacity(color: string, opacity: number): string;
|
|
12
|
+
export declare function toneOpacity(color: ColorDescription, opacity: number): ColorDescription;
|
|
@@ -1,13 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRGBA = void 0;
|
|
3
|
+
exports.toneOpacity = exports.getRGBA = exports.isColorDescriptionStatic = exports.isColorDescriptionCallable = exports.isColorWithStates = void 0;
|
|
4
4
|
var hexToRgb = function (hex) {
|
|
5
5
|
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
6
6
|
return result
|
|
7
7
|
? parseInt(result[1], 16) + ", " + parseInt(result[2], 16) + ", " + parseInt(result[3], 16)
|
|
8
8
|
: '';
|
|
9
9
|
};
|
|
10
|
+
function isColorWithStates(value) {
|
|
11
|
+
return (value &&
|
|
12
|
+
typeof value === 'object' &&
|
|
13
|
+
typeof value['normal'] === 'string' &&
|
|
14
|
+
typeof value['hover'] === 'string' &&
|
|
15
|
+
typeof value['active'] === 'string');
|
|
16
|
+
}
|
|
17
|
+
exports.isColorWithStates = isColorWithStates;
|
|
18
|
+
function isColorDescriptionCallable(value) {
|
|
19
|
+
return typeof value === 'function';
|
|
20
|
+
}
|
|
21
|
+
exports.isColorDescriptionCallable = isColorDescriptionCallable;
|
|
22
|
+
function isColorDescriptionStatic(value) {
|
|
23
|
+
return typeof value === 'string' || isColorWithStates(value);
|
|
24
|
+
}
|
|
25
|
+
exports.isColorDescriptionStatic = isColorDescriptionStatic;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated
|
|
28
|
+
* use toneOpacity
|
|
29
|
+
* TODO: remove
|
|
30
|
+
*/
|
|
10
31
|
function getRGBA(color, opacity) {
|
|
11
|
-
|
|
32
|
+
if (isColorDescriptionStatic(color)) {
|
|
33
|
+
if (isColorWithStates(color)) {
|
|
34
|
+
return "rgba(" + hexToRgb(color.normal) + ", " + opacity + ")";
|
|
35
|
+
}
|
|
36
|
+
return "rgba(" + hexToRgb(color) + ", " + opacity + ")";
|
|
37
|
+
}
|
|
38
|
+
return function (theme) {
|
|
39
|
+
return getRGBA(color(theme), opacity);
|
|
40
|
+
};
|
|
12
41
|
}
|
|
13
42
|
exports.getRGBA = getRGBA;
|
|
43
|
+
function toneOpacity(color, opacity) {
|
|
44
|
+
return getRGBA(color, opacity);
|
|
45
|
+
}
|
|
46
|
+
exports.toneOpacity = toneOpacity;
|
|
@@ -10,4 +10,16 @@ describe('cssHelpers', function () {
|
|
|
10
10
|
expect(cssHelpers_1.getRGBA('#ffff00', 0.2)).toBe('rgba(255, 255, 0, 0.2)');
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
|
+
describe('toneOpacity', function () {
|
|
14
|
+
it('should work with string', function () {
|
|
15
|
+
expect(cssHelpers_1.toneOpacity('#f00000', 0.5)).toBe('rgba(240, 0, 0, 0.5)');
|
|
16
|
+
});
|
|
17
|
+
it('should work with ColorWithStates', function () {
|
|
18
|
+
expect(cssHelpers_1.toneOpacity({
|
|
19
|
+
normal: '#f00000',
|
|
20
|
+
hover: '#f00000',
|
|
21
|
+
active: '#f00000',
|
|
22
|
+
}, 0.5)).toBe('rgba(240, 0, 0, 0.5)');
|
|
23
|
+
});
|
|
24
|
+
});
|
|
13
25
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getAllButSizes(theme: Record<string, any>, themeNameBase?: unknown): any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAllButSizes = void 0;
|
|
4
|
+
var regexSize = /^(size|font|x\d+)/i;
|
|
5
|
+
function getAllButSizes(theme, themeNameBase) {
|
|
6
|
+
return Object.keys(theme).reduce(function (acc, key) {
|
|
7
|
+
var value = theme[key];
|
|
8
|
+
var lookupKey = typeof themeNameBase === 'string' && key.startsWith(themeNameBase)
|
|
9
|
+
? key.slice(themeNameBase.length)
|
|
10
|
+
: key;
|
|
11
|
+
if (!regexSize.test(lookupKey)) {
|
|
12
|
+
acc[key] = value;
|
|
13
|
+
}
|
|
14
|
+
return acc;
|
|
15
|
+
}, {});
|
|
16
|
+
}
|
|
17
|
+
exports.getAllButSizes = getAllButSizes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var getAllButSizes_1 = require("./getAllButSizes");
|
|
4
|
+
describe('getAllButSizes', function () {
|
|
5
|
+
it('should filter out tokens that start with "size", "font" or are a size helper', function () {
|
|
6
|
+
expect(getAllButSizes_1.getAllButSizes({
|
|
7
|
+
colorBackground: '#FFF',
|
|
8
|
+
sizePaddingBase: 20,
|
|
9
|
+
fontText: {
|
|
10
|
+
fontFamily: 'Comic Sans',
|
|
11
|
+
},
|
|
12
|
+
x10: 5,
|
|
13
|
+
xxxTokenXxx: '8',
|
|
14
|
+
octaviusColorBackground: '#ACA',
|
|
15
|
+
octaviusSizePaddingBase: 8,
|
|
16
|
+
}, 'octavius')).toEqual({
|
|
17
|
+
colorBackground: '#FFF',
|
|
18
|
+
xxxTokenXxx: '8',
|
|
19
|
+
octaviusColorBackground: '#ACA',
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var getOnlyColors_1 = require("./getOnlyColors");
|
|
4
|
+
describe('getOnlyColors', function () {
|
|
5
|
+
it('should filter out tokens that do not look like a color', function () {
|
|
6
|
+
expect(getOnlyColors_1.getOnlyColors({
|
|
7
|
+
colorBackground: {
|
|
8
|
+
normal: '#FFF',
|
|
9
|
+
},
|
|
10
|
+
sizePaddingBase: 20,
|
|
11
|
+
})).toEqual({
|
|
12
|
+
colorBackground: {
|
|
13
|
+
normal: '#FFF',
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { ColorsDescription, ColorsFinal } from '../../../interfaces/general';
|
|
2
|
-
import { ColorDescription, ColorsDescriptionStruct } from '../../../interfaces/general/colors';
|
|
2
|
+
import { ColorDescription, ColorsDescriptionStruct, ColorWithStates } from '../../../interfaces/general/colors';
|
|
3
3
|
export declare const colorStateMap: {
|
|
4
4
|
readonly light: "#00103D";
|
|
5
5
|
readonly dark: "#FFFFFF";
|
|
6
6
|
};
|
|
7
|
+
export declare function expandColor<T extends {
|
|
8
|
+
[key in keyof T]: ColorDescription;
|
|
9
|
+
} = ColorsDescriptionStruct>(color: ColorDescription<T>, theme: Partial<ColorsDescription<T>>): ColorWithStates;
|
|
7
10
|
/**
|
|
8
11
|
* Процессор, который формирует из описания темы (ThemeDescription)
|
|
9
12
|
* цвета со всеми состояниями active, hover и normal
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getExpandedThemeColors = exports.colorStateMap = void 0;
|
|
3
|
+
exports.getExpandedThemeColors = exports.expandColor = exports.colorStateMap = void 0;
|
|
4
|
+
var cssHelpers_1 = require("../../helpers/cssHelpers");
|
|
4
5
|
var mixColors_1 = require("./mixColors");
|
|
5
6
|
exports.colorStateMap = {
|
|
6
7
|
light: '#00103D',
|
|
@@ -17,6 +18,27 @@ var getColorWithStates = function (_a) {
|
|
|
17
18
|
active: mixColors_1.mixColors(colorArg, colorState, toneValueActive),
|
|
18
19
|
});
|
|
19
20
|
};
|
|
21
|
+
function expandCallableColor(color, theme) {
|
|
22
|
+
if (!cssHelpers_1.isColorDescriptionCallable(color)) {
|
|
23
|
+
return color;
|
|
24
|
+
}
|
|
25
|
+
// TODO: Придумать, как избавиться от any
|
|
26
|
+
return expandCallableColor(color(theme), theme);
|
|
27
|
+
}
|
|
28
|
+
function expandColor(color, theme) {
|
|
29
|
+
color = expandCallableColor(color, theme);
|
|
30
|
+
if (cssHelpers_1.isColorWithStates(color)) {
|
|
31
|
+
return color;
|
|
32
|
+
}
|
|
33
|
+
var colorState = exports.colorStateMap[theme.colorsScheme];
|
|
34
|
+
return getColorWithStates({
|
|
35
|
+
colorArg: color,
|
|
36
|
+
colorState: colorState,
|
|
37
|
+
toneValueHover: toneValueHover,
|
|
38
|
+
toneValueActive: toneValueActive,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
exports.expandColor = expandColor;
|
|
20
42
|
/**
|
|
21
43
|
* Процессор, который формирует из описания темы (ThemeDescription)
|
|
22
44
|
* цвета со всеми состояниями active, hover и normal
|
|
@@ -28,24 +50,12 @@ function getExpandedThemeColors(colorsDescription) {
|
|
|
28
50
|
if (!colorsScheme || !colors) {
|
|
29
51
|
return null;
|
|
30
52
|
}
|
|
31
|
-
var colorState = exports.colorStateMap[colorsScheme];
|
|
32
|
-
var colorWithStates = function (colorArg) {
|
|
33
|
-
if (typeof colorArg === 'object' && 'active' in colorArg) {
|
|
34
|
-
return colorArg;
|
|
35
|
-
}
|
|
36
|
-
return getColorWithStates({
|
|
37
|
-
colorArg: colorArg,
|
|
38
|
-
colorState: colorState,
|
|
39
|
-
toneValueHover: toneValueHover,
|
|
40
|
-
toneValueActive: toneValueActive,
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
53
|
var theme = {
|
|
44
54
|
colorsScheme: colorsScheme,
|
|
45
55
|
};
|
|
46
56
|
Object.entries(colors).forEach(function (_a) {
|
|
47
57
|
var key = _a[0], colorValue = _a[1];
|
|
48
|
-
theme[key] =
|
|
58
|
+
theme[key] = expandColor(colorValue, colorsDescription);
|
|
49
59
|
});
|
|
50
60
|
return theme;
|
|
51
61
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ColorDescription, ColorDescriptionCallable, ColorsDescriptionStruct } from '../../../interfaces/general/colors';
|
|
2
|
+
export declare function overlayColors<T extends {
|
|
3
|
+
[key in keyof T]: ColorDescription;
|
|
4
|
+
} = ColorsDescriptionStruct>(background: ColorDescription<T>, foreground: ColorDescription<T>, state?: 'normal' | 'hover' | 'active' | 'auto'): ColorDescriptionCallable<T>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.overlayColors = void 0;
|
|
7
|
+
var color_1 = __importDefault(require("color"));
|
|
8
|
+
var expandColors_1 = require("./expandColors");
|
|
9
|
+
var mixColors_1 = require("./mixColors");
|
|
10
|
+
function overlayColors(background, foreground, state) {
|
|
11
|
+
if (state === void 0) { state = 'normal'; }
|
|
12
|
+
return function (theme) {
|
|
13
|
+
var bgColor = expandColors_1.expandColor(background, theme);
|
|
14
|
+
var fgColor = expandColors_1.expandColor(foreground, theme);
|
|
15
|
+
var fgColorParsed = {
|
|
16
|
+
normal: color_1.default(fgColor.normal),
|
|
17
|
+
hover: color_1.default(fgColor.hover),
|
|
18
|
+
active: color_1.default(fgColor.active),
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
normal: mixColors_1.mixColors(bgColor[state === 'auto' ? 'normal' : state], fgColorParsed.normal.rgb().string(), fgColorParsed.normal.alpha()),
|
|
22
|
+
hover: mixColors_1.mixColors(bgColor[state === 'auto' ? 'hover' : state], fgColorParsed.hover.rgb().string(), fgColorParsed.hover.alpha()),
|
|
23
|
+
active: mixColors_1.mixColors(bgColor[state === 'auto' ? 'active' : state], fgColorParsed.active.rgb().string(), fgColorParsed.active.alpha()),
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.overlayColors = overlayColors;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var overlayColors_1 = require("./overlayColors");
|
|
4
|
+
describe('overlayColors', function () {
|
|
5
|
+
test('overlay transparent on opaque in light color scheme', function () {
|
|
6
|
+
expect(overlayColors_1.overlayColors('rgb(0,0,0)', 'rgba(255,255,255,.5)')({ colorsScheme: 'light' })).toEqual({
|
|
7
|
+
normal: '#404040',
|
|
8
|
+
hover: '#4D4D4D',
|
|
9
|
+
active: '#5C5C5C',
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
test('overlay transparent on opaque in dark color scheme', function () {
|
|
13
|
+
expect(overlayColors_1.overlayColors('rgb(0,0,0)', 'rgba(255,255,255,.5)')({ colorsScheme: 'dark' })).toEqual({
|
|
14
|
+
normal: '#404040',
|
|
15
|
+
hover: '#4D4D4D',
|
|
16
|
+
active: '#5C5C5C',
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
test('overlay opaque on opaque', function () {
|
|
20
|
+
expect(overlayColors_1.overlayColors('rgb(0,0,0)', 'rgb(255,255,255)')({ colorsScheme: 'light' })).toEqual({
|
|
21
|
+
normal: '#FFFFFF',
|
|
22
|
+
hover: '#F5F5F7',
|
|
23
|
+
active: '#EBECEF',
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
test('overlay transparent custom states on opaque', function () {
|
|
27
|
+
expect(overlayColors_1.overlayColors('rgb(0,0,0)', {
|
|
28
|
+
normal: 'rgba(255,255,255,.5)',
|
|
29
|
+
hover: 'rgba(255,255,255,.5)',
|
|
30
|
+
active: 'rgba(255,255,255,.5)',
|
|
31
|
+
})({ colorsScheme: 'light' })).toEqual({
|
|
32
|
+
normal: '#404040',
|
|
33
|
+
hover: '#404040',
|
|
34
|
+
active: '#404040',
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.pixelifyValues = void 0;
|
|
4
|
-
var numericCSSProperties =
|
|
4
|
+
var numericCSSProperties = /^(breakpoints$|fontWeight)/i;
|
|
5
5
|
/**
|
|
6
6
|
* Процессор, который превращает численные значения переменных в строковые
|
|
7
7
|
* пример fontSize: 14 -> fontSize: "14px"
|
|
@@ -10,7 +10,7 @@ function pixelifyValues(sourceTheme) {
|
|
|
10
10
|
var theme = JSON.parse(JSON.stringify(sourceTheme));
|
|
11
11
|
Object.entries(theme).forEach(function (_a) {
|
|
12
12
|
var key = _a[0], value = _a[1];
|
|
13
|
-
if (numericCSSProperties.
|
|
13
|
+
if (numericCSSProperties.test(key)) {
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
16
|
if (key === 'themeType') {
|
|
@@ -77,5 +77,10 @@ describe('pixelifyValues', function () {
|
|
|
77
77
|
};
|
|
78
78
|
expect(pixelifyValues_1.pixelifyValues(theme)).toStrictEqual(pixelifyTheme);
|
|
79
79
|
});
|
|
80
|
+
it('should correctly pixelify custom fontWeight tokens', function () {
|
|
81
|
+
expect(pixelifyValues_1.pixelifyValues({ fontWeightAccent1: 700 })).toEqual({
|
|
82
|
+
fontWeightAccent1: 700,
|
|
83
|
+
});
|
|
84
|
+
});
|
|
80
85
|
});
|
|
81
86
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
|
+
import { ColorsDescription, ColorsScheme } from '..';
|
|
2
3
|
/**
|
|
3
4
|
* Интерфейс всех цветов на выходе
|
|
4
5
|
*/
|
|
@@ -7,7 +8,13 @@ export interface ColorWithStates {
|
|
|
7
8
|
hover: Property.Color;
|
|
8
9
|
active: Property.Color;
|
|
9
10
|
}
|
|
10
|
-
export declare type
|
|
11
|
+
export declare type ColorDescriptionStatic = Property.Color | ColorWithStates;
|
|
12
|
+
export declare type ColorDescriptionCallable<T extends {
|
|
13
|
+
[key in keyof T]: ColorDescription;
|
|
14
|
+
} = ColorsDescriptionStruct> = (theme: Partial<ColorsScheme & ColorsDescription<T>>) => ColorDescription;
|
|
15
|
+
export declare type ColorDescription<T extends {
|
|
16
|
+
[key in keyof T]: ColorDescription;
|
|
17
|
+
} = ColorsDescriptionStruct> = ColorDescriptionStatic | ColorDescriptionCallable<T>;
|
|
11
18
|
/**
|
|
12
19
|
* В описании цветов достаточно указать просто строку
|
|
13
20
|
* (тогда состояния сгенерируются при сборке)
|
|
@@ -15,20 +22,22 @@ export declare type ColorDescription = Property.Color | ColorWithStates;
|
|
|
15
22
|
*/
|
|
16
23
|
export interface ColorsDescriptionStruct {
|
|
17
24
|
colorBackgroundAccent: ColorDescription;
|
|
25
|
+
colorBackgroundAccentThemed: ColorDescription;
|
|
26
|
+
colorBackgroundAccentAlternative: ColorDescription;
|
|
18
27
|
colorIconAccent: ColorDescription;
|
|
19
28
|
colorTextAccent: ColorDescription;
|
|
29
|
+
colorTextAccentThemed: ColorDescription;
|
|
20
30
|
colorStrokeAccent: ColorDescription;
|
|
31
|
+
colorStrokeAccentThemed: ColorDescription;
|
|
32
|
+
colorStrokeContrast: ColorDescription;
|
|
21
33
|
colorActionSheetText: ColorDescription;
|
|
22
34
|
colorBackgroundContent: ColorDescription;
|
|
23
35
|
colorBackgroundSecondary: ColorDescription;
|
|
36
|
+
colorBackgroundSecondaryAlpha: ColorDescription;
|
|
24
37
|
colorBackgroundTertiary: ColorDescription;
|
|
25
38
|
colorBackground: ColorDescription;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
colorCounterProminentBackground: ColorDescription;
|
|
29
|
-
colorCounterProminentText: ColorDescription;
|
|
30
|
-
colorCounterMutedBackground: ColorDescription;
|
|
31
|
-
colorCounterMutedText: ColorDescription;
|
|
39
|
+
colorBackgroundContrast: ColorDescription;
|
|
40
|
+
colorBackgroundContrastSecondaryAlpha: ColorDescription;
|
|
32
41
|
colorBackgroundWarning: ColorDescription;
|
|
33
42
|
colorBackgroundNegative: ColorDescription;
|
|
34
43
|
colorIconNegative: ColorDescription;
|
|
@@ -37,30 +46,31 @@ export interface ColorsDescriptionStruct {
|
|
|
37
46
|
colorHeaderBackground: ColorDescription;
|
|
38
47
|
colorPanelHeaderIcon: ColorDescription;
|
|
39
48
|
colorIconPrimary: ColorDescription;
|
|
49
|
+
colorIconPrimaryInvariably: ColorDescription;
|
|
40
50
|
colorIconMedium: ColorDescription;
|
|
41
51
|
colorIconMediumAlpha: ColorDescription;
|
|
42
52
|
colorIconSecondary: ColorDescription;
|
|
43
53
|
colorIconSecondaryAlpha: ColorDescription;
|
|
44
54
|
colorIconTertiary: ColorDescription;
|
|
45
55
|
colorIconTertiaryAlpha: ColorDescription;
|
|
46
|
-
|
|
56
|
+
colorImageBorderAlpha: ColorDescription;
|
|
47
57
|
colorWriteBarInputBackground: ColorDescription;
|
|
48
|
-
|
|
49
|
-
colorTextLinkAlternate: ColorDescription;
|
|
58
|
+
colorWriteBarInputBorderAlpha: ColorDescription;
|
|
50
59
|
colorTrackBackground: ColorDescription;
|
|
51
60
|
colorTrackBuffer: ColorDescription;
|
|
52
61
|
colorBackgroundModal: ColorDescription;
|
|
53
62
|
colorImagePlaceholder: ColorDescription;
|
|
54
|
-
|
|
63
|
+
colorImagePlaceholderAlpha: ColorDescription;
|
|
55
64
|
colorSearchFieldBackground: ColorDescription;
|
|
56
|
-
|
|
57
|
-
colorCheckboxBorder: ColorDescription;
|
|
65
|
+
colorFieldBorderAlpha: ColorDescription;
|
|
58
66
|
colorSeparatorPrimaryAlpha: ColorDescription;
|
|
59
67
|
colorSeparatorSecondary: ColorDescription;
|
|
60
68
|
colorSeparatorPrimary: ColorDescription;
|
|
61
69
|
colorTextLink: ColorDescription;
|
|
70
|
+
colorTextLinkThemed: ColorDescription;
|
|
62
71
|
colorTextMuted: ColorDescription;
|
|
63
72
|
colorTextPrimary: ColorDescription;
|
|
73
|
+
colorTextPrimaryInvariably: ColorDescription;
|
|
64
74
|
colorTextSecondary: ColorDescription;
|
|
65
75
|
colorTextSubhead: ColorDescription;
|
|
66
76
|
colorTextTertiary: ColorDescription;
|
|
@@ -77,7 +87,9 @@ export interface ColorsDescriptionStruct {
|
|
|
77
87
|
colorAccentSecondary: ColorDescription;
|
|
78
88
|
colorTextLinkVisited: ColorDescription;
|
|
79
89
|
colorTextContrast: ColorDescription;
|
|
90
|
+
colorTextContrastThemed: ColorDescription;
|
|
80
91
|
colorIconContrast: ColorDescription;
|
|
92
|
+
colorIconContrastThemed: ColorDescription;
|
|
81
93
|
colorLinkContrast: ColorDescription;
|
|
82
94
|
colorBackgroundPositive: ColorDescription;
|
|
83
95
|
colorIconPositive: ColorDescription;
|
|
@@ -86,6 +98,7 @@ export interface ColorsDescriptionStruct {
|
|
|
86
98
|
colorAvatarOverlay: ColorDescription;
|
|
87
99
|
colorOverlayPrimary: ColorDescription;
|
|
88
100
|
colorTransparent: ColorDescription;
|
|
101
|
+
colorBackgroundNegativeTint: ColorDescription;
|
|
89
102
|
}
|
|
90
103
|
export declare type Colors = {
|
|
91
104
|
[key in keyof ColorsDescriptionStruct]: ColorWithStates;
|