@eeacms/volto-eea-design-system 0.6.1 → 0.7.1

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/package.json +1 -1
  3. package/src/helpers/useClickOutside.js +1 -1
  4. package/src/index.js +4 -1
  5. package/src/semantic.less +4 -0
  6. package/src/ui/CallToAction/CallToAction.stories.jsx +33 -91
  7. package/src/ui/ContextNavigation/ContextNavigation.stories.jsx +73 -0
  8. package/src/ui/Header/Header.jsx +30 -11
  9. package/src/ui/Header/HeaderMenuPopUp.js +149 -67
  10. package/theme/theme.config +26 -11
  11. package/theme/themes/eea/assets/logo/eionet.svg +11 -9
  12. package/theme/themes/eea/collections/menu.variables +1 -1
  13. package/theme/themes/eea/elements/button.overrides +45 -0
  14. package/theme/themes/eea/elements/container.overrides +5 -2
  15. package/theme/themes/eea/extras/banner.variables +1 -1
  16. package/theme/themes/eea/extras/contentBox.less +0 -1
  17. package/theme/themes/eea/extras/contextNavigation.less +80 -0
  18. package/theme/themes/eea/extras/contextNavigation.variables +0 -0
  19. package/theme/themes/eea/extras/footer.less +0 -9
  20. package/theme/themes/eea/extras/footer.variables +1 -6
  21. package/theme/themes/eea/extras/header.less +8 -3
  22. package/theme/themes/eea/extras/header.variables +3 -0
  23. package/theme/themes/eea/extras/hero.less +9 -0
  24. package/theme/themes/eea/extras/hero.variables +7 -5
  25. package/theme/themes/eea/globals/site.variables +10 -0
  26. package/theme/themes/eea/globals/utilities.less +5 -0
  27. package/theme/themes/eea/modules/accordion.overrides +41 -0
  28. package/theme/themes/eea/modules/accordion.variables +6 -6
  29. package/theme/themes/eea/views/card.overrides +4 -0
  30. package/theme/themes/eea/views/card.variables +2 -2
  31. package/theme/themes/eea/views/item.overrides +21 -3
@@ -42,6 +42,8 @@
42
42
  .hero-block-image-wrapper {
43
43
  position: absolute;
44
44
  min-height: @heroBlockImageWrapperMinHeight;
45
+ width: 100%;
46
+ height: 100%;
45
47
  }
46
48
 
47
49
 
@@ -68,6 +70,9 @@
68
70
  .hero-block-body {
69
71
  gap: @tabletHeroBlockBodyGap;
70
72
  }
73
+ .hero-block-inner-wrapper {
74
+ padding-block: @tableHeroBlockWrapperPadding;
75
+ }
71
76
  .homepage #page-document > .eea.hero-block:first-of-type .hero-block-body {
72
77
  margin: @heroBlockHomePageBodyMargin;
73
78
  }
@@ -79,6 +84,10 @@
79
84
  .eea.hero-block.full-height .hero-block-inner-wrapper {
80
85
  min-height: @desktopHeroBlockMinHeight;
81
86
  }
87
+
88
+ .hero-block-inner-wrapper {
89
+ padding-block: @desktopHeroBlockWrapperPadding;
90
+ }
82
91
  .hero-block-body {
83
92
  gap: @desktopHeroBlockBodyGap;
84
93
  }
@@ -3,13 +3,13 @@
3
3
  *******************************/
4
4
 
5
5
  /* Hero block */
6
- @mobileHeroBlockMinHeight : 360px;
7
- @tabletHeroBlockMinHeight : 500px;
8
- @desktopHeroBlockMinHeight: 600px;
6
+ @mobileHeroBlockMinHeight : 412px;
7
+ @tabletHeroBlockMinHeight : 446px;
8
+ @desktopHeroBlockMinHeight: 664px;
9
9
 
10
10
  @heroBlockPosition: relative;
11
11
  @heroBlockHomePagePadding: 0 @rem-space-5;
