@openeuropa/bcl-data-header 1.10.7 → 1.10.9

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.
package/data--ec.js CHANGED
@@ -1,4 +1,4 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  const languageList = require("@openeuropa/bcl-language-list/data/data-modal");
4
4
  const breadcrumbs = require("@openeuropa/bcl-data-breadcrumb/data");
@@ -9,7 +9,12 @@ const modals = require("@openeuropa/bcl-data-header/data--modals");
9
9
  module.exports = {
10
10
  variant: "ec",
11
11
  navbar_id: "header-navbar",
12
+ icon_path: "/icons.svg",
12
13
  site_name: "Project name",
14
+ toggler_attributes: new DrupalAttribute().setAttribute(
15
+ "aria-label",
16
+ "Main navigation toggle",
17
+ ),
13
18
  project_logo: {
14
19
  path: "https://inno-ecl.s3.amazonaws.com/media/examples/placeholder.svg",
15
20
  classes: "d-none d-lg-inline-block",
@@ -17,8 +22,8 @@ module.exports = {
17
22
  },
18
23
  project_link: "/example.html",
19
24
  head: {
20
- attributes: new drupalAttribute()
21
- .addClass(["w-100", "shadow-sm", "bcl-header__top-navbar"])
25
+ attributes: new DrupalAttribute()
26
+ .addClass(["w-100", "bcl-header__top-navbar"])
22
27
  .setAttribute("aria-label", "Top Navigation"),
23
28
  brand: {
24
29
  link: "/example.html",
@@ -38,6 +43,6 @@ module.exports = {
38
43
  language_modal: { ...languageList, variant: "ec" },
39
44
  breadcrumbs: {
40
45
  ...breadcrumbs,
41
- attributes: new drupalAttribute().addClass(["mt-3"]),
46
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
42
47
  },
43
48
  };
package/data--loggedIn.js CHANGED
@@ -1,4 +1,4 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  module.exports = [
4
4
  {
@@ -6,12 +6,12 @@ module.exports = [
6
6
  path: "/example.html",
7
7
  icon_position: "before",
8
8
  remove_icon_spacers: true,
9
- attributes: new drupalAttribute().addClass(["py-lg-2", "pb-3"]),
9
+ attributes: new DrupalAttribute().addClass(["py-lg-2", "pb-3"]),
10
10
  icon: {
11
11
  name: "person-fill",
12
12
  size: "xs",
13
13
  path: "/icons.svg",
14
- attributes: new drupalAttribute().addClass(["me-2-5"]),
14
+ attributes: new DrupalAttribute().addClass(["me-2-5"]),
15
15
  },
16
16
  },
17
17
  {
@@ -19,7 +19,7 @@ module.exports = [
19
19
  path: "/example.html",
20
20
  icon_position: "before",
21
21
  remove_icon_spacers: true,
22
- attributes: new drupalAttribute().addClass([
22
+ attributes: new DrupalAttribute().addClass([
23
23
  "border-top-lg-0",
24
24
  "border-top",
25
25
  "mx-n3",
@@ -31,7 +31,7 @@ module.exports = [
31
31
  name: "lock-fill",
32
32
  size: "xs",
33
33
  path: "/icons.svg",
34
- attributes: new drupalAttribute().addClass("me-2-5"),
34
+ attributes: new DrupalAttribute().addClass("me-2-5"),
35
35
  },
36
36
  },
37
37
  ];
package/data--navbar.js CHANGED
@@ -1,15 +1,15 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  module.exports = {
4
4
  navbar_id: "header-navbar",
5
5
  color_set: "dark",
6
6
  collapse_id: "navbarNavDropdown",
7
- attributes: new drupalAttribute()
7
+ attributes: new DrupalAttribute()
8
8
  .setAttribute("aria-label", "Main Navigation")
9
9
  .addClass("bcl-header__navbar"),
10
10
  navigation: {
11
11
  navbar: true,
12
- attributes: new drupalAttribute().addClass("me-auto"),
12
+ attributes: new DrupalAttribute().addClass("me-auto"),
13
13
  items: [
14
14
  {
15
15
  mega_menu: true,
@@ -33,7 +33,7 @@ module.exports = {
33
33
  trigger: {
34
34
  id: "custom-trigger-mm-1",
35
35
  label: "Base Category Item",
36
- attributes: new drupalAttribute().addClass("active"),
36
+ attributes: new DrupalAttribute().addClass("active"),
37
37
  },
38
38
  see_all: {
39
39
  label: "See all",
@@ -43,7 +43,31 @@ module.exports = {
43
43
  {
44
44
  label: "Base Sub Category Item",
45
45
  path: "/example.html",
46
- attributes: new drupalAttribute().addClass("active"),
46
+ attributes: new DrupalAttribute().addClass("active"),
47
+ },
48
+ {
49
+ label: "Base Sub Category Item",
50
+ path: "/example.html",
51
+ },
52
+ {
53
+ label: "Base Sub Category Item",
54
+ path: "/example.html",
55
+ },
56
+ {
57
+ label: "Base Sub Category Item",
58
+ path: "/example.html",
59
+ },
60
+ {
61
+ label: "Base Sub Category Item",
62
+ path: "/example.html",
63
+ },
64
+ {
65
+ label: "Base Sub Category Item",
66
+ path: "/example.html",
67
+ },
68
+ {
69
+ label: "Base Sub Category Item",
70
+ path: "/example.html",
47
71
  },
48
72
  {
49
73
  label: "Base Sub Category Item",
@@ -134,7 +158,7 @@ module.exports = {
134
158
  label: "Home",
135
159
  path: "/example.html",
136
160
  active: true,
137
- attributes: new drupalAttribute().setAttribute("aria-current", "page"),
161
+ attributes: new DrupalAttribute().setAttribute("aria-current", "page"),
138
162
  },
139
163
  {
140
164
  label: "Item 01",
@@ -170,6 +194,22 @@ module.exports = {
170
194
  },
171
195
  ],
172
196
  },
197
+ {
198
+ label: "Item 04",
199
+ path: "/example.html",
200
+ },
201
+ {
202
+ label: "Item 05",
203
+ path: "/example.html",
204
+ },
205
+ {
206
+ label: "Item 06",
207
+ path: "/example.html",
208
+ },
209
+ {
210
+ label: "Item 07",
211
+ path: "/example.html",
212
+ },
173
213
  ],
174
214
  },
175
215
  };
package/data--neutral.js CHANGED
@@ -1,4 +1,4 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  const languageList = require("@openeuropa/bcl-language-list/data/data-modal");
4
4
  const breadcrumbs = require("@openeuropa/bcl-data-breadcrumb/data");
@@ -9,6 +9,11 @@ const modals = require("@openeuropa/bcl-data-header/data--modals");
9
9
  module.exports = {
10
10
  navbar_id: "header-navbar",
11
11
  site_name: "Project name",
12
+ icon_path: "/icons.svg",
13
+ toggler_attributes: new DrupalAttribute().setAttribute(
14
+ "aria-label",
15
+ "Main navigation toggle",
16
+ ),
12
17
  site_name_classes: "h5 d-inline-block d-lg-none",
13
18
  head: {
14
19
  brand: {
@@ -21,7 +26,7 @@ module.exports = {
21
26
  label: "Project name",
22
27
  link: "/example.html",
23
28
  },
24
- attributes: new drupalAttribute()
29
+ attributes: new DrupalAttribute()
25
30
  .addClass(["w-100", "bcl-header__top-navbar"])
26
31
  .setAttribute("aria-label", "Top Navigation"),
27
32
  disable_collapse: false,
@@ -35,6 +40,6 @@ module.exports = {
35
40
  language_modal: languageList,
36
41
  breadcrumbs: {
37
42
  ...breadcrumbs,
38
- attributes: new drupalAttribute().addClass(["mt-3"]),
43
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
39
44
  },
40
45
  };
package/data--no-form.js CHANGED
@@ -1,4 +1,4 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  const modals = require("@openeuropa/bcl-data-header/data--modals");
4
4
  const languageList = require("@openeuropa/bcl-language-list/data/data-modal");
@@ -6,10 +6,13 @@ const languageList = require("@openeuropa/bcl-language-list/data/data-modal");
6
6
  module.exports = {
7
7
  variant: "eu",
8
8
  navbar_id: "header-navbar",
9
+ toggler_attributes: new DrupalAttribute().setAttribute(
10
+ "aria-label",
11
+ "Main navigation toggle",
12
+ ),
9
13
  head: {
10
- attributes: new drupalAttribute().addClass([
14
+ attributes: new DrupalAttribute().addClass([
11
15
  "w-100",
12
- "shadow-sm",
13
16
  "bcl-header__top-navbar",
14
17
  ]),
15
18
  disable_collapse: false,
@@ -40,9 +43,9 @@ module.exports = {
40
43
  name: "chat-left-dots-fill",
41
44
  size: "xs",
42
45
  path: "/icons.svg",
43
- attributes: new drupalAttribute().addClass("me-2-5"),
46
+ attributes: new DrupalAttribute().addClass("me-2-5"),
44
47
  },
45
- attributes: new drupalAttribute()
48
+ attributes: new DrupalAttribute()
46
49
  .setAttribute("data-bs-toggle", "modal")
47
50
  .setAttribute("data-bs-target", "#languageModal")
48
51
  .addClass("text-center"),
@@ -56,9 +59,9 @@ module.exports = {
56
59
  name: "person-fill",
57
60
  size: "xs",
58
61
  path: "/icons.svg",
59
- attributes: new drupalAttribute().addClass("me-2-5"),
62
+ attributes: new DrupalAttribute().addClass("me-2-5"),
60
63
  },
61
- attributes: new drupalAttribute()
64
+ attributes: new DrupalAttribute()
62
65
  .setAttribute("data-bs-toggle", "modal")
63
66
  .setAttribute("data-bs-target", "#loginModal")
64
67
  .addClass("text-center"),
@@ -69,19 +72,19 @@ module.exports = {
69
72
  navbar: {
70
73
  color_set: "dark",
71
74
  collapse_id: "navbarNavDropdown",
72
- attributes: new drupalAttribute().setAttribute(
75
+ attributes: new DrupalAttribute().setAttribute(
73
76
  "aria-label",
74
77
  "Main Navigation",
75
78
  ),
76
79
  navigation: {
77
80
  navbar: true,
78
- attributes: new drupalAttribute().addClass("me-auto"),
81
+ attributes: new DrupalAttribute().addClass("me-auto"),
79
82
  items: [
80
83
  {
81
84
  label: "Home",
82
85
  path: "/example.html",
83
86
  active: true,
84
- attributes: new drupalAttribute().setAttribute(
87
+ attributes: new DrupalAttribute().setAttribute(
85
88
  "aria-current",
86
89
  "page",
87
90
  ),
@@ -101,7 +104,7 @@ module.exports = {
101
104
  trigger: {
102
105
  label: "Dropdown link",
103
106
  path: "/example.html",
104
- attributes: new drupalAttribute().addClass("nav-link"),
107
+ attributes: new DrupalAttribute().addClass("nav-link"),
105
108
  },
106
109
  items: [
107
110
  {
@@ -124,7 +127,7 @@ module.exports = {
124
127
  modals,
125
128
  language_modal: languageList,
126
129
  breadcrumbs: {
127
- attributes: new drupalAttribute().addClass(["mt-3"]),
130
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
128
131
  links: [
129
132
  { label: "Home", path: "/example.html" },
130
133
  {
package/data--simple.js CHANGED
@@ -1,4 +1,4 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  const languageList = require("@openeuropa/bcl-language-list/data/data-modal");
4
4
  const breadcrumbs = require("@openeuropa/bcl-data-breadcrumb/data");
@@ -8,9 +8,15 @@ const modals = require("@openeuropa/bcl-data-header/data--modals");
8
8
  module.exports = {
9
9
  variant: "eu",
10
10
  navbar_id: "header-navbar",
11
+ icon_path: "/icons.svg",
12
+ site_name: "Project name",
13
+ toggler_attributes: new DrupalAttribute().setAttribute(
14
+ "aria-label",
15
+ "Main navigation toggle",
16
+ ),
11
17
  head: {
12
- attributes: new drupalAttribute()
13
- .addClass(["w-100", "shadow-sm", "bcl-header__top-navbar"])
18
+ attributes: new DrupalAttribute()
19
+ .addClass(["w-100", "bcl-header__top-navbar"])
14
20
  .setAttribute("aria-label", "Top Navigation"),
15
21
  disable_collapse: false,
16
22
  collapse_id: "topNavbarDropdown",
@@ -40,9 +46,9 @@ module.exports = {
40
46
  name: "chat-left-dots-fill",
41
47
  size: "xs",
42
48
  path: "/icons.svg",
43
- attributes: new drupalAttribute().addClass("me-2-5"),
49
+ attributes: new DrupalAttribute().addClass("me-2-5"),
44
50
  },
45
- attributes: new drupalAttribute()
51
+ attributes: new DrupalAttribute()
46
52
  .setAttribute("data-bs-toggle", "modal")
47
53
  .setAttribute("data-bs-target", "#languageModal"),
48
54
  },
@@ -55,9 +61,9 @@ module.exports = {
55
61
  name: "person-fill",
56
62
  size: "xs",
57
63
  path: "/icons.svg",
58
- attributes: new drupalAttribute().addClass("me-2-5"),
64
+ attributes: new DrupalAttribute().addClass("me-2-5"),
59
65
  },
60
- attributes: new drupalAttribute()
66
+ attributes: new DrupalAttribute()
61
67
  .setAttribute("data-bs-toggle", "modal")
62
68
  .setAttribute("data-bs-target", "#loginModal"),
63
69
  },
@@ -69,6 +75,6 @@ module.exports = {
69
75
  language_modal: { ...languageList, variant: "eu" },
70
76
  breadcrumbs: {
71
77
  ...breadcrumbs,
72
- attributes: new drupalAttribute().addClass(["mt-3"]),
78
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
73
79
  },
74
80
  };
@@ -1,4 +1,4 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  module.exports = [
4
4
  {
@@ -28,9 +28,9 @@ module.exports = [
28
28
  name: "chat-left-dots-fill",
29
29
  size: "xs",
30
30
  path: "/icons.svg",
31
- attributes: new drupalAttribute().addClass("me-2-5"),
31
+ attributes: new DrupalAttribute().addClass("me-2-5"),
32
32
  },
33
- attributes: new drupalAttribute()
33
+ attributes: new DrupalAttribute()
34
34
  .setAttribute("data-bs-toggle", "modal")
35
35
  .setAttribute("data-bs-target", "#languageModal"),
36
36
  },
@@ -43,9 +43,9 @@ module.exports = [
43
43
  name: "person-fill",
44
44
  size: "xs",
45
45
  path: "/icons.svg",
46
- attributes: new drupalAttribute().addClass("me-2-5"),
46
+ attributes: new DrupalAttribute().addClass("me-2-5"),
47
47
  },
48
- attributes: new drupalAttribute()
48
+ attributes: new DrupalAttribute()
49
49
  .setAttribute("data-bs-toggle", "modal")
50
50
  .setAttribute("data-bs-target", "#loginModal"),
51
51
  },
package/data--ucpkn.js CHANGED
@@ -1,8 +1,9 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  module.exports = {
4
4
  navbar_id: "header-navbar",
5
5
  variant: "ucpkn",
6
+ icon_path: "/icons.svg",
6
7
  site_name: "UCP Knowledge Network: Applied knowledge for action",
7
8
  light: true,
8
9
  project_logo: {
@@ -13,10 +14,10 @@ module.exports = {
13
14
  navbar: {
14
15
  color_set: "dark",
15
16
  collapse_id: "navbarNavDropdown",
16
- attributes: new drupalAttribute().addClass("bcl-header__navbar"),
17
+ attributes: new DrupalAttribute().addClass("bcl-header__navbar"),
17
18
  navigation: {
18
19
  navbar: true,
19
- attributes: new drupalAttribute().addClass("me-auto"),
20
+ attributes: new DrupalAttribute().addClass("me-auto"),
20
21
  items: [
21
22
  {
22
23
  id: "navbarDropdownMenuLink",
@@ -25,7 +26,7 @@ module.exports = {
25
26
  trigger: {
26
27
  label: "Knowledge & Capacity",
27
28
  path: "/example.html",
28
- attributes: new drupalAttribute().addClass("nav-link"),
29
+ attributes: new DrupalAttribute().addClass("nav-link"),
29
30
  },
30
31
  items: [
31
32
  {
@@ -57,7 +58,7 @@ module.exports = {
57
58
  trigger: {
58
59
  label: "Science & Research",
59
60
  path: "/example.html",
60
- attributes: new drupalAttribute().addClass("nav-link"),
61
+ attributes: new DrupalAttribute().addClass("nav-link"),
61
62
  },
62
63
  items: [
63
64
  {
@@ -85,7 +86,7 @@ module.exports = {
85
86
  trigger: {
86
87
  label: "Projects",
87
88
  path: "/example.html",
88
- attributes: new drupalAttribute().addClass("nav-link"),
89
+ attributes: new DrupalAttribute().addClass("nav-link"),
89
90
  },
90
91
  items: [
91
92
  {
@@ -113,7 +114,7 @@ module.exports = {
113
114
  trigger: {
114
115
  label: "About",
115
116
  path: "#",
116
- attributes: new drupalAttribute().addClass("nav-link"),
117
+ attributes: new DrupalAttribute().addClass("nav-link"),
117
118
  },
118
119
  items: [
119
120
  {
@@ -133,9 +134,13 @@ module.exports = {
133
134
  ],
134
135
  },
135
136
  },
137
+ toggler_attributes: new DrupalAttribute().setAttribute(
138
+ "aria-label",
139
+ "Main navigation toggle",
140
+ ),
136
141
  head: {
137
- attributes: new drupalAttribute()
138
- .addClass(["w-100", "shadow-sm"])
142
+ attributes: new DrupalAttribute()
143
+ .addClass(["w-100"])
139
144
  .setAttribute("aria-label", "Top Navigation"),
140
145
  disable_collapse: true,
141
146
  brand: {
package/data.js CHANGED
@@ -1,4 +1,4 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  const languageList = require("@openeuropa/bcl-language-list/data/data-modal");
4
4
  const breadcrumbs = require("@openeuropa/bcl-data-breadcrumb/data");
@@ -10,14 +10,15 @@ module.exports = {
10
10
  navbar_id: "header-navbar",
11
11
  variant: "eu",
12
12
  site_name: "Project name",
13
+ icon_path: "/icons.svg",
13
14
  project_logo: {
14
15
  path: "https://inno-ecl.s3.amazonaws.com/media/examples/placeholder.svg",
15
16
  classes: "d-none d-lg-inline-block",
16
17
  alt: "project logo",
17
18
  },
18
19
  head: {
19
- attributes: new drupalAttribute()
20
- .addClass(["w-100", "shadow-sm", "bcl-header__top-navbar"])
20
+ attributes: new DrupalAttribute()
21
+ .addClass(["w-100", "bcl-header__top-navbar"])
21
22
  .setAttribute("aria-label", "Top Navigation"),
22
23
  disable_collapse: false,
23
24
  collapse_id: "topNavbarDropdown",
@@ -42,9 +43,13 @@ module.exports = {
42
43
  },
43
44
  navbar,
44
45
  modals,
46
+ toggler_attributes: new DrupalAttribute().setAttribute(
47
+ "aria-label",
48
+ "Main navigation toggle",
49
+ ),
45
50
  language_modal: { ...languageList, variant: "eu" },
46
51
  breadcrumbs: {
47
52
  ...breadcrumbs,
48
- attributes: new drupalAttribute().addClass(["mt-3"]),
53
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
49
54
  },
50
55
  };
package/package.json CHANGED
@@ -2,14 +2,14 @@
2
2
  "name": "@openeuropa/bcl-data-header",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.10.7",
5
+ "version": "1.10.9",
6
6
  "description": "OE header data",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@openeuropa/bcl-data-breadcrumb": "^1.10.7",
12
- "@openeuropa/bcl-language-list": "^1.10.7"
11
+ "@openeuropa/bcl-data-breadcrumb": "^1.10.9",
12
+ "@openeuropa/bcl-language-list": "^1.10.9"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
@@ -24,5 +24,5 @@
24
24
  "component-library",
25
25
  "design-system"
26
26
  ],
27
- "gitHead": "5f7e5c2fd90eceb81c0ffcf52dcf8e3921c3acae"
27
+ "gitHead": "cb9864341bfc98404071520d61568bd18e17e1fe"
28
28
  }