@eeacms/volto-eea-design-system 0.2.2 → 0.3.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 (45) hide show
  1. package/.github/workflows/auto-comment.yml +20 -0
  2. package/CHANGELOG.md +85 -0
  3. package/package.json +1 -1
  4. package/src/semantic.less +2 -2
  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/Callout/Callout.jsx +12 -0
  10. package/src/ui/Callout/Callout.stories.jsx +42 -0
  11. package/src/ui/{Button → Form/Button}/Button.stories.jsx +43 -27
  12. package/src/ui/{Pullquote/Pullquote.jsx → Quote/Quote.jsx} +9 -9
  13. package/src/ui/{Pullquote/Pullquote.stories.jsx → Quote/Quote.stories.jsx} +18 -18
  14. package/src/ui/{Testimonial → Quote/Testimonial}/Testimonial.jsx +10 -11
  15. package/src/ui/{Testimonial → Quote/Testimonial}/Testimonial.stories.jsx +17 -8
  16. package/src/ui/index.js +3 -3
  17. package/theme/theme.config +1 -1
  18. package/theme/themes/eea/collections/breadcrumb.overrides +0 -16
  19. package/theme/themes/eea/collections/form.overrides +1 -1
  20. package/theme/themes/eea/collections/table.overrides +48 -0
  21. package/theme/themes/eea/collections/table.variables +16 -0
  22. package/theme/themes/eea/elements/button.overrides +79 -0
  23. package/theme/themes/eea/elements/container.overrides +4 -19
  24. package/theme/themes/eea/elements/container.variables +5 -4
  25. package/theme/themes/eea/elements/segment.overrides +77 -0
  26. package/theme/themes/eea/extras/avatar.variables +28 -0
  27. package/theme/themes/eea/extras/callout.less +43 -0
  28. package/theme/themes/eea/extras/callout.variables +19 -0
  29. package/theme/themes/eea/extras/header.less +1 -1
  30. package/theme/themes/eea/extras/{pullquote.less → quote.less} +20 -20
  31. package/theme/themes/eea/extras/quote.variables +34 -0
  32. package/theme/themes/eea/extras/testimonial.less +46 -6
  33. package/theme/themes/eea/extras/testimonial.variables +14 -6
  34. package/theme/themes/eea/globals/site.variables +11 -5
  35. package/theme/themes/eea/modules/accordion.variables +2 -2
  36. package/theme/themes/eea/modules/tab.overrides +20 -4
  37. package/theme/themes/eea/modules/tab.variables +12 -3
  38. package/theme/themes/eea/tokens/fonts.less +38 -0
  39. package/theme/themes/eea/tokens/sizes.less +17 -0
  40. package/theme/themes/eea/tokens/tokens.less +2 -0
  41. package/src/ui/Blockquote/Blockquote.jsx +0 -16
  42. package/src/ui/Blockquote/Blockquote.stories.jsx +0 -48
  43. package/theme/themes/eea/extras/blockquote.less +0 -92
  44. package/theme/themes/eea/extras/blockquote.variables +0 -35
  45. package/theme/themes/eea/extras/pullquote.variables +0 -34