12
- @heroBlockHomePageBodyMargin: @rem-space-16 0 0 0;
12
+ @heroBlockHomePageBodyMargin: @rem-space-20 0 0 0;
13
13
 
14
14
  /* Hero block spaced */
15
15
  @heroBlockSpacedMargin: @rem-space-12 0;
@@ -23,7 +23,9 @@
23
23
  @heroBlockImageBackgroundPosition : center;
24
24
 
25
25
  /* Wrapper */
26
- @heroBlockWrapperPadding : @rem-space-20;
26
+ @heroBlockWrapperPadding : 5rem;
27
+ @tableHeroBlockWrapperPadding: 6rem;
28
+ @desktopHeroBlockWrapperPadding: 194px 96px;
27
29
 
28
30
  /* Body */
29
31
  @mobileHeroBlockBodyGap : @rem-space-6;
@@ -61,9 +61,11 @@
61
61
 
62
62
  @lightPrimaryColor : @mediumPersianBlue;
63
63
  @lightSecondaryColor : @darkCyan;
64
+ @lightTertiaryColor : @UCLABlue;
64
65
 
65
66
  @darkPrimaryColor : @darkMidnightBlue;
66
67
  @darkSecondaryColor : @bottleGreen;
68
+ @darkTertiaryColor : @japaneseIndigo;
67
69
 
68
70
  /*--------------
69
71
  Page Heading
@@ -932,8 +934,10 @@
932
934
  /*--- Colors ---*/
933
935
  @primaryColorHover : saturate(darken(@primaryColor, 5), 10, relative);
934
936
  @secondaryColorHover : saturate(lighten(@secondaryColor, 5), 10, relative);
937
+ @tertiaryColorHover : saturate(lighten(@tertiaryColor, 5), 10, relative);
935
938
  @lightPrimaryColorHover : saturate(darken(@lightPrimaryColor, 5), 10, relative);
936
939
  @lightSecondaryColorHover : saturate(lighten(@lightSecondaryColor, 5), 10, relative);
940
+ @lightTertiaryColorHover : saturate(lighten(@lightTertiaryColor, 5), 10, relative);
937
941
 
938
942
  @redHover : saturate(darken(@red, 5), 10, relative);
939
943
  @orangeHover : saturate(darken(@orange, 5), 10, relative);
@@ -992,8 +996,10 @@
992
996
  /*--- Colors ---*/
993
997
  @primaryColorFocus : saturate(darken(@primaryColor, 8), 20, relative);
994
998
  @secondaryColorFocus : saturate(lighten(@secondaryColor, 8), 20, relative);
999
+ @tertiaryColorFocus : saturate(lighten(@tertiaryColor, 8), 20, relative);
995
1000
  @lightPrimaryColorFocus : saturate(darken(@lightPrimaryColor, 8), 20, relative);
996
1001
  @lightSecondaryColorFocus : saturate(lighten(@lightSecondaryColor, 8), 20, relative);
1002
+ @lightTertiaryColorFocus : saturate(lighten(@lightTertiaryColor, 8), 20, relative);
997
1003
 
998
1004
  @redFocus : saturate(darken(@red, 8), 20, relative);
999
1005
  @orangeFocus : saturate(darken(@orange, 8), 20, relative);
@@ -1053,8 +1059,10 @@
1053
1059
  /*--- Colors ---*/
1054
1060
  @primaryColorDown : darken(@primaryColor, 10);
1055
1061
  @secondaryColorDown : lighten(@secondaryColor, 10);
1062
+ @tertiaryColorDown : lighten(@tertiaryColor, 10);
1056
1063
  @lightPrimaryColorDown : darken(@lightPrimaryColor, 10);
1057
1064
  @lightSecondaryColorDown : lighten(@lightSecondaryColor, 10);
1065
+ @lightTertiaryColorDown : lighten(@lightTertiaryColor, 10);
1058
1066
 
