@eeacms/volto-eea-design-system 1.0.7 → 1.12.0

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 (38) hide show
  1. package/CHANGELOG.md +87 -1
  2. package/package.json +1 -1
  3. package/src/semantic.less +0 -4
  4. package/src/ui/Accordion/Accordion.stories.js +52 -123
  5. package/src/ui/Card/Card.stories.jsx +153 -11
  6. package/src/ui/Footer/Contact.jsx +31 -6
  7. package/src/ui/Footer/Footer.stories.js +76 -25
  8. package/src/ui/Header/Header.jsx +9 -3
  9. package/src/ui/Header/HeaderMenuPopUp.js +24 -10
  10. package/src/ui/Header/HeaderSearchPopUp.js +2 -1
  11. package/src/ui/Video/Video.jsx +44 -0
  12. package/src/ui/Video/Video.stories.jsx +53 -0
  13. package/src/ui/index.js +2 -2
  14. package/theme/theme.config +0 -3
  15. package/theme/themes/eea/assets/video/demo-track-el.vtt +11 -0
  16. package/theme/themes/eea/assets/video/demo-track-en.vtt +11 -0
  17. package/theme/themes/eea/assets/video/demo-track-ro.vtt +11 -0
  18. package/theme/themes/eea/collections/table.variables +1 -1
  19. package/theme/themes/eea/elements/header.overrides +0 -103
  20. package/theme/themes/eea/elements/image.overrides +6 -0
  21. package/theme/themes/eea/elements/image.variables +1 -0
  22. package/theme/themes/eea/elements/segment.overrides +7 -0
  23. package/theme/themes/eea/extras/banner.less +12 -0
  24. package/theme/themes/eea/extras/banner.variables +2 -0
  25. package/theme/themes/eea/extras/header.less +0 -11
  26. package/theme/themes/eea/extras/hero.less +33 -0
  27. package/theme/themes/eea/extras/hero.variables +1 -0
  28. package/theme/themes/eea/globals/mixins.less +8 -0
  29. package/theme/themes/eea/globals/site.overrides +40 -2
  30. package/theme/themes/eea/globals/utilities.less +47 -0
  31. package/theme/themes/eea/modules/accordion.overrides +7 -0
  32. package/theme/themes/eea/views/card.overrides +14 -11
  33. package/src/ui/Card/AvatarGrid/AvatarGrid.jsx +0 -61
  34. package/src/ui/Card/AvatarGrid/AvatarGrid.stories.jsx +0 -89
  35. package/src/ui/Card/RoundedCard.stories.jsx +0 -122
  36. package/theme/themes/eea/extras/avatar.variables +0 -28
  37. package/theme/themes/eea/extras/avatarGrid.less +0 -43
  38. package/theme/themes/eea/extras/avatarGrid.variables +0 -16
@@ -281,10 +281,6 @@
281
281
  }
282
282
  }
283
283
 
284
- #main .main-menu .item:first-child {
285
- display: none; // hide home nav item
286
- }
287
-
288
284
  .main-menu.inverted {
289
285
  .item a {
290
286
  color: @mainMenuItemInvertedColor;
@@ -825,8 +821,6 @@
825
821
  padding: @megaMenuAccordionTitlePadding;
826
822
  border-bottom: @megaMenuAccordionTitleBorderBottom;
827
823
  color: @megaMenuTextColor;
828
- color: @megaMenuTextColor;
829
- font-size: @megaMenuAccordionTitleFontSize;
830
824
  font-size: @megaMenuAccordionTitleFontSize;
831
825
  font-weight: @megaMenuAccordionTitleFontWeight;
832
826
 
@@ -876,11 +870,6 @@
876
870
  }
877
871
  }
878
872
 
879
- // hide home link and accordion content from mobile menu
880
- #main #mega-menu .mobile > .ui.accordion > .title:first-child {
881
- display: none;
882
- }
883
-
884
873
  // hide content of accordion titles that are not active
885
874
  #main #mega-menu .ui.accordion .title:first-child + .content:not(.active) {
