@openeuropa/bcl-inpage-navigation 1.10.1 → 1.10.3

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.
@@ -29,8 +29,13 @@ Parameters:
29
29
  {% endif %}
30
30
 
31
31
  {% set attributes = attributes.addClass(['bcl-inpage-navigation', 'position-sticky']).setAttribute('id', _id) %}
32
- {% set title_attributes = _title_attributes.addClass('mb-0') %}
33
- {% set _title_content %}
32
+
33
+ {% if not attributes.hasAttribute('aria-label') and not attributes.hasAttribute('aria-labelledby') %}
34
+ {% set attributes = attributes.setAttribute('aria-labelledby', _dropdown_id) %}
35
+ {% endif %}
36
+
37
+ {% set title_attributes = _title_attributes.addClass(['mb-0', 'd-none', 'd-md-block']) %}
38
+ {% set _button_content %}
34
39
  {{ _title }}
35
40
  {%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
36
41
  name: 'chevron-down',
@@ -45,21 +50,25 @@ Parameters:
45
50
  {% set _classes = _classes|merge(['dynamic-active']) %}
46
51
  {% endif %}
47
52
 
48
- <nav {{ attributes.addClass(_classes) }}>
53
+ <nav{{ attributes.addClass(_classes) }}>
49
54
  {% set trigger_attributes = create_attribute()
50
55
  .setAttribute('aria-expanded', 'false')
51
56
  .setAttribute('type', 'button')
52
57
  .setAttribute('id', _dropdown_id)
53
58
  .setAttribute('data-bs-toggle', 'dropdown')
54
- .addClass(['dropdown-toggle']) %}
59
+ .addClass(['dropdown-toggle', 'h2', 'd-md-none']) %}
60
+ {% include '@oe-bcl/bcl-button/button.html.twig' with {
61
+ label: _button_content,
62
+ clean_class: true,
63
+ attributes: trigger_attributes,
64
+ } only %}
55
65
  {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
56
- title: _title_content,
66
+ title: _title,
57
67
  title_tag: _title_tag,
58
68
  title_link: _title_link,
59
- attributes: _title_attributes
60
- .merge(trigger_attributes),
69
+ attributes: _title_attributes,
61
70
  } only %}
62
- <div class="dropdown-menu" aria-labelledby="{{ _dropdown_id }}">
71
+ <div class="dropdown-menu">
63
72
  {% include '@oe-bcl/bcl-navigation/navigation.html.twig' with {
64
73
  'pills': true,
65
74
  'vertical': true,
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.10.1",
5
+ "version": "1.10.3",
6
6
  "description": "OE - BCL inpage navigation",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@openeuropa/bcl-navigation": "^1.10.1"
11
+ "@openeuropa/bcl-navigation": "^1.10.3"
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": "6c77dfb1e65950872e806cd0acb14023c279b934"
30
+ "gitHead": "b8331832899a57361f44b8a5e3a6c82d0218532f"
31
31
  }