@elvia/elvis-accordion
Advanced tools
Comparing version 3.2.8 to 3.3.0
@@ -6,2 +6,14 @@ { | ||
{ | ||
"date": "19.09.24", | ||
"version": "3.3.0", | ||
"changelog": [ | ||
{ | ||
"type": "new_feature", | ||
"changes": [ | ||
"Added automatic support for switching aria-labels based on the global lang attribute on the html-element" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"date": "18.09.24", | ||
@@ -8,0 +20,0 @@ "version": "3.2.8", |
// components/elvis-accordion/src/react/elvia-accordion.tsx | ||
import expandCircleColor from "@elvia/elvis-assets-icons/dist/icons/expandCircleColor"; | ||
import expandCircleFilledColor from "@elvia/elvis-assets-icons/dist/icons/expandCircleFilledColor"; | ||
import { useSlot } from "@elvia/elvis-toolbox"; | ||
import { useLanguage, useSlot } from "@elvia/elvis-toolbox"; | ||
import React, { useEffect, useMemo, useState } from "react"; | ||
@@ -230,7 +230,8 @@ | ||
}; | ||
const lang = useLanguage(); | ||
const decideButtonAriaLabel = () => { | ||
if (isOpenState) { | ||
return closeAriaLabel ?? closeLabel ?? "Lukk"; | ||
return closeAriaLabel ?? closeLabel ?? (lang === "no" ? "Lukk" : "Close"); | ||
} else { | ||
return openAriaLabel ?? openLabel ?? "\xC5pne"; | ||
return openAriaLabel ?? openLabel ?? (lang === "no" ? "\xC5pne" : "Open"); | ||
} | ||
@@ -237,0 +238,0 @@ }; |
{ | ||
"name": "@elvia/elvis-accordion", | ||
"version": "3.2.8", | ||
"version": "3.3.0", | ||
"license": "MIT", | ||
@@ -22,4 +22,4 @@ "homepage": "https://design.elvia.io/components/accordion", | ||
"@elvia/elvis-component-wrapper": "^4.2.0", | ||
"@elvia/elvis-toolbox": "^12.0.1", | ||
"@elvia/elvis-typography": "^2.7.1", | ||
"@elvia/elvis-toolbox": "^12.1.0", | ||
"@elvia/elvis-typography": "^3.1.1", | ||
"@emotion/react": "^11.11.4", | ||
@@ -26,0 +26,0 @@ "@emotion/styled": "^11.11.5" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
42882
1348
0
- Removed@elvia/elvis-typography@2.7.1(transitive)
Updated@elvia/elvis-toolbox@^12.1.0