@eeacms/volto-eea-design-system 1.0.2 → 1.0.3
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 +50 -0
- package/package.json +1 -1
- package/src/ui/Banner/Banner.jsx +10 -8
- package/src/ui/Banner/Banner.stories.jsx +84 -70
- package/src/ui/Footer/Social.jsx +13 -11
- package/src/ui/Footer/SubFooter.jsx +1 -3
- package/src/ui/Header/Header.jsx +2 -0
- package/src/ui/Header/Header.stories.js +25 -0
- package/src/ui/Header/HeaderSearchPopUp.js +110 -21
- package/src/ui/Popup/Popup.jsx +135 -0
- package/src/ui/Popup/Popup.stories.jsx +4 -1
- package/theme/themes/eea/elements/container.overrides +26 -6
- package/theme/themes/eea/extras/banner.less +7 -3
- package/theme/themes/eea/extras/banner.variables +1 -0
- package/theme/themes/eea/extras/header.less +1 -1
- package/theme/themes/eea/globals/site.overrides +4 -1
- package/theme/themes/eea/tokens/colors.less +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,40 @@ 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.3](https://github.com/eea/volto-eea-design-system/compare/1.0.2...1.0.3) - 24 March 2023
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: improve full-width class [Miu Razvan - [`9322259`](https://github.com/eea/volto-eea-design-system/commit/93222590a630b27f3dfccb7df0a50070c9c9901c)]
|
|
12
|
+
- fix(header): Remove z-index from subsite logo #320 from eea/subsite-logo [ichim-david - [`5091100`](https://github.com/eea/volto-eea-design-system/commit/50911009918faf7d3064d97ea7b685ad71970521)]
|
|
13
|
+
- fix(header): Remove z-index from subsite logo [kreafox - [`d433a97`](https://github.com/eea/volto-eea-design-system/commit/d433a9788d76db0f1c08ef6bb2313f479c2bb19b)]
|
|
14
|
+
|
|
15
|
+
#### :nail_care: Enhancements
|
|
16
|
+
|
|
17
|
+
- change(banner): use custom-made Popup for better accessibility [David Ichim - [`10d0fcf`](https://github.com/eea/volto-eea-design-system/commit/10d0fcfb28ca97efe9fa5c0f6c9c350b76a73140)]
|
|
18
|
+
- change(popup): added also the basic property [David Ichim - [`a4497ac`](https://github.com/eea/volto-eea-design-system/commit/a4497acddde258ed31cda09f4d905e003a1e4611)]
|
|
19
|
+
- change(popup): added most important popup properties from Semantic ui implementation [David Ichim - [`61f65bc`](https://github.com/eea/volto-eea-design-system/commit/61f65bc0e5806aaac33b54db36d5360fd05a48cc)]
|
|
20
|
+
- change(header): Add search popup customizations from eea-website-theme [Krisztina Elekes - [`43e5a78`](https://github.com/eea/volto-eea-design-system/commit/43e5a78be8efa1098ea0fc87f43f40f2b5d482c1)]
|
|
21
|
+
- change(banner): use custom-made Popup for better accessibility [David Ichim - [`9108bee`](https://github.com/eea/volto-eea-design-system/commit/9108bee5f671505be5199e72a4749bb0af0c0cb9)]
|
|
22
|
+
- change(popup): create custom popup for better accessibility [David Ichim - [`036aac9`](https://github.com/eea/volto-eea-design-system/commit/036aac95509b6d78b2d3b251578a7de878e28371)]
|
|
23
|
+
- change(colors): update gray-4 color value #321 from eea/update-gray-4 [ichim-david - [`f458ff0`](https://github.com/eea/volto-eea-design-system/commit/f458ff0965debd3629cdd78362244836d0d42687)]
|
|
24
|
+
- refactor(tokens): updated gray-4 [Giorgos Stamatis - [`b890df7`](https://github.com/eea/volto-eea-design-system/commit/b890df7693880fb965e41752eda64df992a1cdc4)]
|
|
25
|
+
- change(banner): MetadataField now uses proper time tag when value is datetime [David Ichim - [`b4c4d34`](https://github.com/eea/volto-eea-design-system/commit/b4c4d34d5905a6771a281fc3db1174b4998c8fa8)]
|
|
26
|
+
- change(footer): Fix error and empty div if no social links are present #319 from eea/footer-social [ichim-david - [`8922246`](https://github.com/eea/volto-eea-design-system/commit/89222466b76a4720af73c0d516074efec0757c34)]
|
|
27
|
+
- change(footer): Fix error and empty div if no social links are present [kreafox - [`5d934a6`](https://github.com/eea/volto-eea-design-system/commit/5d934a6545ae783ff41dc9e3eda389c571d1369b)]
|
|
28
|
+
|
|
29
|
+
#### :hammer_and_wrench: Others
|
|
30
|
+
|
|
31
|
+
- (feat):Page Header Banner accessibility #316 from eea/accesibility-banner [ichim-david - [`e587f46`](https://github.com/eea/volto-eea-design-system/commit/e587f4657de137273053480a3536a066ab032a29)]
|
|
32
|
+
- lint 3 [Dobricean Ioan Dorian - [`2e0bed1`](https://github.com/eea/volto-eea-design-system/commit/2e0bed19a24d8abfa230212cd8c09f8313dc00f2)]
|
|
33
|
+
- prettier [Dobricean Ioan Dorian - [`6ed78e5`](https://github.com/eea/volto-eea-design-system/commit/6ed78e50ee68accca10b06b0790c231ddeb1a1fa)]
|
|
34
|
+
- lint [Dobricean Ioan Dorian - [`646dfaa`](https://github.com/eea/volto-eea-design-system/commit/646dfaa729b51367ce7545ea928837a481a5485a)]
|
|
35
|
+
- lint 1 [Dobricean Ioan Dorian - [`b4c9580`](https://github.com/eea/volto-eea-design-system/commit/b4c958034870a9861c542359144e3c56f9157994)]
|
|
36
|
+
- lint [Dobricean Ioan Dorian - [`ca41def`](https://github.com/eea/volto-eea-design-system/commit/ca41def7a3743a8328f26cec868bd20395b62446)]
|
|
37
|
+
- cleaning [Dobricean Ioan Dorian - [`4391aa6`](https://github.com/eea/volto-eea-design-system/commit/4391aa6c6611d1a15f5977eb150416909ad83bc1)]
|
|
38
|
+
- refactor [Dobricean Ioan Dorian - [`9789201`](https://github.com/eea/volto-eea-design-system/commit/9789201c7966cd711bfa85fe448f6f6df2583eaf)]
|
|
39
|
+
- storybook [Dobricean Ioan Dorian - [`c8c77de`](https://github.com/eea/volto-eea-design-system/commit/c8c77de372060328d535b190f30747797db0d23a)]
|
|
40
|
+
- banner accesibility [Dobricean Ioan Dorian - [`5e2f23b`](https://github.com/eea/volto-eea-design-system/commit/5e2f23bae30b5bb14d3f607e0cfeb85d0cfe4a9f)]
|
|
7
41
|
### [1.0.2](https://github.com/eea/volto-eea-design-system/compare/1.0.1...1.0.2) - 14 March 2023
|
|
8
42
|
|
|
9
43
|
#### :bug: Bug Fixes
|
|
@@ -91,6 +125,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
91
125
|
|
|
92
126
|
- Release 1.0.0-beta.5 [Alin Voinea - [`e4417e1`](https://github.com/eea/volto-eea-design-system/commit/e4417e121477511c350ae3fbe4e70aadb445ed86)]
|
|
93
127
|
- better useOnScreen hook [Andrei Grigore - [`c214b6b`](https://github.com/eea/volto-eea-design-system/commit/c214b6b76443f81c795ce2f3aa457562ec088b30)]
|
|
128
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b227cf8`](https://github.com/eea/volto-eea-design-system/commit/b227cf8a8c44b9d91e9fda8a7999fb0a42bacdca)]
|
|
94
129
|
- feature(mobile): increased performance by lazy loading footer images #303 from eea/increase_performance [ichim-david - [`80d1df1`](https://github.com/eea/volto-eea-design-system/commit/80d1df1c459680331d486f9e8e6a95c9db0adbf6)]
|
|
95
130
|
- prettier [David Ichim - [`a7f8384`](https://github.com/eea/volto-eea-design-system/commit/a7f838470c1bcc4e2be115d514d92a1b686a5e9b)]
|
|
96
131
|
- fixed less build failure due to changes in footer.less [David Ichim - [`190bc8c`](https://github.com/eea/volto-eea-design-system/commit/190bc8cfa88191b45808f1e27c6e2737ee3d15b1)]
|
|
@@ -161,6 +196,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
161
196
|
|
|
162
197
|
#### :house: Internal changes
|
|
163
198
|
|
|
199
|
+
- chore(docusaurus): ignore website/.yarn [Giorgos Stamatis - [`0b33ffd`](https://github.com/eea/volto-eea-design-system/commit/0b33ffd1dda61b126e3cc5ff48888124d6aee41b)]
|
|
164
200
|
- style(header): react syntax fix [Antonis Tarantilis - [`3add127`](https://github.com/eea/volto-eea-design-system/commit/3add1271c785a92bea0ef925d7bc562cef1e0d92)]
|
|
165
201
|
|
|
166
202
|
#### :house: Documentation changes
|
|
@@ -357,6 +393,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
357
393
|
|
|
358
394
|
- Release 1.0.0-alpha.10 [Alin Voinea - [`7014d08`](https://github.com/eea/volto-eea-design-system/commit/7014d080ce114bd0bc039abeecbd7229333b0971)]
|
|
359
395
|
- Add variable definitions [kreafox - [`293fe65`](https://github.com/eea/volto-eea-design-system/commit/293fe65e2f24e6290e1286229169a77f9be4750e)]
|
|
396
|
+
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`ef58a6f`](https://github.com/eea/volto-eea-design-system/commit/ef58a6f5ad8deea26b1395a86778fe1159b7617b)]
|
|
360
397
|
- Back to dev [Alin Voinea - [`31d4616`](https://github.com/eea/volto-eea-design-system/commit/31d461662b9184a7bbe190e86f3c47fab39229fe)]
|
|
361
398
|
### [1.0.0-alpha.9](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.8...1.0.0-alpha.9) - 28 December 2022
|
|
362
399
|
|
|
@@ -414,6 +451,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
414
451
|
- bump package version [David Ichim - [`b4628be`](https://github.com/eea/volto-eea-design-system/commit/b4628bed134abc76e38a243d4e98143e19cef989)]
|
|
415
452
|
- feature(docusaurus, storybook): logos selection for sites plus inverted options #253 from eea/doc-logo-page [ichim-david - [`dbfc90d`](https://github.com/eea/volto-eea-design-system/commit/dbfc90d035dc40e9d4054347f00fde4de486d63d)]
|
|
416
453
|
- (feat): Add ability to disable the language select from website top menu - refs #158616 [dobri1408 - [`411c8e4`](https://github.com/eea/volto-eea-design-system/commit/411c8e4afaf0b2b9edfdeeecdca22aa4cc41f329)]
|
|
454
|
+
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`c4769e9`](https://github.com/eea/volto-eea-design-system/commit/c4769e987d525f5dcafac8e6cf8a89fd8111667d)]
|
|
417
455
|
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`92feea0`](https://github.com/eea/volto-eea-design-system/commit/92feea09796c9ef0530f65fa1d34139905133215)]
|
|
418
456
|
- Proof reading page header section [ichim-david - [`230239e`](https://github.com/eea/volto-eea-design-system/commit/230239e1b22734fb8606656985bc5e513731e244)]
|
|
419
457
|
### [1.0.0-alpha.7](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.6...1.0.0-alpha.7) - 16 December 2022
|
|
@@ -445,6 +483,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
445
483
|
#### :hammer_and_wrench: Others
|
|
446
484
|
|
|
447
485
|
- Release 1.0.0-alpha.7 [Alin Voinea - [`7e66bcc`](https://github.com/eea/volto-eea-design-system/commit/7e66bcc296b389bc55073e7f99681534977dce3a)]
|
|
486
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`ce47e9b`](https://github.com/eea/volto-eea-design-system/commit/ce47e9b163bcb4eda988e3a87718b54ffbd3f99f)]
|
|
448
487
|
- added back descriptionDistance variable until package release [David Ichim - [`3af811a`](https://github.com/eea/volto-eea-design-system/commit/3af811a8d86a132e16de118697ba5a4302a8a4da)]
|
|
449
488
|
- Back to dev [Alin Voinea - [`cb531c9`](https://github.com/eea/volto-eea-design-system/commit/cb531c933c907bdbb88c9de0f1df2eb7ce899a4c)]
|
|
450
489
|
- Proper paths if the package is not installed, but in development [Tiberiu Ichim - [`7a2655f`](https://github.com/eea/volto-eea-design-system/commit/7a2655f7cf9d3c687f172eefcf2b4cff4b12f832)]
|
|
@@ -532,6 +571,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
532
571
|
#### :hammer_and_wrench: Others
|
|
533
572
|
|
|
534
573
|
- feature(Docusaurus): Updates on color palette information including thematic websites #231 from eea/refactor-docusaurus [ichim-david - [`ec7843d`](https://github.com/eea/volto-eea-design-system/commit/ec7843dea07f626dc1c71ae1baa8bb5b0caa52f3)]
|
|
574
|
+
- Upgrade Jenkinsfile storybook to yarn 3 [Alin Voinea - [`d20de8d`](https://github.com/eea/volto-eea-design-system/commit/d20de8d6e21a14660b7b5125a80218a8a6f19e62)]
|
|
535
575
|
- Back to dev [Alin Voinea - [`563fbc5`](https://github.com/eea/volto-eea-design-system/commit/563fbc5fac0d4b0295690d0a3a4e04271753f18a)]
|
|
536
576
|
- perf(docusaurus): added remixicon and roboto locally [Giorgos Stamatis - [`b67b1a7`](https://github.com/eea/volto-eea-design-system/commit/b67b1a72bc9cdc7c62a25967e81b430f8b62d558)]
|
|
537
577
|
### [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
|
|
@@ -624,6 +664,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
624
664
|
- modified left value of full width classes with toolbars [David Ichim - [`70d82d4`](https://github.com/eea/volto-eea-design-system/commit/70d82d47fbc2c00a3a709de0d5c087c8443a1eae)]
|
|
625
665
|
- WIP settings column grid width when using full size class [David Ichim - [`affc7ac`](https://github.com/eea/volto-eea-design-system/commit/affc7ac99527aa92d5a192d90dc8c9ec46a66404)]
|
|
626
666
|
- fix eslint [Miu Razvan - [`30c52e4`](https://github.com/eea/volto-eea-design-system/commit/30c52e4eb443555ca44c1b35df064e73d52c0a8b)]
|
|
667
|
+
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`76a41c7`](https://github.com/eea/volto-eea-design-system/commit/76a41c786995fd54afe4d1c345de939f683ffa70)]
|
|
627
668
|
- 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)]
|
|
628
669
|
- clean up [Miu Razvan - [`89f3cb3`](https://github.com/eea/volto-eea-design-system/commit/89f3cb33d70a14806a953f0acd1807e94169ee5c)]
|
|
629
670
|
- Feature(container): flexible container size #260 from eea/feature-flexible-container [ichim-david - [`8f84c5b`](https://github.com/eea/volto-eea-design-system/commit/8f84c5b67afe9cbe01b2a44a8f92a9a554e1036a)]
|
|
@@ -725,6 +766,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
725
766
|
|
|
726
767
|
#### :nail_care: Enhancements
|
|
727
768
|
|
|
769
|
+
- change(jenkins): added yarn policy for storybook building [ichim-david - [`3d1b844`](https://github.com/eea/volto-eea-design-system/commit/3d1b844efeea40b99c00c9aa97089e0a0be58a57)]
|
|
728
770
|
- change(docusaurus): typography updates [ichim-david - [`60a93a4`](https://github.com/eea/volto-eea-design-system/commit/60a93a4aece4e478ae13c2dfe697fd3703aa178a)]
|
|
729
771
|
- change(accordion): allow customization of accordion title with css variables [David Ichim - [`15e7d27`](https://github.com/eea/volto-eea-design-system/commit/15e7d27f02c640df582f51a51ef36e645723f842)]
|
|
730
772
|
- change(content-box): added css variables that will set text color and background for children [David Ichim - [`86cac53`](https://github.com/eea/volto-eea-design-system/commit/86cac531cc94386b6022e1be80dba826b39f2443)]
|
|
@@ -759,6 +801,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
759
801
|
#### :hammer_and_wrench: Others
|
|
760
802
|
|
|
761
803
|
- Merge pull request #243 from eea/develop [ichim-david - [`576564c`](https://github.com/eea/volto-eea-design-system/commit/576564ce395ee6ac9e74bcb19d5c4f0b4cd3c33b)]
|
|
804
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`4a5be6e`](https://github.com/eea/volto-eea-design-system/commit/4a5be6eec78dae230626e61ea2c77e7f3c62510d)]
|
|
762
805
|
- Back to dev [Alin Voinea - [`b251255`](https://github.com/eea/volto-eea-design-system/commit/b251255a7ed14d8290717726d86eaf54b87aa2d4)]
|
|
763
806
|
### [0.9.0](https://github.com/eea/volto-eea-design-system/compare/0.8.1...0.9.0) - 19 September 2022
|
|
764
807
|
|
|
@@ -1514,6 +1557,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1514
1557
|
#### :hammer_and_wrench: Others
|
|
1515
1558
|
|
|
1516
1559
|
- prettier changes [David Ichim - [`134da52`](https://github.com/eea/volto-eea-design-system/commit/134da52549b9d5eac5a12b7ad3005073500ac2c4)]
|
|
1560
|
+
- [JENKINSFILE] remove debug, add error per stage [valentinab25 - [`903eecd`](https://github.com/eea/volto-eea-design-system/commit/903eecdb6bcbb8d73cff5e447d80c85e2a2c906d)]
|
|
1561
|
+
- [JENKINSFILE] mention comment author in comment [valentinab25 - [`39a26aa`](https://github.com/eea/volto-eea-design-system/commit/39a26aa1ff0f35e93e8df9f442c29c5ab79ff493)]
|
|
1562
|
+
- [JENKINSFILE] format PR comments [valentinab25 - [`739438c`](https://github.com/eea/volto-eea-design-system/commit/739438c64950c745d630d1998314a2bed595b23a)]
|
|
1563
|
+
- [JENKINSFILE] Add failure comment, no jenkins fail [valentinab25 - [`c325bf1`](https://github.com/eea/volto-eea-design-system/commit/c325bf14f3fb0da150f2a56cda0a9f03d8d8a628)]
|
|
1517
1564
|
### [0.2.3](https://github.com/eea/volto-eea-design-system/compare/0.2.2...0.2.3) - 29 April 2022
|
|
1518
1565
|
|
|
1519
1566
|
#### :rocket: New Features
|
|
@@ -1938,6 +1985,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1938
1985
|
- set profile section overflow to auto [nileshgulia1 - [`71ab47f`](https://github.com/eea/volto-eea-design-system/commit/71ab47f89a433233c14b394c3824e607dd18a393)]
|
|
1939
1986
|
- remove segment custom width [nileshgulia1 - [`1d3ea40`](https://github.com/eea/volto-eea-design-system/commit/1d3ea40f98bbdc1eab95b4da739a659b5e29ec16)]
|
|
1940
1987
|
- fix profile section css overflow [nileshgulia1 - [`db5126f`](https://github.com/eea/volto-eea-design-system/commit/db5126fc902e191d1e18fb7e4c54877c8d8786e6)]
|
|
1988
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`647a6e3`](https://github.com/eea/volto-eea-design-system/commit/647a6e3e2093f2c4884c356eb148453551c8f33f)]
|
|
1941
1989
|
- fix warning related to proptype [nileshgulia1 - [`946c6c6`](https://github.com/eea/volto-eea-design-system/commit/946c6c6bc9dece0985ae4b9f9cad6ece2be0ff2c)]
|
|
1942
1990
|
- removed override already present in card.less [ichim-david - [`50d2ab2`](https://github.com/eea/volto-eea-design-system/commit/50d2ab26f85c8f409da02ec128cc1df34848ca69)]
|
|
1943
1991
|
- update [Miu Razvan - [`bbcab87`](https://github.com/eea/volto-eea-design-system/commit/bbcab87ef4c8475f347f0daf4ab7e428e69c2316)]
|
|
@@ -2024,6 +2072,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2024
2072
|
- remove segment custom width [nileshgulia1 - [`4a60d84`](https://github.com/eea/volto-eea-design-system/commit/4a60d84d5fe76578b7760aa1dad6eef9a20916a7)]
|
|
2025
2073
|
- Reformat header.less [Tiberiu Ichim - [`1f99dfc`](https://github.com/eea/volto-eea-design-system/commit/1f99dfc82c165304ca5600ce5138c1233615ab69)]
|
|
2026
2074
|
- fix profile section css overflow [nileshgulia1 - [`8fd2654`](https://github.com/eea/volto-eea-design-system/commit/8fd265413149f1b5e033dffa0fbcb5ef5ecad15f)]
|
|
2075
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6051724`](https://github.com/eea/volto-eea-design-system/commit/6051724437a38675e659c797bb5586ef81286ec0)]
|
|
2027
2076
|
- fix warning related to proptype [nileshgulia1 - [`824b9be`](https://github.com/eea/volto-eea-design-system/commit/824b9beff77aae139882cd50a1d670a02ec6f723)]
|
|
2028
2077
|
- refactor breadcrumbs component, make it functional and customizable [nileshgulia1 - [`4ec374e`](https://github.com/eea/volto-eea-design-system/commit/4ec374e20565eb0a5aed0ff67a02cd6f77eba1f0)]
|
|
2029
2078
|
- removed override already present in card.less [ichim-david - [`93c4e5a`](https://github.com/eea/volto-eea-design-system/commit/93c4e5aac9cc85ff2cc6c04180f6655d5f5616dc)]
|
|
@@ -2592,6 +2641,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2592
2641
|
- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`3af46d2`](https://github.com/eea/volto-eea-design-system/commit/3af46d2b14fa0b1ef44736f25b0f9ac93b23d18d)]
|
|
2593
2642
|
- Refs #140454 updated eea-design-system readme with extra info on package contents [David Ichim - [`d2efc3d`](https://github.com/eea/volto-eea-design-system/commit/d2efc3ddae7b91efc82cf3bce8fb8e42d696a780)]
|
|
2594
2643
|
- Refs #140454 add h1 to the list of elements that are max 800px and centered [David Ichim - [`7d3c30f`](https://github.com/eea/volto-eea-design-system/commit/7d3c30f409aa4cb43810839f8960589456cc1b2e)]
|
|
2644
|
+
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`8d657d0`](https://github.com/eea/volto-eea-design-system/commit/8d657d056cde5163cfe90ac66bc973f55d82e5e9)]
|
|
2595
2645
|
### [0.1.0](https://github.com/eea/volto-eea-design-system/compare/0.0.1...0.1.0) - 17 November 2021
|
|
2596
2646
|
|
|
2597
2647
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
package/src/ui/Banner/Banner.jsx
CHANGED
|
@@ -6,7 +6,6 @@ import config from '@plone/volto/registry';
|
|
|
6
6
|
|
|
7
7
|
Banner.propTypes = {
|
|
8
8
|
title: PropTypes.string,
|
|
9
|
-
image: PropTypes.bool,
|
|
10
9
|
};
|
|
11
10
|
|
|
12
11
|
const socialPlatforms = {
|
|
@@ -66,16 +65,19 @@ function Banner({ image, metadata, properties, children, ...rest }) {
|
|
|
66
65
|
);
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
Banner.Action = function (
|
|
68
|
+
Banner.Action = React.forwardRef(function (
|
|
69
|
+
{ id, title, titleClass, icon, onClick, className, color },
|
|
70
|
+
ref,
|
|
71
|
+
) {
|
|
70
72
|
return (
|
|
71
|
-
<div className="action">
|
|
73
|
+
<div className="action" ref={ref}>
|
|
72
74
|
<Button className={className} basic icon inverted onClick={onClick}>
|
|
73
75
|
<Icon className={icon} color={color}></Icon>
|
|
74
|
-
<span className=
|
|
76
|
+
<span className={titleClass || 'mobile hidden'}>{title}</span>
|
|
75
77
|
</Button>
|
|
76
78
|
</div>
|
|
77
79
|
);
|
|
78
|
-
};
|
|
80
|
+
});
|
|
79
81
|
|
|
80
82
|
Banner.Content = ({ children, actions }) => {
|
|
81
83
|
return (
|
|
@@ -98,12 +100,12 @@ Banner.Title = ({ children }) => {
|
|
|
98
100
|
Banner.Subtitle = ({ children }) => <p className="subtitle">{children}</p>;
|
|
99
101
|
Banner.Metadata = ({ children }) => <p className="metadata">{children}</p>;
|
|
100
102
|
|
|
101
|
-
Banner.MetadataField = ({ hidden, type = 'text', label, value
|
|
103
|
+
Banner.MetadataField = ({ hidden, type = 'text', label, value }) => {
|
|
102
104
|
const locale = config.settings.dateLocale || 'en-gb';
|
|
103
105
|
if (hidden || !value) return '';
|
|
104
106
|
if (type === 'date' && value)
|
|
105
107
|
return (
|
|
106
|
-
<
|
|
108
|
+
<time className={`field ${type}`} dateTime={value}>
|
|
107
109
|
{label}{' '}
|
|
108
110
|
{formatDate({
|
|
109
111
|
date: value,
|
|
@@ -114,7 +116,7 @@ Banner.MetadataField = ({ hidden, type = 'text', label, value, title }) => {
|
|
|
114
116
|
},
|
|
115
117
|
locale: locale,
|
|
116
118
|
})}
|
|
117
|
-
</
|
|
119
|
+
</time>
|
|
118
120
|
);
|
|
119
121
|
return (
|
|
120
122
|
<span className={`field ${type}`}>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import Banner from './Banner';
|
|
3
3
|
// eslint-disable-next-line import/no-unresolved
|
|
4
4
|
import imgUrl from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/banner.png';
|
|
5
|
-
import {
|
|
5
|
+
import { Icon } from 'semantic-ui-react';
|
|
6
|
+
import Popup from '@eeacms/volto-eea-design-system/ui/Popup/Popup';
|
|
6
7
|
import Copyright from '../Copyright/Copyright';
|
|
7
8
|
|
|
8
9
|
export default {
|
|
@@ -12,49 +13,49 @@ export default {
|
|
|
12
13
|
title: {
|
|
13
14
|
description: 'banner title',
|
|
14
15
|
table: {
|
|
15
|
-
defaultValue: { summary: '
|
|
16
|
+
defaultValue: { summary: '' },
|
|
16
17
|
type: { summary: 'string' },
|
|
17
18
|
},
|
|
18
19
|
},
|
|
19
20
|
metadata: {
|
|
20
21
|
description: 'banner metadata',
|
|
21
22
|
table: {
|
|
22
|
-
defaultValue: { summary: '
|
|
23
|
+
defaultValue: { summary: '' },
|
|
23
24
|
type: { summary: 'object' },
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
image: {
|
|
27
28
|
description: 'set or unset banner image',
|
|
28
29
|
table: {
|
|
29
|
-
defaultValue: { summary: '
|
|
30
|
+
defaultValue: { summary: '' },
|
|
30
31
|
type: { summary: 'boolean' },
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
34
|
hideShareButton: {
|
|
34
35
|
description: 'hide/show share button',
|
|
35
36
|
table: {
|
|
36
|
-
defaultValue: { summary: '
|
|
37
|
+
defaultValue: { summary: '' },
|
|
37
38
|
type: { summary: 'boolean' },
|
|
38
39
|
},
|
|
39
40
|
},
|
|
40
41
|
hideDownloadButton: {
|
|
41
42
|
description: 'hide/show download button',
|
|
42
43
|
table: {
|
|
43
|
-
defaultValue: { summary: '
|
|
44
|
+
defaultValue: { summary: '' },
|
|
44
45
|
type: { summary: 'boolean' },
|
|
45
46
|
},
|
|
46
47
|
},
|
|
47
48
|
copyright: {
|
|
48
49
|
table: {
|
|
49
50
|
category: 'Copyright',
|
|
50
|
-
defaultValue: { summary: '
|
|
51
|
+
defaultValue: { summary: '' },
|
|
51
52
|
type: { summary: 'string' },
|
|
52
53
|
},
|
|
53
54
|
},
|
|
54
55
|
copyrightIcon: {
|
|
55
56
|
table: {
|
|
56
57
|
category: 'Copyright',
|
|
57
|
-
defaultValue: { summary: '
|
|
58
|
+
defaultValue: { summary: '' },
|
|
58
59
|
type: { summary: 'string' },
|
|
59
60
|
},
|
|
60
61
|
},
|
|
@@ -73,69 +74,82 @@ export default {
|
|
|
73
74
|
},
|
|
74
75
|
};
|
|
75
76
|
|
|
76
|
-
const Template = (args) =>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{!args.hideShareButton && (
|
|
83
|
-
<Popup
|
|
84
|
-
className="share-popup"
|
|
85
|
-
trigger={
|
|
86
|
-
<Banner.Action
|
|
87
|
-
icon="ri-share-fill"
|
|
88
|
-
title="Share"
|
|
89
|
-
className="share"
|
|
90
|
-
/>
|
|
91
|
-
}
|
|
92
|
-
content={() => (
|
|
93
|
-
<>
|
|
94
|
-
<p>Share to:</p>
|
|
95
|
-
<div className="actions">
|
|
96
|
-
<Banner.Action icon="ri-facebook-fill" />
|
|
97
|
-
<Banner.Action icon="ri-twitter-fill" />
|
|
98
|
-
<Banner.Action icon="ri-linkedin-fill" />
|
|
99
|
-
</div>
|
|
100
|
-
</>
|
|
101
|
-
)}
|
|
102
|
-
position="top center"
|
|
103
|
-
basic
|
|
104
|
-
/>
|
|
105
|
-
)}
|
|
106
|
-
{!args.hideDownloadButton && (
|
|
107
|
-
<Banner.Action
|
|
108
|
-
icon="ri-download-2-line"
|
|
109
|
-
title="Download"
|
|
110
|
-
className="download"
|
|
111
|
-
/>
|
|
112
|
-
)}
|
|
113
|
-
</>
|
|
114
|
-
}
|
|
115
|
-
>
|
|
116
|
-
<Banner.Subtitle>{args.subtitle}</Banner.Subtitle>
|
|
117
|
-
<Banner.Title>{args.title}</Banner.Title>
|
|
118
|
-
{args.metadata && (
|
|
119
|
-
<Banner.Metadata>
|
|
77
|
+
const Template = (args) => {
|
|
78
|
+
const popupRef = useRef(null);
|
|
79
|
+
return (
|
|
80
|
+
<Banner {...args} image={args.image ? imgUrl : null}>
|
|
81
|
+
<Banner.Content
|
|
82
|
+
actions={
|
|
120
83
|
<>
|
|
121
|
-
{args.
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
84
|
+
{!args.hideShareButton && (
|
|
85
|
+
<Popup
|
|
86
|
+
className="share-popup"
|
|
87
|
+
trigger={
|
|
88
|
+
<Banner.Action
|
|
89
|
+
icon="ri-share-fill"
|
|
90
|
+
title="Share"
|
|
91
|
+
className="share"
|
|
92
|
+
/>
|
|
93
|
+
}
|
|
94
|
+
content={
|
|
95
|
+
<>
|
|
96
|
+
<p>Share to:</p>
|
|
97
|
+
<div className="actions" ref={popupRef}>
|
|
98
|
+
<Banner.Action
|
|
99
|
+
icon="ri-facebook-fill"
|
|
100
|
+
title={'Share page to Facebook'}
|
|
101
|
+
titleClass={'hiddenStructure'}
|
|
102
|
+
/>
|
|
103
|
+
<Banner.Action
|
|
104
|
+
icon="ri-twitter-fill"
|
|
105
|
+
title={'Share page to Twitter'}
|
|
106
|
+
titleClass={'hiddenStructure'}
|
|
107
|
+
/>
|
|
108
|
+
<Banner.Action
|
|
109
|
+
icon="ri-linkedin-fill"
|
|
110
|
+
title={'Share page to Linkedin'}
|
|
111
|
+
titleClass={'hiddenStructure'}
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
</>
|
|
115
|
+
}
|
|
116
|
+
position="top center"
|
|
117
|
+
/>
|
|
118
|
+
)}
|
|
119
|
+
{!args.hideDownloadButton && (
|
|
120
|
+
<Banner.Action
|
|
121
|
+
icon="ri-download-2-line"
|
|
122
|
+
title="Download"
|
|
123
|
+
className="download"
|
|
124
|
+
/>
|
|
125
|
+
)}
|
|
127
126
|
</>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
127
|
+
}
|
|
128
|
+
>
|
|
129
|
+
<Banner.Subtitle>{args.subtitle}</Banner.Subtitle>
|
|
130
|
+
<Banner.Title>{args.title}</Banner.Title>
|
|
131
|
+
{args.metadata && (
|
|
132
|
+
<Banner.Metadata>
|
|
133
|
+
<>
|
|
134
|
+
{args.metadata.map((meta, index) => (
|
|
135
|
+
<Banner.MetadataField
|
|
136
|
+
{...meta}
|
|
137
|
+
key={index}
|
|
138
|
+
></Banner.MetadataField>
|
|
139
|
+
))}
|
|
140
|
+
</>
|
|
141
|
+
</Banner.Metadata>
|
|
142
|
+
)}
|
|
143
|
+
<Copyright copyrightPosition={args.copyrightPosition}>
|
|
144
|
+
<Copyright.Icon>
|
|
145
|
+
<Icon className={args.copyrightIcon} />
|
|
146
|
+
</Copyright.Icon>
|
|
147
|
+
<Copyright.Text>{args.copyright}</Copyright.Text>
|
|
148
|
+
</Copyright>
|
|
149
|
+
</Banner.Content>
|
|
150
|
+
</Banner>
|
|
151
|
+
);
|
|
152
|
+
};
|
|
139
153
|
|
|
140
154
|
export const Default = Template.bind({});
|
|
141
155
|
Default.args = {
|
package/src/ui/Footer/Social.jsx
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Icon } from 'semantic-ui-react';
|
|
2
|
+
import { Grid, Icon } from 'semantic-ui-react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
|
|
5
5
|
const Social = (props) => {
|
|
6
6
|
if (props.children) {
|
|
7
|
-
return <div>{props.children}</div>;
|
|
7
|
+
return <div className="social">{props.children}</div>;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
return (
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
return props.social && props.social.length > 0 ? (
|
|
11
|
+
<Grid.Row>
|
|
12
|
+
<div className="social">
|
|
13
|
+
{props.social?.map((item, index) => (
|
|
14
|
+
<a href={item.link} aria-label={`${item.name} link`} key={index}>
|
|
15
|
+
<Icon className={item.icon}></Icon>
|
|
16
|
+
</a>
|
|
17
|
+
))}
|
|
18
|
+
</div>
|
|
19
|
+
</Grid.Row>
|
|
20
|
+
) : null;
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
Social.propTypes = {
|
|
@@ -42,9 +42,7 @@ const SubFooter = (props) => {
|
|
|
42
42
|
|
|
43
43
|
<Footer.Description description={props.description} />
|
|
44
44
|
|
|
45
|
-
<
|
|
46
|
-
<Footer.Social social={props.social} />
|
|
47
|
-
</Grid.Row>
|
|
45
|
+
<Footer.Social social={props.social} />
|
|
48
46
|
|
|
49
47
|
<Grid className="mobile only">
|
|
50
48
|
{props.managedBy &&
|
package/src/ui/Header/Header.jsx
CHANGED
|
@@ -131,6 +131,7 @@ const Main = ({
|
|
|
131
131
|
menuItems,
|
|
132
132
|
renderMenuItem,
|
|
133
133
|
renderGlobalMenuItem,
|
|
134
|
+
headerSearchBox,
|
|
134
135
|
pathname,
|
|
135
136
|
transparency,
|
|
136
137
|
inverted,
|
|
@@ -321,6 +322,7 @@ const Main = ({
|
|
|
321
322
|
onClose={searchOnClick}
|
|
322
323
|
searchInputRef={searchInputRef}
|
|
323
324
|
triggerRefs={[searchButtonRef]}
|
|
325
|
+
headerSearchBox={headerSearchBox}
|
|
324
326
|
/>
|
|
325
327
|
)}
|
|
326
328
|
<HeaderMenuPopUp
|
|
@@ -1245,6 +1245,30 @@ const menuItems = [
|
|
|
1245
1245
|
},
|
|
1246
1246
|
];
|
|
1247
1247
|
|
|
1248
|
+
const headerSearchBox = [
|
|
1249
|
+
{
|
|
1250
|
+
isDefault: true,
|
|
1251
|
+
path: '/en/advanced-search',
|
|
1252
|
+
placeholder: 'Search or ask your question...',
|
|
1253
|
+
description: 'For more search options',
|
|
1254
|
+
buttonTitle: 'Go to advanced search',
|
|
1255
|
+
searchSuggestions: {
|
|
1256
|
+
maxToShow: 6,
|
|
1257
|
+
suggestionsTitle: 'Try our suggestions',
|
|
1258
|
+
suggestions: [
|
|
1259
|
+
'What is PFAS?',
|
|
1260
|
+
'Which transport mode has the lowest pollution?',
|
|
1261
|
+
'Which countries use most renewable energy?',
|
|
1262
|
+
'How many premature deaths are attributed to PM2.5?',
|
|
1263
|
+
'How many premature deaths are attributed to air pollution?',
|
|
1264
|
+
'How much have new cars co2 emissions decreased?',
|
|
1265
|
+
'What countries had the highest land take in the EEA-39?',
|
|
1266
|
+
'How many people are exposed to air pollution?',
|
|
1267
|
+
],
|
|
1268
|
+
},
|
|
1269
|
+
},
|
|
1270
|
+
];
|
|
1271
|
+
|
|
1248
1272
|
const debounce = (func) => {
|
|
1249
1273
|
let timer;
|
|
1250
1274
|
return (event) => {
|
|
@@ -1394,6 +1418,7 @@ const Template = (args) => {
|
|
|
1394
1418
|
pathname={pathname}
|
|
1395
1419
|
logo={<Logo {...logoProps} inverted={args.inverted} />}
|
|
1396
1420
|
menuItems={menuItems}
|
|
1421
|
+
headerSearchBox={headerSearchBox}
|
|
1397
1422
|
renderMenuItem={(item, options = {}, props) => {
|
|
1398
1423
|
const { onClick } = options;
|
|
1399
1424
|
return (
|
|
@@ -1,43 +1,132 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Container, Input } from 'semantic-ui-react';
|
|
3
|
-
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { Container, Input, List } from 'semantic-ui-react';
|
|
3
|
+
import { withRouter, Link } from 'react-router-dom';
|
|
4
4
|
import { useClickOutside } from '@eeacms/volto-eea-design-system/helpers';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const getRandomItems = (arr, max) => {
|
|
7
|
+
return (
|
|
8
|
+
arr?.slice(0, max).map(function () {
|
|
9
|
+
return this.splice(Math.floor(Math.random() * this.length), 1)[0];
|
|
10
|
+
}, arr.slice()) || []
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function HeaderSearchPopUp({
|
|
15
|
+
history,
|
|
16
|
+
location,
|
|
17
|
+
onClose,
|
|
18
|
+
searchInputRef,
|
|
19
|
+
headerSearchBox,
|
|
20
|
+
triggerRefs = [],
|
|
21
|
+
}) {
|
|
7
22
|
const nodeRef = React.useRef();
|
|
23
|
+
const headerSearchViews = headerSearchBox || [];
|
|
24
|
+
const defaultView = headerSearchViews.filter((v) => v.isDefault);
|
|
25
|
+
const localView = headerSearchViews.filter((v) =>
|
|
26
|
+
location.pathname.includes(v.path),
|
|
27
|
+
);
|
|
28
|
+
const activeView = localView.length > 0 ? localView[0] : defaultView[0];
|
|
29
|
+
|
|
30
|
+
const {
|
|
31
|
+
path = '',
|
|
32
|
+
buttonTitle,
|
|
33
|
+
description,
|
|
34
|
+
placeholder = 'Search',
|
|
35
|
+
searchSuggestions,
|
|
36
|
+
} = activeView || {};
|
|
37
|
+
const { suggestionsTitle, suggestions, maxToShow } = searchSuggestions || {};
|
|
38
|
+
|
|
39
|
+
const [text, setText] = React.useState('');
|
|
40
|
+
const [visibleSuggestions, setVisibileSuggestions] = React.useState(
|
|
41
|
+
getRandomItems(suggestions, maxToShow),
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
setVisibileSuggestions(getRandomItems(suggestions, maxToShow));
|
|
46
|
+
}, [maxToShow, suggestions]);
|
|
8
47
|
|
|
9
48
|
useClickOutside({ targetRefs: [nodeRef, ...triggerRefs], callback: onClose });
|
|
10
49
|
|
|
50
|
+
const onChangeText = (event, { value }) => {
|
|
51
|
+
setText(value);
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const onSubmit = (event) => {
|
|
56
|
+
history.push(`${path}?q=${text}`);
|
|
57
|
+
|
|
58
|
+
if (window?.searchContext?.resetSearch) {
|
|
59
|
+
window.searchContext.resetSearch({ searchTerm: text });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
onClose();
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const onClickHandler = (suggestion) => {
|
|
67
|
+
if (window?.searchContext?.resetSearch) {
|
|
68
|
+
window.searchContext.resetSearch({ searchTerm: suggestion });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
onClose();
|
|
72
|
+
};
|
|
73
|
+
|
|
11
74
|
return (
|
|
12
75
|
<div id="search-box" ref={nodeRef}>
|
|
13
76
|
<div className="wrapper">
|
|
14
77
|
<Container>
|
|
15
|
-
<form>
|
|
78
|
+
<form method="get" onSubmit={onSubmit}>
|
|
16
79
|
<Input
|
|
17
80
|
ref={searchInputRef}
|
|
18
81
|
className="search"
|
|
19
|
-
|
|
20
|
-
|
|
82
|
+
onChange={onChangeText}
|
|
83
|
+
icon={{
|
|
84
|
+
className: 'ri-search-line',
|
|
85
|
+
link: true,
|
|
86
|
+
onClick: onSubmit,
|
|
87
|
+
}}
|
|
88
|
+
placeholder={placeholder}
|
|
21
89
|
fluid
|
|
22
90
|
/>
|
|
23
91
|
</form>
|
|
24
|
-
|
|
92
|
+
{searchSuggestions && suggestions.length > 0 && (
|
|
93
|
+
<div className="search-suggestions">
|
|
94
|
+
{suggestionsTitle && <h4>{suggestionsTitle}</h4>}
|
|
25
95
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
96
|
+
<List>
|
|
97
|
+
{visibleSuggestions.map((item, i) => {
|
|
98
|
+
return (
|
|
99
|
+
<List.Item key={i}>
|
|
100
|
+
<Link
|
|
101
|
+
to={`${path}?q=${item}`}
|
|
102
|
+
onClick={() => onClickHandler(item)}
|
|
103
|
+
>
|
|
104
|
+
{item}
|
|
105
|
+
</Link>
|
|
106
|
+
</List.Item>
|
|
107
|
+
);
|
|
108
|
+
})}
|
|
109
|
+
</List>
|
|
110
|
+
</div>
|
|
111
|
+
)}
|
|
112
|
+
</Container>
|
|
113
|
+
{buttonTitle && (
|
|
114
|
+
<div className="advanced-search">
|
|
115
|
+
<Container>
|
|
116
|
+
<div>{description}</div>
|
|
117
|
+
<a
|
|
118
|
+
href={defaultView[0].path}
|
|
119
|
+
className="ui button white inverted"
|
|
120
|
+
title="Advanced search"
|
|
121
|
+
>
|
|
122
|
+
{buttonTitle}
|
|
123
|
+
</a>
|
|
124
|
+
</Container>
|
|
125
|
+
</div>
|
|
126
|
+
)}
|
|
38
127
|
</div>
|
|
39
128
|
</div>
|
|
40
129
|
);
|
|
41
130
|
}
|
|
42
131
|
|
|
43
|
-
export default HeaderSearchPopUp;
|
|
132
|
+
export default withRouter(HeaderSearchPopUp);
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/* Simplified popup with several options found in the semantic ui implementation
|
|
2
|
+
* https://github.com/Semantic-Org/Semantic-UI-React/blob/master/src/modules/Popup/Popup.js
|
|
3
|
+
* */
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { createPopper } from '@popperjs/core';
|
|
6
|
+
import EventStack from '@semantic-ui-react/event-stack';
|
|
7
|
+
import cx from 'classnames';
|
|
8
|
+
|
|
9
|
+
export const positionsMapping = {
|
|
10
|
+
'top center': 'top',
|
|
11
|
+
'top left': 'top-start',
|
|
12
|
+
'top right': 'top-end',
|
|
13
|
+
|
|
14
|
+
'bottom center': 'bottom',
|
|
15
|
+
'bottom left': 'bottom-start',
|
|
16
|
+
'bottom right': 'bottom-end',
|
|
17
|
+
|
|
18
|
+
'right center': 'right',
|
|
19
|
+
'left center': 'left',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
class Popup extends React.Component {
|
|
23
|
+
constructor(props) {
|
|
24
|
+
super(props);
|
|
25
|
+
|
|
26
|
+
this.triggerRef = React.createRef();
|
|
27
|
+
this.popupRef = React.createRef();
|
|
28
|
+
|
|
29
|
+
this.state = {
|
|
30
|
+
isOpen: false,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
this.togglePopup = this.togglePopup.bind(this);
|
|
34
|
+
this.closeOnEscape = this.closeOnEscape.bind(this);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
componentDidMount() {
|
|
38
|
+
this.popper = createPopper(this.triggerRef.current, this.popupRef.current, {
|
|
39
|
+
placement: positionsMapping[this.props.position] || 'bottom-end',
|
|
40
|
+
strategy: this.props.positionFixed || 'absolute',
|
|
41
|
+
modifiers: [
|
|
42
|
+
{
|
|
43
|
+
name: 'offset',
|
|
44
|
+
options: {
|
|
45
|
+
offset: this.props.offset,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
...this.props.popperModifiers,
|
|
49
|
+
],
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
componentWillUnmount() {
|
|
54
|
+
this.popper && this.popper.destroy();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
togglePopup() {
|
|
58
|
+
this.setState(
|
|
59
|
+
(state) => {
|
|
60
|
+
return {
|
|
61
|
+
isOpen: !state.isOpen,
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
() => {
|
|
65
|
+
this.popper.forceUpdate();
|
|
66
|
+
},
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
closeOnEscape(e) {
|
|
70
|
+
if (e.key === 'Escape') {
|
|
71
|
+
this.setState((state) => {
|
|
72
|
+
return {
|
|
73
|
+
isOpen: !state.isOpen,
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
render() {
|
|
80
|
+
const { trigger, className, size, position, basic, content } = this.props;
|
|
81
|
+
const event = this.props.on;
|
|
82
|
+
const onEvent = 'on' + event.charAt(0).toUpperCase() + event.slice(1);
|
|
83
|
+
return (
|
|
84
|
+
<React.Fragment>
|
|
85
|
+
{trigger &&
|
|
86
|
+
React.cloneElement(trigger, {
|
|
87
|
+
[onEvent]: this.togglePopup,
|
|
88
|
+
ref: this.triggerRef,
|
|
89
|
+
})}
|
|
90
|
+
|
|
91
|
+
<div className="popup-container" ref={this.popupRef}>
|
|
92
|
+
{this.state.isOpen && (
|
|
93
|
+
<EventStack name="keydown" on={this.closeOnEscape} />
|
|
94
|
+
)}
|
|
95
|
+
<React.Fragment>
|
|
96
|
+
<div
|
|
97
|
+
className={cx(
|
|
98
|
+
'ui popup transition',
|
|
99
|
+
className,
|
|
100
|
+
size,
|
|
101
|
+
position,
|
|
102
|
+
basic ? 'basic' : '',
|
|
103
|
+
this.state.isOpen ? 'visible' : '',
|
|
104
|
+
)}
|
|
105
|
+
>
|
|
106
|
+
{content}
|
|
107
|
+
</div>
|
|
108
|
+
</React.Fragment>
|
|
109
|
+
</div>
|
|
110
|
+
</React.Fragment>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
Popup.defaultProps = {
|
|
116
|
+
position: 'bottom center',
|
|
117
|
+
basic: false,
|
|
118
|
+
size: 'small',
|
|
119
|
+
offset: [0, 0],
|
|
120
|
+
positionFixed: false,
|
|
121
|
+
className: '',
|
|
122
|
+
wide: false,
|
|
123
|
+
on: 'click',
|
|
124
|
+
popperModifiers: [],
|
|
125
|
+
// disabled,
|
|
126
|
+
// flowing,
|
|
127
|
+
// header,
|
|
128
|
+
// inverted,
|
|
129
|
+
// pinned,
|
|
130
|
+
// popper,
|
|
131
|
+
// popperDependencies,
|
|
132
|
+
// style,
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export default Popup;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { React } from 'react';
|
|
2
|
-
import { Button, Segment,
|
|
2
|
+
import { Button, Segment, Image, Icon } from 'semantic-ui-react';
|
|
3
|
+
|
|
4
|
+
import Popup from './Popup';
|
|
5
|
+
|
|
3
6
|
import EUflag from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/europe-flag.svg';
|
|
4
7
|
|
|
5
8
|
export default {
|
|
@@ -109,20 +109,40 @@ body {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/* Hack for escape the blocks container in blocks full width */
|
|
112
|
+
[class~="view-defaultview"] [id="page-document"] > .full-width,
|
|
113
|
+
[class~="view-viewview"] [id="page-document"] > .full-width {
|
|
114
|
+
max-width: initial !important;
|
|
115
|
+
}
|
|
116
|
+
|
|
112
117
|
.has--size--full:not(.block-editor-columnsBlock),
|
|
113
118
|
.full-width {
|
|
114
119
|
position: relative;
|
|
120
|
+
width: calc(100vw - var(--scrollbar-width, @scrollbarWidth)) !important;
|
|
115
121
|
right: 50%;
|
|
116
122
|
left: 50%;
|
|
117
|
-
width: 100vw !important;
|
|
118
123
|
max-width: initial !important;
|
|
119
|
-
margin-
|
|
120
|
-
margin-
|
|
124
|
+
margin-left: calc(-50vw + var(--scrollbar-width, @scrollbarWidth) / 2) !important;
|
|
125
|
+
margin-right: calc(-50vw + var(--scrollbar-width, @scrollbarWidth) / 2) !important;
|
|
121
126
|
}
|
|
122
127
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
@media only screen and (min-width: @largestMobileScreen) {
|
|
129
|
+
body.has-toolbar {
|
|
130
|
+
.has--size--full:not(.block-editor-columnsBlock),
|
|
131
|
+
.full-width {
|
|
132
|
+
width: calc(100vw - @toolbarWidth - var(--scrollbar-width, @scrollbarWidth)) !important;
|
|
133
|
+
margin-left: calc(-50vw + (@toolbarWidth + var(--scrollbar-width, @scrollbarWidth)) / 2) !important;
|
|
134
|
+
margin-right: calc(-50vw + (@toolbarWidth + var(--scrollbar-width, @scrollbarWidth)) / 2) !important;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
body.has-toolbar-collapsed {
|
|
139
|
+
.has--size--full:not(.block-editor-columnsBlock),
|
|
140
|
+
.full-width {
|
|
141
|
+
width: calc(100vw - @toolbarWidthMin - var(--scrollbar-width, @scrollbarWidth)) !important;
|
|
142
|
+
margin-left: calc(-50vw + (var(--scrollbar-width, @scrollbarWidth) + @toolbarWidthMin) / 2) !important;
|
|
143
|
+
margin-right: calc(-50vw + (var(--scrollbar-width, @scrollbarWidth) + @toolbarWidthMin) / 2) !important;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
126
146
|
}
|
|
127
147
|
|
|
128
148
|
.has--size--full:not(.block-editor-columnsBlock) .ui.grid {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
align-items: @mobileActionsAlignItems;
|
|
60
60
|
justify-content: flex-end;
|
|
61
61
|
|
|
62
|
-
.action {
|
|
62
|
+
> .action {
|
|
63
63
|
.ui.basic.inverted.button {
|
|
64
64
|
/* used basic inverted button for minimun overrides on box-shadow and active state background */
|
|
65
65
|
box-shadow: @bannerActionButtonBoxShadow !important;
|
|
@@ -112,6 +112,8 @@
|
|
|
112
112
|
.ui.popup.share-popup {
|
|
113
113
|
padding: @sharePopupPadding;
|
|
114
114
|
filter: @sharePopupFilter;
|
|
115
|
+
min-width: @sharePopupMinWidth;
|
|
116
|
+
position: initial; // without position initial popper cannot correctly place popup
|
|
115
117
|
|
|
116
118
|
p {
|
|
117
119
|
font-size: @sharePopupFontSize;
|
|
@@ -165,7 +167,7 @@
|
|
|
165
167
|
flex-direction: @tabletActionsFlexDirection;
|
|
166
168
|
align-items: @tabletActionsAlignItems;
|
|
167
169
|
|
|
168
|
-
.action {
|
|
170
|
+
> .action {
|
|
169
171
|
min-width: @tabletActionsActionMinWidth;
|
|
170
172
|
|
|
171
173
|
.ui.basic.inverted.button i.icon {
|
|
@@ -189,10 +191,12 @@
|
|
|
189
191
|
|
|
190
192
|
.actions {
|
|
191
193
|
display: flex;
|
|
192
|
-
flex-flow: row;
|
|
194
|
+
flex-flow: row !important;
|
|
195
|
+
justify-content: flex-start !important;
|
|
193
196
|
|
|
194
197
|
.action {
|
|
195
198
|
display: inherit;
|
|
199
|
+
min-width: 1rem !important;
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
}
|
|
@@ -596,7 +596,6 @@
|
|
|
596
596
|
@media only screen and (min-width: @computerBreakpoint) {
|
|
597
597
|
.eea.header .subsite-logo {
|
|
598
598
|
position: absolute;
|
|
599
|
-
z-index: 1;
|
|
600
599
|
top: @subsiteLogoTopPosition;
|
|
601
600
|
left: calc(100% + @subsiteFlexGap);
|
|
602
601
|
width: 400px;
|
|
@@ -780,6 +779,7 @@
|
|
|
780
779
|
font-size: @megaMenuGlanceListItemFontSize;
|
|
781
780
|
font-weight: @megaMenuGlanceListItemFontWeight;
|
|
782
781
|
}
|
|
782
|
+
|
|
783
783
|
.list.menu-list {
|
|
784
784
|
margin-top: @megaMenuGlanceMenuListMarginTop;
|
|
785
785
|
}
|
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/globals/utilities';
|
|
6
6
|
|
|
7
7
|
// Accessibility outline on focus-visible for every component
|
|
8
|
-
button:focus-visible,
|
|
9
8
|
*:focus-visible {
|
|
10
9
|
outline: @focusVisibleOutline;
|
|
11
10
|
}
|
|
12
11
|
|
|
12
|
+
button:focus-visible {
|
|
13
|
+
outline: @focusVisibleOutline !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
13
16
|
h1, h2, h3, h4, h5, h6 {
|
|
14
17
|
line-height: @font-lineheight-0;
|
|
15
18
|
letter-spacing: @font-letterspacing-00;
|