@eeacms/volto-eea-design-system 1.0.0-alpha.5 → 1.0.0-alpha.7
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.
- package/CHANGELOG.md +68 -1
- package/package.json +1 -1
- package/razzle.extend.js +7 -2
- package/src/semantic.less +4 -0
- package/src/ui/Banner/Banner.stories.jsx +37 -1
- package/src/ui/Copyright/Copyright.jsx +27 -0
- package/src/ui/Copyright/Copyright.stories.jsx +40 -0
- package/src/ui/Header/Header.jsx +15 -12
- package/src/ui/Hero/Hero.jsx +20 -1
- package/src/ui/Hero/Hero.stories.jsx +70 -0
- package/src/ui/Item/ItemGroupWithIcons.stories.js +174 -61
- package/src/ui/TagList/TagList.jsx +4 -0
- package/src/ui/TagList/TagList.stories.jsx +7 -5
- package/src/ui/index.js +2 -0
- package/theme/theme.config +1 -1
- package/theme/themes/eea/definitions/elements/icon.less +1 -0
- package/theme/themes/eea/definitions/views/item.less +0 -1
- package/theme/themes/eea/elements/icon.overrides +0 -4
- package/theme/themes/eea/elements/image.overrides +4 -0
- package/theme/themes/eea/elements/image.variables +1 -0
- package/theme/themes/eea/extras/banner.less +2 -1
- package/theme/themes/eea/extras/copyright.less +29 -0
- package/theme/themes/eea/extras/copyright.variables +11 -0
- package/theme/themes/eea/extras/custom.overrides +6 -0
- package/theme/themes/eea/extras/hero.less +7 -0
- package/theme/themes/eea/extras/hero.variables +5 -1
- package/theme/themes/eea/extras/tagList.less +8 -0
- package/theme/themes/eea/extras/tagList.variables +2 -1
- package/theme/themes/eea/views/card.overrides +4 -10
- package/theme/themes/eea/views/item.overrides +67 -8
- package/theme/themes/eea/views/item.variables +13 -7
- package/website/docs/2-whatsnew.md +74 -4
- package/website/docs/webdev/3-Guidelines/3-images.md +6 -0
- package/website/docs/webdev/md_components/media_container_image_components/usage_markdown.md +2 -1
- package/website/docs/webdev/md_components/page_header_components/usage_markdown.md +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,74 @@ 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
|
+
### [1.0.0-alpha.7](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.6...1.0.0-alpha.7) - 16 December 2022
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat(item): normalized size for image or icon items #258 from eea/refactor-items [ichim-david - [`945170f`](https://github.com/eea/volto-eea-design-system/commit/945170f1503be68aa3fc1bd950a97eeebfd81037)]
|
|
12
|
+
|
|
13
|
+
#### :bug: Bug Fixes
|
|
14
|
+
|
|
15
|
+
- fix(item): removed margin set for description which pushed the text from icon [David Ichim - [`d9d4031`](https://github.com/eea/volto-eea-design-system/commit/d9d40310fcfb1bd214bd901b79dcbac41e9a8518)]
|
|
16
|
+
- fix(card): rounded after removal of has--rounded--true style class [David Ichim - [`d4727af`](https://github.com/eea/volto-eea-design-system/commit/d4727afdecf3d25e3e5bc98d472b976d60154183)]
|
|
17
|
+
- fix(project): Proper paths if volto-eea-design-system package is not installed, but in development #270 from eea/correct_paths [ichim-david - [`0f8ee8d`](https://github.com/eea/volto-eea-design-system/commit/0f8ee8d770f1b26d4315be8f615d58a61acbafc8)]
|
|
18
|
+
|
|
19
|
+
#### :nail_care: Enhancements
|
|
20
|
+
|
|
21
|
+
- change(item): added tiny size that outputs 24px icon sizes [David Ichim - [`2ea9636`](https://github.com/eea/volto-eea-design-system/commit/2ea96363a957f9033cb5bfe2d7fd311e92377493)]
|
|
22
|
+
- change(image): added preview image size default to 400px [David Ichim - [`a0aa867`](https://github.com/eea/volto-eea-design-system/commit/a0aa867e932d1b3c0bf449553726d6feb645853e)]
|
|
23
|
+
- change(item): rename large to big class [David Ichim - [`24ff127`](https://github.com/eea/volto-eea-design-system/commit/24ff1275b9a0556b85ab86757bc0c84f50357e7d)]
|
|
24
|
+
- change(item): set same height as width on item images [David Ichim - [`69cbd23`](https://github.com/eea/volto-eea-design-system/commit/69cbd23ca53dd68ae9f7c00a69ed2d8820746305)]
|
|
25
|
+
- refactor(item): update item part 2 [Antonis Tarantilis - [`9812ae2`](https://github.com/eea/volto-eea-design-system/commit/9812ae2e41ac86cfd4c56e13af8af570b752966f)]
|
|
26
|
+
- refactor(item): update spacing [Antonis Tarantilis - [`2fd91c4`](https://github.com/eea/volto-eea-design-system/commit/2fd91c4aa1a76dd2f7099d3f24f94067e95e06a1)]
|
|
27
|
+
- refactor(item): update icon variations and paddings [Antonis Tarantilis - [`6a407b3`](https://github.com/eea/volto-eea-design-system/commit/6a407b3e7f743eb7b73247bcc5d489685d567bc6)]
|
|
28
|
+
- refactor(item): update image and icon sizes [Antonis Tarantilis - [`b802573`](https://github.com/eea/volto-eea-design-system/commit/b8025735121aaa0024a5783afbde0f6be3715618)]
|
|
29
|
+
- refactor(item): initial values for new sizes & add description class [Antonis Tarantilis - [`3546296`](https://github.com/eea/volto-eea-design-system/commit/3546296f0cacb96411c8c67b98e9763e2b843b05)]
|
|
30
|
+
- refactor(item): update operator for condition controls [Antonis Tarantilis - [`149ccb2`](https://github.com/eea/volto-eea-design-system/commit/149ccb2f1e498c27e5550214cdee25eb808ab27e)]
|
|
31
|
+
- refactor(item): add icon and more size options [Antonis Tarantilis - [`1120bb6`](https://github.com/eea/volto-eea-design-system/commit/1120bb62d9ab908c5c97a4871a66e3c08c5c7ece)]
|
|
32
|
+
|
|
33
|
+
#### :hammer_and_wrench: Others
|
|
34
|
+
|
|
35
|
+
- Release 1.0.0-alpha.7 [Alin Voinea - [`7e66bcc`](https://github.com/eea/volto-eea-design-system/commit/7e66bcc296b389bc55073e7f99681534977dce3a)]
|
|
36
|
+
- added back descriptionDistance variable until package release [David Ichim - [`3af811a`](https://github.com/eea/volto-eea-design-system/commit/3af811a8d86a132e16de118697ba5a4302a8a4da)]
|
|
37
|
+
- Back to dev [Alin Voinea - [`cb531c9`](https://github.com/eea/volto-eea-design-system/commit/cb531c933c907bdbb88c9de0f1df2eb7ce899a4c)]
|
|
38
|
+
- Proper paths if the package is not installed, but in development [Tiberiu Ichim - [`7a2655f`](https://github.com/eea/volto-eea-design-system/commit/7a2655f7cf9d3c687f172eefcf2b4cff4b12f832)]
|
|
39
|
+
- Update .project.eslintrc.js [ichim-david - [`a2fd3f2`](https://github.com/eea/volto-eea-design-system/commit/a2fd3f23473325976c2b146e066eeb538d140dce)]
|
|
40
|
+
### [1.0.0-alpha.6](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.5...1.0.0-alpha.6) - 7 December 2022
|
|
41
|
+
|
|
42
|
+
#### :rocket: New Features
|
|
43
|
+
|
|
44
|
+
- feat(Header): add hideSearch prop [Miu Razvan - [`13ddfe5`](https://github.com/eea/volto-eea-design-system/commit/13ddfe59a6bd7fe2050b70ac4524a6f6c5c169ea)]
|
|
45
|
+
- feat(Docusaurus): Image copyright information #257 from eea/image-copyright-info [ichim-david - [`2119515`](https://github.com/eea/volto-eea-design-system/commit/21195153240da052acb7171f7904449ed7854cb3)]
|
|
46
|
+
- feat(copyright): create copyright component and import it in banner [Antonis Tarantilis - [`8fcde9d`](https://github.com/eea/volto-eea-design-system/commit/8fcde9df2915585e2336024436cef76642820d75)]
|
|
47
|
+
|
|
48
|
+
#### :bug: Bug Fixes
|
|
49
|
+
|
|
50
|
+
- fix(tags): content gap when using tags-content wrapper [David Ichim - [`c4eb9b8`](https://github.com/eea/volto-eea-design-system/commit/c4eb9b89d4ea09f936b7fcdc22a84105fd8639af)]
|
|
51
|
+
|
|
52
|
+
#### :nail_care: Enhancements
|
|
53
|
+
|
|
54
|
+
- change(copyright): removed copyrightVariant from Banner and Hero stories [David Ichim - [`ac62e07`](https://github.com/eea/volto-eea-design-system/commit/ac62e079d4eafb818f9cae25880a04d9e069d107)]
|
|
55
|
+
- change(copyright): now uses text color css variable with fallback to white [David Ichim - [`ee7268b`](https://github.com/eea/volto-eea-design-system/commit/ee7268ba359f079dfce45fd0fe91f75ae5c37e94)]
|
|
56
|
+
- change(copyright): removed color variant [David Ichim - [`747b8a2`](https://github.com/eea/volto-eea-design-system/commit/747b8a27155569247d4975837587e3320327fce9)]
|
|
57
|
+
- change(copyright): line height to match page header implementation [David Ichim - [`a56254e`](https://github.com/eea/volto-eea-design-system/commit/a56254e7588cfc6aca999f550084d79dca6e9a6c)]
|
|
58
|
+
- change(copyright): implementation to add classes on content sections [David Ichim - [`e10bde6`](https://github.com/eea/volto-eea-design-system/commit/e10bde674f2b1f722ec6c70734e4a72c018f4afe)]
|
|
59
|
+
- change(tagList): modified implementation to align to volto-tags-block [David Ichim - [`7a57a3d`](https://github.com/eea/volto-eea-design-system/commit/7a57a3d4bf7ede4b5ab5f3ef045d664aaaf67f2c)]
|
|
60
|
+
- refactor(hero): add copyright component to hero [Antonis Tarantilis - [`0fa88fa`](https://github.com/eea/volto-eea-design-system/commit/0fa88fad3e7b48789dc6d0462b9f78dd359b8949)]
|
|
61
|
+
- refactor(copyright): remove data section [Antonis Tarantilis - [`52cb09d`](https://github.com/eea/volto-eea-design-system/commit/52cb09dc363bb0a2e363ec86dcefb4c57e07a14d)]
|
|
62
|
+
|
|
63
|
+
#### :house: Documentation changes
|
|
64
|
+
|
|
65
|
+
- docs(copyright): copyright documentation [Dora Anastasiou - [`a90ed76`](https://github.com/eea/volto-eea-design-system/commit/a90ed766e60b5eb5b027beb36d2b1967d2c41fa3)]
|
|
66
|
+
|
|
67
|
+
#### :hammer_and_wrench: Others
|
|
68
|
+
|
|
69
|
+
- Release 1.0.0-alpha.6 [Alin Voinea - [`6ca32f0`](https://github.com/eea/volto-eea-design-system/commit/6ca32f03c1860781d3c1c4ff9558713ad8acac95)]
|
|
70
|
+
- feature(copyright): image information #250 from eea/feature-copyright [ichim-david - [`a8618c7`](https://github.com/eea/volto-eea-design-system/commit/a8618c7f0230a19b6c973aa2c9646463de9eeffb)]
|
|
71
|
+
- lint fix by introducing local variable tagsGap [David Ichim - [`7b6c0ae`](https://github.com/eea/volto-eea-design-system/commit/7b6c0ae2ebfed06221700faf9a0d0c2bdeb60d99)]
|
|
72
|
+
- grammar fixes [ichim-david - [`cb2a5a5`](https://github.com/eea/volto-eea-design-system/commit/cb2a5a5fd9dfc01eccc179721b06988742f5b2e2)]
|
|
73
|
+
- Update usage_markdown.md [ichim-david - [`f76d4a2`](https://github.com/eea/volto-eea-design-system/commit/f76d4a242f795451d64ef2d192d0006a0ed5eac1)]
|
|
74
|
+
- Update 3-images.md [ichim-david - [`1b0ef03`](https://github.com/eea/volto-eea-design-system/commit/1b0ef033f9c8a36aaa739f268263f24a6d0fb473)]
|
|
7
75
|
### [1.0.0-alpha.5](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.4...1.0.0-alpha.5) - 29 November 2022
|
|
8
76
|
|
|
9
77
|
#### :rocket: New Features
|
|
@@ -51,7 +119,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
51
119
|
|
|
52
120
|
#### :hammer_and_wrench: Others
|
|
53
121
|
|
|
54
|
-
- Release 1.0.0-alpha.5 [Alin Voinea - [`dcd60c9`](https://github.com/eea/volto-eea-design-system/commit/dcd60c9285caf60b23ed97a9ca5daed0a943bc24)]
|
|
55
122
|
- feature(Docusaurus): Updates on color palette information including thematic websites #231 from eea/refactor-docusaurus [ichim-david - [`ec7843d`](https://github.com/eea/volto-eea-design-system/commit/ec7843dea07f626dc1c71ae1baa8bb5b0caa52f3)]
|
|
56
123
|
- Back to dev [Alin Voinea - [`563fbc5`](https://github.com/eea/volto-eea-design-system/commit/563fbc5fac0d4b0295690d0a3a4e04271753f18a)]
|
|
57
124
|
- perf(docusaurus): added remixicon and roboto locally [Giorgos Stamatis - [`b67b1a7`](https://github.com/eea/volto-eea-design-system/commit/b67b1a72bc9cdc7c62a25967e81b430f8b62d558)]
|
package/package.json
CHANGED
package/razzle.extend.js
CHANGED
|
@@ -7,8 +7,13 @@ const modify = (config, { target, dev }, webpack) => {
|
|
|
7
7
|
config.resolve.alias['../../theme.config$'] = themeConfigPath;
|
|
8
8
|
config.resolve.alias['../../theme.config'] = themeConfigPath;
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const designSystem = '@eeacms/volto-eea-design-system';
|
|
11
|
+
const designSystemPath =
|
|
12
|
+
config.resolve.alias[designSystem] ||
|
|
13
|
+
path.dirname(require.resolve(designSystem));
|
|
14
|
+
const themeLessPath = path.resolve(`${designSystemPath}/../theme`);
|
|
15
|
+
|
|
16
|
+
const themesPath = `${themeLessPath}/themes`;
|
|
12
17
|
|
|
13
18
|
config.resolve.alias['eea-volto-themes'] = themesPath;
|
|
14
19
|
config.resolve.alias['ui-theme'] = `${themesPath}/eea/`;
|
package/src/semantic.less
CHANGED
|
@@ -2,7 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import Banner from './Banner';
|
|
3
3
|
// eslint-disable-next-line import/no-unresolved
|
|
4
4
|
import imgUrl from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/banner.png';
|
|
5
|
-
import { Popup } from 'semantic-ui-react';
|
|
5
|
+
import { Popup, Icon } from 'semantic-ui-react';
|
|
6
|
+
import Copyright from '../Copyright/Copyright';
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
title: 'Components/Page Header',
|
|
@@ -43,6 +44,32 @@ export default {
|
|
|
43
44
|
type: { summary: 'boolean' },
|
|
44
45
|
},
|
|
45
46
|
},
|
|
47
|
+
copyrightPosition: {
|
|
48
|
+
name: 'Position',
|
|
49
|
+
control: {
|
|
50
|
+
type: 'inline-radio',
|
|
51
|
+
options: ['left', 'right'],
|
|
52
|
+
},
|
|
53
|
+
type: { name: 'string' },
|
|
54
|
+
table: {
|
|
55
|
+
category: 'Copyright',
|
|
56
|
+
defaultValue: { summary: '"left"' },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
copyrightIcon: {
|
|
60
|
+
table: {
|
|
61
|
+
category: 'Copyright',
|
|
62
|
+
defaultValue: { summary: '""' },
|
|
63
|
+
type: { summary: 'string' },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
copyrightText: {
|
|
67
|
+
table: {
|
|
68
|
+
category: 'Copyright',
|
|
69
|
+
defaultValue: { summary: '""' },
|
|
70
|
+
type: { summary: 'string' },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
46
73
|
},
|
|
47
74
|
};
|
|
48
75
|
|
|
@@ -100,6 +127,12 @@ const Template = (args) => (
|
|
|
100
127
|
</>
|
|
101
128
|
</Banner.Metadata>
|
|
102
129
|
)}
|
|
130
|
+
<Copyright copyrightPosition={args.copyrightPosition}>
|
|
131
|
+
<Copyright.Icon>
|
|
132
|
+
<Icon className={args.copyrightIcon} />
|
|
133
|
+
</Copyright.Icon>
|
|
134
|
+
<Copyright.Text>{args.copyrightText}</Copyright.Text>
|
|
135
|
+
</Copyright>
|
|
103
136
|
</Banner.Content>
|
|
104
137
|
</Banner>
|
|
105
138
|
);
|
|
@@ -117,4 +150,7 @@ Default.args = {
|
|
|
117
150
|
image: true,
|
|
118
151
|
hideShareButton: false,
|
|
119
152
|
hideDownloadButton: false,
|
|
153
|
+
copyrightPosition: 'left',
|
|
154
|
+
copyrightIcon: 'ri-copyright-line',
|
|
155
|
+
copyrightText: 'Image copyright: Velit fusce sed sem ut.',
|
|
120
156
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
Copyright.propTypes = {
|
|
5
|
+
copyrightPosition: PropTypes.oneOf(['left', 'right']),
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
function Copyright({ children, ...rest }) {
|
|
9
|
+
return (
|
|
10
|
+
<div className={`eea copyright ${rest.copyrightPosition}`}>
|
|
11
|
+
<div className={'wrapper'}>{children}</div>
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
Copyright.Icon = ({ children, ...rest }) => (
|
|
17
|
+
<span {...rest} className={'icon-wrapper'}>
|
|
18
|
+
{children}
|
|
19
|
+
</span>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
Copyright.Text = ({ children, ...rest }) => (
|
|
23
|
+
<span {...rest} className={'icon-content'}>
|
|
24
|
+
{children}
|
|
25
|
+
</span>
|
|
26
|
+
);
|
|
27
|
+
export default Copyright;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Copyright from './Copyright';
|
|
3
|
+
import { Container, Icon, Segment } from 'semantic-ui-react';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Copyright',
|
|
7
|
+
component: Copyright,
|
|
8
|
+
argTypes: {
|
|
9
|
+
copyrightPosition: {
|
|
10
|
+
name: 'Position',
|
|
11
|
+
control: {
|
|
12
|
+
type: 'inline-radio',
|
|
13
|
+
options: ['left', 'right'],
|
|
14
|
+
},
|
|
15
|
+
type: { name: 'string' },
|
|
16
|
+
table: {
|
|
17
|
+
defaultValue: { summary: '"left"' },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const Default = (args) => (
|
|
24
|
+
<Container>
|
|
25
|
+
<Segment className={'inverted'}>
|
|
26
|
+
<Copyright copyrightPosition={args.copyrightPosition}>
|
|
27
|
+
<Copyright.Icon>
|
|
28
|
+
<Icon className={args.icon} />
|
|
29
|
+
</Copyright.Icon>
|
|
30
|
+
<Copyright.Text>{args.text}</Copyright.Text>
|
|
31
|
+
</Copyright>
|
|
32
|
+
</Segment>
|
|
33
|
+
</Container>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
Default.args = {
|
|
37
|
+
copyrightPosition: 'left',
|
|
38
|
+
icon: 'ri-copyright-line',
|
|
39
|
+
text: 'Image copyright: Velit fusce sed sem ut.',
|
|
40
|
+
};
|
package/src/ui/Header/Header.jsx
CHANGED
|
@@ -107,6 +107,7 @@ const Main = ({
|
|
|
107
107
|
pathname,
|
|
108
108
|
transparency,
|
|
109
109
|
inverted,
|
|
110
|
+
hideSearch,
|
|
110
111
|
}) => {
|
|
111
112
|
const history = useHistory();
|
|
112
113
|
const [activeItem, setActiveItem] = React.useState(pathname);
|
|
@@ -231,18 +232,20 @@ const Main = ({
|
|
|
231
232
|
))}
|
|
232
233
|
</div>
|
|
233
234
|
)}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
235
|
+
{!hideSearch && (
|
|
236
|
+
<div
|
|
237
|
+
className="search-action"
|
|
238
|
+
onClick={searchOnClick}
|
|
239
|
+
role="none"
|
|
240
|
+
ref={searchButtonRef}
|
|
241
|
+
>
|
|
242
|
+
{/* <Icon name={!state.activeSearch ? 'search' : 'close'} /> */}
|
|
243
|
+
<Image
|
|
244
|
+
src={!searchIsActive ? `${searchIcon}` : `${closeIcon}`}
|
|
245
|
+
alt="search button open/close"
|
|
246
|
+
/>
|
|
247
|
+
</div>
|
|
248
|
+
)}
|
|
246
249
|
<Header.BurgerAction
|
|
247
250
|
className={`mobile ${burger}`}
|
|
248
251
|
onClick={mobileBurgerOnClick}
|
package/src/ui/Hero/Hero.jsx
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
|
+
import { Icon } from 'semantic-ui-react';
|
|
5
|
+
import Copyright from '../Copyright/Copyright';
|
|
6
|
+
|
|
4
7
|
Hero.propTypes = {
|
|
5
8
|
image: PropTypes.bool,
|
|
6
9
|
fullWidth: PropTypes.bool,
|
|
@@ -21,6 +24,11 @@ function Hero({
|
|
|
21
24
|
alignContent,
|
|
22
25
|
backgroundVariant,
|
|
23
26
|
children,
|
|
27
|
+
|
|
28
|
+
has_copyright,
|
|
29
|
+
copyrightPosition,
|
|
30
|
+
copyrightIcon,
|
|
31
|
+
copyrightText,
|
|
24
32
|
}) {
|
|
25
33
|
return (
|
|
26
34
|
// full width prop
|
|
@@ -36,7 +44,18 @@ function Hero({
|
|
|
36
44
|
<div
|
|
37
45
|
className={`hero-block-inner-wrapper d-flex ui container flex-items-${alignContent}`}
|
|
38
46
|
>
|
|
39
|
-
<div className="hero-block-body">
|
|
47
|
+
<div className="hero-block-body">
|
|
48
|
+
{children}
|
|
49
|
+
|
|
50
|
+
{has_copyright && (
|
|
51
|
+
<Copyright copyrightPosition={copyrightPosition}>
|
|
52
|
+
<Copyright.Icon>
|
|
53
|
+
<Icon className={copyrightIcon} />
|
|
54
|
+
</Copyright.Icon>
|
|
55
|
+
<Copyright.Text>{copyrightText}</Copyright.Text>
|
|
56
|
+
</Copyright>
|
|
57
|
+
)}
|
|
58
|
+
</div>
|
|
40
59
|
</div>
|
|
41
60
|
</div>
|
|
42
61
|
</div>
|
|
@@ -54,6 +54,40 @@ export default {
|
|
|
54
54
|
type: { summary: 'boolean' },
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
|
+
has_copyright: {
|
|
58
|
+
name: 'Copyright',
|
|
59
|
+
table: {
|
|
60
|
+
category: 'Copyright',
|
|
61
|
+
defaultValue: { summary: '' },
|
|
62
|
+
type: { summary: 'boolean' },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
copyrightPosition: {
|
|
66
|
+
name: 'Position',
|
|
67
|
+
control: {
|
|
68
|
+
type: 'inline-radio',
|
|
69
|
+
options: ['left', 'right'],
|
|
70
|
+
},
|
|
71
|
+
type: { name: 'string' },
|
|
72
|
+
table: {
|
|
73
|
+
category: 'Copyright',
|
|
74
|
+
defaultValue: { summary: '"left"' },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
copyrightIcon: {
|
|
78
|
+
table: {
|
|
79
|
+
category: 'Copyright',
|
|
80
|
+
defaultValue: { summary: '""' },
|
|
81
|
+
type: { summary: 'string' },
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
copyrightText: {
|
|
85
|
+
table: {
|
|
86
|
+
category: 'Copyright',
|
|
87
|
+
defaultValue: { summary: '""' },
|
|
88
|
+
type: { summary: 'string' },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
57
91
|
},
|
|
58
92
|
};
|
|
59
93
|
|
|
@@ -93,6 +127,11 @@ Default.args = {
|
|
|
93
127
|
inverted: true,
|
|
94
128
|
alignContent: 'center',
|
|
95
129
|
backgroundVariant: 'grey',
|
|
130
|
+
|
|
131
|
+
has_copyright: true,
|
|
132
|
+
copyrightPosition: 'left',
|
|
133
|
+
copyrightIcon: 'ri-copyright-line',
|
|
134
|
+
copyrightText: 'Image copyright: Velit fusce sed sem ut.',
|
|
96
135
|
};
|
|
97
136
|
Default.parameters = {
|
|
98
137
|
controls: {
|
|
@@ -125,6 +164,11 @@ Playground.args = {
|
|
|
125
164
|
inverted: true,
|
|
126
165
|
alignContent: 'center',
|
|
127
166
|
backgroundVariant: 'tertiary',
|
|
167
|
+
|
|
168
|
+
has_copyright: true,
|
|
169
|
+
copyrightPosition: 'left',
|
|
170
|
+
copyrightIcon: 'ri-copyright-line',
|
|
171
|
+
copyrightText: 'Image copyright: Velit fusce sed sem ut.',
|
|
128
172
|
};
|
|
129
173
|
Playground.argTypes = {
|
|
130
174
|
fullWidth: {
|
|
@@ -202,4 +246,30 @@ Playground.argTypes = {
|
|
|
202
246
|
type: { summary: 'string' },
|
|
203
247
|
},
|
|
204
248
|
},
|
|
249
|
+
copyrightPosition: {
|
|
250
|
+
name: 'Position',
|
|
251
|
+
control: {
|
|
252
|
+
type: 'inline-radio',
|
|
253
|
+
options: ['left', 'right'],
|
|
254
|
+
},
|
|
255
|
+
type: { name: 'string' },
|
|
256
|
+
table: {
|
|
257
|
+
category: 'Copyright',
|
|
258
|
+
defaultValue: { summary: '"left"' },
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
copyrightIcon: {
|
|
262
|
+
table: {
|
|
263
|
+
category: 'Copyright',
|
|
264
|
+
defaultValue: { summary: '""' },
|
|
265
|
+
type: { summary: 'string' },
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
copyrightText: {
|
|
269
|
+
table: {
|
|
270
|
+
category: 'Copyright',
|
|
271
|
+
defaultValue: { summary: '""' },
|
|
272
|
+
type: { summary: 'string' },
|
|
273
|
+
},
|
|
274
|
+
},
|
|
205
275
|
};
|