886
875
  display: none;
@@ -100,4 +100,37 @@
100
100
  }
101
101
  }
102
102
 
103
+ @media print {
104
+ .eea.hero-block.full-height,
105
+ .eea.hero-block.full-height .hero-block-image-wrapper,
106
+ .eea.hero-block.full-height .hero-block-inner-wrapper {
107
+ min-height: unset;
108
+ }
109
+
110
+ .hero-block-inner-wrapper {
111
+ padding-top: @heroBlockPrintPadding;
112
+ padding-bottom: @heroBlockPrintPadding;
113
+ }
114
+
115
+ .hero-block-image-wrapper {
116
+ left: 0 !important;
117
+ right: 0 !important;
118
+ padding-left: 0 !important;
119
+ margin-left: 0 !important;
120
+ margin-right: 0 !important;
121
+ padding-right: 0% !important;
122
+ width: 100% !important;
123
+ break-inside: avoid-page;
124
+ }
125
+
126
+ .hero-block {
127
+ break-inside: avoid-page;
128
+ }
129
+
130
+ .hero-block-body .eea.copyright {
131
+ display: none;
132
+ visibility: hidden;
133
+ }
134
+ }
135
+
103
136
  .loadUIOverrides();
@@ -26,6 +26,7 @@
26
26
  @heroBlockWrapperPadding : 5rem;
27
27
  @tableHeroBlockWrapperPadding: 6rem;
28
28
  @desktopHeroBlockWrapperPadding: 194px 96px;
29
+ @heroBlockPrintPadding: 20px;
29
30
 
30
31
  /* Body */
31
32
  @mobileHeroBlockBodyGap : @rem-space-6;
@@ -14,3 +14,11 @@
14
14
  .image-overlay-gradient() {
15
15
  .gradientMix(linear; rgba(46, 62, 76, 0.65) 38.6%, rgba(46, 62, 76, 0.169) 59.52%, rgba(69, 95, 106, 0) 79.64%; 13.39deg)
16
16
  }
17
+
18
+ .useTitleMaxLines(@value: 2) {
19
+ display: -webkit-box !important;
20
+ overflow: hidden;
21
+
22
+ -webkit-box-orient: vertical;
23
+ -webkit-line-clamp: var(--title-max-lines, @value);
24
+ }
@@ -29,7 +29,9 @@ h2, h3, h4, h5, h6 {
29
29
  color: @contentAreaColor;
30
30
  }
31
31
 
32
- [id="page-document"] > * {
32
+ [id="page-document"] > *,
33
+ .view-wrapper > *
34
+ {
33
35
  margin-left: auto !important;
34
36
  margin-right: auto !important;
35
37
  }
@@ -37,7 +39,8 @@ h2, h3, h4, h5, h6 {
37
39
  [class~="view-defaultview"] [id="page-document"] > *,
38
40
  [class~="view-viewview"] [id="page-document"] > *,
39
41
  #main .container_width,
40
- #main .has--size--container_width
42
+ #main .has--size--container_width,
43
+ .view-wrapper > *
41
44
  {
42
45
  max-width: @containerWidth !important;
43
46
  }
@@ -150,3 +153,38 @@ a {
150
153
  }
151
154
  }
152
155
  }