1059
1067
  @redDown : darken(@red, 10);
1060
1068
  @orangeDown : darken(@orange, 10);
@@ -1114,8 +1122,10 @@
1114
1122
  /*--- Colors ---*/
1115
1123
  @primaryColorActive : saturate(darken(@primaryColor, 5), 15, relative);
1116
1124
  @secondaryColorActive : saturate(lighten(@secondaryColor, 5), 15, relative);
1125
+ @tertiaryColorActive : saturate(lighten(@tertiaryColor, 5), 15, relative);
1117
1126
  @lightPrimaryColorActive : saturate(darken(@lightPrimaryColor, 5), 15, relative);
1118
1127
  @lightSecondaryColorActive : saturate(lighten(@lightSecondaryColor, 5), 15, relative);
1128
+ @lightTertiaryColorActive : saturate(lighten(@lightTertiaryColor, 5), 15, relative);
1119
1129
 
1120
1130
  @redActive : saturate(darken(@red, 5), 15, relative);
1121
1131
  @orangeActive : saturate(darken(@orange, 5), 15, relative);
@@ -39,10 +39,15 @@ h1, h2, h3, h4, h5, h6, p, span, .header {
39
39
  .text-right { text-align: right !important; }
40
40
 
41
41
  // Quotes
42
+ .quoted-wrapper h2::before,
43
+ .quoted-wrapper h3::before,
42
44
  .quoted::before {
43
45
  content: "\ec51";
44
46
  font-family: 'remixicon' !important;
45
47
  }
48
+
49
+ .quoted-wrapper h2::after,
50
+ .quoted-wrapper h3::after,
46
51
  .quoted::after {
47
52
  content: "\ec52";
48
53
  font-family: 'remixicon' !important;
@@ -78,6 +78,10 @@
78
78
  Styled
79
79
  ---------------*/
80
80
 
81
+ .ui.styled.accordion .title,
82
+ .ui.styled.accordion .title:hover {
83
+ background-color: @styledActiveTitleBackground;
84
+ }
81
85
  .ui.styled.accordion .active.title input {
82
86
  color: @styledActiveTitleColor;
83
87
  }
@@ -99,3 +103,40 @@
99
103
  }
100
104
  }
101
105
  }
106
+
107
+ /*--------------
108
+ Variations
109
+ ---------------*/
110
+ .ui.accordion:not([class*='ary']) .active.title i {
111
+ color: @tertiaryColor;
112
+ }
113
+ .ui.accordion[class*='ary'] .active.title {
114
+ color: white;
115
+ }
116
+
117
+ /* Primary */
118
+ .ui.accordion.primary .active.title {
119
+ background-color: @primaryColor;
120
+ }
121
+ .ui.accordion.primary .title:not(.active):hover,
122
+ .ui.accordion.primary .title:not(.active):hover i {
123
+ color: @primaryColor;
124
+ }
125
+
126
+ /* Secondary */
127
+ .ui.accordion.secondary .active.title {
128
+ background-color: @secondaryColor;
129
+ }
130
+ .ui.accordion.secondary .title:not(.active):hover,
131
+ .ui.accordion.secondary .title:not(.active):hover i {
132
+ color: @secondaryColor;
133
+ }
134
+
135
+ /* Tertiary */
136
+ .ui.accordion.tertiary .active.title {
137
+ background-color: @tertiaryColor;
138
+ }
139
+ .ui.accordion.tertiary .title:not(.active):hover,
140
+ .ui.accordion.tertiary .title:not(.active):hover i {
141
+ color: @tertiaryColor;
142
+ }
@@ -12,7 +12,7 @@
12
12
  @titleFontSize: 1.125rem;
13
13
  @titleColor: @textColor;
14
14
  @titleBorderBottom: @1px solid @silverGray;
15
- @titleColorHover: @secondaryColor;
15
+ @titleColorHover: @grey-5;
16
16
  @titleJustifyContent: space-between;
17
17
 
