@eeacms/volto-eea-design-system 1.0.0-alpha.2 → 1.0.0-alpha.4
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/.github/workflows/node.js.yml +1 -6
- package/.project.eslintrc.js +5 -1
- package/CHANGELOG.md +97 -0
- package/package.json +2 -1
- package/src/index.js +1 -0
- package/src/ui/Card/Card.stories.jsx +3 -0
- package/src/ui/Container/Container.stories.js +34 -1
- package/src/ui/ContextNavigation/ContextNavigation.stories.jsx +67 -7
- package/src/ui/Header/Header.jsx +7 -1
- package/src/ui/Header/Header.stories.js +91 -21
- package/src/ui/Header/HeaderMenuPopUp.js +61 -31
- package/theme/theme.config +0 -1
- package/theme/themes/eea/elements/container.overrides +71 -10
- package/theme/themes/eea/elements/container.variables +1 -0
- package/theme/themes/eea/extras/avatarGrid.less +2 -0
- package/theme/themes/eea/extras/banner.less +3 -0
- package/theme/themes/eea/extras/contentBox.less +5 -5
- package/theme/themes/eea/extras/contextNavigation.less +20 -4
- package/theme/themes/eea/extras/contextNavigation.variables +8 -0
- package/theme/themes/eea/extras/custom.overrides +0 -4
- package/theme/themes/eea/extras/downloadLabeledIcon.less +2 -0
- package/theme/themes/eea/extras/footer.less +3 -1
- package/theme/themes/eea/extras/header.less +100 -39
- package/theme/themes/eea/extras/header.variables +28 -9
- package/theme/themes/eea/extras/hero.less +2 -0
- package/theme/themes/eea/extras/inpageNavigation.less +2 -0
- package/theme/themes/eea/extras/keyContent.less +2 -0
- package/theme/themes/eea/extras/labeledIconGroup.less +2 -0
- package/theme/themes/eea/extras/languageLabeledIcon.less +2 -0
- package/theme/themes/eea/extras/newTabLabeledIcon.less +2 -0
- package/theme/themes/eea/extras/quote.less +2 -0
- package/theme/themes/eea/extras/relatedContent.less +2 -0
- package/theme/themes/eea/extras/tag.less +2 -0
- package/theme/themes/eea/extras/tagList.less +3 -1
- package/theme/themes/eea/extras/testimonial.less +1 -0
- package/theme/themes/eea/extras/timeline.less +2 -0
- package/theme/themes/eea/globals/site.overrides +52 -0
- package/theme/themes/eea/globals/site.variables +4 -0
- package/theme/themes/eea/globals/utilities.less +6 -4
- package/theme/themes/eea/views/card.overrides +42 -138
- package/theme/themes/eea/views/card.variables +17 -28
- package/website/docs/2-whatsnew.md +104 -1
- package/mockups/EEA component library.fig +0 -0
- package/mockups/README.md +0 -1
- package/mockups/page-templates/R1 R3 templates.fig +0 -0
- package/mockups/page-templates/WISE BISE FISE.fig +0 -0
- package/mockups/page-templates/datahub/Data hub updated proposal.fig +0 -0
- package/mockups/page-templates/homepage_selected_upd1.fig +0 -0
- package/mockups/special-designs/Mega Menu.fig +0 -0
- package/mockups/special-designs/New footer.fig +0 -0
- package/mockups/special-designs/Search (Final).fig +0 -0
- package/mockups/special-designs/Side Navigation.fig +0 -0
|
@@ -6,11 +6,6 @@ name: Storybook & Docusaurus CI deployment
|
|
|
6
6
|
on:
|
|
7
7
|
push:
|
|
8
8
|
branches: [ develop ]
|
|
9
|
-
paths:
|
|
10
|
-
- src/**
|
|
11
|
-
- theme/**
|
|
12
|
-
- website/**
|
|
13
|
-
- templates/**
|
|
14
9
|
|
|
15
10
|
jobs:
|
|
16
11
|
build:
|
|
@@ -46,7 +41,7 @@ jobs:
|
|
|
46
41
|
git commit -m "Autobuild of docusaurus docs"
|
|
47
42
|
git push
|
|
48
43
|
|
|
49
|
-
- uses: convictional/trigger-workflow-and-wait@v1.
|
|
44
|
+
- uses: convictional/trigger-workflow-and-wait@v1.6.5
|
|
50
45
|
with:
|
|
51
46
|
github_token: ${{ secrets.PAT_TOKEN }}
|
|
52
47
|
owner: 'eea'
|
package/.project.eslintrc.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
|
-
const projectRootPath = fs.
|
|
4
|
+
const projectRootPath = fs.existsSync('./project')
|
|
5
|
+
? fs.realpathSync('./project')
|
|
6
|
+
: fs.realpathSync('./../../../');
|
|
5
7
|
const packageJson = require(path.join(projectRootPath, 'package.json'));
|
|
6
8
|
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions;
|
|
7
9
|
|
|
@@ -23,6 +25,7 @@ const addonAliases = Object.keys(reg.packages).map(o => [
|
|
|
23
25
|
reg.packages[o].modulePath,
|
|
24
26
|
]);
|
|
25
27
|
|
|
28
|
+
|
|
26
29
|
module.exports = {
|
|
27
30
|
extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
|
|
28
31
|
settings: {
|
|
@@ -42,3 +45,4 @@ module.exports = {
|
|
|
42
45
|
},
|
|
43
46
|
},
|
|
44
47
|
};
|
|
48
|
+
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,103 @@ 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.0-alpha.4](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.3...1.0.0-alpha.4) - 22 November 2022
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix(cards-storybook): load slick carousel css for arrow and pagination styles [David Ichim - [`1159b1b`](https://github.com/eea/volto-eea-design-system/commit/1159b1beea0d7f7e026f1f1181fea91b7ac38ffa)]
|
|
12
|
+
|
|
13
|
+
#### :nail_care: Enhancements
|
|
14
|
+
|
|
15
|
+
- change(utilities): added has text classes to the text alignment utilities [David Ichim - [`e6974c6`](https://github.com/eea/volto-eea-design-system/commit/e6974c634551fe0d19a9c9da269f5c6fbaefab7a)]
|
|
16
|
+
- change(build): upgrade action to trigger workflow and wait to latest version [David Ichim - [`c63ad3f`](https://github.com/eea/volto-eea-design-system/commit/c63ad3fdae7972bb2c722dea3d046861fa0ac086)]
|
|
17
|
+
- refactor(card): theming implementation to allow has theming classes #265 from eea/card-refactoring [ichim-david - [`24edc99`](https://github.com/eea/volto-eea-design-system/commit/24edc99d85c0c619fc763a8774a96f7208f529a5)]
|
|
18
|
+
- change(utilities): modified class name for text align using has naming [David Ichim - [`579a0cb`](https://github.com/eea/volto-eea-design-system/commit/579a0cbe0f704eb9305119fdd162f4f29c8086d5)]
|
|
19
|
+
- change(theme): ensure that only direct children of container have a default top and bottom margin [David Ichim - [`7f8b8dc`](https://github.com/eea/volto-eea-design-system/commit/7f8b8dcc72827004d366e1c531311cf8734053fc)]
|
|
20
|
+
- change(theme): add slick-carousel dependency [David Ichim - [`f2eec7d`](https://github.com/eea/volto-eea-design-system/commit/f2eec7d7233adf86b9c4f61670eb87d9754ff94c)]
|
|
21
|
+
- change(card): expect has classes on the card directly [David Ichim - [`6a9e38b`](https://github.com/eea/volto-eea-design-system/commit/6a9e38bcae0656685a99b47800d556813663d2ee)]
|
|
22
|
+
- change(cards): allow rounded, inverted and theme parameter to be set by has classes [David Ichim - [`4b4ad89`](https://github.com/eea/volto-eea-design-system/commit/4b4ad893fc5d39629b4e8d874327f31ea2e7d885)]
|
|
23
|
+
- change(cards): refactor cards theming implementation [David Ichim - [`d4e4542`](https://github.com/eea/volto-eea-design-system/commit/d4e454238d540ef306f4c1a4f8e9a94c7aa10189)]
|
|
24
|
+
|
|
25
|
+
#### :hammer_and_wrench: Others
|
|
26
|
+
|
|
27
|
+
- Release 1.0.0-alpha.4 [Alin Voinea - [`ec8938b`](https://github.com/eea/volto-eea-design-system/commit/ec8938b4847a2973c7a853896d609d2de0041019)]
|
|
28
|
+
- Exclude mockups from npm package [Alin Voinea - [`634af8e`](https://github.com/eea/volto-eea-design-system/commit/634af8e3ddabec36a18597d8d7638888269875fc)]
|
|
29
|
+
- Update eea.github.io on all commits in develop branch [Alin Voinea - [`3d0b8d7`](https://github.com/eea/volto-eea-design-system/commit/3d0b8d745138bd2e0219560c8c895ce2c56dbf04)]
|
|
30
|
+
- Trigger re-build [Alin Voinea - [`3566dd2`](https://github.com/eea/volto-eea-design-system/commit/3566dd2b4d2cd12496e05b792c85a78de550dd50)]
|
|
31
|
+
- fix rounded selector [David Ichim - [`1fa1544`](https://github.com/eea/volto-eea-design-system/commit/1fa15442f03d3f3d9ef59afa14075b061483cf3a)]
|
|
32
|
+
- Back to dev. [Alin Voinea - [`ea47f6f`](https://github.com/eea/volto-eea-design-system/commit/ea47f6f10097f23f635d98f0c5483bebf8378fc4)]
|
|
33
|
+
### [1.0.0-alpha.3](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.2...1.0.0-alpha.3) - 16 November 2022
|
|
34
|
+
|
|
35
|
+
#### :rocket: New Features
|
|
36
|
+
|
|
37
|
+
- feat(Header): Add subsite section styling #263 from eea/subsite [ichim-david - [`00398b8`](https://github.com/eea/volto-eea-design-system/commit/00398b8a6c5d83241c30d0ba85d95c115edf2480)]
|
|
38
|
+
|
|
39
|
+
#### :bug: Bug Fixes
|
|
40
|
+
|
|
41
|
+
- fix(search): position now changed by default to absolute from relative [David Ichim - [`51b08fc`](https://github.com/eea/volto-eea-design-system/commit/51b08fc217e25c1391a2bac0b42a8c3f7ae091c7)]
|
|
42
|
+
- fix(megaMenu): remove paddings for buttons added by active class [Antonis Tarantilis - [`ec33ebf`](https://github.com/eea/volto-eea-design-system/commit/ec33ebfe23a6064c88383ab465bd45edee2dba9b)]
|
|
43
|
+
|
|
44
|
+
#### :nail_care: Enhancements
|
|
45
|
+
|
|
46
|
+
- change(mega-menu): hide home link and accordion content from mobile menu [David Ichim - [`1a69172`](https://github.com/eea/volto-eea-design-system/commit/1a691729b6d61c0daf46c5de035c1c55b0fda0d9)]
|
|
47
|
+
- change(container): width from min width 1280px to 1365px max width [David Ichim - [`66e551e`](https://github.com/eea/volto-eea-design-system/commit/66e551e532da2cc5e9716e5179f943f172663be4)]
|
|
48
|
+
- change(theme): modified wide width to point to 1320px as it's perfectly divisible by 4 [David Ichim - [`8f82573`](https://github.com/eea/volto-eea-design-system/commit/8f825737d6dafd595024bb4537eab624a47a9ad0)]
|
|
49
|
+
- change(theme): modified wide width to point to 1368px as it's perfectly divisible by 4 [David Ichim - [`2349fee`](https://github.com/eea/volto-eea-design-system/commit/2349fee36ee72783665a0b101d684389f1fdf834)]
|
|
50
|
+
- change(container): fullwidth now take into account devices without hover [David Ichim - [`5a35a65`](https://github.com/eea/volto-eea-design-system/commit/5a35a65ce4928972027325bd01265db3f046f0e8)]
|
|
51
|
+
- change(container): ensure only the top level elements behave like containers [David Ichim - [`98b85d1`](https://github.com/eea/volto-eea-design-system/commit/98b85d1fb285919a8851454fa3007131b2a0ffc3)]
|
|
52
|
+
- change(container): modified column-block grid to remove margin and padding when using full width class [David Ichim - [`35c1cee`](https://github.com/eea/volto-eea-design-system/commit/35c1cee7b3b35e7c361562ab7a430240f0117cc3)]
|
|
53
|
+
- change(components): load overrides files for our defined semantic files [David Ichim - [`adde7a9`](https://github.com/eea/volto-eea-design-system/commit/adde7a9519f38fa779d8d038f3b6817281f0b4a2)]
|
|
54
|
+
- change(container): story to avoid adding containerwidth property to container div [David Ichim - [`c13d83c`](https://github.com/eea/volto-eea-design-system/commit/c13d83cdbc8741bf4075cdfcd884f39f3f71d73c)]
|
|
55
|
+
- change(container): story to add classes that modify the max width of the containers [David Ichim - [`37948f8`](https://github.com/eea/volto-eea-design-system/commit/37948f89ee797738bd8bbb0023bc5dca018d7331)]
|
|
56
|
+
- change(container): renamed content-text-width to container-text-width [David Ichim - [`6f788c2`](https://github.com/eea/volto-eea-design-system/commit/6f788c282348292dd4b5deb47ffe83ca4573e5c8)]
|
|
57
|
+
- change(container): removed app extras and view setting of layout sizes [David Ichim - [`f6dc1ee`](https://github.com/eea/volto-eea-design-system/commit/f6dc1ee602634df85140f6db75e41293b72eacf1)]
|
|
58
|
+
- change(homepage): removed hiding of staging banner from homepage [David Ichim - [`4ba2cd7`](https://github.com/eea/volto-eea-design-system/commit/4ba2cd7fc17cdf1bf58381aa58e05acad0ac77ba)]
|
|
59
|
+
- change(site): add a 1rem margin top and bottom on all styled classes [David Ichim - [`dabf6c1`](https://github.com/eea/volto-eea-design-system/commit/dabf6c1162fe23cef61a2053eefd7e687f649a56)]
|
|
60
|
+
- change(container): use important flag for left and right margin [David Ichim - [`a49c83a`](https://github.com/eea/volto-eea-design-system/commit/a49c83abe9a045d28118a680558de5416a0516a3)]
|
|
61
|
+
- change(views): moved narrow style bellow the default container width styles [David Ichim - [`72fa58d`](https://github.com/eea/volto-eea-design-system/commit/72fa58dce9ea03a1e4f409a9f9aab21b01efbfc8)]
|
|
62
|
+
- change(view): set container width for view-viewview class as well [David Ichim - [`29dc324`](https://github.com/eea/volto-eea-design-system/commit/29dc324319d6dc2450dd0e906c1b4c93fd65ed56)]
|
|
63
|
+
- change(listing): provide ui container fallback if no class is passed to default view [David Ichim - [`af9e94d`](https://github.com/eea/volto-eea-design-system/commit/af9e94ded1e301f4c811749badbcc1f59e6d0de5)]
|
|
64
|
+
- change(narrow-view): re-added container class to page-document [David Ichim - [`56b44a6`](https://github.com/eea/volto-eea-design-system/commit/56b44a6e09d45f96c106dc471bb2e1cde58ef10f)]
|
|
65
|
+
- change(container): unset values of page-document on 1200+ browser width [David Ichim - [`dd5bea3`](https://github.com/eea/volto-eea-design-system/commit/dd5bea37d414e2a8689eaf6cc99c7b3a3d4b0e08)]
|
|
66
|
+
- change(container): affect only left and right margin of containers [David Ichim - [`183265b`](https://github.com/eea/volto-eea-design-system/commit/183265b7dd8d20359b6c3956ea05b62df6e70f75)]
|
|
67
|
+
- change(containers): modified class names after layout checks [David Ichim - [`1dc3689`](https://github.com/eea/volto-eea-design-system/commit/1dc3689509001031f0afd30422f517de5316e47a)]
|
|
68
|
+
- change(listing): removed container from default view page-document area [David Ichim - [`69f3d8f`](https://github.com/eea/volto-eea-design-system/commit/69f3d8f422e3cb95e89937929aaef48b5569bcdf)]
|
|
69
|
+
- change(views): rename classes names to width_view and added app extras layout component [David Ichim - [`745b772`](https://github.com/eea/volto-eea-design-system/commit/745b7720839754d1e248795cb1263f8c02f5f3c2)]
|
|
70
|
+
- change(container): add variables for edit and add section of containers [David Ichim - [`f2e2c33`](https://github.com/eea/volto-eea-design-system/commit/f2e2c335dc82c120d15d4c536c400ae742f68fe7)]
|
|
71
|
+
- change(columns): implement narrow, container and wide width classes [David Ichim - [`9696b54`](https://github.com/eea/volto-eea-design-system/commit/9696b5457e50ba3186406a584da16f5248c14439)]
|
|
72
|
+
- change(views): customized DefaultView to pass class into page-document area [David Ichim - [`91123aa`](https://github.com/eea/volto-eea-design-system/commit/91123aad429f4bb086110b4997e43e9809a97581)]
|
|
73
|
+
- change(megamenu): set children to be appended to the right of the menu title [David Ichim - [`b69c23a`](https://github.com/eea/volto-eea-design-system/commit/b69c23a20ef2ded1f0382650ff8e85d1bead6941)]
|
|
74
|
+
- refactor(sidemenu): add is_in_path and is_current attributes for an active example [Antonis Tarantilis - [`a3fe7fd`](https://github.com/eea/volto-eea-design-system/commit/a3fe7fd8da93db0a065d4408ce154c9d8c26b568)]
|
|
75
|
+
- refactor(sidemenu): add third level list and items & update active indication [Antonis Tarantilis - [`e2d87da`](https://github.com/eea/volto-eea-design-system/commit/e2d87da9fddca2b867f3d065a007c0b921587a61)]
|
|
76
|
+
- refactor(megaMenu): update padding variables [Antonis Tarantilis - [`c5f2583`](https://github.com/eea/volto-eea-design-system/commit/c5f25838ba9ec367a58c98c929921ebf09cd8ad8)]
|
|
77
|
+
- refactor(megaMenu): update sub-title paddings [Antonis Tarantilis - [`992f919`](https://github.com/eea/volto-eea-design-system/commit/992f919bb5155c8e6fc169e43adf00dcae41f400)]
|
|
78
|
+
- refactor(megaMenu): style sub-title and nav-description [Antonis Tarantilis - [`b2a48fd`](https://github.com/eea/volto-eea-design-system/commit/b2a48fd3588ffdc75f61f0b8d52284d13edf2d92)]
|
|
79
|
+
- refactor(megaMenu): add nav_title and nav_description attributes [Antonis Tarantilis - [`0d7a568`](https://github.com/eea/volto-eea-design-system/commit/0d7a5686daab2ecec87d78728437d8f994606448)]
|
|
80
|
+
- refactor(megaMenu): mobile - use buttons for menu section titles [Antonis Tarantilis - [`a7b632f`](https://github.com/eea/volto-eea-design-system/commit/a7b632fd29a8ac815d2e590509baa51f1279e659)]
|
|
81
|
+
- refactor(megaMenu): desktop - use buttons for menu section titles and readjust content [Antonis Tarantilis - [`cb9315f`](https://github.com/eea/volto-eea-design-system/commit/cb9315f2b999193b7b64cec27c49fc8dda306899)]
|
|
82
|
+
|
|
83
|
+
#### :house: Internal changes
|
|
84
|
+
|
|
85
|
+
- style: load header/footer overrides [Miu Razvan - [`e5b5e0f`](https://github.com/eea/volto-eea-design-system/commit/e5b5e0fc00c61d81f45c12f119bd2f06a91b1b5c)]
|
|
86
|
+
- style(megaMenu): restore item description color [Antonis Tarantilis - [`8a19bbb`](https://github.com/eea/volto-eea-design-system/commit/8a19bbb4866cdeb31d87b782587c499e621055b7)]
|
|
87
|
+
- style(megaMenu): restore accordion content bottom padding [Antonis Tarantilis - [`8e0c5a7`](https://github.com/eea/volto-eea-design-system/commit/8e0c5a79f06247d353511b412b0122c6f614f5ec)]
|
|
88
|
+
|
|
89
|
+
#### :hammer_and_wrench: Others
|
|
90
|
+
|
|
91
|
+
- Release 1.0.0-alpha.3 [Alin Voinea - [`8fc86a7`](https://github.com/eea/volto-eea-design-system/commit/8fc86a7d0bf4ad06ab339b3066ff56ea61d48878)]
|
|
92
|
+
- code cleanup [David Ichim - [`2cdc3e5`](https://github.com/eea/volto-eea-design-system/commit/2cdc3e590b6d36865f16890c45ce56d32963e1d0)]
|
|
93
|
+
- Add subsite styling [kreafox - [`e79c0ed`](https://github.com/eea/volto-eea-design-system/commit/e79c0ed7931d6287dbeb3bab1e9155b8707481a3)]
|
|
94
|
+
- test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`aaeaa07`](https://github.com/eea/volto-eea-design-system/commit/aaeaa07b27491551daba29bbfdd7cab4a54b6bec)]
|
|
95
|
+
- modified left value of full width classes with toolbars [David Ichim - [`70d82d4`](https://github.com/eea/volto-eea-design-system/commit/70d82d47fbc2c00a3a709de0d5c087c8443a1eae)]
|
|
96
|
+
- WIP settings column grid width when using full size class [David Ichim - [`affc7ac`](https://github.com/eea/volto-eea-design-system/commit/affc7ac99527aa92d5a192d90dc8c9ec46a66404)]
|
|
97
|
+
- fix eslint [Miu Razvan - [`30c52e4`](https://github.com/eea/volto-eea-design-system/commit/30c52e4eb443555ca44c1b35df064e73d52c0a8b)]
|
|
98
|
+
- fix broken variable call for contentBox.variables introduced in previous commit by mistake [David Ichim - [`d249c11`](https://github.com/eea/volto-eea-design-system/commit/d249c1160d19bedb174a2fde3fdab48d9ce297d4)]
|
|
99
|
+
- clean up [Miu Razvan - [`89f3cb3`](https://github.com/eea/volto-eea-design-system/commit/89f3cb33d70a14806a953f0acd1807e94169ee5c)]
|
|
100
|
+
- Feature(container): flexible container size #260 from eea/feature-flexible-container [ichim-david - [`8f84c5b`](https://github.com/eea/volto-eea-design-system/commit/8f84c5b67afe9cbe01b2a44a8f92a9a554e1036a)]
|
|
101
|
+
- removed console log from code [David Ichim - [`fad86ae`](https://github.com/eea/volto-eea-design-system/commit/fad86ae581dd81d0c29fc03d8528e57cadadd3fb)]
|
|
102
|
+
- jslint fix [David Ichim - [`9846159`](https://github.com/eea/volto-eea-design-system/commit/98461593605344d0b6d8cba81f91d1cafc2653cd)]
|
|
103
|
+
- feature(content): added NarrowView useful for modifying the containers from content-area [David Ichim - [`d937df7`](https://github.com/eea/volto-eea-design-system/commit/d937df7c262e8d8cc6e78eebec736e28263fc657)]
|
|
7
104
|
### [1.0.0-alpha.2](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.1...1.0.0-alpha.2) - 28 October 2022
|
|
8
105
|
|
|
9
106
|
#### :nail_care: Enhancements
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-eea-design-system",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.4",
|
|
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",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@eeacms/volto-corsproxy": "*",
|
|
24
24
|
"remixicon": "2.5.0",
|
|
25
25
|
"react-slick": "^0.28.1",
|
|
26
|
+
"slick-carousel": "^1.8.1",
|
|
26
27
|
"react-countup": "^6.3.0"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
package/src/index.js
CHANGED
|
@@ -2,6 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { Card, Image, Grid, Container, Icon, Button } from 'semantic-ui-react';
|
|
3
3
|
import Slider from 'react-slick';
|
|
4
4
|
|
|
5
|
+
import 'slick-carousel/slick/slick.css';
|
|
6
|
+
import 'slick-carousel/slick/slick-theme.css';
|
|
7
|
+
|
|
5
8
|
const tabletBreakpoint = 835;
|
|
6
9
|
const mobileBreakpoint = 480;
|
|
7
10
|
|
|
@@ -23,6 +23,26 @@ export default {
|
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
|
+
containerWidth: {
|
|
27
|
+
control: {
|
|
28
|
+
type: 'inline-radio',
|
|
29
|
+
labels: {
|
|
30
|
+
narrow_width: 'Narrow',
|
|
31
|
+
container_width: 'Default',
|
|
32
|
+
wide_width: 'Wide',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
options: ['narrow_width', 'container_width', 'wide_width'],
|
|
36
|
+
description: 'Container width',
|
|
37
|
+
table: {
|
|
38
|
+
type: {
|
|
39
|
+
summary: 'text',
|
|
40
|
+
},
|
|
41
|
+
defaultValue: {
|
|
42
|
+
summary: 'container_width',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
26
46
|
content: {
|
|
27
47
|
description: 'container content',
|
|
28
48
|
table: {
|
|
@@ -54,7 +74,20 @@ const content = (
|
|
|
54
74
|
</p>
|
|
55
75
|
);
|
|
56
76
|
|
|
57
|
-
const Template = (args) =>
|
|
77
|
+
const Template = (args) => {
|
|
78
|
+
const { containerWidth, ...options } = args;
|
|
79
|
+
return (
|
|
80
|
+
<>
|
|
81
|
+
<div id={'main'}>
|
|
82
|
+
<Container
|
|
83
|
+
id={'page-document'}
|
|
84
|
+
{...options}
|
|
85
|
+
className={containerWidth || 'container_width'}
|
|
86
|
+
></Container>
|
|
87
|
+
</div>
|
|
88
|
+
</>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
58
91
|
|
|
59
92
|
export const Default = Template.bind({});
|
|
60
93
|
Default.args = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Container
|
|
2
|
+
import { Container } from 'semantic-ui-react';
|
|
3
3
|
|
|
4
4
|
const sidenavItems = [
|
|
5
5
|
{
|
|
@@ -72,10 +72,30 @@ const sidenavItems = [
|
|
|
72
72
|
{
|
|
73
73
|
'@id': 'Articles',
|
|
74
74
|
description: '',
|
|
75
|
-
items: [
|
|
75
|
+
items: [
|
|
76
|
+
{
|
|
77
|
+
'@id': 'article-1',
|
|
78
|
+
description: '',
|
|
79
|
+
items: [],
|
|
80
|
+
review_state: null,
|
|
81
|
+
title: 'Summer 2022: Living in a state of multiple crises',
|
|
82
|
+
url: '/#',
|
|
83
|
+
is_current: true,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
'@id': 'article-2',
|
|
87
|
+
description: '',
|
|
88
|
+
items: [],
|
|
89
|
+
review_state: null,
|
|
90
|
+
title:
|
|
91
|
+
'Interview — Prosumers and the energy crisis: citizens contributing to Europe’s energy transition',
|
|
92
|
+
url: '/#',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
76
95
|
review_state: null,
|
|
77
96
|
title: 'Articles',
|
|
78
97
|
url: '/#',
|
|
98
|
+
is_in_path: true,
|
|
79
99
|
},
|
|
80
100
|
{
|
|
81
101
|
'@id': 'Infographics-overview',
|
|
@@ -89,6 +109,7 @@ const sidenavItems = [
|
|
|
89
109
|
review_state: null,
|
|
90
110
|
title: 'Infographics',
|
|
91
111
|
url: '/#',
|
|
112
|
+
is_in_path: true,
|
|
92
113
|
},
|
|
93
114
|
];
|
|
94
115
|
|
|
@@ -96,14 +117,19 @@ function Template({ ...args }) {
|
|
|
96
117
|
return (
|
|
97
118
|
<Container>
|
|
98
119
|
<nav className="context-navigation">
|
|
99
|
-
<div className="context-navigation-header">
|
|
100
|
-
<Icon className="ri-menu-2-line" /> {args.header}
|
|
101
|
-
</div>
|
|
120
|
+
<div className="context-navigation-header">{args.header}</div>
|
|
102
121
|
<div role="list" className="ui list">
|
|
103
122
|
{args.sidenavItems &&
|
|
104
123
|
args.sidenavItems.map((element, index) => {
|
|
105
124
|
return (
|
|
106
|
-
<div
|
|
125
|
+
<div
|
|
126
|
+
role="listitem"
|
|
127
|
+
className={
|
|
128
|
+
(element.is_current ? 'active ' : '') +
|
|
129
|
+
(element.is_in_path ? 'in_path ' : '') +
|
|
130
|
+
'item level-1'
|
|
131
|
+
}
|
|
132
|
+
>
|
|
107
133
|
<div className="content">
|
|
108
134
|
<a
|
|
109
135
|
title={element.title}
|
|
@@ -116,7 +142,14 @@ function Template({ ...args }) {
|
|
|
116
142
|
element.items.map((subelement, index) => {
|
|
117
143
|
return (
|
|
118
144
|
<div className="list" role="list">
|
|
119
|
-
<div
|
|
145
|
+
<div
|
|
146
|
+
role="listitem"
|
|
147
|
+
className={
|
|
148
|
+
(subelement.is_current ? 'active ' : '') +
|
|
149
|
+
(subelement.is_in_path ? 'in_path ' : '') +
|
|
150
|
+
'item level-2'
|
|
151
|
+
}
|
|
152
|
+
>
|
|
120
153
|
<div className="content">
|
|
121
154
|
<a
|
|
122
155
|
title={subelement.title}
|
|
@@ -125,6 +158,33 @@ function Template({ ...args }) {
|
|
|
125
158
|
>
|
|
126
159
|
{subelement.title}
|
|
127
160
|
</a>
|
|
161
|
+
{subelement.items.length > 0 &&
|
|
162
|
+
subelement.items.map(
|
|
163
|
+
(subparelement, index) => {
|
|
164
|
+
return (
|
|
165
|
+
<div className="list" role="list">
|
|
166
|
+
<div
|
|
167
|
+
role="listitem"
|
|
168
|
+
className={
|
|
169
|
+
(subparelement.is_current
|
|
170
|
+
? 'active '
|
|
171
|
+
: '') + 'item level-3'
|
|
172
|
+
}
|
|
173
|
+
>
|
|
174
|
+
<div className="content">
|
|
175
|
+
<a
|
|
176
|
+
title={subparelement.title}
|
|
177
|
+
className="contenttype-document"
|
|
178
|
+
href={subparelement.url}
|
|
179
|
+
>
|
|
180
|
+
{subparelement.title}
|
|
181
|
+
</a>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
);
|
|
186
|
+
},
|
|
187
|
+
)}
|
|
128
188
|
</div>
|
|
129
189
|
</div>
|
|
130
190
|
</div>
|
package/src/ui/Header/Header.jsx
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from 'react'; // , { Component }
|
|
7
|
+
import { useHistory } from 'react-router-dom';
|
|
7
8
|
import cx from 'classnames';
|
|
8
9
|
import { Container, Image, Menu, Grid, Dropdown } from 'semantic-ui-react'; // Dropdown,
|
|
9
10
|
|
|
@@ -107,6 +108,7 @@ const Main = ({
|
|
|
107
108
|
transparency,
|
|
108
109
|
inverted,
|
|
109
110
|
}) => {
|
|
111
|
+
const history = useHistory();
|
|
110
112
|
const [activeItem, setActiveItem] = React.useState(pathname);
|
|
111
113
|
const [menuIsActive, setMenuIsActive] = React.useState(false);
|
|
112
114
|
const [searchIsActive, setSearchIsActive] = React.useState(false);
|
|
@@ -169,7 +171,11 @@ const Main = ({
|
|
|
169
171
|
const menuOnClick = (e, item) => {
|
|
170
172
|
if (searchIsActive) setSearchIsActive(false);
|
|
171
173
|
setActiveItem(item['@id'] || item.url);
|
|
172
|
-
|
|
174
|
+
if (item.items.length) {
|
|
175
|
+
setMenuIsActive(true);
|
|
176
|
+
} else {
|
|
177
|
+
history.push(item.url);
|
|
178
|
+
}
|
|
173
179
|
};
|
|
174
180
|
|
|
175
181
|
// React.useEffect(() => {
|
|
@@ -486,13 +486,72 @@ const menuItems = [
|
|
|
486
486
|
url: '/#',
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
|
-
'@id': '
|
|
490
|
-
items: [
|
|
489
|
+
'@id': 'Analysis-and-data',
|
|
490
|
+
items: [
|
|
491
|
+
{
|
|
492
|
+
'@id': 'Reports',
|
|
493
|
+
nav_description:
|
|
494
|
+
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.',
|
|
495
|
+
items: [],
|
|
496
|
+
review_state: null,
|
|
497
|
+
title: 'Briefings',
|
|
498
|
+
nav_title: 'Briefings nav',
|
|
499
|
+
url: '/#',
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
'@id': 'Briefings',
|
|
503
|
+
nav_description:
|
|
504
|
+
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.',
|
|
505
|
+
items: [],
|
|
506
|
+
review_state: null,
|
|
507
|
+
title: 'Reports',
|
|
508
|
+
nav_title: 'Reports nav',
|
|
509
|
+
url: '/#',
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
'@id': 'Indicators',
|
|
513
|
+
nav_description:
|
|
514
|
+
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.',
|
|
515
|
+
items: [],
|
|
516
|
+
review_state: null,
|
|
517
|
+
title: 'Indicators',
|
|
518
|
+
nav_title: 'Indicators nav',
|
|
519
|
+
url: '/#',
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
'@id': 'Datahub',
|
|
523
|
+
nav_description:
|
|
524
|
+
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.',
|
|
525
|
+
items: [],
|
|
526
|
+
review_state: null,
|
|
527
|
+
title: 'Datahub',
|
|
528
|
+
nav_title: 'Datahub nav',
|
|
529
|
+
url: '/#',
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
'@id': 'Maps-and-charts',
|
|
533
|
+
nav_description:
|
|
534
|
+
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.',
|
|
535
|
+
items: [],
|
|
536
|
+
review_state: null,
|
|
537
|
+
title: 'Maps and charts',
|
|
538
|
+
url: '/#',
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
'@id': 'Country-fact-sheets',
|
|
542
|
+
nav_description:
|
|
543
|
+
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.',
|
|
544
|
+
items: [],
|
|
545
|
+
review_state: null,
|
|
546
|
+
title: 'Country fact sheets',
|
|
547
|
+
nav_title: '',
|
|
548
|
+
url: '/#',
|
|
549
|
+
},
|
|
550
|
+
],
|
|
491
551
|
review_state: null,
|
|
492
|
-
title: '
|
|
552
|
+
title: 'Analysis and data',
|
|
493
553
|
url: '/#',
|
|
494
554
|
},
|
|
495
|
-
|
|
496
555
|
{
|
|
497
556
|
'@id': 'Countries',
|
|
498
557
|
items: [
|
|
@@ -1332,23 +1391,34 @@ const Template = (args) => {
|
|
|
1332
1391
|
renderMenuItem={(item, options = {}, props) => {
|
|
1333
1392
|
const { onClick } = options;
|
|
1334
1393
|
return (
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1394
|
+
<>
|
|
1395
|
+
<a
|
|
1396
|
+
onClick={(e) => {
|
|
1397
|
+
const path = item['@id'] || item.url;
|
|
1398
|
+
setPathname(path);
|
|
1399
|
+
e.preventDefault();
|
|
1400
|
+
onClick && onClick(e, item);
|
|
1401
|
+
}}
|
|
1402
|
+
href={item['@id'] || item.url}
|
|
1403
|
+
{...options}
|
|
1404
|
+
className={cx(options?.className, {
|
|
1405
|
+
active: item['@id'] === pathname,
|
|
1406
|
+
})}
|
|
1407
|
+
>
|
|
1408
|
+
{/* nav_title ovverides title */}
|
|
1409
|
+
{item.nav_title && item.nav_title !== '' ? (
|
|
1410
|
+
<span>{item.nav_title}</span>
|
|
1411
|
+
) : (
|
|
1412
|
+
<span>{item.title}</span>
|
|
1413
|
+
)}
|
|
1414
|
+
{/* Contains a string and an icon for the buttons */}
|
|
1415
|
+
{props?.children}
|
|
1416
|
+
</a>
|
|
1417
|
+
{/* Item description */}
|
|
1418
|
+
{item.nav_description && (
|
|
1419
|
+
<p className="nav-description">{item.nav_description}</p>
|
|
1420
|
+
)}
|
|
1421
|
+
</>
|
|
1352
1422
|
);
|
|
1353
1423
|
}}
|
|
1354
1424
|
renderGlobalMenuItem={(item, options = {}) => {
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Transition } from 'semantic-ui-react';
|
|
3
|
-
import {
|
|
4
|
-
Container,
|
|
5
|
-
Divider,
|
|
6
|
-
Grid,
|
|
7
|
-
List,
|
|
8
|
-
Icon,
|
|
9
|
-
Accordion,
|
|
10
|
-
} from 'semantic-ui-react';
|
|
3
|
+
import { Container, Grid, List, Icon, Accordion } from 'semantic-ui-react';
|
|
11
4
|
|
|
12
5
|
import { cloneDeep } from 'lodash';
|
|
13
6
|
|
|
14
7
|
import { Link } from 'react-router-dom';
|
|
15
8
|
import { useClickOutside } from '@eeacms/volto-eea-design-system/helpers';
|
|
16
9
|
|
|
17
|
-
import linkArrowsSVG from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Svg/arrow-double-right.svg';
|
|
18
|
-
|
|
19
10
|
const createColumns = (item, length, renderMenuItem) => {
|
|
20
11
|
let subArrays = [];
|
|
21
12
|
let size = length;
|
|
@@ -76,10 +67,28 @@ const Topics = ({ menuItem, renderMenuItem }) => (
|
|
|
76
67
|
<React.Fragment key={index}>
|
|
77
68
|
{section.title === 'At a glance' ? (
|
|
78
69
|
<Grid.Column width={3} id="at-a-glance">
|
|
70
|
+
<div className="mega-menu-title">
|
|
71
|
+
{/* Inverted right labeled button as a category title,
|
|
72
|
+
for topics the button goes inside the grid */}
|
|
73
|
+
{renderMenuItem(
|
|
74
|
+
menuItem,
|
|
75
|
+
{ className: 'ui button inverted icon right labeled' },
|
|
76
|
+
{
|
|
77
|
+
iconPosition: 'right',
|
|
78
|
+
children: (
|
|
79
|
+
<>
|
|
80
|
+
{/* Add word overview to titles */}
|
|
81
|
+
<span> overview</span>
|
|
82
|
+
<Icon className={'arrow right icon'} alt={'Title icon'} />
|
|
83
|
+
</>
|
|
84
|
+
),
|
|
85
|
+
},
|
|
86
|
+
)}
|
|
87
|
+
</div>
|
|
79
88
|
<Item item={section} key={index} renderMenuItem={renderMenuItem} />
|
|
80
89
|
</Grid.Column>
|
|
81
90
|
) : (
|
|
82
|
-
<Grid.Column width={9} key={index}>
|
|
91
|
+
<Grid.Column width={9} key={index} id="topics-right-column">
|
|
83
92
|
<ItemGrid
|
|
84
93
|
item={section}
|
|
85
94
|
columns={4}
|
|
@@ -154,7 +163,7 @@ const FirstLevelContent = ({ element, renderMenuItem, pathName }) => {
|
|
|
154
163
|
if (!item.items.length) {
|
|
155
164
|
return (
|
|
156
165
|
<React.Fragment key={index}>
|
|
157
|
-
{renderMenuItem(item, { className: 'item' })}
|
|
166
|
+
{renderMenuItem(item, { className: 'item sub-title' })}
|
|
158
167
|
</React.Fragment>
|
|
159
168
|
);
|
|
160
169
|
}
|
|
@@ -267,10 +276,25 @@ const NestedAccordion = ({ menuItems, renderMenuItem, pathName }) => {
|
|
|
267
276
|
</Accordion.Title>
|
|
268
277
|
);
|
|
269
278
|
let overview = cloneDeep(element);
|
|
270
|
-
overview.title = 'See all';
|
|
271
279
|
x.content = (
|
|
272
280
|
<Accordion.Content key={index}>
|
|
273
|
-
|
|
281
|
+
<div className="mega-menu-title">
|
|
282
|
+
{/* Inverted right labeled button as a category title - Mobile */}
|
|
283
|
+
{renderMenuItem(
|
|
284
|
+
overview,
|
|
285
|
+
{ className: 'ui button inverted icon right labeled' },
|
|
286
|
+
{
|
|
287
|
+
iconPosition: 'right',
|
|
288
|
+
children: (
|
|
289
|
+
<>
|
|
290
|
+
{/* Add word overview to titles */}
|
|
291
|
+
<span> overview</span>
|
|
292
|
+
<Icon className={'arrow right icon'} alt={'Title icon'} />
|
|
293
|
+
</>
|
|
294
|
+
),
|
|
295
|
+
},
|
|
296
|
+
)}
|
|
297
|
+
</div>
|
|
274
298
|
<FirstLevelContent
|
|
275
299
|
element={element}
|
|
276
300
|
renderMenuItem={renderMenuItem}
|
|
@@ -306,23 +330,29 @@ function HeaderMenuPopUp({
|
|
|
306
330
|
<Container>
|
|
307
331
|
{menuItem && (
|
|
308
332
|
<div className="menu-content tablet hidden mobile hidden">
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
{
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
333
|
+
{/* Inverted right labeled button as a category title,
|
|
334
|
+
for topics the button goes inside the grid */}
|
|
335
|
+
{menuItem.title !== 'Topics' && (
|
|
336
|
+
<div className="mega-menu-title">
|
|
337
|
+
{renderMenuItem(
|
|
338
|
+
menuItem,
|
|
339
|
+
{ className: 'ui button inverted icon right labeled' },
|
|
340
|
+
{
|
|
341
|
+
iconPosition: 'right',
|
|
342
|
+
children: (
|
|
343
|
+
<>
|
|
344
|
+
{/* Add word overview to titles */}
|
|
345
|
+
<span> overview</span>
|
|
346
|
+
<Icon
|
|
347
|
+
className={'arrow right icon'}
|
|
348
|
+
alt={'Title icon'}
|
|
349
|
+
/>
|
|
350
|
+
</>
|
|
351
|
+
),
|
|
352
|
+
},
|
|
353
|
+
)}
|
|
354
|
+
</div>
|
|
355
|
+
)}
|
|
326
356
|
{menuItem.title === 'Topics' ? (
|
|
327
357
|
<Topics menuItem={menuItem} renderMenuItem={renderMenuItem} />
|
|
328
358
|
) : menuItem.title === 'Countries' ? (
|