Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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,068 changes: 1,480 additions & 588 deletions package-lock.json

Large diffs are not rendered by default.

25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
},
"dependencies": {
"@bem-react/classname": "^1.6.0",
"@gravity-ui/components": "^2.4.0",
"@gravity-ui/i18n": "^1.0.0",
"@gravity-ui/components": "^2.5.1",
"@gravity-ui/i18n": "^1.1.0",
"lodash": "^4.17.21",
"react-helmet": "^6.1.0",
"react-player": "^2.9.0",
Expand All @@ -74,7 +74,8 @@
"typograf": "^6.14.0",
"ua-parser-js": "^0.7.28",
"url": "^0.11.0",
"url-join": "^5.0.0"
"url-join": "^5.0.0",
"utility-types": "^3.10.0"
},
"peerDependencies": {
"@doc-tools/transform": "^3.3.2",
Expand All @@ -87,18 +88,20 @@
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@commitlint/config-conventional": "^17.4.3",
"@doc-tools/transform": "^3.3.2",
"@gravity-ui/eslint-config": "^2.0.0",
"@gravity-ui/page-constructor": "^4.26.0",
"@gravity-ui/prettier-config": "^1.0.1",
"@gravity-ui/stylelint-config": "^1.0.0",
"@doc-tools/transform": "^3.11.0",
"@gravity-ui/eslint-config": "^3.1.1",
"@gravity-ui/page-constructor": "^4.28.0",
"@gravity-ui/prettier-config": "^1.1.0",
"@gravity-ui/stylelint-config": "^4.0.1",
"@gravity-ui/tsconfig": "^1.0.0",
"@gravity-ui/uikit": "^5.12.0",
"@gravity-ui/uikit": "^5.17.0",
"@jest/environment": "^29.7.0",
"@storybook/addon-essentials": "^7.0.27",
"@storybook/cli": "^7.0.27",
"@storybook/preset-scss": "^1.0.3",
"@storybook/react": "^7.0.27",
"@storybook/react-webpack5": "^7.0.27",
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
Expand Down Expand Up @@ -128,14 +131,14 @@
"lint-staged": "^11.2.6",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.14",
"prettier": "2.4.1",
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^3.0.2",
"sass": "^1.54.4",
"sass-loader": "^13.3.1",
"storybook": "^7.0.27",
"stylelint": "^14.11.0",
"stylelint": "^15.11.0",
"ts-jest": "^29.0.5",
"typescript": "^4.9.3"
},
Expand Down
1 change: 1 addition & 0 deletions src/blocks/Author/Author.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ $block: '.#{$namespace}author';
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
align-content: flex-start;
position: relative;
}
Expand Down
1 change: 1 addition & 0 deletions src/blocks/CTA/CTA.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $block: '.#{$namespace}cta';
border-radius: var(--bc-border-radius);
min-height: 80px;
align-content: center;
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
justify-content: center;
flex-direction: column;
flex-grow: 1;
Expand Down
23 changes: 11 additions & 12 deletions src/components/FeedHeader/components/Controls/customRenders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@ type RenderSwitcherType = ({
export const renderSwitcher: RenderSwitcherType =
({initial, list, defaultLabel}) =>
// eslint-disable-next-line react/display-name
({onClick, ref, onKeyDown, open}) =>
(
<CustomSwitcher
initial={initial}
defaultLabel={defaultLabel}
list={list}
controlRef={ref}
onClick={onClick}
onKeyDown={onKeyDown}
open={open}
/>
);
({onClick, ref, onKeyDown, open}) => (
<CustomSwitcher
initial={initial}
defaultLabel={defaultLabel}
list={list}
controlRef={ref}
onClick={onClick}
onKeyDown={onKeyDown}
open={open}
/>
);

export const renderFilter: SelectProps['renderFilter'] = ({value, ref, onChange, onKeyDown}) => (
<TextInput
Expand Down
11 changes: 7 additions & 4 deletions src/data/sanitizeMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ export const sanitizeMeta = (metaData: PostMetaProps) => {
// this func for resolve type conflicts in reduce method
const stringObjectKeys = <K extends string, V>(obj: Record<K, V>) => Object.keys(obj) as K[];

const sanitizedOrganization = stringObjectKeys(organization).reduce((acc, current) => {
acc[current] = sanitizeHtml(organization[current]);
const sanitizedOrganization = stringObjectKeys(organization).reduce(
(acc, current) => {
acc[current] = sanitizeHtml(organization[current]);

return acc;
}, {} as PostMetaProps['organization']);
return acc;
},
{} as PostMetaProps['organization'],
);

return {
...metaData,
Expand Down
42 changes: 28 additions & 14 deletions styles/fonts.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@font-face {
font-family: 'YS Display';
src: url('https://yastatic.net/s3/home/fonts/ys/1/display-thin.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/display-thin.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/display-thin.woff') format('woff');
font-weight: 100;
font-style: normal;
Expand All @@ -9,7 +10,8 @@

@font-face {
font-family: 'YS Display';
src: url('https://yastatic.net/s3/home/fonts/ys/1/display-light.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/display-light.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/display-light.woff') format('woff');
font-weight: 300;
font-style: normal;
Expand All @@ -18,7 +20,8 @@

@font-face {
font-family: 'YS Display';
src: url('https://yastatic.net/s3/home/fonts/ys/1/display-regular.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/display-regular.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/display-regular.woff') format('woff');
font-weight: 400;
font-style: normal;
Expand All @@ -27,7 +30,8 @@

@font-face {
font-family: 'YS Display';
src: url('https://yastatic.net/s3/home/fonts/ys/1/display-medium.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/display-medium.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/display-medium.woff') format('woff');
font-weight: 500;
font-style: normal;
Expand All @@ -36,7 +40,8 @@

@font-face {
font-family: 'YS Display';
src: url('https://yastatic.net/s3/home/fonts/ys/1/display-bold.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/display-bold.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/display-bold.woff') format('woff');
font-weight: 700;
font-style: normal;
Expand All @@ -45,7 +50,8 @@

@font-face {
font-family: 'YS Display';
src: url('https://yastatic.net/s3/home/fonts/ys/1/display-heavy.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/display-heavy.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/display-heavy.woff') format('woff');
font-weight: 900;
font-style: normal;
Expand All @@ -54,7 +60,8 @@

@font-face {
font-family: 'YS Text';
src: url('https://yastatic.net/s3/home/fonts/ys/1/text-light.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/text-light.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/text-light.woff') format('woff');
font-weight: 300;
font-style: normal;
Expand All @@ -63,7 +70,8 @@

@font-face {
font-family: 'YS Text';
src: url('https://yastatic.net/s3/home/fonts/ys/1/text-light-italic.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/text-light-italic.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/text-light-italic.woff') format('woff');
font-weight: 300;
font-style: italic;
Expand All @@ -72,7 +80,8 @@

@font-face {
font-family: 'YS Text';
src: url('https://yastatic.net/s3/home/fonts/ys/1/text-regular.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/text-regular.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/text-regular.woff') format('woff');
font-weight: 400;
font-style: normal;
Expand All @@ -81,7 +90,8 @@

@font-face {
font-family: 'YS Text';
src: url('https://yastatic.net/s3/home/fonts/ys/1/text-regular-italic.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/text-regular-italic.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/text-regular-italic.woff') format('woff');
font-weight: 400;
font-style: italic;
Expand All @@ -90,7 +100,8 @@

@font-face {
font-family: 'YS Text';
src: url('https://yastatic.net/s3/home/fonts/ys/1/text-medium.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/text-medium.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/text-medium.woff') format('woff');
font-weight: 500;
font-style: normal;
Expand All @@ -99,7 +110,8 @@

@font-face {
font-family: 'YS Text';
src: url('https://yastatic.net/s3/home/fonts/ys/1/text-medium-italic.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/text-medium-italic.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/text-medium-italic.woff') format('woff');
font-weight: 500;
font-style: italic;
Expand All @@ -108,7 +120,8 @@

@font-face {
font-family: 'YS Text';
src: url('https://yastatic.net/s3/home/fonts/ys/1/text-bold.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/text-bold.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/text-bold.woff') format('woff');
font-weight: 700;
font-style: normal;
Expand All @@ -117,7 +130,8 @@

@font-face {
font-family: 'YS Text';
src: url('https://yastatic.net/s3/home/fonts/ys/1/text-bold-italic.woff2') format('woff2'),
src:
url('https://yastatic.net/s3/home/fonts/ys/1/text-bold-italic.woff2') format('woff2'),
url('https://yastatic.net/s3/home/fonts/ys/1/text-bold-italic.woff') format('woff');
font-weight: 700;
font-style: italic;
Expand Down
2 changes: 1 addition & 1 deletion test-utils/custom-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const matchMedia = (query: string) =>
matches: false,
addListener: function () {},
removeListener: function () {},
} as unknown as MediaQueryList);
}) as unknown as MediaQueryList;

class CustomEnvironment extends JsDomEnvironmetn {
constructor(config: JestEnvironmentConfig, context: EnvironmentContext) {
Expand Down