156
+
157
+ @media print {
158
+ .skiplinks-wrapper,
159
+ .top.bar,
160
+ .main.bar.transparency,
161
+ .main-menu,
162
+ .eea .header .action,
163
+ .slider-arrow,
164
+ #footer,
165
+ #page-header .action,
166
+ #inpage-navigation {
167
+ display: none;
168
+ visibility: hidden;
169
+ }
170
+ .logo {
171
+ margin-left: 0;
172
+ }
173
+ .static-banner {
174
+ display: none;
175
+ visibility: hidden;
176
+ }
177
+ .image {
178
+ page-break-inside: avoid;
179
+ }
180
+ img {
181
+ page-break-inside: avoid;
182
+ }
183
+ .card {
184
+ page-break-inside: avoid;
185
+
186
+ }
187
+ .grid-block-teaser .card{
188
+ page-break-inside: auto;
189
+ }
190
+ }
@@ -37,15 +37,19 @@ h1, h2, h3, h4, h5, h6, p, span, .header {
37
37
  .text-left,
38
38
  .has--text--left,
39
39
  .has--textAlign--left { text-align: left !important; }
40
+
40
41
  .text-center,
41
42
  .has--text--center,
42
43
  .has--textAlign--center { text-align: center !important;}
44
+
43
45
  .text-right,
44
46
  .has--text--right,
45
47
  .has--textAlign--right { text-align: right !important; }
48
+
46
49
  .text-justify,
47
50
  .has--text--justify,
48
51
  .has--textAlign--justify { text-align: justify !important; }
52
+
49
53
  .bold { font-weight: bold !important; }
50
54
 
51
55
  .has--text--left {
@@ -57,6 +61,49 @@ h1, h2, h3, h4, h5, h6, p, span, .header {
57
61
  --justify-content: space-evenly;
58
62
  }
59
63
 
64
+ /*******************************
65
+ Image properties utilities
66
+ *******************************/
67
+
68
+ // image object fit
69
+ .has--object-fit--contain {
70
+ --image-object-fit: contain;
71
+ }
72
+
73
+ .has--object-fit--cover {
74
+ --image-object-fit: cover;
75
+ }
76
+
77
+ .has--object-fit--fill {
78
+ --image-object-fit: fill;
79
+ }
80
+
81
+ .has--object-fit--scale-down {
82
+ --image-object-fit: scale-down;
83
+ }
84
+
85
+ // image object position
86
+ .has--object-position--top {
87
+ --image-object-position: top;
88
+ }
89
+
90
+ .has--object-position--bottom {
91
+ --image-object-position: bottom;
92
+ }
93
+
94
+ .has--object-position--left {
95
+ --image-object-position: left;
96
+ }
97
+
98
+ .has--object-position--right {
99
+ --image-object-position: right;
100
+ }
101
+
102
+ .has--object-position--center {
103
+ --image-object-position: center;
104
+ }
105
+
106
+
60
107
  // background position utilities
61
108
  .has--bg--top {
62
109
  background-position: top !important;
@@ -158,3 +158,10 @@
158
158
  .ui.accordion.tertiary .title:not(.active):focus-visible i {
159
159
  color: @tertiaryColorCSSVar;
160
160
  }
161
+
162
+ @media only screen and (max-width: @largestMobileScreen) {
163
+ .accordion-block h1 * { font-size: @mobileH1; }
164
+ .accordion-block h2 * { font-size: @mobileH2; }
165
+ .accordion-block h3 * { font-size: @mobileH3; }
166
+ .accordion-block h4 * { font-size: @mobileH4; }
167
+ }
@@ -32,11 +32,14 @@
32
32
  img {
33
33
  width: var(--card-image-width, @imageWidth);
34
34
  height: var(--card-image-width, @imageHeight);
35
- object-fit: @imageObjectFit;
36
- object-position: @imageObjectPosition;
37
35
  }
38
36
  }
39
37
 
38
+ .ui.card img, img.ui.image {
39
+ object-fit: var(--image-object-fit, @imageObjectFit);
40
+ object-position: var(--image-object-position, @imageObjectPosition);
41
+ }
42
+
40
43
 
41
44
  .ui.cards > .card > .content > *:not(:last-child),
42
45
  .ui.card > .content > *:not(:last-child) {
@@ -150,6 +153,8 @@
150
153
  width: @roundedImageWidth;
151
154
  height: @roundedImageHeight;
152
155
  border-radius: @roundedImageBorderRadius !important;
156
+ object-fit: var(--image-object-fit, @imageObjectFit);
157
+ object-position: var(--image-object-position, @imageObjectPosition);
153
158
  }
154
159
 
155
160
  .content {
@@ -434,24 +439,22 @@
434
439
  padding-left: @tabletTeaserCardPaddingInline;
435
440
  padding-right: @tabletTeaserCardPaddingInline;
436
441
  }
442
+
437
443
  .grid-block-teaser .ui.card {
438
444
  min-width: @tabletTeaserCardMinWidth;
439
445
  }
440
446
  }
441
447
 
442
- // Added from listing-cards.less
443
- .grid-block-teaser .ui.card.u-card .header {
444
- display: -webkit-box !important;
445
- overflow: hidden;
446
- -webkit-box-orient: vertical;
447
- -webkit-line-clamp: var(--title-max-lines, 3);
448
- }
449
-
450
448
  // Spacing adjustment to display outline with overflow hidden
451
449
  .ui.card .header {
452
450
  padding: @headerPadding;
453
451
  }
452
+
454
453
  .ui.card .header > a {
455
- display: @headerLinkDisplay;
454
+ .useTitleMaxLines();
456
455
  }
457
456
 
457
+ // Meta align fix
458
+ .ui.card.u-card .meta:after {
459
+ content: none;
460
+ }
@@ -1,61 +0,0 @@
1
- import React from 'react';
2
- import { Grid, Card, Image } from 'semantic-ui-react';
3
-
4
- function AvatarGrid({ children, ...rest }) {
5
- return (
6
- <div className="eea avatar-grid" {...rest}>
7
- <div className="wrapper">{children}</div>
8
- </div>
9
- );
10
- }
11
-
12
- AvatarGrid.Content = ({ children }) => {
13
- return <div className="content">{children}</div>;
14
- };
15
-
16
- AvatarGrid.Group = ({ children, ...rest }) => {
17
- let avatars = rest.avatars;
18
-
19
- return (
20
- <div className="avatar group">
21
- <Grid>
22
- {avatars.map((avatar, index) => (
23
- <Grid.Column key={index} mobile={12} tablet={4} computer={4}>
24
- <div className="avatar-wrapper">
25
- <Card
26
- className={`eea rounded ${
27
- rest.variant === 'default' ? '' : rest.variant
28
- } ${rest.inverted ? 'inverted' : ''}`}
29
- fluid={rest.fluid}
30
- >
31
- {rest.hasLink ? (
32
- <Image
33
- as="a"
34
- href={rest.href}
35
- src={avatar.src}
36
- wrapped
37
- ui={false}
38
- alt="card image"
39
- />
40
- ) : (
41
- <Image src={avatar.src} wrapped ui={false} alt="card image" />
42
- )}
43
- <Card.Content>
44
- {rest.hasLink ? (
45
- <Card.Header>
46
- <a href={rest.href}>{avatar.title}</a>
47
- </Card.Header>
48
- ) : (
49
- <Card.Header>{avatar.title}</Card.Header>
50
- )}
51
- <Card.Description>{avatar.description}</Card.Description>
52
- </Card.Content>
53
- </Card>
54
- </div>
55
- </Grid.Column>
56
- ))}
57
- </Grid>
58
- </div>
59
- );
60
- };
61
- export default AvatarGrid;
@@ -1,89 +0,0 @@
1
- import React from 'react';
2
- // eslint-disable-next-line import/no-unresolved
3
- import AvatarGrid from './AvatarGrid';
4
- import { Container } from 'semantic-ui-react';
5
- import imgUrl from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/avatar.png';
6
-
7
- export default {
8
- title: 'Components/Card/Rounded Card',
9
- component: AvatarGrid,
10
- argTypes: {
11
- variant: {
12
- options: ['default', 'primary', 'secondary', 'tertiary'],
13
- control: { type: 'select' },
14
- description: 'card variation class',
15
- table: {
16
- type: {
17
- summary: 'string',
18
- },
19
- defaultValue: { summary: 'default' },
20
- },
21
- },
22
- inverted: {
23
- description: 'Inverted card',
24
- table: {
25
- defaultValue: { summary: 'false' },
26
- type: { summary: 'boolean' },
27
- },
28
- },
29
- fluid: {
30
- description: 'take up the width of its container',
31
- table: {
32
- type: {
33
- summary: 'boolean',
34
- },
35
- defaultValue: { summary: false },
36
- },
37
- },
38
- hasLink: {
39
- description: 'Clickable card',
40
- table: {
41
- defaultValue: { summary: 'true' },
42
- type: { summary: 'boolean' },
43
- },
44
- },
45
- avatars: {
46
- description: 'avatar data',
47
- table: {
48
- type: { summary: 'Object' },
49
- defaultValue: { summary: ' "" ' },
50
- },
51
- },
52
- },
53
- };
54
-
55
- const GridTemplate = (args) => (
56
- <Container>
57
- <AvatarGrid>
58
- <AvatarGrid.Content>
59
- <AvatarGrid.Group avatars={args.avatars} {...args}></AvatarGrid.Group>
60
- </AvatarGrid.Content>
61
- </AvatarGrid>
62
- </Container>
63
- );
64
-
65
- export const RoundedGrid = GridTemplate.bind({});
66
- RoundedGrid.args = {
67
- variant: 'default',
68
- inverted: false,
69
- fluid: false,
70
- hasLink: true,
71
- href: '/#',
72
- avatars: [
73
- {
74
- src: imgUrl,
75
- title: 'Lorem Ipsum',
76
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
77
- },
78
- {
79
- src: imgUrl,
80
- title: 'Lorem Ipsum',
81
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
82
- },
83
- {
84
- src: imgUrl,
85
- title: 'Lorem Ipsum',
86
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
87
- },
88
- ],
89
- };
@@ -1,122 +0,0 @@
1
- import React from 'react';
2
- import { Card, Image, Container } from 'semantic-ui-react';
3
- import imgUrl from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/avatar.png';
4
-
5
- export default {
6
- title: 'Components/Card/Rounded Card',
7
- component: Card,
8
- parameters: {
9
- actions: {
10
- handles: ['click'],
11
- },
12
- },
13
- argTypes: {
14
- variant: {
15
- options: ['default', 'primary', 'secondary', 'tertiary'],
16
- control: { type: 'select' },
17
- description: 'card variation class',
18
- table: {
19
- type: {
20
- summary: 'string',
21
- },
22
- defaultValue: { summary: 'null' },
23
- },
24
- },
25
- inverted: {
26
- description: 'Inverted card',
27
- table: {
28
- defaultValue: { summary: 'false' },
29
- type: { summary: 'boolean' },
30
- },
31
- },
32
- title: {
33
- description: 'card header',
34
- table: {
35
- type: {
36
- summary: 'string',
37
- },
38
- defaultValue: { summary: ' "" ' },
39
- },
40
- },
41
- description: {
42
- description: 'card main content',
43
- table: {
44
- type: {
45
- summary: 'string',
46
- },
47
- defaultValue: { summary: ' "" ' },
48
- },
49
- },
50
- fluid: {
51
- description: 'take up the width of its container',
52
- table: {
53
- type: {
54
- summary: 'boolean',
55
- },
56
- defaultValue: { summary: false },
57
- },
58
- },
59
- src: {
60
- description: 'rounded card image url',
61
- table: {
62
- type: {
63
- summary: 'string',
64
- },
65
- defaultValue: { summary: ' "" ' },
66
- },
67
- },
68
- hasLink: {
69
- description: 'Clickable card',
70
- table: {
71
- defaultValue: { summary: 'true' },
72
- type: { summary: 'boolean' },
73
- },
74
- },
75
- },
76
- };
77
-
78
- const AvatarTemplate = (args) => (
79
- <Container>
80
- <Card
81
- className={`rounded ${args.variant === 'default' ? '' : args.variant} ${
82
- args.inverted ? 'inverted' : ''
83
- }`}
84
- fluid={args.fluid}
85
- >
86
- {args.hasLink ? (
87
- <Image
88
- as="a"
89
- href={args.href}
90
- src={args.src}
91
- wrapped
92
- ui={false}
93
- alt="card image"
94
- />
95
- ) : (
96
- <Image src={args.src} wrapped ui={false} alt="card image" />
97
- )}
98
- <Card.Content>
99
- {args.hasLink ? (
100
- <Card.Header>
101
- <a href={args.href}>{args.title}</a>
102
- </Card.Header>
103
- ) : (
104
- <Card.Header>{args.title}</Card.Header>
105
- )}
106
- <Card.Description>{args.description}</Card.Description>
107
- </Card.Content>
108
- </Card>
109
- </Container>
110
- );
111
-
112
- export const Default = AvatarTemplate.bind({});
113
- Default.args = {
114
- variant: 'default',
115
- inverted: false,
116
- src: imgUrl,
117
- title: 'Lorem Ipsum',
118
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
119
- fluid: false,
120
- hasLink: true,
121
- href: '/#',
122
- };
@@ -1,28 +0,0 @@
1
- /*******************************
2
- Avatar
3
- *******************************/
4
-
5
- /* Global */
6
- @avatarWidth : 100%;
7
- @avatarWrapperWidth : 100%;
8
- @avatarWrapperGap : @largeGap;
9
- @avatarContentWrapperWidth : 100%;
10
- @avatarImageBorderRadius : 50%;
11
- @avatarContentTitleMarginBottom : 0;
12
- @avatarImageWrapperWidth : 100%;
13
- @avatarImageBackgroundSize : cover;
14
- @avatarContentTitleFontWeight : @bold;
15
- @avatarContentTitleFontSize : 1.25rem;
16
-
17
- /* Big */
18
- @avatarBigImageHeight : 173px;
19
- @avatarBigImageWidth : 173px;
20
- @avatarBigMetadataFontSize : 1.25rem;
21
- @avatarBigMetadataFontWeight : @normal;
22
-
23
- /* Small */
24
- @avatarSmallImageHeight : 135px;
25
- @avatarSmallImageWidth : 135px;
26
- @avatarSmallTitleColor : @secondaryColor;
27
- @avatarSmallMetadataFontSize : 1rem;
28
- @avatarSmallMetadataFontWeight : 300;
@@ -1,43 +0,0 @@
1
- @type: 'extra';
2
- @element: 'avatarGrid';
3
-
4
- @import (multiple) '../../theme.config';
5
-
6
- /*-------------------
7
- AVATAR GRID
8
- --------------------*/
9
-
10
- .eea.avatar-grid {
11
- width: @avatarGridWidth;
12
-
13
- .wrapper {
14
- width: @avatarGridWrapperWidth;
15
-
16
- .content {
17
- display: flex;
18
- flex-direction: column;
19
- width: @avatarGridContentWidth;
20
- }
21
- }
22
- }
23
-
24
- .eea.avatar-grid {
25
- .grid-title {
26
- text-align: @avatarGridContentTitleTextAlign;
27
- width: @avatarGridContentTitleWidth;
28
- margin: @avatarGroupMargin;
29
- }
30
-
31
- .grid-title.hidden {
32
- display: none;
33
- }
34
- }
35
-
36
- .eea.avatar-grid .avatar.group {
37
- display: flex;
38
- justify-content: center;
39
- width: @avatarGroupWidth;
40
- margin: @avatarGroupMargin;
41
- }
42
-
43
- .loadUIOverrides();
@@ -1,16 +0,0 @@
1
- /*******************************
2
- Avatar Grid
3
- *******************************/
4
-
5
- @avatarGridWidth : 100%;
6
- @avatarGridWrapperWidth : 100%;
7
- @avatarGridContentWidth : 100%;
8
-
9
- /* Grid Title */
10
- @avatarGridContentTitleTextAlign : center;
11
- @avatarGridContentTitleWidth : 100%;
12
- @avatarGridContentTitleFontWeight : @bold;
13
-
14
- /* Avatar Group */
15
- @avatarGroupWidth : 100%;
16
- @avatarGroupMargin : @largeGap 0;