@openeuropa/bcl-inpage-navigation 1.8.2 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ Parameters:
9
9
  - links: (link[]) (default: [])
10
10
  - id (string) (default: bcl-inpage-navigation-random(100))
11
11
  - dropdown_id (string) (default: bcl-inpage-navigation-dropdown-random(100))
12
+ - dynamic_active: (boolean) (default: false)
12
13
  - icon_path (string) (default: '')
13
14
  - attributes (drupal attrs)
14
15
  #}
@@ -21,6 +22,7 @@ Parameters:
21
22
  {% set _id = id|default('bcl-inpage-navigation-' ~ random(100)) %}
22
23
  {% set _icon_path = icon_path|default('') %}
23
24
  {% set _dropdown_id = dropdown_id|default('bcl-inpage-navigation-dropdown' ~ random(100)) %}
25
+ {% set _dyanmic_active = dynamic_active|default(false) %}
24
26
 
25
27
  {% if attributes is empty %}
26
28
  {% set attributes = create_attribute() %}
@@ -37,7 +39,13 @@ Parameters:
37
39
  } only -%}
38
40
  {% endset %}
39
41
 
40
- <nav {{ attributes }}>
42
+ {% set _classes = [] %}
43
+
44
+ {% if _dyanmic_active %}
45
+ {% set _classes = _classes|merge(['dynamic-active']) %}
46
+ {% endif %}
47
+
48
+ <nav {{ attributes.addClass(_classes) }}>
41
49
  {% set trigger_attributes = create_attribute()
42
50
  .setAttribute('aria-expanded', 'false')
43
51
  .setAttribute('type', 'button')
package/package.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "name": "@openeuropa/bcl-inpage-navigation",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.8.2",
5
+ "version": "1.9.1",
6
6
  "description": "OE - BCL inpage navigation",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@openeuropa/bcl-navigation": "^1.8.2"
11
+ "@openeuropa/bcl-navigation": "^1.9.1"
12
12
  },
13
13
  "devDependencies": {
14
14
  "lorem-ipsum": "2.0.8"
@@ -27,5 +27,5 @@
27
27
  "design-system",
28
28
  "twig"
29
29
  ],
30
- "gitHead": "3eb04ddc2c8195e3ad880a8155e6ec108a6ee088"
30
+ "gitHead": "70554ede8523da73edc3c786661e687a30fb2315"
31
31
  }