From 6bbcf559ad8d94fe5ded9a210ce17ebc9a317b58 Mon Sep 17 00:00:00 2001 From: Ivan Melnik Date: Wed, 10 Jul 2024 09:28:55 +0300 Subject: [PATCH] feat: HDS 3.9 (#184) HCRC-114 --- package.json | 6 +- src/core/configProvider/configContext.ts | 1 + src/core/configProvider/defaultConfig.tsx | 1 + src/core/imageGallery/Lightbox.tsx | 2 +- src/core/navigation/Navigation.tsx | 3 +- yarn.lock | 113 ++++++++++++++-------- 6 files changed, 80 insertions(+), 46 deletions(-) diff --git a/package.json b/package.json index 3b296a39..040d47d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-helsinki-headless-cms", - "version": "1.0.0-alpha289", + "version": "1.0.0-alpha290", "description": "React components for displaying Headless CMS content according to guidelines set by HDS", "main": "cjs/index.js", "module": "index.js", @@ -106,7 +106,7 @@ "eslint-plugin-react-hooks": "^4.3.0", "git-rev-sync": "^3.0.2", "graphql": "^16.8.0", - "hds-react": "^3.8.0", + "hds-react": "^3.9.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.6.2", "jest-axe": "^8.0.0", @@ -135,7 +135,7 @@ "webpack": "^5.70.0" }, "dependencies": { - "hds-design-tokens": "^3.8.0", + "hds-design-tokens": "^3.9.0", "html-entities": "^2.4.0", "html-react-parser": "^4.2.9", "isomorphic-dompurify": "^1.8.0", diff --git a/src/core/configProvider/configContext.ts b/src/core/configProvider/configContext.ts index da42ef8e..20eefa2f 100644 --- a/src/core/configProvider/configContext.ts +++ b/src/core/configProvider/configContext.ts @@ -27,6 +27,7 @@ export type Config = { copy: { breadcrumbNavigationLabel: string; breadcrumbListLabel: string; + menuButtonLabel: string; menuToggleAriaLabel: string; skipToContentLabel: string; openInExternalDomainAriaLabel: string; diff --git a/src/core/configProvider/defaultConfig.tsx b/src/core/configProvider/defaultConfig.tsx index 3bc03494..e5995ba7 100644 --- a/src/core/configProvider/defaultConfig.tsx +++ b/src/core/configProvider/defaultConfig.tsx @@ -30,6 +30,7 @@ export const defaultConfig: Config = { copy: { breadcrumbNavigationLabel: 'Breadcrumb navigation', breadcrumbListLabel: 'breadcrumbs', + menuButtonLabel: 'Menu', menuToggleAriaLabel: 'toggle menu', skipToContentLabel: 'skip to content', openInExternalDomainAriaLabel: 'Opens a different website.', diff --git a/src/core/imageGallery/Lightbox.tsx b/src/core/imageGallery/Lightbox.tsx index f899e544..ed3be7a9 100644 --- a/src/core/imageGallery/Lightbox.tsx +++ b/src/core/imageGallery/Lightbox.tsx @@ -116,7 +116,7 @@ export function Lightbox({ images, lightboxUid }: LightboxProps) { > {imagePhotogrpher} - + {images.length > 1 && } diff --git a/src/core/navigation/Navigation.tsx b/src/core/navigation/Navigation.tsx index 475ac8f7..c50299e8 100644 --- a/src/core/navigation/Navigation.tsx +++ b/src/core/navigation/Navigation.tsx @@ -101,7 +101,7 @@ export function Navigation({ const { siteName, currentLanguageCode, - copy: { menuToggleAriaLabel, skipToContentLabel }, + copy: { menuButtonLabel, menuToggleAriaLabel, skipToContentLabel }, components: { A }, mainContentId, utils: { getRoutedInternalHref }, @@ -187,6 +187,7 @@ export function Navigation({