@eeacms/volto-eea-design-system 0.7.5 → 0.7.6

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,8 +4,21 @@ 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
+ #### [0.7.6](https://github.com/eea/volto-eea-design-system/compare/0.7.5...0.7.6)
8
+
9
+ - Autobuild of docusaurus docs [`03b82a6`](https://github.com/eea/volto-eea-design-system/commit/03b82a6a3e20731865de424d6cbce827f64d9504)
10
+ - change(footer): fix missing key warning from react dev [`77f72d5`](https://github.com/eea/volto-eea-design-system/commit/77f72d5bdc719805a6314058c741387ee7155d28)
11
+ - Autobuild of docusaurus docs [`f6930f5`](https://github.com/eea/volto-eea-design-system/commit/f6930f57c7a0b63de20f0fad757c6f1409e43ca2)
12
+ - change(footer): Footer updates 147837 #222 [`32fed23`](https://github.com/eea/volto-eea-design-system/commit/32fed231f1209caeddb18e0bb75d670f20bafb88)
13
+ - change(footer): set actions before thematic section on mobile [`db25f96`](https://github.com/eea/volto-eea-design-system/commit/db25f966a214c94677192215181453e9d59ca957)
14
+ - refactor(footer): initial redesign of main section [`8e85617`](https://github.com/eea/volto-eea-design-system/commit/8e85617157cdc31a7470acfcd72b85d8fadd1bce)
15
+ - refactor(footer): restructure theme sites logo columns [`dcba45a`](https://github.com/eea/volto-eea-design-system/commit/dcba45a0bfd832c7d5d1e092db8ea4040eceda57)
16
+
7
17
  #### [0.7.5](https://github.com/eea/volto-eea-design-system/compare/0.7.3...0.7.5)
8
18
 
19
+ > 11 August 2022
20
+
21
+ - change(megamenu): mobile improvements with See all links, active elements and non accordion children #224 [`6767b99`](https://github.com/eea/volto-eea-design-system/commit/6767b99fea3925b35e9dede0a67ea90242e5e730)
9
22
  - Update package.json [`e21e00d`](https://github.com/eea/volto-eea-design-system/commit/e21e00dc1e0b54daef2c71311a9da709bc1f7e6d)
10
23
  - Autobuild of docusaurus docs [`ca7c756`](https://github.com/eea/volto-eea-design-system/commit/ca7c75680763219f0acdc4c91d348c4520de13f4)
11
24
  - change(megamenu): mobile menu improvements #223 [`b3cabfe`](https://github.com/eea/volto-eea-design-system/commit/b3cabfe3ddc42c2ea39ae20d01bb6fd0db478ecc)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
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",
@@ -1,30 +1,34 @@
1
1
  import React from 'react';
2
- import { Icon } from 'semantic-ui-react';
3
2
  import PropTypes from 'prop-types';
4
3
  import { Link } from 'react-router-dom';
5
4
 
6
- const Contact = ({ children, contacts, header, address }) =>
5
+ const Contact = ({ children, contacts }) =>
7
6
  children?.length ? (
8
7
  children
9
8
  ) : (
10
9
  <div className="contact-block">
11
- <p className="header">{header}</p>
12
10
  {contacts?.map((contact, index) => (
13
11
  <div className="contact" key={index}>
14
- <Link to={contact.link}>
15
- <Icon className={contact.icon} size="big"></Icon>
12
+ <Link to={contact.link} className="bold">
16
13
  {contact.text}
17
14
  </Link>
15
+ {contact.children && (
16
+ <div className="subcontact">
17
+ {contact.children.map((child, index) => (
18
+ <Link to={child.link} key={index}>
19
+ {child.text}
20
+ </Link>
21
+ ))}
22
+ </div>
23
+ )}
18
24
  </div>
19
25
  ))}
20
- {address && <p className="address">{address}</p>}
21
26
  </div>
22
27
  );
23
28
 
24
29
  Contact.propTypes = {
25
30
  contacts: PropTypes.array,
26
31
  header: PropTypes.string,
27
- address: PropTypes.string,
28
32
  };
29
33
 
30
34
  export default Contact;
@@ -24,7 +24,7 @@ const Footer = (props) => {
24
24
  const { children } = props;
25
25
  return (
26
26
  <footer>
27
- <div className="wrapper">
27
+ <div className="footer-wrapper">
28
28
  <Container>{children}</Container>
29
29
  </div>
30
30
  </footer>
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Link } from 'react-router-dom';
3
+ import { Grid } from 'semantic-ui-react';
3
4
 
4
5
  const FooterActions = (props) => {
5
6
  if (props.children) {
@@ -8,13 +9,29 @@ const FooterActions = (props) => {
8
9
 
9
10
  return (
10
11
  <div className="menu">
11
- {props.actions &&
12
- props.actions.map((action, index) => (
13
- <Link to={action.link} key={index}>
14
- {action.copy && <>&copy;</>}
15
- {action.title}
16
- </Link>
17
- ))}
12
+ <Grid>
13
+ <Grid.Column mobile={12} tablet={6} computer={6}>
14
+ <div className="actions">
15
+ {props.actions &&
16
+ props.actions.map((action, index) => (
17
+ <Link to={action.link} key={index}>
18
+ {action.title}
19
+ </Link>
20
+ ))}
21
+ </div>
22
+ </Grid.Column>
23
+
24
+ <Grid.Column mobile={12} tablet={6} computer={6}>
25
+ <div className="copyright">
26
+ {props.copyright &&
27
+ props.copyright.map((copyright, index) => (
28
+ <Link to={copyright.link} key={index}>
29
+ &copy; Copyright {new Date().getFullYear()} {copyright.site}
30
+ </Link>
31
+ ))}
32
+ </div>
33
+ </Grid.Column>
34
+ </Grid>
18
35
  </div>
19
36
  );
20
37
  };
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  const FooterHeader = (props) => {
4
4
  return (
5
- <div className="theme-sites mobile hidden">
5
+ <div className="theme-sites">
6
6
  <p className="header text-center">{props.children}</p>
7
7
  </div>
8
8
  );
@@ -3,23 +3,35 @@ import { Grid, Image } from 'semantic-ui-react';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
5
  const Sites = (props) => {
6
+ const getLogoColumns = (logos) => {
7
+ let column = [];
8
+ for (let i = 0; i < logos.length; i += 2) {
9
+ const item = logos[i];
10
+ const nextItem = logos[i + 1];
11
+ column.push(
12
+ <Grid.Column className="logo" key={i}>
13
+ <a className="logo" href={item.link}>
14
+ <Image src={item.src} alt={item.alt}></Image>
15
+ </a>
16
+ <a className="logo" href={nextItem.link}>
17
+ <Image src={nextItem.src} alt={nextItem.alt}></Image>
18
+ </a>
19
+ </Grid.Column>,
20
+ );
21
+ }
22
+ return column;
23
+ };
24
+
6
25
  if (props.children) {
7
26
  return <div>{props.children}</div>;
8
27
  }
9
28
 
10
29
  //fallback to props
11
30
  return (
12
- <div className="theme-sites mobile hidden">
31
+ <div className="theme-sites">
13
32
  <div className="logos">
14
- <Grid columns={5}>
15
- {props.sites &&
16
- props.sites.map((site, index) => (
17
- <Grid.Column className="logo" key={index}>
18
- <a href={site.link}>
19
- <Image src={site.src} alt={site.alt}></Image>
20
- </a>
21
- </Grid.Column>
22
- ))}
33
+ <Grid columns={5} stackable>
34
+ {getLogoColumns(props.sites)}
23
35
  </Grid>
24
36
  </div>
25
37
  </div>
@@ -11,51 +11,55 @@ const SubFooter = (props) => {
11
11
  return (
12
12
  <div className={'subfooter'}>
13
13
  <Grid>
14
- <Grid.Column mobile={12} tablet={5} computer={6}>
15
- <div className="item">
16
- <p className="header text-center logo-header">
17
- {props.logosHeader}
18
- </p>
14
+ {props.managedBy &&
15
+ props.managedBy.map((manager, index) => (
16
+ <Grid.Column
17
+ mobile={manager.columnSize.mobile}
18
+ tablet={manager.columnSize.tablet}
19
+ computer={manager.columnSize.computer}
20
+ key={index}
21
+ className="mobile hidden"
22
+ >
23
+ <div className="item">
24
+ <div className={manager.className}>
25
+ <a href={manager.link}>
26
+ <Image src={manager.src} alt={manager.alt}></Image>
27
+ </a>
28
+ </div>
29
+ </div>
30
+ </Grid.Column>
31
+ ))}
19
32
 
20
- <Grid>
21
- {props.managedBy &&
22
- props.managedBy.map((manager, index) => (
23
- <Grid.Column
24
- mobile={manager.columnSize.mobile}
25
- tablet={manager.columnSize.tablet}
26
- computer={manager.columnSize.computer}
27
- key={index}
28
- >
29
- <div className={manager.className}>
30
- <a href={manager.link}>
31
- <Image src={manager.src} alt={manager.alt}></Image>
32
- </a>
33
- </div>
34
- </Grid.Column>
35
- ))}
36
- </Grid>
37
- </div>
38
- </Grid.Column>
39
- <Grid.Column
40
- mobile={6}
41
- tablet={2}
42
- computer={2}
43
- className="mobile hidden"
44
- ></Grid.Column>
45
- <Grid.Column mobile={12} tablet={5} computer={4}>
33
+ <Grid.Column mobile={12} tablet={4} computer={4}>
46
34
  <div className="item">
47
- <Footer.Contact
48
- contacts={props.contacts}
49
- header={props.contactHeader}
50
- address={props.address}
51
- />
52
- <Footer.Social social={props.social} />
35
+ <Footer.Contact contacts={props.contacts} />
53
36
  </div>
54
37
  </Grid.Column>
55
38
  </Grid>
39
+
56
40
  <Grid.Row>
57
- <Footer.Actions actions={props.actions} />
41
+ <Footer.Social social={props.social} />
58
42
  </Grid.Row>
43
+
44
+ <Grid className="mobile only">
45
+ {props.managedBy &&
46
+ props.managedBy.map((manager, index) => (
47
+ <Grid.Column
48
+ mobile={manager.columnSize.mobile}
49
+ tablet={manager.columnSize.tablet}
50
+ computer={manager.columnSize.computer}
51
+ key={index}
52
+ >
53
+ <div className="item">
54
+ <div className={manager.className}>
55
+ <a href={manager.link}>
56
+ <Image src={manager.src} alt={manager.alt}></Image>
57
+ </a>
58
+ </div>
59
+ </div>
60
+ </Grid.Column>
61
+ ))}
62
+ </Grid>
59
63
  </div>
60
64
  );
61
65
  };