@eeacms/volto-eea-design-system 1.0.0-beta.6 → 1.0.2

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,38 @@ 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.0.2](https://github.com/eea/volto-eea-design-system/compare/1.0.1...1.0.2) - 14 March 2023
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix(megamenu): topic menu title is now placed before content [David Ichim - [`6004bcb`](https://github.com/eea/volto-eea-design-system/commit/6004bcb2683dedf6d6e18e61f33fde84a54c38d5)]
12
+ - fix(megamenu): removed in depth nav_title renaming that set title wrongly to a-z topics [David Ichim - [`899ca0e`](https://github.com/eea/volto-eea-design-system/commit/899ca0e2ba5f8f9eb61e4280d786f74a17c186b7)]
13
+
14
+ #### :nail_care: Enhancements
15
+
16
+ - change(megamenu): removed special styling from at a glance mega menu section [David Ichim - [`fd0c4c8`](https://github.com/eea/volto-eea-design-system/commit/fd0c4c8a06bb4c4aa26f57c453132d13d30bc691)]
17
+ - change(docusaurus): updated static image of footer sections [David Ichim - [`4ff3185`](https://github.com/eea/volto-eea-design-system/commit/4ff3185edf9257c790d2a124d3f937f61d84e147)]
18
+ - change(footer): renamed thematic information platforms to environmental information systems [David Ichim - [`e7004a7`](https://github.com/eea/volto-eea-design-system/commit/e7004a7ea39451dbf97e1faed222b0cc5a12d6ce)]
19
+
20
+ #### :house: Documentation changes
21
+
22
+ - docs(What's new): Update 'What's new' [Alin Voinea - [`d7ed9d6`](https://github.com/eea/volto-eea-design-system/commit/d7ed9d619aa60d087c3821a972ebe5bf5766521a)]
23
+
24
+ #### :hammer_and_wrench: Others
25
+
26
+ - fixed accordion selector typo [David Ichim - [`f4cabc8`](https://github.com/eea/volto-eea-design-system/commit/f4cabc8f2222cf587af9e04b0ea196799b84202f)]
27
+ ### [1.0.1](https://github.com/eea/volto-eea-design-system/compare/1.0.0...1.0.1) - 13 March 2023
28
+
29
+ ### [1.0.0](https://github.com/eea/volto-eea-design-system/compare/1.0.0-beta.6...1.0.0) - 13 March 2023
30
+
31
+ #### :bug: Bug Fixes
32
+
33
+ - fix(Footer): Open internal links within the same page [Alin Voinea - [`5b3e409`](https://github.com/eea/volto-eea-design-system/commit/5b3e409c71281800bb0fd137a1bac256efaca2b5)]
34
+
35
+ #### :nail_care: Enhancements
36
+
37
+ - change(banner): use huge scale instead of full image for better performance [David Ichim - [`381c58e`](https://github.com/eea/volto-eea-design-system/commit/381c58e3521436f562d9e1727428a18435e2c0f3)]
38
+
7
39
  ### [1.0.0-beta.6](https://github.com/eea/volto-eea-design-system/compare/1.0.0-beta.5...1.0.0-beta.6) - 10 March 2023
8
40
 
9
41
  #### :rocket: New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.2",
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",
@@ -26,9 +26,7 @@ const socialPlatforms = {
26
26
  };
27
27
 
28
28
  export const getImageSource = (image) => {
29
- if (image?.download) return image.download;
30
- if (image?.encoding)
31
- return `data:${image['content-type']};${image['encoding']},${image['data']}`;
29
+ if (image?.scales?.huge) return image.scales.huge.download;
32
30
  return null;
33
31
  };
34
32
 
@@ -30,7 +30,7 @@ const Template = (args) => (
30
30
 
31
31
  export const Default = Template.bind({});
32
32
  Default.args = {
33
- header: 'Thematic information platforms',
33
+ header: 'Environmental information systems',
34
34
  description: '',
35
35
  actions: [
36
36
  { link: '/#', title: 'Privacy' },
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
+ import { Link } from 'react-router-dom';
2
3
  import { Grid } from 'semantic-ui-react';
4
+ import { isInternalURL } from '@plone/volto/helpers';
3
5
 
4
6
  const FooterActions = (props) => {
5
7
  if (props.children) {
@@ -12,24 +14,34 @@ const FooterActions = (props) => {
12
14
  <Grid.Column mobile={12} tablet={6} computer={6}>
13
15
  <div className="actions">
14
16
  {props.actions &&
15
- props.actions.map((action, index) => (
16
- <a
17
- href={action.link}
18
- key={index}
19
- target={'_blank'}
20
- rel={'noreferrer'}
21
- >
22
- {action.title}
23
- </a>
24
- ))}
17
+ props.actions.map((action, index) =>
18
+ isInternalURL(action.link) ? (
19
+ <Link to={action.link} key={index}>
20
+ {action.title}
21
+ </Link>
22
+ ) : (
23
+ <a
24
+ href={action.link}
25
+ key={index}
26
+ target={'_blank'}
27
+ rel={'noreferrer'}
28
+ >
29
+ {action.title}
30
+ </a>
31
+ ),
32
+ )}
25
33
  </div>
26
34
  </Grid.Column>
27
35
 
28
36
  <Grid.Column mobile={12} tablet={6} computer={6}>
29
37
  <div className="copyright">
30
38
  {props.copyright &&
31
- props.copyright.map((copyright, index) => (
32
- <React.Fragment key={index}>
39
+ props.copyright.map((copyright, index) =>
40
+ isInternalURL(copyright.link) ? (
41
+ <Link to={copyright.link} key={index}>
42
+ {copyright.title}
43
+ </Link>
44
+ ) : (
33
45
  <a
34
46
  href={copyright.link}
35
47
  key={index}
@@ -38,8 +50,8 @@ const FooterActions = (props) => {
38
50
  >
39
51
  {copyright.title}
40
52
  </a>
41
- </React.Fragment>
42
- ))}
53
+ ),
54
+ )}
43
55
  </div>
44
56
  </Grid.Column>
45
57
  </Grid>
@@ -70,24 +70,6 @@ const Topics = ({ menuItem, renderMenuItem }) => (
70
70
  <React.Fragment key={index}>
71
71
  {section.title === 'At a glance' ? (
72
72
  <Grid.Column width={3} id="at-a-glance">
73
- <div className="mega-menu-title">
74
- {/* Inverted right labeled button as a category title,
75
- for topics the button goes inside the grid */}
76
- {renderMenuItem(
77
- menuItem,
78
- { className: 'ui button inverted icon right labeled' },
79
- {
80
- iconPosition: 'right',
81
- children: (
82
- <>
83
- {/* Add word overview to titles */}
84
- <span> overview</span>
85
- <Icon className={'arrow right icon'} alt={'Title icon'} />
86
- </>
87
- ),
88
- },
89
- )}
90
- </div>
91
73
  <Item item={section} key={index} renderMenuItem={renderMenuItem} />
92
74
  </Grid.Column>
93
75
  ) : (
@@ -224,8 +206,6 @@ const SecondLevelContent = ({ element, topics = false, renderMenuItem }) => {
224
206
  const inDepth = element.items.find(
225
207
  (element) => element.url.indexOf('in-depth') !== -1,
226
208
  );
227
- // eslint-disable-next-line no-unused-expressions
228
- inDepth ? (inDepth.nav_title = 'A-Z Topics') : '';
229
209
  content = (
230
210
  <List>
231
211
  {atAGlance &&
@@ -341,7 +321,7 @@ function HeaderMenuPopUp({
341
321
  <div className="menu-content tablet hidden mobile hidden">
342
322
  {/* Inverted right labeled button as a category title,
343
323
  for topics the button goes inside the grid */}
344
- {menuItem.title !== 'Topics' && (
324
+ {menuItem.title && (
345
325
  <div className="mega-menu-title">
346
326
  {renderMenuItem(
347
327
  menuItem,
package/templates/eea.hbs CHANGED
@@ -2,7 +2,7 @@
2
2
  title: What's new
3
3
  ---
4
4
 
5
- ### EEA Design System (1.0.0)
5
+ ### EEA Design System (1.0)
6
6
 
7
7
  #### Components ready to be used
8
8
 
@@ -26,12 +26,8 @@ The following components are ready to be used as Volto `blocks`, `slate` integra
26
26
  #### Future releases
27
27
 
28
28
  Below is a non-exhaustive list of the work-in-progress which is planned for future releases:
29
- - Navigation Portlet (used on the left/right hand of content) is still WIP and should not be used
30
- - When using the Table `block`, please be aware of enabling the responsive design manually (it should be on by default in later releases)
31
- - Description list (dt, dd) is still missing from slate editor
32
- - Slate enhancements, e.g. the inclusion of various font weights and text alignment (left, centered, right)
33
- - Spacing/padding system via the `block styler`. We do have design-tokens; however, these are not exposed to the volto block styler. We want to add the ability for editors to consistently apply various spacing/padding on certain components in order to allow a better alignment when components are used together.
34
- - Harmonize component naming across docusarurus, storybook, code, and Volto.
29
+ - Navigation Portlet (used on the left/right hand of content)
30
+ - Spacing/padding system. We want to add the ability for editors to consistently apply various spacing/padding on certain components in order to allow a better alignment when components are used together.
35
31
  - Improve docusaurus and storybook with more components, controls, and variations in order to better reflect what is possible in Volto.
36
32
 
37
33
  {{#unless options.hideCredit}}
@@ -27,7 +27,7 @@
27
27
  background: @topSectionBackground;
28
28
 
29
29
  .ui.container {
30
- z-index: @topSectionZindex;
30
+ z-index: @topSectionZIndex;
31
31
  display: flex;
32
32
  align-items: center;
33
33
  justify-content: space-between;
@@ -775,19 +775,17 @@
775
775
  }
776
776
 
777
777
  #at-a-glance {
778
- padding: @megaMenuGlancePadding !important;
779
- margin-bottom: @megaMenuGlanceMarginBottom !important;
780
- background-color: @megaMenuGlanceBackgroundColor;
781
-
782
778
  .item {
783
779
  margin: @megaMenuGlanceListItemMargin;
784
780
  font-size: @megaMenuGlanceListItemFontSize;
785
781
  font-weight: @megaMenuGlanceListItemFontWeight;
786
782
  }
783
+ .list.menu-list {
784
+ margin-top: @megaMenuGlanceMenuListMarginTop;
785
+ }
787
786
  }
788
787
 
789
788
  #topics-right-column {
790
- padding-top: @topicsRightColumnPaddingTop;
791
789
  padding-left: @topicsRightColumnPaddingLeft;
792
790
  }
793
791
 
@@ -33,7 +33,7 @@
33
33
  @topSectionItemFontSize : @font-size-00;
34
34
  @mobileTopSectionItemFontSize : @font-size-00;
35
35
  @tabletTopSectionItemFontSize : @font-size-00;
36
- @topSectionZindex : @z-index-1;
36
+ @topSectionZIndex : @z-index-1;
37
37
  @dropdownColor : @blue-grey-6;
38
38
  @mobileDropdownFontSize : @font-size-00;
39
39
  @tabletDropdownFontSize : @font-size-00;
@@ -187,16 +187,13 @@
187
187
  @megaMenuListItemActivePadding: 8px;
188
188
 
189
189
  /* Topics */
190
- @topicsRightColumnPaddingTop: calc(31 * @spacer); // 124px;
191
190
  @topicsRightColumnPaddingLeft: @rem-space-4;
192
191
 
193
192
  /* At a glance */
194
- @megaMenuGlanceBackgroundColor: @secondaryColor;
195
- @megaMenuGlancePadding: @rem-space-4 @rem-space-6;
196
- @megaMenuGlanceMarginBottom: -@rem-space-4;
197
- @megaMenuGlanceListItemFontSize: @font-size-2;
193
+ @megaMenuGlanceListItemFontSize: @font-size-1;
198
194
  @megaMenuGlanceListItemFontWeight: @font-weight-4;
199
- @megaMenuGlanceListItemMargin: @rem-space-4 0;
195
+ @megaMenuGlanceListItemMargin: 0;
196
+ @megaMenuGlanceMenuListMarginTop: @rem-space-4;
200
197
 
201
198
  /* Accordion */
202
199
  @megaMenuAccordionTitleFontSize: @font-size-3;
@@ -237,7 +234,7 @@
237
234
  @tabletSearchBoxFullSearchTextAlign: center;
238
235
  @searchBoxSuggestionsMarginTop: 2em;
239
236
  @searchBoxSuggestionsTextColor: @white;
240
- @searchBoxSuggestionsColumnGap: 2em;
237
+ @searchBoxSuggestionsColumnGap: 2em;
241
238
  @searchBoxSuggestionsRowGap: 1em;
242
239
  @searchBoxMobilePopupMarginTop: 0.5em;
243
240
  @searchBoxTabletPopupMarginTop: 1em;
@@ -155,6 +155,6 @@
155
155
  .ui.accordion.tertiary .title:not(.active):hover,
156
156
  .ui.accordion.tertiary .title:not(.active):focus-visible,
157
157
  .ui.accordion.tertiary .title:not(.active):hover i,
158
- .ui.accordion.tertiary .title:not(.active):focus-visble i {
158
+ .ui.accordion.tertiary .title:not(.active):focus-visible i {
159
159
  color: @tertiaryColorCSSVar;
160
- }
160
+ }