Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.39.1 #599

Merged
merged 22 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
16f17f1
build(deps-dev): bump @vkontakte/vkjs from 0.32.2 to 1.1.0
dependabot[bot] Jun 22, 2023
a6c1887
Merge branch 'master' into dependabot/npm_and_yarn/vkontakte/vkjs-1.1.0
8coon Sep 12, 2023
003afc0
dependabot/npm_and_yarn/vkontakte/vkjs-1.1.0: update yarn lock
8coon Sep 12, 2023
ada4311
build(deps-dev): bump @vkontakte/vkui from 5.8.0 to 5.8.1
dependabot[bot] Sep 13, 2023
3a35a17
build(deps-dev): bump @types/react-dom from 18.2.1 to 18.2.7
dependabot[bot] Sep 13, 2023
c1f091a
build(deps-dev): bump babel-jest from 29.6.2 to 29.7.0
dependabot[bot] Sep 13, 2023
734e8d3
feat(vkontakteAndroid): add letterSpacing
SevereCloud Sep 13, 2023
2423047
fix/coverage-perms: add coverage permissions
8coon Sep 14, 2023
2af7953
fix/coverage-perms: update perms
8coon Sep 14, 2023
bebd258
fix/coverage-perms: fix perms
8coon Sep 14, 2023
3a923aa
Merge pull request #598 from VKCOM/fix/coverage-perms
8coon Sep 14, 2023
23d3a30
Merge pull request #593 from VKCOM/dependabot/npm_and_yarn/vkontakte/…
8coon Sep 14, 2023
39d9fa0
Merge branch '4.39.1' into dependabot/npm_and_yarn/babel-jest-29.7.0
8coon Sep 14, 2023
1ac89e9
Merge pull request #595 from VKCOM/dependabot/npm_and_yarn/babel-jest…
8coon Sep 14, 2023
6594966
Merge branch '4.39.1' into dependabot/npm_and_yarn/vkontakte/vkjs-1.1.0
8coon Sep 14, 2023
779de5c
Merge pull request #594 from VKCOM/dependabot/npm_and_yarn/types/reac…
8coon Sep 14, 2023
f5dec30
Merge pull request #596 from VKCOM/SevereCloud/feat/vkontakteAndroid/…
8coon Sep 14, 2023
2737b35
dependabot/npm_and_yarn/vkontakte/vkjs-1.1.0: fix lock
8coon Sep 14, 2023
d859d89
Merge pull request #537 from VKCOM/dependabot/npm_and_yarn/vkontakte/…
8coon Sep 14, 2023
3f8fb21
4.39.1: fix lock
8coon Sep 14, 2023
3475ffd
4.39.1: fix overflow in docs
8coon Sep 14, 2023
761b57c
4.39.1
8coon Sep 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
branches:
- master

permissions: write-all

jobs:
coverage:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

.tokens-content-item > div {
overflow: auto;
overflow: visible;
}

.tokens-content-header > div:nth-child(1),
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vkontakte/vkui-tokens",
"version": "4.39.0",
"version": "4.39.1",
"description": "Репозиторий, который содержит в себе дизайн-токены и другие инструменты объединенной дизайн-системы VKUI и Paradigm",
"license": "MIT",
"main": "utils/descriptions.js",
Expand Down Expand Up @@ -48,18 +48,19 @@
"@types/color": "3.0.3",
"@types/common-tags": "1.8.1",
"@types/fs-extra": "11.0.1",
"@types/lodash": "4.14.198",
"@types/node": "18.11.10",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.1",
"@types/react-dom": "18.2.7",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"@vkontakte/appearance": "https://github.com/VKCOM/Appearance#v10.1.4",
"@vkontakte/icons": "2.54.0",
"@vkontakte/prettier-config": "0.1.0",
"@vkontakte/vk-bridge": "2.11.1",
"@vkontakte/vkjs": "0.32.2",
"@vkontakte/vkui": "5.8.0",
"babel-jest": "29.6.2",
"@vkontakte/vkjs": "1.1.0",
"@vkontakte/vkui": "5.8.1",
"babel-jest": "29.7.0",
"babel-loader": "9.1.2",
"clean-webpack-plugin": "4.0.0",
"clsx": "1.2.1",
Expand Down
320 changes: 320 additions & 0 deletions src/build/__snapshots__/snapthots.test.ts.snap

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/interfaces/general/tools/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ export type StringifyObject<Base> = {
? StringifyObject<Base[Key]>
: Base[Key];
};

