@eeacms/volto-eea-design-system 0.2.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 (263) hide show
  1. package/.coverage.babel.config.js +13 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +50 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +50 -0
  4. package/.github/workflows/node.js.yml +59 -0
  5. package/.prettierignore +4 -0
  6. package/.project.eslintrc.js +45 -0
  7. package/.release-it.json +17 -0
  8. package/.storybook/manager.js +15 -0
  9. package/CHANGELOG.md +1025 -0
  10. package/DEVELOP.md +51 -0
  11. package/LICENSE.md +9 -0
  12. package/README.md +196 -0
  13. package/bootstrap +41 -0
  14. package/cypress.json +17 -0
  15. package/jest-addon.config.js +36 -0
  16. package/locales/volto.pot +0 -0
  17. package/mockups/README.md +1 -0
  18. package/package.json +49 -0
  19. package/razzle.extend.js +23 -0
  20. package/src/helpers/index.js +2 -0
  21. package/src/helpers/useClickOutside.js +30 -0
  22. package/src/helpers/usePrevious.js +9 -0
  23. package/src/i18n.js +180 -0
  24. package/src/index.js +6 -0
  25. package/src/semantic.less +262 -0
  26. package/src/ui/Avatar/Avatar.jsx +32 -0
  27. package/src/ui/Avatar/Avatar.stories.jsx +61 -0
  28. package/src/ui/AvatarGrid/AvatarGrid.jsx +49 -0
  29. package/src/ui/AvatarGrid/AvatarGrid.stories.jsx +66 -0
  30. package/src/ui/Banner/Banner.jsx +59 -0
  31. package/src/ui/Banner/Banner.stories.jsx +121 -0
  32. package/src/ui/Blockquote/Blockquote.jsx +16 -0
  33. package/src/ui/Blockquote/Blockquote.stories.jsx +48 -0
  34. package/src/ui/Breadcrumbs/Breadcrumb.stories.jsx +76 -0
  35. package/src/ui/Breadcrumbs/Breadcrumbs.jsx +67 -0
  36. package/src/ui/Breadcrumbs/Breadcrumbs.stories.jsx +30 -0
  37. package/src/ui/Button/Button.stories.jsx +169 -0
  38. package/src/ui/Divider/Divider.jsx +7 -0
  39. package/src/ui/Footer/Contact.jsx +28 -0
  40. package/src/ui/Footer/Footer.jsx +52 -0
  41. package/src/ui/Footer/FooterActions.jsx +22 -0
  42. package/src/ui/Footer/FooterHeader.jsx +10 -0
  43. package/src/ui/Footer/FooterSites.jsx +33 -0
  44. package/src/ui/Footer/Social.jsx +25 -0
  45. package/src/ui/Footer/SubFooter.jsx +9 -0
  46. package/src/ui/FormFieldWrapper/FormFieldWrapper.jsx +51 -0
  47. package/src/ui/Header/Header.jsx +224 -0
  48. package/src/ui/Header/HeaderMenuPopUp.js +79 -0
  49. package/src/ui/Header/HeaderSearchPopUp.js +33 -0
  50. package/src/ui/InpageNavigation/InpageNavigation.jsx +61 -0
  51. package/src/ui/InpageNavigation/InpageNavigation.stories.jsx +166 -0
  52. package/src/ui/KeyContent/KeyContent.jsx +22 -0
  53. package/src/ui/KeyContent/KeyContent.stories.jsx +62 -0
  54. package/src/ui/Loader/Loader.stories.jsx +45 -0
  55. package/src/ui/Logo/Logo.jsx +31 -0
  56. package/src/ui/Popup/Popup.stories.jsx +97 -0
  57. package/src/ui/PublicationCard/PublicationCard.jsx +27 -0
  58. package/src/ui/PublicationCard/PublicationCard.stories.jsx +69 -0
  59. package/src/ui/Pullquote/Pullquote.jsx +44 -0
  60. package/src/ui/Pullquote/Pullquote.stories.jsx +101 -0
  61. package/src/ui/RelatedContent/RelatedContent.jsx +90 -0
  62. package/src/ui/RelatedContent/RelatedContent.stories.jsx +80 -0
  63. package/src/ui/Segment/Segment.stories.jsx +163 -0
  64. package/src/ui/Tag/Tag.jsx +13 -0
  65. package/src/ui/Tag/Tag.stories.jsx +21 -0
  66. package/src/ui/TagList/TagList.jsx +23 -0
  67. package/src/ui/TagList/TagList.stories.jsx +63 -0
  68. package/src/ui/Testimonial/Testimonial.jsx +53 -0
  69. package/src/ui/Testimonial/Testimonial.stories.jsx +51 -0
  70. package/src/ui/Timeline/Timeline.jsx +44 -0
  71. package/src/ui/Timeline/Timeline.stories.jsx +322 -0
  72. package/src/ui/index.js +31 -0
  73. package/templates/eea.hbs +50 -0
  74. package/theme/theme.config +122 -0
  75. package/theme/theme.less +64 -0
  76. package/theme/themes/eea/assets/images/EEA_Logo_Vertical.png +0 -0
  77. package/theme/themes/eea/assets/images/Footer/EEALogo.png +0 -0
  78. package/theme/themes/eea/assets/images/Footer/EULogo.png +0 -0
  79. package/theme/themes/eea/assets/images/Footer/Extras/Logo1.png +0 -0
  80. package/theme/themes/eea/assets/images/Footer/Extras/Logo10.png +0 -0
  81. package/theme/themes/eea/assets/images/Footer/Extras/Logo2.png +0 -0
  82. package/theme/themes/eea/assets/images/Footer/Extras/Logo3.png +0 -0
  83. package/theme/themes/eea/assets/images/Footer/Extras/Logo4.png +0 -0
  84. package/theme/themes/eea/assets/images/Footer/Extras/Logo5.png +0 -0
  85. package/theme/themes/eea/assets/images/Footer/Extras/Logo6.png +0 -0
  86. package/theme/themes/eea/assets/images/Footer/Extras/Logo7.png +0 -0
  87. package/theme/themes/eea/assets/images/Footer/Extras/Logo8.png +0 -0
  88. package/theme/themes/eea/assets/images/Footer/Extras/Logo9.png +0 -0
  89. package/theme/themes/eea/assets/images/Footer/Extras/abstract-visual.svg +32 -0
  90. package/theme/themes/eea/assets/images/Footer/Extras/footervisual.svg +1755 -0
  91. package/theme/themes/eea/assets/images/Footer/Vector1.png +0 -0
  92. package/theme/themes/eea/assets/images/Footer/Vector2.png +0 -0
  93. package/theme/themes/eea/assets/images/Header/EeaLogo.png +0 -0
  94. package/theme/themes/eea/assets/images/Header/Vector.png +0 -0
  95. package/theme/themes/eea/assets/images/Header/close-line.svg +1 -0
  96. package/theme/themes/eea/assets/images/Header/close.png +0 -0
  97. package/theme/themes/eea/assets/images/Header/down-arrow.png +0 -0
  98. package/theme/themes/eea/assets/images/Header/eea-logo.svg +14 -0
  99. package/theme/themes/eea/assets/images/Header/eea.png +0 -0
  100. package/theme/themes/eea/assets/images/Header/eeaIcon.png +0 -0
  101. package/theme/themes/eea/assets/images/Header/global-line.svg +1 -0
  102. package/theme/themes/eea/assets/images/Header/globeIcon.png +0 -0
  103. package/theme/themes/eea/assets/images/Header/hamburgerMenuIcon.png +0 -0
  104. package/theme/themes/eea/assets/images/Header/menu-left-arrow.svg +3 -0
  105. package/theme/themes/eea/assets/images/Header/menu-line.svg +1 -0
  106. package/theme/themes/eea/assets/images/Header/search-line.svg +1 -0
  107. package/theme/themes/eea/assets/images/Header/search.png +0 -0
  108. package/theme/themes/eea/assets/images/Header/searchIcon.png +0 -0
  109. package/theme/themes/eea/assets/images/arrow-down.svg +10 -0
  110. package/theme/themes/eea/assets/images/avatar.png +0 -0
  111. package/theme/themes/eea/assets/images/banner.png +0 -0
  112. package/theme/themes/eea/assets/images/eea-logo.png +0 -0
  113. package/theme/themes/eea/assets/images/eea_icon.png +0 -0
  114. package/theme/themes/eea/assets/images/europe-flag.svg +4 -0
  115. package/theme/themes/eea/assets/images/home-icon.svg +3 -0
  116. package/theme/themes/eea/assets/images/loaderImage.png +0 -0
  117. package/theme/themes/eea/assets/images/mega-menu-arrow.svg +3 -0
  118. package/theme/themes/eea/assets/logo/EEA-Logo-White-2.svg +9 -0
  119. package/theme/themes/eea/assets/logo/EEA-Logo-white.svg +9 -0
  120. package/theme/themes/eea/assets/logo/EIONETLogo.png +0 -0
  121. package/theme/themes/eea/assets/logo/bise.svg +47 -0
  122. package/theme/themes/eea/assets/logo/cca.svg +20 -0
  123. package/theme/themes/eea/assets/logo/copernicus.svg +62 -0
  124. package/theme/themes/eea/assets/logo/energy.svg +77 -0
  125. package/theme/themes/eea/assets/logo/fise.svg +37 -0
  126. package/theme/themes/eea/assets/logo/freshwater.svg +48 -0
  127. package/theme/themes/eea/assets/logo/industry.svg +40 -0
  128. package/theme/themes/eea/assets/logo/insitu.svg +43 -0
  129. package/theme/themes/eea/assets/logo/ipchem.svg +23 -0
  130. package/theme/themes/eea/assets/logo/marine.svg +63 -0
  131. package/theme/themes/eea/collections/breadcrumb.overrides +44 -0
  132. package/theme/themes/eea/collections/breadcrumb.variables +49 -0
  133. package/theme/themes/eea/collections/form.overrides +56 -0
  134. package/theme/themes/eea/collections/form.variables +211 -0
  135. package/theme/themes/eea/collections/grid.overrides +17 -0
  136. package/theme/themes/eea/collections/grid.variables +103 -0
  137. package/theme/themes/eea/collections/menu.overrides +84 -0
  138. package/theme/themes/eea/collections/menu.variables +471 -0
  139. package/theme/themes/eea/collections/message.overrides +34 -0
  140. package/theme/themes/eea/collections/message.variables +142 -0
  141. package/theme/themes/eea/collections/table.overrides +30 -0
  142. package/theme/themes/eea/collections/table.variables +249 -0
  143. package/theme/themes/eea/definitions/elements/icon.less +499 -0
  144. package/theme/themes/eea/elements/button.overrides +199 -0
  145. package/theme/themes/eea/elements/button.variables +405 -0
  146. package/theme/themes/eea/elements/container.overrides +98 -0
  147. package/theme/themes/eea/elements/container.variables +66 -0
  148. package/theme/themes/eea/elements/divider.overrides +17 -0
  149. package/theme/themes/eea/elements/divider.variables +53 -0
  150. package/theme/themes/eea/elements/flag.overrides +1235 -0
  151. package/theme/themes/eea/elements/flag.variables +13 -0
  152. package/theme/themes/eea/elements/header.overrides +205 -0
  153. package/theme/themes/eea/elements/header.variables +151 -0
  154. package/theme/themes/eea/elements/icon.overrides +5589 -0
  155. package/theme/themes/eea/elements/icon.variables +95 -0
  156. package/theme/themes/eea/elements/image.overrides +3 -0
  157. package/theme/themes/eea/elements/image.variables +44 -0
  158. package/theme/themes/eea/elements/input.overrides +83 -0
  159. package/theme/themes/eea/elements/input.variables +104 -0
  160. package/theme/themes/eea/elements/label.overrides +49 -0
  161. package/theme/themes/eea/elements/label.variables +267 -0
  162. package/theme/themes/eea/elements/list.overrides +28 -0
  163. package/theme/themes/eea/elements/list.variables +233 -0
  164. package/theme/themes/eea/elements/loader.overrides +3 -0
  165. package/theme/themes/eea/elements/loader.variables +73 -0
  166. package/theme/themes/eea/elements/placeholder.overrides +3 -0
  167. package/theme/themes/eea/elements/placeholder.variables +55 -0
  168. package/theme/themes/eea/elements/rail.overrides +3 -0
  169. package/theme/themes/eea/elements/rail.variables +34 -0
  170. package/theme/themes/eea/elements/reveal.overrides +3 -0
  171. package/theme/themes/eea/elements/reveal.variables +18 -0
  172. package/theme/themes/eea/elements/segment.overrides +8 -0
  173. package/theme/themes/eea/elements/segment.variables +154 -0
  174. package/theme/themes/eea/elements/step.overrides +18 -0
  175. package/theme/themes/eea/elements/step.variables +130 -0
  176. package/theme/themes/eea/extras/avatar.less +97 -0
  177. package/theme/themes/eea/extras/avatar.variables +34 -0
  178. package/theme/themes/eea/extras/avatarGrid.less +43 -0
  179. package/theme/themes/eea/extras/avatarGrid.variables +20 -0
  180. package/theme/themes/eea/extras/banner.less +213 -0
  181. package/theme/themes/eea/extras/banner.variables +77 -0
  182. package/theme/themes/eea/extras/blockquote.less +89 -0
  183. package/theme/themes/eea/extras/blockquote.variables +35 -0
  184. package/theme/themes/eea/extras/custom.overrides +0 -0
  185. package/theme/themes/eea/extras/custom.variables +0 -0
  186. package/theme/themes/eea/extras/divider.less +14 -0
  187. package/theme/themes/eea/extras/divider.variables +9 -0
  188. package/theme/themes/eea/extras/footer.less +273 -0
  189. package/theme/themes/eea/extras/footer.variables +109 -0
  190. package/theme/themes/eea/extras/header.less +691 -0
  191. package/theme/themes/eea/extras/header.variables +149 -0
  192. package/theme/themes/eea/extras/inpageNavigation.less +57 -0
  193. package/theme/themes/eea/extras/inpageNavigation.variables +30 -0
  194. package/theme/themes/eea/extras/keyContent.less +36 -0
  195. package/theme/themes/eea/extras/keyContent.variables +18 -0
  196. package/theme/themes/eea/extras/main.overrides +31 -0
  197. package/theme/themes/eea/extras/main.variables +33 -0
  198. package/theme/themes/eea/extras/publicationCard.less +62 -0
  199. package/theme/themes/eea/extras/publicationCard.variables +24 -0
  200. package/theme/themes/eea/extras/pullquote.less +76 -0
  201. package/theme/themes/eea/extras/pullquote.variables +34 -0
  202. package/theme/themes/eea/extras/select.overrides +0 -0
  203. package/theme/themes/eea/extras/select.variables +0 -0
  204. package/theme/themes/eea/extras/tag.less +37 -0
  205. package/theme/themes/eea/extras/tag.variables +22 -0
  206. package/theme/themes/eea/extras/tagList.less +50 -0
  207. package/theme/themes/eea/extras/tagList.variables +13 -0
  208. package/theme/themes/eea/extras/testimonial.less +28 -0
  209. package/theme/themes/eea/extras/testimonial.variables +13 -0
  210. package/theme/themes/eea/extras/timeline.less +114 -0
  211. package/theme/themes/eea/extras/timeline.variables +40 -0
  212. package/theme/themes/eea/globals/reset.overrides +454 -0
  213. package/theme/themes/eea/globals/reset.variables +6 -0
  214. package/theme/themes/eea/globals/site.overrides +27 -0
  215. package/theme/themes/eea/globals/site.variables +1135 -0
  216. package/theme/themes/eea/modules/accordion.overrides +83 -0
  217. package/theme/themes/eea/modules/accordion.variables +114 -0
  218. package/theme/themes/eea/modules/chatroom.overrides +3 -0
  219. package/theme/themes/eea/modules/chatroom.variables +3 -0
  220. package/theme/themes/eea/modules/checkbox.overrides +67 -0
  221. package/theme/themes/eea/modules/checkbox.variables +194 -0
  222. package/theme/themes/eea/modules/dimmer.overrides +3 -0
  223. package/theme/themes/eea/modules/dimmer.variables +58 -0
  224. package/theme/themes/eea/modules/dropdown.overrides +53 -0
  225. package/theme/themes/eea/modules/dropdown.variables +390 -0
  226. package/theme/themes/eea/modules/embed.overrides +3 -0
  227. package/theme/themes/eea/modules/embed.variables +53 -0
  228. package/theme/themes/eea/modules/modal.overrides +3 -0
  229. package/theme/themes/eea/modules/modal.variables +193 -0
  230. package/theme/themes/eea/modules/nag.overrides +3 -0
  231. package/theme/themes/eea/modules/nag.variables +74 -0
  232. package/theme/themes/eea/modules/popup.overrides +83 -0
  233. package/theme/themes/eea/modules/popup.variables +153 -0
  234. package/theme/themes/eea/modules/progress.overrides +3 -0
  235. package/theme/themes/eea/modules/progress.variables +113 -0
  236. package/theme/themes/eea/modules/rating.overrides +74 -0
  237. package/theme/themes/eea/modules/rating.variables +103 -0
  238. package/theme/themes/eea/modules/search.overrides +3 -0
  239. package/theme/themes/eea/modules/search.variables +163 -0
  240. package/theme/themes/eea/modules/shape.overrides +3 -0
  241. package/theme/themes/eea/modules/shape.variables +40 -0
  242. package/theme/themes/eea/modules/sidebar.overrides +3 -0
  243. package/theme/themes/eea/modules/sidebar.variables +45 -0
  244. package/theme/themes/eea/modules/sticky.overrides +3 -0
  245. package/theme/themes/eea/modules/sticky.variables +7 -0
  246. package/theme/themes/eea/modules/tab.overrides +13 -0
  247. package/theme/themes/eea/modules/tab.variables +17 -0
  248. package/theme/themes/eea/modules/transition.overrides +1087 -0
  249. package/theme/themes/eea/modules/transition.variables +10 -0
  250. package/theme/themes/eea/modules/video.overrides +3 -0
  251. package/theme/themes/eea/modules/video.variables +16 -0
  252. package/theme/themes/eea/views/ad.overrides +3 -0
  253. package/theme/themes/eea/views/ad.variables +13 -0
  254. package/theme/themes/eea/views/card.overrides +73 -0
  255. package/theme/themes/eea/views/card.variables +237 -0
  256. package/theme/themes/eea/views/comment.overrides +3 -0
  257. package/theme/themes/eea/views/comment.variables +98 -0
  258. package/theme/themes/eea/views/feed.overrides +3 -0
  259. package/theme/themes/eea/views/feed.variables +141 -0
  260. package/theme/themes/eea/views/item.overrides +8 -0
  261. package/theme/themes/eea/views/item.variables +157 -0
  262. package/theme/themes/eea/views/statistic.overrides +19 -0
  263. package/theme/themes/eea/views/statistic.variables +105 -0
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { Icon } from 'semantic-ui-react';
3
+
4
+ function Tag({ children, ...rest }) {
5
+ return (
6
+ <a {...rest} className="tag">
7
+ <Icon className={`icon`} name="hashtag" />
8
+ <span className="name">{children}</span>
9
+ </a>
10
+ );
11
+ }
12
+
13
+ export default Tag;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import Tag from './Tag';
3
+
4
+ export default {
5
+ title: 'Components/Tag',
6
+ component: Tag,
7
+ argTypes: {
8
+ title: {
9
+ name: 'title',
10
+ description: 'Tag main text',
11
+ type: { name: 'string', required: true },
12
+ },
13
+ },
14
+ };
15
+
16
+ export const Default = (args) => <Tag href={args.href}>{args.title}</Tag>;
17
+
18
+ Default.args = {
19
+ title: 'subcategory 1',
20
+ link: '/#',
21
+ };
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+
3
+ function TagList({ children, ...rest }) {
4
+ return (
5
+ <div {...rest} className={`tags ${rest.className || ''}`}>
6
+ {children}
7
+ </div>
8
+ );
9
+ }
10
+
11
+ TagList.Title = ({ children, ...rest }) => (
12
+ <span className="tags-title" {...rest}>
13
+ {children}
14
+ </span>
15
+ );
16
+
17
+ TagList.Content = ({ children, ...rest }) => (
18
+ <div className="tags-content" {...rest}>
19
+ {children}
20
+ </div>
21
+ );
22
+
23
+ export default TagList;
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ import TagList from './TagList';
3
+ import Tag from '../Tag/Tag';
4
+
5
+ export default {
6
+ title: 'Components/TagList',
7
+ component: TagList,
8
+ argTypes: {
9
+ title: {
10
+ name: 'title',
11
+ description: 'Tag main text',
12
+ type: { name: 'string', required: true },
13
+ },
14
+ direction: {
15
+ control: { type: 'select' },
16
+ options: ['right', 'left'],
17
+ description: 'tag container direction',
18
+ table: {
19
+ type: {
20
+ summary: 'string',
21
+ },
22
+ defaultValue: {
23
+ summary: 'right',
24
+ },
25
+ },
26
+ },
27
+ tags: {
28
+ description: 'category tag',
29
+ table: {
30
+ type: {
31
+ summary: 'Object',
32
+ },
33
+ defaultValue: {
34
+ summary: ' "" ',
35
+ },
36
+ },
37
+ },
38
+ },
39
+ };
40
+
41
+ export const Default = (args) => (
42
+ <TagList className={args.direction}>
43
+ <TagList.Title>{args.title}</TagList.Title>
44
+ <TagList.Content>
45
+ {args.tags.map((tag, index) => [
46
+ <Tag className={tag.class} href={tag.href} key={index}>
47
+ {tag.category}
48
+ </Tag>,
49
+ ])}
50
+ </TagList.Content>
51
+ </TagList>
52
+ );
53
+
54
+ Default.args = {
55
+ title: 'Tags:',
56
+ direction: 'right',
57
+ tags: [
58
+ { category: 'land use 1', href: '#' },
59
+ { category: 'land use 2', href: '#' },
60
+ { category: 'land use 3', href: '#' },
61
+ { category: 'land use 4', href: '#' },
62
+ ],
63
+ };
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Divider from '../Divider/Divider';
4
+ import Avatar from '../Avatar/Avatar';
5
+ import Pullquote from '../Pullquote/Pullquote';
6
+ import { Grid } from 'semantic-ui-react';
7
+
8
+ Testimonial.propTypes = {
9
+ title: PropTypes.string,
10
+ info: PropTypes.string,
11
+ };
12
+
13
+ function Testimonial({ children, ...rest }) {
14
+ return (
15
+ <div className="eea testimonial" {...rest}>
16
+ <Divider />
17
+ <Grid>{children}</Grid>
18
+ <Divider />
19
+ </div>
20
+ );
21
+ }
22
+
23
+ Testimonial.Avatar = ({ children, ...rest }) => {
24
+ return (
25
+ <Grid.Column mobile={12} tablet={2} computer={2}>
26
+ <div className="avatar-wrapper">
27
+ <Avatar {...rest} image_url={rest.image_url} avatarSize="small">
28
+ <Avatar.Content>
29
+ <Avatar.Title>{rest.title}</Avatar.Title>
30
+ <Avatar.Metadata>{rest.metadata}</Avatar.Metadata>
31
+ </Avatar.Content>
32
+ </Avatar>
33
+ </div>
34
+ </Grid.Column>
35
+ );
36
+ };
37
+
38
+ Testimonial.Content = ({ children }) => {
39
+ return (
40
+ <Grid.Column mobile={12} tablet={10} computer={10}>
41
+ <div className="content">{children}</div>
42
+ </Grid.Column>
43
+ );
44
+ };
45
+
46
+ Testimonial.Title = ({ children }) => <p className="title">{children}</p>;
47
+ Testimonial.Pullquote = ({ children, ...rest }) => (
48
+ <Pullquote quotePosition="none">
49
+ <Pullquote.Quote>{children}</Pullquote.Quote>
50
+ </Pullquote>
51
+ );
52
+
53
+ export default Testimonial;
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ // eslint-disable-next-line import/no-unresolved
3
+ import imgUrl from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/avatar.png';
4
+ import Testimonial from './Testimonial';
5
+
6
+ export default {
7
+ title: 'Components/Testimonial',
8
+ component: Testimonial,
9
+ argTypes: {
10
+ title: {
11
+ description: 'testimonial title',
12
+ table: {
13
+ defaultValue: { summary: '""' },
14
+ type: { summary: 'string' },
15
+ },
16
+ },
17
+ image: {
18
+ description: 'testimonial image',
19
+ table: {
20
+ defaultValue: { summary: '""' },
21
+ },
22
+ },
23
+ quote: {
24
+ description: 'quote text',
25
+ type: { summary: 'string' },
26
+ },
27
+ },
28
+ };
29
+
30
+ const InlineTemplate = (args) => (
31
+ <Testimonial {...args}>
32
+ <Testimonial.Avatar
33
+ image_url={imgUrl}
34
+ title={args.avatarTitle}
35
+ metadata={args.avatarInfo}
36
+ ></Testimonial.Avatar>
37
+ <Testimonial.Content>
38
+ <Testimonial.Title>{args.title}</Testimonial.Title>
39
+ <Testimonial.Pullquote>{args.quote}</Testimonial.Pullquote>
40
+ </Testimonial.Content>
41
+ </Testimonial>
42
+ );
43
+
44
+ export const Inline = InlineTemplate.bind({});
45
+ Inline.args = {
46
+ avatarTitle: 'Jane Doe',
47
+ avatarInfo: 'EEA Analyst',
48
+ title: 'Amet - Lorem ipsum dolor sit amet',
49
+ quote:
50
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
51
+ };
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import cx from 'classnames';
3
+ import { Grid, Card, Label, Icon } from 'semantic-ui-react';
4
+ function Timeline({ children, reversed }) {
5
+ return (
6
+ <div className="eea timeline">
7
+ <Grid className={cx({ 'any reversed': reversed })}>
8
+ <Grid.Row>{children}</Grid.Row>
9
+ </Grid>
10
+ </div>
11
+ );
12
+ }
13
+
14
+ Timeline.Content = (args) => (
15
+ <Grid.Column width={10}>
16
+ <Card fluid raised color={args.color}>
17
+ <Card.Content>
18
+ <Label
19
+ pointing={args.pointing}
20
+ attached="top"
21
+ style={{ marginLeft: '0' }}
22
+ color={args.color}
23
+ >
24
+ {args.time}
25
+ </Label>
26
+ <Card.Header>{args.title}</Card.Header>
27
+ <Card.Description>{args.description}</Card.Description>
28
+ {/* <Label.Group>
29
+ {tags.map((tag, i) => (
30
+ <Label key={i.toString()}>{tag}</Label>
31
+ ))}
32
+ </Label.Group> */}
33
+ </Card.Content>
34
+ </Card>
35
+ </Grid.Column>
36
+ );
37
+
38
+ Timeline.Icon = (args) => (
39
+ <Grid.Column width={2} className="line">
40
+ <Icon name={args.icon} color={args.color} inverted circular />
41
+ </Grid.Column>
42
+ );
43
+
44
+ export default Timeline;
@@ -0,0 +1,322 @@
1
+ import React from 'react';
2
+ import Timeline from './Timeline';
3
+
4
+ export default {
5
+ title: 'Components/Timeline',
6
+ component: Timeline,
7
+ argTypes: {},
8
+ };
9
+
10
+ function TimelineEEA({ items }) {
11
+ return (
12
+ <>
13
+ {items.map((item, index) => (
14
+ <Timeline key={index}>
15
+ <Timeline.Content
16
+ pointing="right"
17
+ time={item.time}
18
+ title={item.title}
19
+ description={item.description}
20
+ color={item.color}
21
+ ></Timeline.Content>
22
+ <Timeline.Icon icon={item.icon} color={item.color}></Timeline.Icon>
23
+ </Timeline>
24
+ ))}
25
+ </>
26
+ );
27
+ }
28
+
29
+ function TimelineEEAReversed({ items }) {
30
+ return (
31
+ <>
32
+ {items.map((item, index) => (
33
+ <Timeline key={index}>
34
+ <Timeline.Icon icon={item.icon} color={item.color}></Timeline.Icon>
35
+ <Timeline.Content
36
+ pointing="left"
37
+ time={item.time}
38
+ title={item.title}
39
+ description={item.description}
40
+ color={item.color}
41
+ ></Timeline.Content>
42
+ </Timeline>
43
+ ))}
44
+ </>
45
+ );
46
+ }
47
+
48
+ const Template = (args) => (
49
+ <Timeline>
50
+ <Timeline.Content
51
+ pointing="right"
52
+ time={args.time}
53
+ title={args.title}
54
+ description={args.description}
55
+ color={args.color}
56
+ ></Timeline.Content>
57
+ <Timeline.Icon icon={args.icon} color={args.color}></Timeline.Icon>
58
+ </Timeline>
59
+ );
60
+
61
+ const TemplateReversed = (args) => (
62
+ <Timeline>
63
+ <Timeline.Icon icon={args.icon} color={args.color}></Timeline.Icon>
64
+ <Timeline.Content
65
+ pointing="left"
66
+ time={args.time}
67
+ title={args.title}
68
+ description={args.description}
69
+ color={args.color}
70
+ ></Timeline.Content>
71
+ </Timeline>
72
+ );
73
+
74
+ export const Default = Template.bind({});
75
+ Default.args = {
76
+ icon: 'user',
77
+ time: 'Date and time',
78
+ title: 'Title',
79
+ description: 'description',
80
+ color: 'blue',
81
+ tags: [],
82
+ };
83
+
84
+ Default.argTypes = {
85
+ icon: {
86
+ description: 'timeline item icon',
87
+ table: {
88
+ type: {
89
+ summary: 'string',
90
+ },
91
+ defaultValue: {
92
+ summary: ' "" ',
93
+ },
94
+ },
95
+ },
96
+ time: {
97
+ description: 'timeline item time',
98
+ table: {
99
+ type: {
100
+ summary: 'string',
101
+ },
102
+ defaultValue: {
103
+ summary: ' "" ',
104
+ },
105
+ },
106
+ },
107
+ title: {
108
+ description: 'timeline item heading',
109
+ table: {
110
+ type: {
111
+ summary: 'string',
112
+ },
113
+ defaultValue: {
114
+ summary: ' "" ',
115
+ },
116
+ },
117
+ },
118
+ description: {
119
+ description: 'timeline item main content',
120
+ table: {
121
+ type: {
122
+ summary: 'string',
123
+ },
124
+ defaultValue: {
125
+ summary: ' "" ',
126
+ },
127
+ },
128
+ },
129
+ color: {
130
+ description: 'timeline item color',
131
+ table: {
132
+ type: {
133
+ summary: 'string',
134
+ },
135
+ defaultValue: {
136
+ summary: ' "" ',
137
+ },
138
+ },
139
+ },
140
+ tags: {
141
+ description: 'timeline item content tags',
142
+ table: {
143
+ type: {
144
+ summary: 'array',
145
+ },
146
+ defaultValue: {
147
+ summary: ' "" ',
148
+ },
149
+ },
150
+ },
151
+ };
152
+
153
+ export const DefaultReversed = TemplateReversed.bind({});
154
+ DefaultReversed.args = {
155
+ icon: 'user',
156
+ time: 'Date and time',
157
+ title: 'Title',
158
+ description: 'description',
159
+ color: 'blue',
160
+ tags: [],
161
+ };
162
+
163
+ DefaultReversed.argTypes = {
164
+ icon: {
165
+ description: 'timeline item icon',
166
+ table: {
167
+ type: {
168
+ summary: 'string',
169
+ },
170
+ defaultValue: {
171
+ summary: ' "" ',
172
+ },
173
+ },
174
+ },
175
+ time: {
176
+ description: 'timeline item time',
177
+ table: {
178
+ type: {
179
+ summary: 'string',
180
+ },
181
+ defaultValue: {
182
+ summary: ' "" ',
183
+ },
184
+ },
185
+ },
186
+ title: {
187
+ description: 'timeline item heading',
188
+ table: {
189
+ type: {
190
+ summary: 'string',
191
+ },
192
+ defaultValue: {
193
+ summary: ' "" ',
194
+ },
195
+ },
196
+ },
197
+ description: {
198
+ description: 'timeline item main content',
199
+ table: {
200
+ type: {
201
+ summary: 'string',
202
+ },
203
+ defaultValue: {
204
+ summary: ' "" ',
205
+ },
206
+ },
207
+ },
208
+ color: {
209
+ description: 'timeline item color',
210
+ table: {
211
+ type: {
212
+ summary: 'string',
213
+ },
214
+ defaultValue: {
215
+ summary: ' "" ',
216
+ },
217
+ },
218
+ },
219
+ tags: {
220
+ description: 'timeline item content tags',
221
+ table: {
222
+ type: {
223
+ summary: 'array',
224
+ },
225
+ defaultValue: {
226
+ summary: ' "" ',
227
+ },
228
+ },
229
+ },
230
+ };
231
+
232
+ export const Multiple = (args) => <TimelineEEA {...args}></TimelineEEA>;
233
+
234
+ Multiple.args = {
235
+ items: [
236
+ {
237
+ icon: 'time',
238
+ time: 'Date and time',
239
+ title: 'Title 1',
240
+ description: 'description 1',
241
+ color: 'blue',
242
+ tags: [],
243
+ },
244
+ {
245
+ icon: 'check circle',
246
+ time: 'Date and time',
247
+ title: 'Title 2',
248
+ description: 'description 2',
249
+ color: 'green',
250
+ tags: [],
251
+ },
252
+ {
253
+ icon: 'minus circle',
254
+ time: 'Date and time',
255
+ title: 'Title 3',
256
+ description: 'description 3',
257
+ color: 'teal',
258
+ tags: [],
259
+ },
260
+ ],
261
+ };
262
+
263
+ Multiple.argTypes = {
264
+ items: {
265
+ description: 'array of different timeline item objects',
266
+ table: {
267
+ type: {
268
+ summary: 'array',
269
+ },
270
+ defaultValue: {
271
+ summary: ' "" ',
272
+ },
273
+ },
274
+ },
275
+ };
276
+
277
+ export const MultipleReversed = (args) => (
278
+ <TimelineEEAReversed {...args}></TimelineEEAReversed>
279
+ );
280
+
281
+ MultipleReversed.args = {
282
+ items: [
283
+ {
284
+ icon: 'time',
285
+ time: 'Date and time',
286
+ title: 'Title 1',
287
+ description: 'description 1',
288
+ color: 'blue',
289
+ tags: [],
290
+ },
291
+ {
292
+ icon: 'check circle',
293
+ time: 'Date and time',
294
+ title: 'Title 2',
295
+ description: 'description 2',
296
+ color: 'green',
297
+ tags: [],
298
+ },
299
+ {
300
+ icon: 'minus circle',
301
+ time: 'Date and time',
302
+ title: 'Title 3',
303
+ description: 'description 3',
304
+ color: 'teal',
305
+ tags: [],
306
+ },
307
+ ],
308
+ };
309
+
310
+ MultipleReversed.argTypes = {
311
+ items: {
312
+ description: 'array of different timeline item objects',
313
+ table: {
314
+ type: {
315
+ summary: 'array',
316
+ },
317
+ defaultValue: {
318
+ summary: ' "" ',
319
+ },
320
+ },
321
+ },
322
+ };
@@ -0,0 +1,31 @@
1
+ export Banner from './Banner/Banner';
2
+
3
+ export Blockquote from './Blockquote/Blockquote';
4
+
5
+ export Breadcrumbs from './Breadcrumbs/Breadcrumbs';
6
+
7
+ export Tag from './Tag/Tag';
8
+
9
+ export TagList from './TagList/TagList';
10
+
11
+ export Footer from './Footer/Footer';
12
+
13
+ export Header from './Header/Header';
14
+
15
+ export InpageNavigation from './InpageNavigation/InpageNavigation';
16
+
17
+ export Logo from './Logo/Logo';
18
+
19
+ export Pullquote from './Pullquote/Pullquote';
20
+
21
+ export Timeline from './Timeline/Timeline';
22
+
23
+ export Avatar from './Avatar/Avatar';
24
+
25
+ export Testimonial from './Testimonial/Testimonial';
26
+
27
+ export AvatarGrid from './AvatarGrid/AvatarGrid';
28
+
29
+ export KeyContent from './KeyContent/KeyContent';
30
+
31
+ export PublicationCard from './PublicationCard/PublicationCard';
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: What's new
3
+ ---
4
+
5
+ All notable changes to this project will be documented in this file. Dates are displayed in UTC.
6
+
7
+ {{#unless options.hideCredit}}
8
+ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
9
+ {{/unless}}
10
+
11
+ {{#each releases}}
12
+ {{#if href}}
13
+ ##{{#unless major}}#{{/unless}} [{{title}}]({{href}}) - {{date}}
14
+ {{else}}
15
+ ### {{title}} - {{date}}
16
+ {{/if}}
17
+
18
+ {{! List commits with `Breaking change: ` somewhere in the message }}
19
+ {{#commit-list commits heading='#### :boom: Breaking Change' subject='(^Breaking change[:(]|^breaking[:(])'}}
20
+ - {{subject}} [`{{shorthash}}`]({{href}})
21
+ {{/commit-list}}
22
+
23
+ {{! List commits that add new features, but not those already listed above }}
24
+ {{#commit-list commits heading='#### :rocket: New Features' subject='^feat[:(]'}}
25
+ - {{subject}} [`{{shorthash}}`]({{href}})
26
+ {{/commit-list}}
27
+
28
+ {{! List commits that add new features, but not those already listed above }}
29
+ {{#commit-list commits heading='#### :bug: Bug Fixes' subject='^fix[:(]'}}
30
+ - {{subject}} [`{{shorthash}}`]({{href}})
31
+ {{/commit-list}}
32
+
33
+ {{#commit-list commits heading='#### :nail_care: Enhancements' subject='(^enhancement[:(]|^change[:(]|^refactor[:(])' }}
34
+ - {{subject}} [`{{shorthash}}`]({{href}})
35
+ {{/commit-list}}
36
+
37
+ {{#commit-list commits heading='#### :house: Internal changes' subject='^chore[:(]|^style[:(]'}}
38
+ - {{subject}} [`{{shorthash}}`]({{href}})
39
+ {{/commit-list}}
40
+
41
+ {{#commit-list commits heading='#### :house: Documentation changes' subject='^docs[:(]' }}
42
+ - {{subject}} [`{{shorthash}}`]({{href}})
43
+ {{/commit-list}}
44
+
45
+
46
+ {{#commit-list commits heading='#### :hammer_and_wrench: Others' exclude='^Breaking change:|^breaking:|^feat[:(]|^fix[:(]|^enhancement[:(]|^change[:(]|^chore[:(]|^docs[:(]|^Autobuild|^Automated|^\[JENKINS\]|^\[YARN\]|^refactor[:(]|^style[:(]' }}
47
+ - {{subject}} [`{{shorthash}}`]({{href}})
48
+ {{/commit-list}}
49
+
50
+ {{/each}}