@eeacms/volto-eea-design-system 0.2.1 → 0.2.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.
Files changed (71) hide show
  1. package/.github/workflows/auto-comment.yml +20 -0
  2. package/CHANGELOG.md +165 -1
  3. package/package.json +1 -1
  4. package/src/semantic.less +1 -5
  5. package/src/ui/Banner/Banner.jsx +1 -1
  6. package/src/ui/Breadcrumbs/Breadcrumb.stories.jsx +3 -0
  7. package/src/ui/Breadcrumbs/Breadcrumbs.jsx +1 -0
  8. package/src/ui/CallToAction/CallToAction.stories.jsx +239 -0
  9. package/src/ui/{AvatarGrid → Card/AvatarGrid}/AvatarGrid.jsx +14 -14
  10. package/src/ui/{AvatarGrid → Card/AvatarGrid}/AvatarGrid.stories.jsx +24 -21
  11. package/src/ui/Card/Card.stories.jsx +249 -0
  12. package/src/ui/Card/PublicationCard.stories.jsx +46 -0
  13. package/src/ui/Card/RelatedContent/RelatedContent.jsx +76 -0
  14. package/src/ui/Card/RelatedContent/RelatedContent.stories.jsx +313 -0
  15. package/src/ui/Card/RoundedCard.stories.jsx +96 -0
  16. package/src/ui/{Button → Form/Button}/Button.stories.jsx +88 -52
  17. package/src/ui/KeyContent/KeyContent.jsx +9 -3
  18. package/src/ui/KeyContent/KeyContent.stories.jsx +1 -22
  19. package/src/ui/Loader/Loader.stories.jsx +21 -3
  20. package/src/ui/Testimonial/Testimonial.jsx +9 -8
  21. package/src/ui/Testimonial/Testimonial.stories.jsx +14 -11
  22. package/src/ui/Timeline/Timeline.jsx +1 -1
  23. package/src/ui/Timeline/Timeline.stories.jsx +12 -12
  24. package/src/ui/index.js +2 -4
  25. package/theme/theme.config +2 -4
  26. package/theme/themes/eea/collections/breadcrumb.overrides +12 -20
  27. package/theme/themes/eea/collections/breadcrumb.variables +3 -3
  28. package/theme/themes/eea/collections/form.overrides +116 -0
  29. package/theme/themes/eea/elements/button.overrides +172 -113
  30. package/theme/themes/eea/elements/button.variables +20 -6
  31. package/theme/themes/eea/elements/container.overrides +4 -19
  32. package/theme/themes/eea/elements/container.variables +5 -4
  33. package/theme/themes/eea/elements/label.overrides +12 -3
  34. package/theme/themes/eea/elements/label.variables +1 -1
  35. package/theme/themes/eea/elements/list.overrides +10 -0
  36. package/theme/themes/eea/elements/list.variables +3 -1
  37. package/theme/themes/eea/elements/loader.overrides +197 -0
  38. package/theme/themes/eea/elements/loader.variables +12 -1
  39. package/theme/themes/eea/elements/segment.overrides +77 -0
  40. package/theme/themes/eea/elements/segment.variables +2 -2
  41. package/theme/themes/eea/extras/avatarGrid.less +22 -24
  42. package/theme/themes/eea/extras/avatarGrid.variables +4 -8
  43. package/theme/themes/eea/extras/banner.less +32 -41
  44. package/theme/themes/eea/extras/blockquote.less +6 -3
  45. package/theme/themes/eea/extras/footer.less +239 -241
  46. package/theme/themes/eea/extras/header.less +1 -1
  47. package/theme/themes/eea/extras/keyContent.less +18 -16
  48. package/theme/themes/eea/extras/keyContent.variables +13 -7
  49. package/theme/themes/eea/extras/main.overrides +9 -0
  50. package/theme/themes/eea/extras/main.variables +3 -0
  51. package/theme/themes/eea/extras/pullquote.less +3 -3
  52. package/theme/themes/eea/extras/relatedContent.less +27 -0
  53. package/theme/themes/eea/extras/relatedContent.variables +3 -0
  54. package/theme/themes/eea/extras/tagList.less +0 -1
  55. package/theme/themes/eea/globals/site.variables +16 -12
  56. package/theme/themes/eea/modules/modal.overrides +4 -0
  57. package/theme/themes/eea/modules/progress.variables +1 -1
  58. package/theme/themes/eea/modules/tab.overrides +24 -0
  59. package/theme/themes/eea/modules/tab.variables +11 -1
  60. package/theme/themes/eea/views/card.overrides +242 -25
  61. package/theme/themes/eea/views/card.variables +92 -8
  62. package/src/ui/Avatar/Avatar.jsx +0 -32
  63. package/src/ui/Avatar/Avatar.stories.jsx +0 -61
  64. package/src/ui/PublicationCard/PublicationCard.jsx +0 -27
  65. package/src/ui/PublicationCard/PublicationCard.stories.jsx +0 -69
  66. package/src/ui/RelatedContent/RelatedContent.jsx +0 -90
  67. package/src/ui/RelatedContent/RelatedContent.stories.jsx +0 -80
  68. package/theme/themes/eea/extras/avatar.less +0 -97
  69. package/theme/themes/eea/extras/avatar.variables +0 -34
  70. package/theme/themes/eea/extras/publicationCard.less +0 -62
  71. package/theme/themes/eea/extras/publicationCard.variables +0 -24
