@openeuropa/bcl-data-header 0.3791.202505281600 → 0.3821.202510100015

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");
@@ -8,6 +8,7 @@ const modals = require("@openeuropa/bcl-data-header/data--modals");
8
8
 
9
9
  module.exports = {
10
10
  variant: "ec",
11
+ navbar_id: "header-navbar",
11
12
  site_name: "Project name",
12
13
  project_logo: {
13
14
  path: "https://inno-ecl.s3.amazonaws.com/media/examples/placeholder.svg",
@@ -16,11 +17,9 @@ module.exports = {
16
17
  },
17
18
  project_link: "/example.html",
18
19
  head: {
19
- attributes: new drupalAttribute()
20
+ attributes: new DrupalAttribute()
20
21
  .addClass(["w-100", "shadow-sm", "bcl-header__top-navbar"])
21
22
  .setAttribute("aria-label", "Top Navigation"),
22
- disable_collapse: false,
23
- collapse_id: "topNavbarDropdown",
24
23
  brand: {
25
24
  link: "/example.html",
26
25
  logos: [
@@ -39,6 +38,6 @@ module.exports = {
39
38
  language_modal: { ...languageList, variant: "ec" },
40
39
  breadcrumbs: {
41
40
  ...breadcrumbs,
42
- attributes: new drupalAttribute().addClass(["mt-3"]),
41
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
43
42
  },
44
43
  };
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,54 +1,140 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  module.exports = {
4
+ navbar_id: "header-navbar",
4
5
  color_set: "dark",
5
6
  collapse_id: "navbarNavDropdown",
6
- attributes: new drupalAttribute()
7
- .addClass("bcl-header__navbar")
8
- .setAttribute("aria-label", "Main Navigation"),
9
- form: {
10
- attributes: new drupalAttribute().addClass(["d-flex", "mt-3", "mt-lg-0"]),
11
- submit: {
12
- variant: "light",
13
- assistive_text: "search",
14
- icon: {
15
- name: "search",
16
- size: "xs",
17
- path: "/icons.svg",
18
- },
19
- attributes: new drupalAttribute().addClass([
20
- "border-start-0",
21
- "rounded-0",
22
- "rounded-end",
23
- ]),
24
- },
25
- items: [
26
- [
27
- {
28
- type: "text",
29
- required: true,
30
- label: "Search",
31
- hidden_label: true,
32
- placeholder: "Search",
33
- id: "inlineFormInputGroupSearch",
34
- attributes: new drupalAttribute().addClass([
35
- "border-start-0",
36
- "rounded-0",
37
- "rounded-start",
38
- ]),
39
- },
40
- ],
41
- ],
42
- },
7
+ attributes: new DrupalAttribute()
8
+ .setAttribute("aria-label", "Main Navigation")
9
+ .addClass("bcl-header__navbar"),
43
10
  navigation: {
44
11
  navbar: true,
45
- attributes: new drupalAttribute().addClass("me-auto"),
12
+ attributes: new DrupalAttribute().addClass("me-auto"),
46
13
  items: [
14
+ {
15
+ mega_menu: true,
16
+ icon_path: "/icons.svg",
17
+ id: "dropdown-megamenu",
18
+ trigger: {
19
+ label: "A link with dropdown",
20
+ },
21
+ content_link: {
22
+ label: "Discover more",
23
+ path: "/example.html",
24
+ icon: {
25
+ name: "arrow-right",
26
+ },
27
+ },
28
+ content_block:
29
+ "<h4>About the European Commission</h4><p>Description text, lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
30
+ items: [
31
+ {
32
+ id: "dropdown-megamenu-inner",
33
+ trigger: {
34
+ id: "custom-trigger-mm-1",
35
+ label: "Base Category Item",
36
+ attributes: new DrupalAttribute().addClass("active"),
37
+ },
38
+ see_all: {
39
+ label: "See all",
40
+ path: "/example.html",
41
+ },
42
+ items: [
43
+ {
44
+ label: "Base Sub Category Item",
45
+ path: "/example.html",
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
+ },
62
+ {
63
+ label: "Base Category Item",
64
+ },
65
+ {
66
+ id: "dropdown-megamenu-inner-2",
67
+ trigger: {
68
+ label: "Base Category Item",
69
+ path: "/example.html",
70
+ id: "custom-trigger-mm-2",
71
+ },
72
+ items: [
73
+ {
74
+ label: "Base Sub Category Item",
75
+ path: "/example.html",
76
+ },
77
+ {
78
+ label: "Base Sub Category Item",
79
+ path: "/example.html",
80
+ },
81
+ {
82
+ label: "Base Sub Category Item",
83
+ path: "/example.html",
84
+ },
85
+ {
86
+ label: "Base Sub Category Item",
87
+ path: "/example.html",
88
+ },
89
+ {
90
+ label: "Base Sub Category Item",
91
+ path: "/example.html",
92
+ },
93
+ {
94
+ label: "Base Sub Category Item",
95
+ path: "/example.html",
96
+ },
97
+ {
98
+ label: "Base Sub Category Item",
99
+ path: "/example.html",
100
+ },
101
+ {
102
+ label: "Base Sub Category Item",
103
+ path: "/example.html",
104
+ },
105
+ ],
106
+ },
107
+ {
108
+ label: "Base Category Item",
109
+ path: "/example.html",
110
+ },
111
+ {
112
+ label: "Base Category Item",
113
+ path: "/example.html",
114
+ },
115
+ {
116
+ label: "Base Category Item",
117
+ path: "/example.html",
118
+ },
119
+ {
120
+ label: "Base Category Item",
121
+ path: "/example.html",
122
+ },
123
+ {
124
+ label: "Base Category Item",
125
+ path: "/example.html",
126
+ },
127
+ {
128
+ label: "Base Category Item",
129
+ path: "/example.html",
130
+ },
131
+ ],
132
+ },
47
133
  {
48
134
  label: "Home",
49
135
  path: "/example.html",
50
136
  active: true,
51
- attributes: new drupalAttribute().setAttribute("aria-current", "page"),
137
+ attributes: new DrupalAttribute().setAttribute("aria-current", "page"),
52
138
  },
53
139
  {
54
140
  label: "Item 01",
@@ -60,12 +146,9 @@ module.exports = {
60
146
  },
61
147
  {
62
148
  id: "navbarDropdownMenuLink",
63
- link: true,
64
149
  dropdown: true,
65
150
  trigger: {
66
151
  label: "Dropdown link",
67
- path: "#",
68
- attributes: new drupalAttribute().addClass("nav-link"),
69
152
  },
70
153
  items: [
71
154
  {
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");
@@ -7,6 +7,7 @@ const navbar = require("@openeuropa/bcl-data-header/data--navbar");
7
7
  const modals = require("@openeuropa/bcl-data-header/data--modals");
8
8
 
9
9
  module.exports = {
10
+ navbar_id: "header-navbar",
10
11
  site_name: "Project name",
11
12
  site_name_classes: "h5 d-inline-block d-lg-none",
12
13
  head: {
@@ -20,7 +21,7 @@ module.exports = {
20
21
  label: "Project name",
21
22
  link: "/example.html",
22
23
  },
23
- attributes: new drupalAttribute()
24
+ attributes: new DrupalAttribute()
24
25
  .addClass(["w-100", "bcl-header__top-navbar"])
25
26
  .setAttribute("aria-label", "Top Navigation"),
26
27
  disable_collapse: false,
@@ -34,6 +35,6 @@ module.exports = {
34
35
  language_modal: languageList,
35
36
  breadcrumbs: {
36
37
  ...breadcrumbs,
37
- attributes: new drupalAttribute().addClass(["mt-3"]),
38
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
38
39
  },
39
40
  };
package/data--no-form.js CHANGED
@@ -1,12 +1,13 @@
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");
5
5
 
6
6
  module.exports = {
7
7
  variant: "eu",
8
+ navbar_id: "header-navbar",
8
9
  head: {
9
- attributes: new drupalAttribute().addClass([
10
+ attributes: new DrupalAttribute().addClass([
10
11
  "w-100",
11
12
  "shadow-sm",
12
13
  "bcl-header__top-navbar",
@@ -39,9 +40,9 @@ module.exports = {
39
40
  name: "chat-left-dots-fill",
40
41
  size: "xs",
41
42
  path: "/icons.svg",
42
- attributes: new drupalAttribute().addClass("me-2-5"),
43
+ attributes: new DrupalAttribute().addClass("me-2-5"),
43
44
  },
44
- attributes: new drupalAttribute()
45
+ attributes: new DrupalAttribute()
45
46
  .setAttribute("data-bs-toggle", "modal")
46
47
  .setAttribute("data-bs-target", "#languageModal")
47
48
  .addClass("text-center"),
@@ -55,9 +56,9 @@ module.exports = {
55
56
  name: "person-fill",
56
57
  size: "xs",
57
58
  path: "/icons.svg",
58
- attributes: new drupalAttribute().addClass("me-2-5"),
59
+ attributes: new DrupalAttribute().addClass("me-2-5"),
59
60
  },
60
- attributes: new drupalAttribute()
61
+ attributes: new DrupalAttribute()
61
62
  .setAttribute("data-bs-toggle", "modal")
62
63
  .setAttribute("data-bs-target", "#loginModal")
63
64
  .addClass("text-center"),
@@ -68,18 +69,19 @@ module.exports = {
68
69
  navbar: {
69
70
  color_set: "dark",
70
71
  collapse_id: "navbarNavDropdown",
71
- attributes: new drupalAttribute()
72
- .addClass("bcl-header__navbar")
73
- .setAttribute("aria-label", "Main Navigation"),
72
+ attributes: new DrupalAttribute().setAttribute(
73
+ "aria-label",
74
+ "Main Navigation",
75
+ ),
74
76
  navigation: {
75
77
  navbar: true,
76
- attributes: new drupalAttribute().addClass("me-auto"),
78
+ attributes: new DrupalAttribute().addClass("me-auto"),
77
79
  items: [
78
80
  {
79
81
  label: "Home",
80
82
  path: "/example.html",
81
83
  active: true,
82
- attributes: new drupalAttribute().setAttribute(
84
+ attributes: new DrupalAttribute().setAttribute(
83
85
  "aria-current",
84
86
  "page",
85
87
  ),
@@ -99,7 +101,7 @@ module.exports = {
99
101
  trigger: {
100
102
  label: "Dropdown link",
101
103
  path: "/example.html",
102
- attributes: new drupalAttribute().addClass("nav-link"),
104
+ attributes: new DrupalAttribute().addClass("nav-link"),
103
105
  },
104
106
  items: [
105
107
  {
@@ -122,7 +124,7 @@ module.exports = {
122
124
  modals,
123
125
  language_modal: languageList,
124
126
  breadcrumbs: {
125
- attributes: new drupalAttribute().addClass(["mt-3"]),
127
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
126
128
  links: [
127
129
  { label: "Home", path: "/example.html" },
128
130
  {
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");
@@ -7,8 +7,9 @@ const modals = require("@openeuropa/bcl-data-header/data--modals");
7
7
 
8
8
  module.exports = {
9
9
  variant: "eu",
10
+ navbar_id: "header-navbar",
10
11
  head: {
11
- attributes: new drupalAttribute()
12
+ attributes: new DrupalAttribute()
12
13
  .addClass(["w-100", "shadow-sm", "bcl-header__top-navbar"])
13
14
  .setAttribute("aria-label", "Top Navigation"),
14
15
  disable_collapse: false,
@@ -39,9 +40,9 @@ module.exports = {
39
40
  name: "chat-left-dots-fill",
40
41
  size: "xs",
41
42
  path: "/icons.svg",
42
- attributes: new drupalAttribute().addClass("me-2-5"),
43
+ attributes: new DrupalAttribute().addClass("me-2-5"),
43
44
  },
44
- attributes: new drupalAttribute()
45
+ attributes: new DrupalAttribute()
45
46
  .setAttribute("data-bs-toggle", "modal")
46
47
  .setAttribute("data-bs-target", "#languageModal"),
47
48
  },
@@ -54,9 +55,9 @@ module.exports = {
54
55
  name: "person-fill",
55
56
  size: "xs",
56
57
  path: "/icons.svg",
57
- attributes: new drupalAttribute().addClass("me-2-5"),
58
+ attributes: new DrupalAttribute().addClass("me-2-5"),
58
59
  },
59
- attributes: new drupalAttribute()
60
+ attributes: new DrupalAttribute()
60
61
  .setAttribute("data-bs-toggle", "modal")
61
62
  .setAttribute("data-bs-target", "#loginModal"),
62
63
  },
@@ -68,6 +69,6 @@ module.exports = {
68
69
  language_modal: { ...languageList, variant: "eu" },
69
70
  breadcrumbs: {
70
71
  ...breadcrumbs,
71
- attributes: new drupalAttribute().addClass(["mt-3"]),
72
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
72
73
  },
73
74
  };
@@ -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,6 +1,7 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  module.exports = {
4
+ navbar_id: "header-navbar",
4
5
  variant: "ucpkn",
5
6
  site_name: "UCP Knowledge Network: Applied knowledge for action",
6
7
  light: true,
@@ -12,44 +13,10 @@ module.exports = {
12
13
  navbar: {
13
14
  color_set: "dark",
14
15
  collapse_id: "navbarNavDropdown",
15
- attributes: new drupalAttribute().addClass("bcl-header__navbar"),
16
- form: {
17
- attributes: new drupalAttribute().addClass(["d-flex", "mt-3", "mt-lg-0"]),
18
- submit: {
19
- variant: "light",
20
- assistive_text: "search",
21
- icon: {
22
- name: "search",
23
- size: "xs",
24
- path: "/icons.svg",
25
- },
26
- attributes: new drupalAttribute().addClass([
27
- "border-start-0",
28
- "rounded-0",
29
- "rounded-end",
30
- ]),
31
- },
32
- items: [
33
- [
34
- {
35
- type: "text",
36
- required: true,
37
- label: "Search",
38
- hidden_label: true,
39
- placeholder: "Search",
40
- id: "inlineFormInputGroupSearch",
41
- attributes: new drupalAttribute().addClass([
42
- "border-start-0",
43
- "rounded-0",
44
- "rounded-start",
45
- ]),
46
- },
47
- ],
48
- ],
49
- },
16
+ attributes: new DrupalAttribute().addClass("bcl-header__navbar"),
50
17
  navigation: {
51
18
  navbar: true,
52
- attributes: new drupalAttribute().addClass("me-auto"),
19
+ attributes: new DrupalAttribute().addClass("me-auto"),
53
20
  items: [
54
21
  {
55
22
  id: "navbarDropdownMenuLink",
@@ -58,7 +25,7 @@ module.exports = {
58
25
  trigger: {
59
26
  label: "Knowledge & Capacity",
60
27
  path: "/example.html",
61
- attributes: new drupalAttribute().addClass("nav-link"),
28
+ attributes: new DrupalAttribute().addClass("nav-link"),
62
29
  },
63
30
  items: [
64
31
  {
@@ -90,7 +57,7 @@ module.exports = {
90
57
  trigger: {
91
58
  label: "Science & Research",
92
59
  path: "/example.html",
93
- attributes: new drupalAttribute().addClass("nav-link"),
60
+ attributes: new DrupalAttribute().addClass("nav-link"),
94
61
  },
95
62
  items: [
96
63
  {
@@ -118,7 +85,7 @@ module.exports = {
118
85
  trigger: {
119
86
  label: "Projects",
120
87
  path: "/example.html",
121
- attributes: new drupalAttribute().addClass("nav-link"),
88
+ attributes: new DrupalAttribute().addClass("nav-link"),
122
89
  },
123
90
  items: [
124
91
  {
@@ -146,7 +113,7 @@ module.exports = {
146
113
  trigger: {
147
114
  label: "About",
148
115
  path: "#",
149
- attributes: new drupalAttribute().addClass("nav-link"),
116
+ attributes: new DrupalAttribute().addClass("nav-link"),
150
117
  },
151
118
  items: [
152
119
  {
@@ -167,7 +134,7 @@ module.exports = {
167
134
  },
168
135
  },
169
136
  head: {
170
- attributes: new drupalAttribute()
137
+ attributes: new DrupalAttribute()
171
138
  .addClass(["w-100", "shadow-sm"])
172
139
  .setAttribute("aria-label", "Top Navigation"),
173
140
  disable_collapse: true,
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");
@@ -7,6 +7,7 @@ const navbar = require("@openeuropa/bcl-data-header/data--navbar");
7
7
  const modals = require("@openeuropa/bcl-data-header/data--modals");
8
8
 
9
9
  module.exports = {
10
+ navbar_id: "header-navbar",
10
11
  variant: "eu",
11
12
  site_name: "Project name",
12
13
  project_logo: {
@@ -15,7 +16,7 @@ module.exports = {
15
16
  alt: "project logo",
16
17
  },
17
18
  head: {
18
- attributes: new drupalAttribute()
19
+ attributes: new DrupalAttribute()
19
20
  .addClass(["w-100", "shadow-sm", "bcl-header__top-navbar"])
20
21
  .setAttribute("aria-label", "Top Navigation"),
21
22
  disable_collapse: false,
@@ -44,6 +45,6 @@ module.exports = {
44
45
  language_modal: { ...languageList, variant: "eu" },
45
46
  breadcrumbs: {
46
47
  ...breadcrumbs,
47
- attributes: new drupalAttribute().addClass(["mt-3"]),
48
+ attributes: new DrupalAttribute().addClass(["mt-3"]),
48
49
  },
49
50
  };
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": "0.3791.202505281600",
5
+ "version": "0.3821.202510100015",
6
6
  "description": "OE header data",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@openeuropa/bcl-data-breadcrumb": "^0.3791.202505281600",
12
- "@openeuropa/bcl-language-list": "^0.3791.202505281600"
11
+ "@openeuropa/bcl-data-breadcrumb": "^0.3821.202510100015",
12
+ "@openeuropa/bcl-language-list": "^0.3821.202510100015"
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": "82386b23099d054d6be4d12b88414d068e2b94bb"
27
+ "gitHead": "6a890344c1b3fed3b4f049080c3e30cc55b42b9d"
28
28
  }