@ec-europa/ecl-accordions
Advanced tools
Comparing version 0.2.0 to 0.2.1
// Heavily inspired by the accordion component from https://github.com/frend/frend.co | ||
import { queryAll } from '../../base/helpers/dom'; | ||
import { queryAll } from '@ec-europa/ecl-base/helpers/dom'; | ||
@@ -95,5 +95,6 @@ /** | ||
case 38: { | ||
const previousHeaderIndex = currentHeaderIndex === 0 | ||
? theseHeaders.length - 1 | ||
: currentHeaderIndex - 1; | ||
const previousHeaderIndex = | ||
currentHeaderIndex === 0 | ||
? theseHeaders.length - 1 | ||
: currentHeaderIndex - 1; | ||
giveHeaderFocus(theseHeaders, previousHeaderIndex); | ||
@@ -105,5 +106,6 @@ e.preventDefault(); | ||
case 40: { | ||
const nextHeaderIndex = currentHeaderIndex < theseHeaders.length - 1 | ||
? currentHeaderIndex + 1 | ||
: 0; | ||
const nextHeaderIndex = | ||
currentHeaderIndex < theseHeaders.length - 1 | ||
? currentHeaderIndex + 1 | ||
: 0; | ||
giveHeaderFocus(theseHeaders, nextHeaderIndex); | ||
@@ -110,0 +112,0 @@ e.preventDefault(); |
@@ -5,8 +5,10 @@ { | ||
"license": "EUPL-1.1", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "ECL Accordions", | ||
"main": "_accordions.scss", | ||
"style": "_accordions.scss", | ||
"dependencies": { | ||
"@ec-europa/ecl-base": "^0.6.0" | ||
}, | ||
"peerDependencies": { | ||
"@ec-europa/ecl-base": "^0.4.0", | ||
"@ec-europa/ecl-links": "^0.5.0", | ||
@@ -13,0 +15,0 @@ "@ec-europa/ecl-screen-reader": "^0.3.0" |
9520
7
178
+ Added@ec-europa/ecl-base@^0.6.0
+ Added@ec-europa/ecl-base@0.6.0(transitive)
- Removed@ec-europa/ecl-base@0.4.1(transitive)