/**
* Как Partial, но уходящий вглубь.
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export type DeepPartial<T> = T extends object
? {
[P in keyof T]?: DeepPartial<T[P]>;
}
: T;
28 changes: 21 additions & 7 deletions src/themeDescriptions/base/vk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { alias } from '@/build/helpers/tokenHelpers';
import { ColorsDescription, ThemeDescription } from '@/interfaces/general';
import { Elevation } from '@/interfaces/general/elevation';
import { Gradients } from '@/interfaces/general/gradients';
import { Adaptive } from '@/interfaces/general/tools';
import { Fonts, TypographyBaseProps } from '@/interfaces/general/typography';
import figma from '@/themeDescriptions/base/figma/vk.json';

const fontFamilyFallbacks = '-apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif';
Expand Down Expand Up @@ -250,12 +252,15 @@ export const darkElevation: Elevation = {
elevation4: '0px 0px 8px rgba(0, 0, 0, 0.12), 0px 16px 16px rgba(0, 0, 0, 0.16)',
};

export const lightTheme: ThemeDescription = {
themeName: 'vkBase',
themeNameBase: 'vkBase',
...lightColors,
...lightGradient,
...lightElevation,
type BaseFonts = Omit<
{
[key in keyof Fonts]: Adaptive<Fonts[key]>;
},
'fontHeadline'
> &
TypographyBaseProps;

export const fonts: BaseFonts = {
// Типографика
fontFamilyFallbacks,
fontFamilyAccent,
Expand Down Expand Up @@ -290,7 +295,6 @@ export const lightTheme: ThemeDescription = {
fontWeight: fontWeightAccent1,
},
},
fontHeadline: alias('fontHeadline1'),
fontHeadline1: {
regular: {
fontSize: 16,
Expand Down Expand Up @@ -415,6 +419,16 @@ export const lightTheme: ThemeDescription = {
textTransform: 'uppercase',
},
},
};

export const lightTheme: ThemeDescription = {
themeName: 'vkBase',
themeNameBase: 'vkBase',
...lightColors,
...lightGradient,
...lightElevation,
...fonts,
fontHeadline: alias('fontHeadline1'),

// Размеры
sizeSelectIconPadding: {
Expand Down
77 changes: 76 additions & 1 deletion src/themeDescriptions/themes/vkontakteAndroid/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import lodash from 'lodash';

import { DeepPartial } from '@/interfaces/general/tools/utils';
import type {
LocalVkontakteAndroidColorsDescriptionStruct,
ThemeVkontakteAndroidDescription,
VkontakteAndroidGradients,
} from '@/interfaces/themes/vkontakteAndroid';
import type { ThemeVkontakteAndroidDarkDescription } from '@/interfaces/themes/vkontakteAndroidDark';

import { darkTheme as vkDarkTheme, lightTheme as vkLightTheme } from '../../base/vk';
import { darkTheme as vkDarkTheme, fonts, lightTheme as vkLightTheme } from '../../base/vk';

const themeNameBase = 'vkontakteAndroid';

Expand Down Expand Up @@ -228,6 +231,76 @@ const gradients: VkontakteAndroidGradients = {
vkontakteGradientWomensDay: '#FF99CC, #E52E6A',
};

const androidFonts: typeof fonts = lodash.merge<typeof fonts, DeepPartial<typeof fonts>>(
lodash.cloneDeep(fonts),
{
fontHeadline1: {
regular: {
letterSpacing: '0.15px',
},
compact: {
letterSpacing: '0.15px',
},
},
fontText: {
regular: {
letterSpacing: '0.15px',
},
compact: {
letterSpacing: '0.15px',
},
},
fontSubhead: {
regular: {
letterSpacing: '0.15px',
},
compact: {
letterSpacing: '0.15px',
},
},
fontFootnote: {
regular: {
letterSpacing: '0.2px',
},
},
fontFootnoteCaps: {
regular: {
letterSpacing: '0.2px',
},
},
fontCaption1: {
regular: {
letterSpacing: '0.3px',
},
},
fontCaption1Caps: {
regular: {
letterSpacing: '0.3px',
},
},
fontCaption2: {
regular: {
letterSpacing: '0.3px',
},
},
fontCaption2Caps: {
regular: {
letterSpacing: '0.3px',
},
},
fontCaption3: {
regular: {
letterSpacing: '0.3px',
},
},
fontCaption3Caps: {
regular: {
letterSpacing: '0.3px',
},
},
},
);

export const vkontakteTokens = {
...gradients,
};
Expand All @@ -243,6 +316,7 @@ export const vkontakteAndroidTheme: ThemeVkontakteAndroidDescription = {
...vkontakteLocalColorLight,
},
...vkontakteTokens,
...androidFonts,
};

export const vkontakteAndroidThemeDark: ThemeVkontakteAndroidDarkDescription = {
Expand All @@ -257,4 +331,5 @@ export const vkontakteAndroidThemeDark: ThemeVkontakteAndroidDarkDescription = {
...vkontakteLocalColorDark,
},
...vkontakteTokens,
...androidFonts,
};
Loading
Loading