18
18
  /* Icon */
@@ -32,7 +32,7 @@
32
32
  ;
33
33
  @iconVerticalAlign: baseline;
34
34
  @iconTransform: none;
35
- @iconColorHover: @secondaryColor;
35
+ @iconColorHover: @grey-5;
36
36
  @iconInactive: "\ea4e"; // Icon of closed accordion
37
37
  @iconActive: "\EA78"; // Icon of open accordion
38
38
  @iconOrder: 1; // Icon after text of the title
@@ -62,8 +62,8 @@
62
62
  --------------------*/
63
63
 
64
64
  @activeIconTransform: none;
65
- @activeTitleBackground: @secondaryColor;
66
- @activeTitleColor: @white;
65
+ @activeTitleBackground: @darkWhite;
66
+ @activeTitleColor: @grey-5;
67
67
  @activeTitleBorderBottom: 0;
68
68
 
69
69
  /*-------------------
@@ -99,9 +99,9 @@
99
99
 
100
100
  /* Styled Title States */
101
101
  @styledTitleHoverBackground: transparent;
102
- @styledTitleHoverColor: @activeTitleBackground;
102
+ @styledTitleHoverColor: @activeTitleColor;
103
103
  @styledActiveTitleBackground: @activeTitleBackground;
104
- @styledActiveTitleColor: @white;
104
+ @styledActiveTitleColor: @activeTitleColor;
105
105
 
106
106
  /* Styled Child Title States */
107
107
  @styledHoverChildTitleBackground: @styledTitleHoverBackground;
@@ -45,6 +45,10 @@
45
45
  }
46
46
  }
47
47
 
48
+ .card .header-link:hover {
49
+ text-decoration: @contentLinkTextDecoration;
50
+ }
51
+
48
52
  .ui.left.card {
49
53
  margin-right: auto;
50
54
  }
@@ -98,8 +98,8 @@
98
98
  @likeActiveColor: #FF2733;
99
99
 
100
100
  /* Links */
101
- @contentLinkColor: @white;
102
- @contentLinkHoverColor: @white;
101
+ @contentLinkColor: @tertiaryColor;
102
+ @contentLinkHoverColor: @tertiaryColor;
103
103
  @contentLinkFontWeight: @bold;
104
104
  @contentLinkTransition: color @defaultDuration @defaultEasing;
105
105
  @contentLinkTextDecoration: underline;
@@ -70,6 +70,17 @@
70
70
  }
71
71
  }
72
72
 
73
+ // decrease margin when using icons instead of images
74
+ // since the icons have themselves extra whitespace
75
+ // and we should aim to get about 32px as seen in the figma design
76
+ .item .icon {
77
+ width: auto;
78
+ margin-right: 0;
79
+ }
80
+ .ui.items > .item > .icon + .content {
81
+ padding-left: @tabletItemSpacing;
82
+ }
83
+
73
84
  .item .tile.image,
74
85
  .block .item .tile.image {
75
86
  width: @tileImageWidth;
@@ -80,7 +91,7 @@
80
91
  margin: @mobileRowItemMargin;
81
92
  }
82
93
 
83
- // As semantic does for non unstacable items
94
+ // As semantic does for non unstackable items
84
95
  // so columns does not affect margin in mobiles
85
96
  .ui.items.row > .item:last-child {
86
97
  margin-bottom: 0;
@@ -150,11 +161,18 @@
150
161
  ---------------*/
151
162
 
152
163
  .ui.items > .item {
153
- &.primary > .icon {
164
+ &.primary,
165
+ > .icon.primary
166
+ {
154
167
  color: @primaryColor;
155
168
  }
156
169
 
157
- &.secondary > .icon {
170
+ &.secondary,
171
+ > .icon.secondary {
158
172
  color: @secondaryColor;
159
173
  }
174
+ &.tertiary,
175
+ > .icon.tertiary {
176
+ color: @tertiaryColor;
177
+ }
160
178
  }