@@ -0,0 +1,20 @@
1
+ name: Auto Comment
2
+ on: [pull_request]
3
+ jobs:
4
+ run:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: wow-actions/auto-comment@v1
8
+ with:
9
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10
+ pullRequestOpened: |
11
+ 👋 @{{ author }}
12
+
13
+ To generate the Storybook and Docusaurus websites, write comment with:
14
+ > @eea-jenkins build all
15
+
16
+ To generate only Storybook write comment with:
17
+ > @eea-jenkins build storybook
18
+
19
+ To generate only Docusaurus write comment with:
20
+ > @eea-jenkins build docusaurus
package/CHANGELOG.md CHANGED
@@ -4,8 +4,93 @@ 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
+ #### [0.3.0](https://github.com/eea/volto-eea-design-system/compare/0.2.4...0.3.0)
8
+
9
+ - [R2] Quote [`#158`](https://github.com/eea/volto-eea-design-system/pull/158)
10
+ - [R2] Refactor table [`#159`](https://github.com/eea/volto-eea-design-system/pull/159)
11
+ - Release 0.3.0 [`8724b28`](https://github.com/eea/volto-eea-design-system/commit/8724b2809027b2e359dcd64e418a33cade4ad487)
12
+ - Autobuild of docusaurus docs [`368a09d`](https://github.com/eea/volto-eea-design-system/commit/368a09de4885a7ce01e238c37d48db6a13af64e4)
13
+ - feat(callout): Align the Callout component with Volto slate component [`e9343ff`](https://github.com/eea/volto-eea-design-system/commit/e9343ff7008cd3d60700929e8861c7bdd06df4d3)
14
+ - Autobuild of docusaurus docs [`cabb7a5`](https://github.com/eea/volto-eea-design-system/commit/cabb7a55c655e6fa5669a6ce904da46290e31f55)
15
+ - Autobuild of docusaurus docs [`aaadafd`](https://github.com/eea/volto-eea-design-system/commit/aaadafd9844c79a2323718f3392173fe6d6da352)
16
+ - Autobuild of docusaurus docs [`33eff2e`](https://github.com/eea/volto-eea-design-system/commit/33eff2e246328d2a0f2afb56656719a3dfaed531)
17
+ - feature(tokens): added tokens folder for design tokens we can use in the system [`a542172`](https://github.com/eea/volto-eea-design-system/commit/a542172cfd84dde0286b4332e66a617a1f3d13bf)
18
+ - Autobuild of docusaurus docs [`081ad83`](https://github.com/eea/volto-eea-design-system/commit/081ad832ecedee400779b8023d2e5eab8e67639e)
19
+ - fix(accordion): Fix accordion active title color [`57af165`](https://github.com/eea/volto-eea-design-system/commit/57af1650a0b830e01c79e21b130784190defbcc0)
20
+ - refactor(quote): update action name to match the functionality [`caf2e35`](https://github.com/eea/volto-eea-design-system/commit/caf2e359cada8056f280d2cd137776d64f82a2af)
21
+ - refactor(table): add borders to responsive table with celled attribute [`8a71a67`](https://github.com/eea/volto-eea-design-system/commit/8a71a670fb34a11fbe4cef7365b91c6be84b5b54)
22
+ - change(table): make use of headerSortableWhiteSpace variable [`fd836fb`](https://github.com/eea/volto-eea-design-system/commit/fd836fbe82e92864a628bf4d9d3093674890f722)
23
+ - fix(table): tweak responsive table for extra long headers [`7f9f9e2`](https://github.com/eea/volto-eea-design-system/commit/7f9f9e25f7c57d4bf7edd2546a7579b892867b5c)
24
+ - change(table): use the @mobileLandscapeBreakpoint for max 480px media query [`90880ab`](https://github.com/eea/volto-eea-design-system/commit/90880ab324b6a66c7741819dd0d913504751454f)
25
+ - refactor(Table):wrap table with semantic ui container [`24ac2bb`](https://github.com/eea/volto-eea-design-system/commit/24ac2bb4813df33547f684220e1e12af5ca6df7e)
26
+ - refactor(Callout): wrap story with semantic ui container [`ead362d`](https://github.com/eea/volto-eea-design-system/commit/ead362d88f43fa1380e8be5481cbc38c055060f8)
27
+ - refactor(Table):add responsive mobile table story and styles [`aed69e6`](https://github.com/eea/volto-eea-design-system/commit/aed69e698e5b89e33a4c331570755934267492af)
28
+ - refactor(testimonial): readjust rounded card [`b419334`](https://github.com/eea/volto-eea-design-system/commit/b41933417a44dabcf829a3346d91c142dd6472d3)
29
+ - fix(quote): fix color and padding issue [`310d6b3`](https://github.com/eea/volto-eea-design-system/commit/310d6b37bdf5df3da2d2103eab8f4fa5020c95ab)
30
+ - feat(Callout):create Callout component with Blockquote style [`3d486b1`](https://github.com/eea/volto-eea-design-system/commit/3d486b1c2c7f74ee8bc4b3a5e1bf3993ac98f6dd)
31
+ - refactor(Quote):rename Quote.Metadata to Quote.SourceInfo [`dfae8b1`](https://github.com/eea/volto-eea-design-system/commit/dfae8b1c147659d24dfd1a13fb4c3098e5865a12)
32
+ - refactor(Quote):move Testimonial component under Quote folder [`e2467c2`](https://github.com/eea/volto-eea-design-system/commit/e2467c2089577d67ef5689a2507cb860a837f6a0)
33
+ - refactor(Quote):rename pullquote to Quote in Testimonial [`f54da19`](https://github.com/eea/volto-eea-design-system/commit/f54da192ab3b0823b0d6c77254f8954ab94506c8)
34
+ - refactor(Quote): rename Author to Source [`6d400f6`](https://github.com/eea/volto-eea-design-system/commit/6d400f6a0ec0062f58782b4e170f4a1a9a31c56c)
35
+ - refactor(Quote):rename Pullquote component to Quote [`9384a0c`](https://github.com/eea/volto-eea-design-system/commit/9384a0c129b8e4eed637e51a9669c41d8ade69d4)
36
+ - refactor(Testimonial): prettier changes [`904594b`](https://github.com/eea/volto-eea-design-system/commit/904594b9814c3d8900656f0e4c8d3a99481efe94)
37
+ - refactor(Testimonial): change card class name [`e995c32`](https://github.com/eea/volto-eea-design-system/commit/e995c32bc70780e4315c4dc02d6b6fa9a0c5b29d)
38
+ - refactor(Testimonial):minor storybook bug fix [`7b6d128`](https://github.com/eea/volto-eea-design-system/commit/7b6d128c6be3b2481d4765cebca82af6cafbea05)
39
+ - perf(lint): fix [`f2ef3ab`](https://github.com/eea/volto-eea-design-system/commit/f2ef3abb9daa8fee3dd103adc14246c412951427)
40
+ - refactor(testimonial): adjust to volto design | fix avatar image size [`546070e`](https://github.com/eea/volto-eea-design-system/commit/546070e494ad187c50913b5742dab49ce5475a84)
41
+ - fix(testimonial): remove info arguement [`9593d95`](https://github.com/eea/volto-eea-design-system/commit/9593d95f6352fb5aea48c3611b27b4bc6a9ae7e4)
42
+ - fix(testimonial): fix storybook arg names [`b9df52f`](https://github.com/eea/volto-eea-design-system/commit/b9df52f7151ef759fd672d365b2d74f6db535ad0)
43
+
44
+ #### [0.2.4](https://github.com/eea/volto-eea-design-system/compare/0.2.3...0.2.4)
45
+
46
+ > 13 May 2022
47
+
48
+ - Add storybook/docusaurus on PRs Refs #148775 [`#157`](https://github.com/eea/volto-eea-design-system/pull/157)
49
+ - Autobuild of docusaurus docs [`18c8b77`](https://github.com/eea/volto-eea-design-system/commit/18c8b77b6d0677f304a83965ed4d6849f75bc179)
50
+ - change(header): wrap header globalnav links useful for editing section [`10d4f56`](https://github.com/eea/volto-eea-design-system/commit/10d4f56624510eb63155ab330dcf0475b0728ed4)
51
+ - Autobuild of docusaurus docs [`5f4c47c`](https://github.com/eea/volto-eea-design-system/commit/5f4c47c93bf102fb198efc97e9f2cc60c162d0e3)
52
+ - change(container): restore maxWidth to 100% now that the last value is 1120px [`8b55c58`](https://github.com/eea/volto-eea-design-system/commit/8b55c58d3bbc8967b20de19a828aedd2f1473ee5)
53
+ - Autobuild of docusaurus docs [`71d6cd9`](https://github.com/eea/volto-eea-design-system/commit/71d6cd90f911960211d227bfc51a0f87fb868a8c)
54
+ - change(breadcrumb): removed padding from breadcrumb added by container [`c5df567`](https://github.com/eea/volto-eea-design-system/commit/c5df5675a519085badc030416e5bb784a9f73321)
55
+ - Autobuild of docusaurus docs [`473b5ff`](https://github.com/eea/volto-eea-design-system/commit/473b5ff05980780a1b8606f70f7a380bd0a077cc)
56
+ - prettier changes [`134da52`](https://github.com/eea/volto-eea-design-system/commit/134da52549b9d5eac5a12b7ad3005073500ac2c4)
57
+ - change(grid-story): added container as grid width is influenced by container width [`459f481`](https://github.com/eea/volto-eea-design-system/commit/459f4813ee3c5325a3db22d417ac5f23063bd4d2)
58
+ - change(container): modified all outputted widths to align to grid [`9f29cef`](https://github.com/eea/volto-eea-design-system/commit/9f29cefa4bfee1fe50844c8450de39ef4b0915d4)
59
+ - Autobuild of docusaurus docs [`52245bb`](https://github.com/eea/volto-eea-design-system/commit/52245bb5f2cec22cb964f61ef556a8985eaa3a49)
60
+ - change(breadcrumb): added vertical variant to the breadcrumbs like we do in Volto [`f405f84`](https://github.com/eea/volto-eea-design-system/commit/f405f8437be6be221b055a41c5d391f4cc94385d)
61
+ - Autobuild of docusaurus docs [`1ea4dd3`](https://github.com/eea/volto-eea-design-system/commit/1ea4dd3dc780f564a2ea9ff92ca00dc083380eed)
62
+ - change(segment): brought back overrides from pastanaga into our theme [`14efd02`](https://github.com/eea/volto-eea-design-system/commit/14efd021f81898bb0f2d3f1a2e8677445420591a)
63
+ - change(container): removed padding from containers restoring thus the defaults [`c2ed813`](https://github.com/eea/volto-eea-design-system/commit/c2ed813cf2f7ce284e33f2e94e02ff16678c2d05)
64
+ - Autobuild of docusaurus docs [`8652ed7`](https://github.com/eea/volto-eea-design-system/commit/8652ed7cbebd9508c620279c9f994aef6c5d952d)
65
+ - change(breakpoints): added also contentBreakpoint for backward compatibility [`b6c9212`](https://github.com/eea/volto-eea-design-system/commit/b6c9212378a37639e6154d8d8e837169bcbac8b5)
66
+ - Autobuild of docusaurus docs [`7928530`](https://github.com/eea/volto-eea-design-system/commit/792853064185f960f3f0a83a70b626b8bfc93d39)
67
+ - change(breakpoints): restore Semantic UI breakpoints, adding extra needed values [`e7f5b1e`](https://github.com/eea/volto-eea-design-system/commit/e7f5b1e4fac6453458078bb02cdc66c328843b59)
68
+
69
+ #### [0.2.3](https://github.com/eea/volto-eea-design-system/compare/0.2.2...0.2.3)
70
+
71
+ > 29 April 2022
72
+
73
+ - Release [`#156`](https://github.com/eea/volto-eea-design-system/pull/156)
74
+ - [R2] Button [`#154`](https://github.com/eea/volto-eea-design-system/pull/154)
75
+ - [R2] Tab [`#155`](https://github.com/eea/volto-eea-design-system/pull/155)
76
+ - Autobuild of docusaurus docs [`4418144`](https://github.com/eea/volto-eea-design-system/commit/4418144c194c49cdeaf6928eabd781e01d0a391e)
77
+ - change(banner): added icon class to share icons [`48e866e`](https://github.com/eea/volto-eea-design-system/commit/48e866e4251dd517c0477cd5a42cec1a98e2f16d)
78
+ - Autobuild of docusaurus docs [`a51745e`](https://github.com/eea/volto-eea-design-system/commit/a51745e8ec045c583f9b0bfdb93b3a0eaec67110)
79
+ - refactor(tab): update vertical tab columns and content [`b473fab`](https://github.com/eea/volto-eea-design-system/commit/b473fabee196a3ec420e29160448d2be3d1685cc)
80
+ - docs(button): import call to action stories [`e4eed44`](https://github.com/eea/volto-eea-design-system/commit/e4eed44e3519ae3dba7d16e252271a964fcb7a4b)
81
+ - refactor(button): update inverted button colors [`c822021`](https://github.com/eea/volto-eea-design-system/commit/c822021ab37939632416ce74c0cc88a64b98a3c1)
82
+ - refactor(button): add container to stories [`6c02c19`](https://github.com/eea/volto-eea-design-system/commit/6c02c1953e102f2d90ab23023d6b4dfc738ced2e)
83
+ - refactor(call to action):render call to action with Button as="a" [`e7dfabf`](https://github.com/eea/volto-eea-design-system/commit/e7dfabfc2f006505b0f1c802dc6fb48611518bcb)
84
+ - feat(CallToAction):add feat call to action [`ab53642`](https://github.com/eea/volto-eea-design-system/commit/ab53642f27c996f929ff871d0794add39bab6c23)
85
+ - refactor(Button): move button to forms folder [`94996fc`](https://github.com/eea/volto-eea-design-system/commit/94996fcdf1ea7e55c63dd44e10edf1b44b9bdef5)
86
+ - refactor(Tab):scrollbar change in mobile & vertical tab fix [`0e34cbf`](https://github.com/eea/volto-eea-design-system/commit/0e34cbf459e67b6910217f30a44a1e81f33df622)
87
+ - refactor(Tab):minor change in secondary pointing menu variables [`280b6c4`](https://github.com/eea/volto-eea-design-system/commit/280b6c41a2107bccb38500f54eb5663ef62c7ae3)
88
+
7
89
  #### [0.2.2](https://github.com/eea/volto-eea-design-system/compare/0.2.1...0.2.2)
8
90
 
91
+ > 22 April 2022
92
+
93
+ - Release [`#153`](https://github.com/eea/volto-eea-design-system/pull/153)
9
94
  - fix(volto): various fixes for issues presented in ticket #147629 [`#150`](https://github.com/eea/volto-eea-design-system/pull/150)
10
95
  - [R2] Card [updated for R3] [`#152`](https://github.com/eea/volto-eea-design-system/pull/152)
11
96
  - [R2] Ordered list [`#144`](https://github.com/eea/volto-eea-design-system/pull/144)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "@eeacms/volto-eea-design-system: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
package/src/semantic.less CHANGED
@@ -202,11 +202,11 @@
202
202
 
203
203
  // EEA Design custom components
204
204
  & {
205
- @import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/blockquote';
205
+ @import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/callout';
206
206
  }
207
207
 
208
208
  & {
209
- @import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/pullquote';
209
+ @import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/quote';
210
210
  }
211
211
 
212
212
  & {
@@ -25,7 +25,7 @@ function Banner({ image_url, image, children }) {
25
25
  Banner.Action = function ({ id, title, icon, onClick, className, color }) {
26
26
  return (
27
27
  <div className="action">
28
- <Button className={className} basic inverted onClick={onClick}>
28
+ <Button className={className} basic icon inverted onClick={onClick}>
29
29
  <Icon className={icon} color={color}></Icon>
30
30
  <span className="mobile hidden">{title}</span>
31
31
  </Button>
@@ -45,6 +45,9 @@ const Template = (args) => (
45
45
  <Breadcrumb.Section key="home" href={args.root}>
46
46
  <Image src={homeSVG} alt="home" />
47
47
  </Breadcrumb.Section>
48
+ <Breadcrumb.Divider>
49
+ <Icon className="ri-arrow-right-s-line"></Icon>
50
+ </Breadcrumb.Divider>
48
51
  {args.sections.map((section, index, sections) => [
49
52
  index !== 0 && (
50
53
  <Breadcrumb.Divider key={index}>
@@ -22,6 +22,7 @@ const Breadcrumbs = ({
22
22
  aria-label={'breadcrumbs'}
23
23
  className="breadcrumbs"
24
24
  attached
25
+ vertical
25
26
  >
26
27
  <Container>
27
28
  <Breadcrumb size={size}>
@@ -0,0 +1,239 @@
1
+ import React from 'react';
2
+ import { Button, Icon, Container, Segment } from 'semantic-ui-react';
3
+
4
+ export default {
5
+ title: 'Components/Call To Action',
6
+ component: Button,
7
+ argTypes: {
8
+ label: {
9
+ description: 'link label',
10
+ table: {
11
+ defaultValue: {
12
+ summary: '',
13
+ },
14
+ type: {
15
+ summary: 'string',
16
+ },
17
+ },
18
+ },
19
+ href: {
20
+ description: "link's destination url",
21
+ table: {
22
+ defaultValue: {
23
+ summary: '',
24
+ },
25
+ type: { summary: 'string' },
26
+ },
27
+ },
28
+ disabled: {
29
+ description: 'link disabled',
30
+ table: {
31
+ defaultValue: { summary: 'false' },
32
+ type: { summary: 'boolean' },
33
+ },
34
+ },
35
+ },
36
+ };
37
+
38
+ //Default Call To Action
39
+ export const Default = (args) => {
40
+ return (
41
+ <Container>
42
+ <Button as="a" disabled={args.disabled} href={args.href} target="_blank">
43
+ {args.label}
44
+ </Button>
45
+ </Container>
46
+ );
47
+ };
48
+ Default.args = {
49
+ label: 'Default Call To Action',
50
+ href: '/#',
51
+ disabled: false,
52
+ };
53
+
54
+ //Primary Call To Action
55
+ export const Primary = (args) => {
56
+ return (
57
+ <Container>
58
+ <Button
59
+ primary
60
+ as="a"
61
+ disabled={args.disabled}
62
+ href={args.href}
63
+ target="_blank"
64
+ >
65
+ {args.label}
66
+ </Button>
67
+ </Container>
68
+ );
69
+ };
70
+ Primary.args = {
71
+ label: 'Primary Call To Action',
72
+ href: '/#',
73
+ disabled: false,
74
+ };
75
+
76
+ //Secondary Call To Action
77
+ export const Secondary = (args) => {
78
+ return (
79
+ <Container>
80
+ <Button
81
+ secondary
82
+ as="a"
83
+ disabled={args.disabled}
84
+ href={args.href}
85
+ target="_blank"
86
+ >
87
+ {args.label}
88
+ </Button>
89
+ </Container>
90
+ );
91
+ };
92
+ Secondary.args = {
93
+ label: 'Secondary Call To Action',
94
+ href: '/#',
95
+ disabled: false,
96
+ };
97
+
98
+ //Inverted Call To Action
99
+ export const Inverted = (args) => {
100
+ return (
101
+ <Container>
102
+ <Segment compact>
103
+ <Button
104
+ primary
105
+ inverted
106
+ as="a"
107
+ disabled={args.disabled}
108
+ href={args.href1}
109
+ target="_blank"
110
+ >
111
+ {args.button1}
112
+ </Button>
113
+ </Segment>
114
+ <Segment compact>
115
+ <Button
116
+ secondary
117
+ inverted
118
+ as="a"
119
+ disabled={args.disabled}
120
+ href={args.href2}
121
+ target="_blank"
122
+ >
123
+ {args.button2}
124
+ </Button>
125
+ </Segment>
126
+ <Segment inverted compact>
127
+ <Button
128
+ inverted
129
+ as="a"
130
+ disabled={args.disabled}
131
+ href={args.href3}
132
+ target="_blank"
133
+ >
134
+ {args.button3}
135
+ </Button>
136
+ </Segment>
137
+ </Container>
138
+ );
139
+ };
140
+ Inverted.args = {
141
+ button1: 'Primary Call To Action',
142
+ button2: 'Secondary Call To Action',
143
+ button3: 'Default Call To Action',
144
+ href1: '/#',
145
+ href2: '/#',
146
+ href3: '/#',
147
+ disabled: false,
148
+ };
149
+ Inverted.parameters = {
150
+ controls: { exclude: ['label', 'href'] },
151
+ hideNoControlsWarning: true,
152
+ };
153
+
154
+ //Labeled Call To Action
155
+ export const Labeled = (args) => {
156
+ return (
157
+ <Container>
158
+ <Button
159
+ className={args.variant + ' icon ' + args.icon_position + ' labeled'}
160
+ as="a"
161
+ disabled={args.disabled}
162
+ href={args.href}
163
+ target="_blank"
164
+ >
165
+ {args.label}
166
+ <Icon name={args.icon} />
167
+ </Button>
168
+ </Container>
169
+ );
170
+ };
171
+ Labeled.args = {
172
+ label: 'Labeled Call To Action',
173
+ icon: 'chevron right',
174
+ href: '/#',
175
+ disabled: false,
176
+ };
177
+ Labeled.argTypes = {
178
+ variant: {
179
+ options: ['primary', 'secondary', 'default'],
180
+ description: 'call to action class',
181
+ control: { type: 'radio' },
182
+ defaultValue: 'secondary',
183
+ table: {
184
+ defaultValue: { summary: 'secondary' },
185
+ type: { summary: 'string' },
186
+ },
187
+ },
188
+ icon: {
189
+ name: 'icon',
190
+ defaultValue: 'chevron right',
191
+ options: [
192
+ 'chevron right',
193
+ 'arrow right',
194
+ 'sign-in',
195
+ 'sign-out',
196
+ 'play',
197
+ 'stop',
198
+ 'pause',
199
+ 'download',
200
+ 'upload',
201
+ 'print',
202
+ 'copy',
203
+ 'edit',
204
+ 'ellipsis',
205
+ ],
206
+ control: { type: 'select' },
207
+ description: 'call to action icon',
208
+ table: {
209
+ defaultValue: { summary: 'chevron right' },
210
+ type: { summary: 'string' },
211
+ },
212
+ },
213
+ icon_position: {
214
+ options: ['left', 'right'],
215
+ control: { type: 'radio' },
216
+ defaultValue: 'left',
217
+ description: 'icon left or right position',
218
+ table: {
219
+ defaultValue: { summary: 'left' },
220
+ type: { summary: 'string' },
221
+ },
222
+ },
223
+ };
224
+
225
+ //Text Button - can also play with text class
226
+ export const Link = (args) => {
227
+ return (
228
+ <Container>
229
+ <a href={args.href}>{args.label}</a>
230
+ </Container>
231
+ );
232
+ };
233
+ Link.args = {
234
+ label: 'Link label',
235
+ href: '/#',
236
+ };
237
+ Link.parameters = {
238
+ hideNoControlsWarning: true,
239
+ };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+
3
+ function Callout({ children, as, bold, ...rest }) {
4
+ const As = as || 'div';
5
+ return (
6
+ <As className="eea callout" {...rest}>
7
+ {bold ? <strong>{children}</strong> : children}
8
+ </As>
9
+ );
10
+ }
11
+
12
+ export default Callout;
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { Container } from 'semantic-ui-react';
3
+ import Callout from './Callout';
4
+
5
+ const CITATION =
6
+ 'An interconnected grid will help deliver the ultimate goal of the Energy Union, to make sure affordable, secure and sustainable energy, and also growth across the EU.';
7
+
8
+ export default {
9
+ title: 'Components/Callout',
10
+ component: Callout,
11
+ argTypes: {
12
+ content: {
13
+ name: 'content',
14
+ description: 'Callout content',
15
+ type: { name: 'string', required: true },
16
+ },
17
+ as: {
18
+ name: 'as',
19
+ description: 'HTML tag to be used. Default: blockquote',
20
+ type: { name: 'string', required: false },
21
+ },
22
+ bold: {
23
+ name: 'bold',
24
+ description: 'Bolder text',
25
+ type: { summary: 'boolean' },
26
+ },
27
+ },
28
+ };
29
+
30
+ export const Default = (args) => (
31
+ <Container>
32
+ <Callout as={args.as} bold={args.bold}>
33
+ {args.content}
34
+ </Callout>
35
+ </Container>
36
+ );
37
+
38
+ Default.args = {
39
+ content: CITATION,
40
+ as: 'div',
41
+ bold: false,
42
+ };
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { Button, Icon, Segment } from 'semantic-ui-react';
2
+ import { Button, Icon, Container, Segment } from 'semantic-ui-react';
3
3
 
4
4
  export default {
5
- title: 'Components/Button',
5
+ title: 'Components/Forms/Button',
6
6
  component: Button,
7
7
  parameters: {
8
8
  actions: {
@@ -32,7 +32,11 @@ export default {
32
32
 
33
33
  //Default Button
34
34
  export const Default = (args) => {
35
- return <Button disabled={args.disabled}>{args.label}</Button>;
35
+ return (
36
+ <Container>
37
+ <Button disabled={args.disabled}>{args.label}</Button>
38
+ </Container>
39
+ );
36
40
  };
37
41
  Default.args = {
38
42
  label: 'Default Button',
@@ -46,9 +50,11 @@ Default.parameters = {
46
50
  //Primary button
47
51
  export const Primary = (args) => {
48
52
  return (
49
- <Button primary disabled={args.disabled}>
50
- {args.label}
51
- </Button>
53
+ <Container>
54
+ <Button primary disabled={args.disabled}>
55
+ {args.label}
56
+ </Button>
57
+ </Container>
52
58
  );
53
59
  };
54
60
  Primary.args = {
@@ -63,9 +69,11 @@ Primary.parameters = {
63
69
  //secondary Button
64
70
  export const Secondary = (args) => {
65
71
  return (
66
- <Button secondary disabled={args.disabled}>
67
- {args.label}
68
- </Button>
72
+ <Container>
73
+ <Button secondary disabled={args.disabled}>
74
+ {args.label}
75
+ </Button>
76
+ </Container>
69
77
  );
70
78
  };
71
79
  Secondary.args = {
@@ -80,17 +88,23 @@ Secondary.parameters = {
80
88
  //secondary Button Inverted
81
89
  export const Inverted = (args) => {
82
90
  return (
83
- <Segment inverted compact>
84
- <Button primary inverted disabled={args.disabled}>
85
- {args.button1}
86
- </Button>
87
- <Button secondary inverted disabled={args.disabled}>
88
- {args.button2}
89
- </Button>
90
- <Button inverted disabled={args.disabled}>
91
- {args.button3}
92
- </Button>
93
- </Segment>
91
+ <Container>
92
+ <Segment compact>
93
+ <Button primary inverted disabled={args.disabled}>
94
+ {args.button1}
95
+ </Button>
96
+ </Segment>
97
+ <Segment compact>
98
+ <Button secondary inverted disabled={args.disabled}>
99
+ {args.button2}
100
+ </Button>
101
+ </Segment>
102
+ <Segment inverted compact>
103
+ <Button inverted disabled={args.disabled}>
104
+ {args.button3}
105
+ </Button>
106
+ </Segment>
107
+ </Container>
94
108
  );
95
109
  };
96
110
  Inverted.args = {
@@ -107,15 +121,15 @@ Inverted.parameters = {
107
121
  //Call to action button
108
122
  export const Labeled = (args) => {
109
123
  return (
110
- <div className="eea">
124
+ <Container>
111
125
  <Button
112
126
  className={args.variant + ' icon ' + args.icon_position + ' labeled'}
113
127
  disabled={args.disabled}
114
128
  >
115
129
  {args.label}
116
- <Icon name={args.icon + args.icon_position} />
130
+ <Icon name={args.icon} />
117
131
  </Button>
118
- </div>
132
+ </Container>
119
133
  );
120
134
  };
121
135
  Labeled.args = {
@@ -171,12 +185,14 @@ Labeled.argTypes = {
171
185
  },
172
186
  };
173
187
 
174
- //Text Button - can also play with text class
188
+ //Text Button
175
189
  export const Text = (args) => {
176
190
  return (
177
- <Button as="p" disabled={args.disabled}>
178
- {args.label}
179
- </Button>
191
+ <Container>
192
+ <Button as="p" disabled={args.disabled}>
193
+ {args.label}
194
+ </Button>
195
+ </Container>
180
196
  );
181
197
  };
182
198
  Text.args = {
@@ -2,21 +2,21 @@ import React from 'react';
2
2
  import { Icon } from 'semantic-ui-react';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
- Pullquote.propTypes = {
5
+ Quote.propTypes = {
6
6
  quote: PropTypes.string,
7
7
  source: PropTypes.string,
8
8
  quotePosition: PropTypes.oneOf(['left', 'right', 'none', 'inherit']),
9
9
  };
10
10
 
11
- function Pullquote({ children, ...rest }) {
11
+ function Quote({ children, ...rest }) {
12
12
  return (
13
- <blockquote className={`eea pullquote ${rest.quotePosition}`}>
13
+ <blockquote className={`eea quote ${rest.quotePosition}`}>
14
14
  <div className="content">{children}</div>
15
15
  </blockquote>
16
16
  );
17
17
  }
18
18
 
19
- Pullquote.Quote = ({ children, as: As, ...rest }) => (
19
+ Quote.Quote = ({ children, as: As, ...rest }) => (
20
20
  <div className="quotes wrapper">
21
21
  <Icon className="ri-double-quotes-l"></Icon>
22
22
  {As ? (
@@ -30,15 +30,15 @@ Pullquote.Quote = ({ children, as: As, ...rest }) => (
30
30
  </div>
31
31
  );
32
32
 
33
- Pullquote.Author = ({ children, ...rest }) => (
34
- <p className="author" {...rest}>
33
+ Quote.Source = ({ children, ...rest }) => (
34
+ <p className="source" {...rest}>
35
35
  {children}
36
36
  </p>
37
37
  );
38
38
 
39
- Pullquote.Metadata = ({ children, ...rest }) => (
40
- <p className="meta" {...rest}>
39
+ Quote.SourceInfo = ({ children, ...rest }) => (
40
+ <p className="info" {...rest}>
41
41
  {children}
42
42
  </p>
43
43
  );
44
- export default Pullquote;
44
+ export default Quote;