@@ -1,90 +0,0 @@
1
- import React from 'react';
2
- import { Grid, Container } from 'semantic-ui-react';
3
- import PublicationCard from '../PublicationCard/PublicationCard';
4
-
5
- function RelatedContent({ publicationCards }) {
6
- let cards = publicationCards;
7
- if (publicationCards.length > 4) {
8
- cards = cards.slice(0, 4);
9
- }
10
- const rows = cards.reduce(function (rows, key, index) {
11
- return (
12
- (index % 2 === 0 ? rows.push([key]) : rows[rows.length - 1].push(key)) &&
13
- rows
14
- );
15
- }, []);
16
-
17
- return (
18
- <div className="related-content-wrapper">
19
- <Container>
20
- {/* desktop grid */}
21
- <Grid columns={2} className="tablet or lower hidden">
22
- {cards.length > 2
23
- ? rows.map((row, rowIndex) => (
24
- <Grid.Column key={rowIndex} stretched>
25
- {row.map((item, index) => (
26
- <PublicationCard {...item} key={index}>
27
- <PublicationCard.Header></PublicationCard.Header>
28
- <PublicationCard.Info
29
- description={item.description}
30
- tag={item.tag}
31
- ></PublicationCard.Info>
32
- </PublicationCard>
33
- ))}
34
- </Grid.Column>
35
- ))
36
- : cards.map((item, index) => (
37
- <Grid.Column key={index} stretched>
38
- <PublicationCard {...item}>
39
- <PublicationCard.Header></PublicationCard.Header>
40
- <PublicationCard.Info
41
- description={item.description}
42
- tag={item.tag}
43
- ></PublicationCard.Info>
44
- </PublicationCard>
45
- </Grid.Column>
46
- ))}
47
- </Grid>
48
-
49
- {/* mobile grid */}
50
- <Grid className="mobile only" columns={1}>
51
- {cards.map((item, index) => (
52
- <Grid.Column key={index}>
53
- <PublicationCard {...item}>
54
- <PublicationCard.Header></PublicationCard.Header>
55
- <PublicationCard.Info
56
- description={item.description}
57
- tag={item.tag}
58
- ></PublicationCard.Info>
59
- </PublicationCard>
60
- </Grid.Column>
61
- ))}
62
- </Grid>
63
-
64
- {/* tablet grid */}
65
- <Grid className="tablet only">
66
- {cards.map((item, index) => (
67
- <Grid.Column
68
- key={index}
69
- tablet={
70
- cards.length % 2 !== 0 && index === cards.length - 1
71
- ? '12'
72
- : '6'
73
- }
74
- >
75
- <PublicationCard {...item}>
76
- <PublicationCard.Header></PublicationCard.Header>
77
- <PublicationCard.Info
78
- description={item.description}
79
- tag={item.tag}
80
- ></PublicationCard.Info>
81
- </PublicationCard>
82
- </Grid.Column>
83
- ))}
84
- </Grid>
85
- </Container>
86
- </div>
87
- );
88
- }
89
-
90
- export default RelatedContent;
@@ -1,80 +0,0 @@
1
- import React from 'react';
2
- import RelatedContent from './RelatedContent';
3
-
4
- export default {
5
- title: 'Components/Related Content',
6
- component: RelatedContent,
7
- argTypes: {
8
- publicationCards: {
9
- description: 'publication cards data',
10
- table: {
11
- type: {
12
- summary: 'Object',
13
- },
14
- defaultValue: {
15
- summary: '',
16
- },
17
- },
18
- },
19
- },
20
- };
21
-
22
- const Template = (args) => (
23
- <div>
24
- <RelatedContent {...args}></RelatedContent>
25
- </div>
26
- );
27
-
28
- export const DefaultEven = Template.bind({});
29
- DefaultEven.args = {
30
- publicationCards: [
31
- {
32
- tag: 'Publication',
33
- description:
34
- 'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
35
- href: '/#',
36
- },
37
- {
38
- tag: 'Publication',
39
- description:
40
- 'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
41
- href: '/#',
42
- },
43
- {
44
- tag: 'Publication',
45
- description:
46
- 'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
47
- href: '/#',
48
- },
49
- {
50
- tag: 'Publication',
51
- description:
52
- 'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
53
- href: '/#',
54
- },
55
- ],
56
- };
57
-
58
- export const DefaultOdd = Template.bind({});
59
- DefaultOdd.args = {
60
- publicationCards: [
61
- {
62
- tag: 'Publication',
63
- description:
64
- 'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
65
- href: '/#',
66
- },
67
- {
68
- tag: 'Publication',
69
- description:
70
- 'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
71
- href: '/#',
72
- },
73
- {
74
- tag: 'Publication',
75
- description:
76
- 'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
77
- href: '/#',
78
- },
79
- ],
80
- };
@@ -1,97 +0,0 @@
1
- @type: 'extra';
2
- @element: 'avatar';
3
-
4
- @import (multiple) '../../theme.config';
5
-
6
- /*-------------------
7
- AVATAR
8
- --------------------*/
9
-
10
- .eea.avatar.big {
11
- width: @avatarWidthBig;
12
- .wrapper {
13
- display: flex;
14
- flex-direction: column;
15
- justify-content: center;
16
- width: @avatarWrapperWidth;
17
-
18
- .image-wrapper {
19
- width: @avatarImageWrapperWidth;
20
- display: flex;
21
- justify-content: center;
22
-
23
- .image {
24
- height: @avatarImageHeightBig;
25
- width: @avatarImageWidthBig;
26
- border-radius: @avatarImageBorderRadius;
27
- background-position: center;
28
- background-size: contain;
29
- }
30
- }
31
- .content-wrapper {
32
- width: @avatarContentWrapperWidth;
33
- .content {
34
- margin-top: @avatarContentMarginTop;
35
- .title {
36
- font-weight: @avatarContentTitleFontWeight;
37
- text-align: center;
38
- font-size: @avatarContentTitleFontSize;
39
- line-height: @avatarContentTitleLineHeight;
40
- letter-spacing: @avatarContentTitleLetterSpacing;
41
- margin-bottom: @avatarContentTitleMarginBottom;
42
- }
43
- .metadata {
44
- text-align: center;
45
- font-size: @avatarMetadataFontSize;
46
- font-weight: @avatarMetadataFontWeight;
47
- margin-top: @avatarMetadataMarginTop;
48
- }
49
- }
50
- }
51
- }
52
- }
53
-
54
- .eea.avatar.small {
55
- width: @avatarWidthSmall;
56
- .wrapper {
57
- width: @avatarWrapperWidth;
58
- display: flex;
59
- flex-direction: column;
60
- justify-content: center;
61
-
62
- .image-wrapper {
63
- width: @avatarImageWrapperWidth;
64
- display: flex;
65
- justify-content: center;
66
-
67
- .image {
68
- height: @avatarImageHeightSmall;
69
- width: @avatarImageWidthSmall;
70
- border-radius: @avatarImageBorderRadius;
71
- background-position: center;
72
- background-size: contain;
73
- }
74
- }
75
-
76
- .content-wrapper {
77
- width: @avatarContentWrapperWidth;
78
- .content {
79
- margin-top: @avatarContentMarginTopSmall;
80
- .title {
81
- font-weight: @avatarContentTitleFontWeightSmall;
82
- color: @darkCyan;
83
- text-align: center;
84
- font-size: @avatarContentTitleFontSizeSmall;
85
- line-height: @avatarContentTitleLineHeightSmall;
86
- letter-spacing: @avatarContentTitleLetterSpacing;
87
- margin-bottom: @avatarContentTitleMarginBottom;
88
- }
89
- .metadata {
90
- text-align: center;
91
- font-size: @avatarMetadataFontSizeSmall;
92
- font-weight: @avatarMetadataFontWeightSmall;
93
- }
94
- }
95
- }
96
- }
97
- }
@@ -1,34 +0,0 @@
1
- /*******************************
2
- Avatar
3
- *******************************/
4
-
5
- /* Big */
6
- @avatarWidthBig : 100%;
7
- @avatarWrapperWidth : 100%;
8
- @avatarImageWrapperWidth : 100%;
9
- @avatarImageHeightBig : 150px;
10
- @avatarImageWidthBig : 150px;
11
- @avatarImageBorderRadius : 50%;
12
- @avatarContentWrapperWidth : 100%;
13
- @avatarContentMarginTop : 17.84px;
14
- @avatarContentTitleFontWeight : 700;
15
- @avatarContentTitleFontSize : 36px;
16
- @avatarContentTitleLineHeight : 54px;
17
- @avatarContentTitleLetterSpacing: -0.015em;
18
- @avatarContentTitleMarginBottom : 0px;
19
- @avatarMetadataFontSize : 24px;
20
- @avatarMetadataFontWeight : 400;
21
- @avatarMetadataMarginTop : 8.84px;
22
-
23
-
24
- /* Small */
25
- @avatarWidthSmall : 100%;
26
- @avatarImageHeightSmall : 130px;
27
- @avatarImageWidthSmall : 130px;
28
- @avatarContentMarginTopSmall : 20px;
29
- @avatarContentTitleFontWeightSmall : 500;
30
- @avatarContentTitleFontSizeSmall : 20px;
31
- @avatarContentTitleLineHeightSmall : 30px;
32
- @avatarMetadataFontSizeSmall : 16px;
33
- @avatarMetadataFontWeightSmall : 300;
34
- @avatarMetadataMarginTop : 8.84px;
@@ -1,62 +0,0 @@
1
- @type: 'extra';
2
- @element: 'publicationCard';
3
-
4
- @import (multiple) '../../theme.config';
5
-
6
- /*-------------------
7
- Publication Card
8
- --------------------*/
9
-
10
- .eea.publication.card {
11
- color: @publicationCardtextColor;
12
- //position: relative;
13
- height: @publicationCardHeight;
14
- background-color: @publicationCardBackgroundColor;
15
- display: flex;
16
- flex-direction: column;
17
- justify-content: space-between;
18
-
19
- a {
20
- display: contents;
21
- text-decoration: none;
22
- color: @publicationCardtextColor;
23
- cursor: pointer;
24
- }
25
-
26
- .header {
27
- background-repeat: no-repeat;
28
- background-position: center;
29
- background-size: contain;
30
- height: calc(100% - @cardDescriptionMaxHeight);
31
- }
32
-
33
- .description {
34
- background-color: @publicationCardDescriptionColor;
35
- height: @cardDescriptionHeight;
36
- padding: @cardDescriptionPadding;
37
- //position: absolute;
38
- //bottom: 0;
39
- width: @cardDescriptionWidth;
40
- max-height: @cardDescriptionMaxHeight;
41
-
42
- .tag {
43
- font-size: @cardDescriptionTagFontSize;
44
- font-weight: @cardDescriptionTagFontWeight;
45
- }
46
-
47
- .text {
48
- font-size: @cardDescriptionTextFontSize;
49
- font-weight: @cardDescriptionTextFontWeight;
50
- }
51
- }
52
- }
53
-
54
- @media only screen and (min-width: @computerBreakpoint) {
55
- .eea.publication.card {
56
- margin: @publicationCardMargin;
57
-
58
- .description {
59
- height: @computerCardDescriptionHeight;
60
- }
61
- }
62
- }
@@ -1,24 +0,0 @@
1
- /*-------------------
2
- Publication Card
3
- --------------------*/
4
-
5
- @publicationCardtextColor: @white;
6
- @publicationCardMargin: 10px 0;
7
- @publicationCardHeight: 268px;
8
-
9
- /* Colors */
10
- @publicationCardBackgroundColor: #BCBEC0;
11
- @publicationCardDescriptionColor: #3D5265;
12
-
13
- /* Description */
14
- @cardDescriptionHeight: auto;
15
- @cardDescriptionMaxHeight: 135px;
16
- @computerCardDescriptionHeight: auto;
17
- @cardDescriptionPadding: 20px;
18
- @cardDescriptionWidth: 100%;
19
-
20
- @cardDescriptionTagFontSize: 12px;
21
- @cardDescriptionTagFontWeight: 400;
22
- @cardDescriptionTextFontSize: 16px;
23
- @cardDescriptionTextFontWeight: 700;
24
-