From 4c6dd9658803f6bd7a897d95bd2ffdc6101c6d21 Mon Sep 17 00:00:00 2001 From: Kyzyl-ool Kezhik Date: Wed, 18 Oct 2023 12:35:15 +0200 Subject: [PATCH] feat: added focus styles for interactive elements (#576) * feat: adding focus styles for interactive elements --- package-lock.json | 16 +++++----- package.json | 4 +-- src/blocks/ContentLayout/ContentLayout.scss | 6 ++++ src/blocks/ContentLayout/ContentLayout.tsx | 2 +- src/blocks/Icons/Icons.scss | 4 +++ .../QuestionBlockItem/QuestionBlockItem.scss | 13 ++++++++ src/blocks/Slider/Arrow/Arrow.scss | 2 ++ src/blocks/Slider/Slider.tsx | 26 +++++++++------ src/blocks/Slider/__tests__/Slider.test.tsx | 31 ++++-------------- src/components/Button/Button.scss | 9 ++++++ src/components/ButtonTabs/ButtonTabs.scss | 3 ++ src/components/ButtonTabs/ButtonTabs.tsx | 2 +- src/components/CardBase/CardBase.tsx | 17 ++++++---- src/components/Control/Control.scss | 3 +- src/components/FileLink/FileLink.scss | 2 ++ .../FullscreenImage/FullscreenImage.scss | 11 ++++++- .../FullscreenImage/FullscreenImage.tsx | 17 +++------- .../FullscreenMedia/FullscreenMedia.scss | 6 ++++ .../FullscreenMedia/FullscreenMedia.tsx | 18 ++++++++--- src/components/Link/Link.scss | 2 ++ src/components/Media/Image/Image.tsx | 10 +++--- .../OverflowScroller/OverflowScroller.scss | 5 +++ .../OverflowScroller/OverflowScroller.tsx | 7 ++-- src/components/OverflowScroller/i18n/en.json | 4 +++ src/components/OverflowScroller/i18n/index.ts | 8 +++++ src/components/OverflowScroller/i18n/ru.json | 4 +++ .../ReactPlayer/CustomBarControls.scss | 15 ++------- src/components/ReactPlayer/ReactPlayer.scss | 1 + src/components/ReactPlayer/ReactPlayer.tsx | 1 + src/components/Title/TitleItem.scss | 2 ++ src/components/VideoBlock/VideoBlock.scss | 1 + src/sub-blocks/BannerCard/BannerCard.scss | 2 ++ src/sub-blocks/Content/Content.scss | 2 ++ src/sub-blocks/HubspotForm/HubspotForm.scss | 32 ++++++++++++++++--- .../PriceDetails/PriceDetails.scss | 7 +++- .../PriceDetails/PriceDetails.tsx | 6 ++-- styles/mixins.scss | 20 ++++++++++++ styles/root.scss | 6 ++++ styles/yfm.scss | 2 ++ 39 files changed, 231 insertions(+), 98 deletions(-) create mode 100644 src/components/OverflowScroller/i18n/en.json create mode 100644 src/components/OverflowScroller/i18n/index.ts create mode 100644 src/components/OverflowScroller/i18n/ru.json diff --git a/package-lock.json b/package-lock.json index 59da863a0..07c6f133e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "@gravity-ui/prettier-config": "^1.0.1", "@gravity-ui/stylelint-config": "^1.0.0", "@gravity-ui/tsconfig": "^1.0.0", - "@gravity-ui/uikit": "^5.9.1", + "@gravity-ui/uikit": "^5.12.2", "@storybook/addon-actions": "^7.1.0", "@storybook/addon-essentials": "^7.1.0", "@storybook/addon-knobs": "^7.0.2", @@ -116,7 +116,7 @@ }, "peerDependencies": { "@doc-tools/transform": "^3.3.2", - "@gravity-ui/uikit": "^5.4.1", + "@gravity-ui/uikit": "^5.12.0", "react": "^16.0.0 || ^17.0.0 || ^18.0.0" } }, @@ -4405,9 +4405,9 @@ "dev": true }, "node_modules/@gravity-ui/uikit": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@gravity-ui/uikit/-/uikit-5.9.1.tgz", - "integrity": "sha512-Zyf0xDlkYze4/oSljsjEtB3opWQzjuj+lM2QYEaIIE2wJHkt+07t7yUy2t+VqPKUtOZ81VJKi47MYB+tPqOAQQ==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@gravity-ui/uikit/-/uikit-5.17.0.tgz", + "integrity": "sha512-Q59Rq4AV4J9j6TKX7GayvcNE68kcxqTHPUgbETLUC2IIwhGGrm2TvJtzifY9RkJrFIJ1xNs6MiRAsjKPm73dfA==", "dev": true, "dependencies": { "@bem-react/classname": "^1.6.0", @@ -24002,9 +24002,9 @@ } }, "node_modules/react-spring": { - "version": "9.7.2", - "resolved": "https://registry.npmjs.org/react-spring/-/react-spring-9.7.2.tgz", - "integrity": "sha512-cckALtj79yiaJiAOUNAhtZbdqjvv1bdn/FpobgkckIChc8l6vu0E53WQ+zWru60gINI3JT+oRJSIn2hUVlOvlQ==", + "version": "9.7.3", + "resolved": "https://registry.npmjs.org/react-spring/-/react-spring-9.7.3.tgz", + "integrity": "sha512-oTxDpFV5gzq7jQX6+bU0SVq+vX8VnuuT5c8Zwn6CpDErOPvCmV+DRkPiEBtaL3Ozgzwiy5yFx83N0h303j/r3A==", "dependencies": { "@react-spring/core": "~9.7.3", "@react-spring/konva": "~9.7.3", diff --git a/package.json b/package.json index f21921b08..794e23205 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ }, "peerDependencies": { "@doc-tools/transform": "^3.3.2", - "@gravity-ui/uikit": "^5.4.1", + "@gravity-ui/uikit": "^5.12.0", "react": "^16.0.0 || ^17.0.0 || ^18.0.0" }, "devDependencies": { @@ -120,7 +120,7 @@ "@gravity-ui/prettier-config": "^1.0.1", "@gravity-ui/stylelint-config": "^1.0.0", "@gravity-ui/tsconfig": "^1.0.0", - "@gravity-ui/uikit": "^5.9.1", + "@gravity-ui/uikit": "^5.12.2", "@storybook/addon-actions": "^7.1.0", "@storybook/addon-essentials": "^7.1.0", "@storybook/addon-knobs": "^7.0.2", diff --git a/src/blocks/ContentLayout/ContentLayout.scss b/src/blocks/ContentLayout/ContentLayout.scss index bb142f10d..628e05133 100644 --- a/src/blocks/ContentLayout/ContentLayout.scss +++ b/src/blocks/ContentLayout/ContentLayout.scss @@ -60,6 +60,12 @@ $block: '.#{$ns}content-layout-block'; padding: $indentXL; } + &_theme { + &_dark { + --g-color-line-focus: var(--pc-color-line-focus-dark); + } + } + @media (max-width: map-get($gridBreakpoints, 'sm')) { &_background { padding: $indentM; diff --git a/src/blocks/ContentLayout/ContentLayout.tsx b/src/blocks/ContentLayout/ContentLayout.tsx index d487a7eec..8d05d96f9 100644 --- a/src/blocks/ContentLayout/ContentLayout.tsx +++ b/src/blocks/ContentLayout/ContentLayout.tsx @@ -48,7 +48,7 @@ export const ContentLayoutBlock = (props: ContentLayoutBlockProps) => { const colSizes = useMemo(() => getTextWidth(textWidth), [textWidth]); return ( -
+