@eeacms/volto-eea-design-system 1.38.3 → 1.39.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [1.39.0](https://github.com/eea/volto-eea-design-system/compare/1.38.3...1.39.0) - 20 August 2025
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: Control Navigation Settings TTW - refs #288509 [dobri1408 - [`6b151e4`](https://github.com/eea/volto-eea-design-system/commit/6b151e46dc8f8e23e0933c882e45552ab1a3c547)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Update package.json [David Ichim - [`4389bce`](https://github.com/eea/volto-eea-design-system/commit/4389bcefad69ffbcccd567fcb1c08611e3599877)]
7
16
  ### [1.38.3](https://github.com/eea/volto-eea-design-system/compare/1.38.2...1.38.3) - 31 July 2025
8
17
 
9
18
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "1.38.3",
3
+ "version": "1.39.0",
4
4
  "description": "@eeacms/volto-eea-design-system: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -6,9 +6,7 @@
6
6
  import React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { Link } from 'react-router-dom';
9
- import { Breadcrumb, Container, Image, Icon, Segment } from 'semantic-ui-react';
10
-
11
- import homeIcon from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/home-icon.svg';
9
+ import { Breadcrumb, Container, Icon, Segment } from 'semantic-ui-react';
12
10
 
13
11
  const Breadcrumbs = ({
14
12
  root,
@@ -22,9 +20,9 @@ const Breadcrumbs = ({
22
20
  <Container>
23
21
  <Breadcrumb size={size} as="nav" aria-label={'Breadcrumbs'}>
24
22
  <ol aria-label="Breadcrumbs navigation">
25
- <li>
23
+ <li className="breadcrumbs-home-item">
26
24
  <Link to={root || '/'} className="section" title={'Home'}>
27
- <Image src={homeIcon} alt="" />
25
+ <Icon className="ri-home-2-line breadcrumbs-home-icon" />
28
26
  </Link>
29
27
  </li>
30
28
  {sections.map((item, index, items) => {
@@ -158,7 +158,9 @@ const Main = ({
158
158
  const [burger, setBurger] = React.useState('');
159
159
  const searchInputRef = React.useRef(null);
160
160
  const [isClient, setIsClient] = React.useState();
161
- const itemsLayouts = menuItemsLayouts || config.settings?.menuItemsLayouts;
161
+
162
+ const itemsLayouts =
163
+ menuItemsLayouts || config.settings?.menuItemsLayouts || {};
162
164
 
163
165
  React.useEffect(() => setIsClient(true), []);
164
166
 
@@ -8,10 +8,17 @@ import {
8
8
  Transition,
9
9
  } from 'semantic-ui-react';
10
10
 
11
- import { cloneDeep } from 'lodash';
11
+ import { cloneDeep, kebabCase } from 'lodash';
12
12
 
13
13
  import { useClickOutside } from '@eeacms/volto-eea-design-system/helpers';
14
14
 
15
+ const generateCssClassFromUrl = (url) => {
16
+ if (!url) return '';
17
+ return kebabCase(
18
+ url.replace(/\//g, '-').replace(/\./g, '-').replace(/@/g, '-'),
19
+ );
20
+ };
21
+
15
22
  const createColumns = (item, renderMenuItem, item_id) => {
16
23
  return item.items.map((item, index) => (
17
24
  <React.Fragment key={index}>
@@ -120,17 +127,30 @@ export const StandardMegaMenuGrid = ({ menuItem, renderMenuItem, layout }) => {
120
127
 
121
128
  const renderColumns = () => (
122
129
  <Grid>
123
- {menuItemColumns.map((section, columnIndex) => (
124
- <div className={layout.menuItemColumns[columnIndex]} key={columnIndex}>
125
- {columnIndex !== menuItemColumnsLength
126
- ? renderColumnContent(menuItem.items[columnIndex], columnIndex)
127
- : menuItem.items
128
- .slice(menuItemColumnsLength)
129
- .map((section, _idx) =>
130
- renderColumnContent(section, columnIndex),
131
- )}
132
- </div>
133
- ))}
130
+ {menuItemColumns.map((section, columnIndex) => {
131
+ const sectionItem =
132
+ columnIndex !== menuItemColumnsLength
133
+ ? menuItem.items[columnIndex]
134
+ : menuItem.items.slice(menuItemColumnsLength)[0];
135
+ const urlClass = sectionItem?.url
136
+ ? generateCssClassFromUrl(sectionItem.url)
137
+ : '';
138
+ const classNames = `${layout.menuItemColumns[columnIndex]}${
139
+ urlClass ? ` ${urlClass}` : ''
140
+ }`;
141
+
142
+ return (
143
+ <div className={classNames} key={columnIndex}>
144
+ {columnIndex !== menuItemColumnsLength
145
+ ? renderColumnContent(menuItem.items[columnIndex], columnIndex)
146
+ : menuItem.items
147
+ .slice(menuItemColumnsLength)
148
+ .map((section, _idx) =>
149
+ renderColumnContent(section, columnIndex),
150
+ )}
151
+ </div>
152
+ );
153
+ })}
134
154
  </Grid>
135
155
  );
136
156
 
@@ -346,7 +366,6 @@ function HeaderMenuPopUp({
346
366
  const menuItem = menuItems.find(
347
367
  (current) => current.url === activeItem || current['@id'] === activeItem,
348
368
  );
349
-
350
369
  // Get layout for current menu item and fallback to a * layout that can
351
370
  // be used for all menu items that don't have a specific layout
352
371
  const layout =
@@ -360,7 +379,6 @@ function HeaderMenuPopUp({
360
379
  ])) ||
361
380
  (!!menuItemsLayouts && menuItemsLayouts['*']) ||
362
381
  {};
363
-
364
382
  return (
365
383
  <Transition visible={visible} animation="slide down" duration={300}>
366
384
  <div id="mega-menu" ref={nodeRef}>
@@ -6,9 +6,11 @@
6
6
  display: flex;
7
7
  align-items: center;
8
8
  line-height: @lineHeight;
9
-
10
- .home.icon {
11
- margin-right: 0;
9
+ .breadcrumbs-home-item {
10
+ line-height: 1;
11
+ }
12
+ .breadcrumbs-home-icon {
13
+ --breadcrumbIconFontSize: @breadcrumbIconWidth;
12
14
  }
13
15
  }
14
16
 
@@ -49,6 +51,6 @@
49
51
 
50
52
  i.icon {
51
53
  width: @breadcrumbIconWidth;
52
- font-size: @breadcrumbIconFontSize;
54
+ font-size: var(--breadcrumbIconFontSize, @breadcrumbIconFontSize);
53
55
  }
54
56
  }
@@ -10,6 +10,7 @@
10
10
  padding-left: @sidenavPaddingLeft;
11
11
  overflow: @sidenavOverflow;
12
12
  }
13
+
13
14
  @media (max-width: @largeMonitorBreakpoint) {
14
15
  .context-navigation {
15
16
  max-width: @sidenavMaxWidth;
@@ -63,12 +64,12 @@
63
64
  padding: @sidenavFolderItemPadding;
64
65
  }
65
66
 
66
- .context-navigation .ui.list > .item > .content {
67
+ .context-navigation .ui.list>.item>.content {
67
68
  border-bottom: @sidenavContentBorderBottom;
68
69
  }
69
70
 
70
71
  // Hide last border
71
- .context-navigation .ui.list > .item:last-child > .content {
72
+ .context-navigation .ui.list>.item:last-child>.content {
72
73
  border-bottom: none;
73
74
  }
74
75
 
@@ -103,12 +104,13 @@
103
104
  }
104
105
 
105
106
  // Active indicator
106
- .context-navigation .active.item > .content > a {
107
+ .context-navigation .active.item>.content>a {
107
108
  color: @sidenavItemActiveColor;
108
109
  font-weight: @sidenavItemActiveFontWeight;
109
110
  }
110
- .context-navigation .active.item > .content > a:hover,
111
- .context-navigation .active.item > .content > a:focus-visible {
111
+
112
+ .context-navigation .active.item>.content>a:hover,
113
+ .context-navigation .active.item>.content>a:focus-visible {
112
114
  color: @sidenavItemActiveColorHover;
113
115
  }
114
116
 
@@ -130,9 +132,11 @@
130
132
  align-items: center;
131
133
  gap: 0.15rem;
132
134
  }
135
+
133
136
  .list-item {
134
137
  padding: 0.25rem 0;
135
138
  }
139
+
136
140
  .list-item:has(> .context-navigation-detail) {
137
141
  list-style-type: none;
138
142
  }
@@ -150,6 +154,7 @@
150
154
  background-color: @sidenavAccordionHeaderBackgroundColor;
151
155
  box-shadow: @sidenavBoxShadow;
152
156
  }
157
+
153
158
  @media only screen and (max-width: 991px) {
154
159
  .view-viewview.light-header .eea-side-menu:not(.fixed) .accordion-header {
155
160
  color: white;
@@ -163,6 +168,7 @@
163
168
  box-shadow: @sidenavBoxShadow;
164
169
  background-color: @sidenavBackground;
165
170
  }
171
+
166
172
  .context-navigation-list .title-link {
167
173
  display: block;
168
174
  color: @sidenavItemColor;
@@ -170,9 +176,11 @@
170
176
  font-size: @sidenavItemFontSize;
171
177
  font-weight: @sidenavItemFontWeight;
172
178
  }
179
+
173
180
  .context-navigation-list .content .title-link {
174
181
  font-weight: @sidenavLevelTwoItemFontWeight;
175
182
  }
183
+
176
184
  .context-navigation {
177
185
  .current {
178
186
  color: @sidenavItemActiveColor;
@@ -183,7 +191,16 @@
183
191
  flex-wrap: wrap;
184
192
  margin: 0 !important;
185
193
  }
186
- .ui.accordion > .title {
194
+
195
+ .navigation_home .icon {
196
+ font-size: 1rem !important;
197
+ font-weight: inherit;
198
+ margin-right: 0;
199
+ margin-left: -4px; // align icon with title text
200
+ margin-left: 2px;
201
+ }
202
+
203
+ .ui.accordion>.title {
187
204
  --text-color: @sidenavItemColor;
188
205
  --text-color-hover: @sidenavItemColor;
189
206
  font-size: @sidenavItemFontSize;
@@ -192,22 +209,21 @@
192
209
  text-align: left;
193
210
  line-height: @sidenavFolderItemLineHeight;
194
211
  margin: 0;
212
+ display: flex;
213
+ align-items: normal;
214
+
215
+ .icon {
216
+ margin-top: 4px;
217
+ }
195
218
  }
196
219
 
197
220
  // add border-bottom only on first level titles
198
- .context-navigation-list
199
- > .accordion-list-item
200
- > .accordion
201
- > .title:not([aria-expanded='true']) {
221
+ .context-navigation-list>.accordion-list-item>.accordion>.title:not([aria-expanded='true']) {
202
222
  border-bottom: @sidenavContentBorderBottom;
203
223
  }
204
224
 
205
225
  // add border-bottom to content of first level expanded accordion
206
- .context-navigation-list
207
- > .accordion-list-item
208
- > .accordion
209
- > .title[aria-expanded='true']
210
- + .content {
226
+ .context-navigation-list>.accordion-list-item>.accordion>.title[aria-expanded='true']+.content {
211
227
  border-bottom: @sidenavContentBorderBottom;
212
228
  }
213
229
 
@@ -216,7 +232,14 @@
216
232
  overflow-y: auto;
217
233
  -webkit-overflow-scrolling: touch;
218
234
  }
235
+
219
236
  .accordion-list {
237
+ &.level-0 {
238
+ >.accordion-list-title .title-link {
239
+ font-weight: @sidenavItemFontWeight;
240
+ }
241
+ }
242
+
220
243
  .accordion-list .accordion-list-item .title {
221
244
  padding-left: @secondLevelItemPaddingLeft;
222
245
  }
@@ -224,24 +247,22 @@
224
247
  .accordion-list .accordion-list .accordion-list-item .title {
225
248
  padding-left: @thirdLevelItemPaddingLeft;
226
249
  }
250
+
227
251
  .accordion-list .accordion-list-item .accordion-list-title .title-link {
228
252
  padding-left: @thirdLevelItemPaddingLeft;
229
253
  }
230
254
 
231
- .accordion-list
232
- .accordion-list
233
- .accordion-list-item
234
- .accordion-list-title
235
- .title-link {
255
+ .accordion-list .accordion-list .accordion-list-item .accordion-list-title .title-link {
236
256
  padding-left: @fourthLevelItemPaddingLeft;
237
257
  }
258
+
238
259
  margin-top: 0;
239
260
  margin-bottom: 0;
240
261
  list-style: none;
241
262
  padding-left: 0;
242
263
  }
243
264
 
244
- .context-navigation-list > .accordion-list-title {
265
+ .context-navigation-list>.accordion-list-title {
245
266
  border-bottom: @sidenavContentBorderBottom;
246
267
 
247
268
  .title-link {
@@ -261,4 +282,4 @@
261
282
  }
262
283
  }
263
284
 
264
- .loadUIOverrides();
285
+ .loadUIOverrides();
@@ -54,10 +54,10 @@
54
54
 
55
55
  /* Item - Level 2 */
56
56
  @sidenavLevelTwoItemFontWeight: @font-weight-4;
57
- @sidenavLevelTwoItemPadding: 0.5rem 1.5rem;
58
- @secondLevelItemPaddingLeft: @rem-space-6;
57
+ @sidenavLevelTwoItemPadding: 0.5rem 1rem 0.5rem 2rem;
58
+ @secondLevelItemPaddingLeft: @rem-space-8;
59
59
 
60
60
  /* Item - Level 3 */
61
61
  @subparItemPaddingLeft: @rem-space-12;
62
- @thirdLevelItemPaddingLeft: @rem-space-8;
63
- @fourthLevelItemPaddingLeft: @rem-space-10;
62
+ @thirdLevelItemPaddingLeft: @rem-space-12;
63
+ @fourthLevelItemPaddingLeft: @rem-space-14;
@@ -47,6 +47,7 @@ h6 {
47
47
 
48
48
  .content-area {
49
49
  color: @contentAreaColor;
50
+ min-height: 100px;
50
51
  }
51
52
 
52
53
  [id='page-document']>*,
@@ -210,10 +211,12 @@ a {
210
211
  size: A4;
211
212
  margin: 1cm;
212
213
  }
214
+
213
215
  * {
214
216
  -webkit-print-color-adjust: exact;
215
217
  print-color-adjust: exact;
216
218
  }
219
+
217
220
  .skiplinks-wrapper,
218
221
  .slider-arrow,
219
222
  #footer,
@@ -260,4 +263,4 @@ a {
260
263
  .grid-block-teaser .card {
261
264
  page-break-inside: auto;
262
265
  }
263
- }
266
+ }
@@ -197,6 +197,16 @@
197
197
  --text-color-hover: @tertiaryColorCSSVar;
198
198
  }
199
199
 
200
+ /* Remove padding from navigation settings accordion content */
201
+ .navigation-objectlist-widget .ui.styled.accordion .content, .navigation-objectlist-widget .ui.styled.accordion .accordion .content {
202
+ padding: 0 !important;
203
+ margin: 0 !important
204
+ }
205
+
206
+ navigation-objectlist-widget .ui.styled.accordion{
207
+ margin: 0 !important
208
+ }
209
+
200
210
  @media only screen and (max-width: @largestMobileScreen) {
201
211
  .accordion-block h1 * {
202
212
  font-size: @mobileH1;