@eeacms/volto-eea-design-system 0.5.1 → 0.5.2
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 +15 -0
- package/package.json +1 -1
- package/src/semantic.less +4 -0
- package/src/ui/ContentBox/ContentBox.jsx +12 -0
- package/theme/themes/eea/elements/container.overrides +5 -3
- package/theme/themes/eea/extras/contentBox.less +41 -0
- package/theme/themes/eea/extras/contentBox.variables +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,23 @@ 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.5.2](https://github.com/eea/volto-eea-design-system/compare/0.5.1...0.5.2)
|
|
8
|
+
|
|
9
|
+
- [R3] Content box [`#125`](https://github.com/eea/volto-eea-design-system/pull/125)
|
|
10
|
+
- Autobuild of docusaurus docs [`31bc68c`](https://github.com/eea/volto-eea-design-system/commit/31bc68cbfe7ba8b7fc5d02358e777f394e60c48d)
|
|
11
|
+
- feat(ContentBox): Update storybook with available themes [`93b26b2`](https://github.com/eea/volto-eea-design-system/commit/93b26b2f5f1d627aa8049df61257499e4798dd79)
|
|
12
|
+
- feat(ContentBox): Add primary, secondary, tertiary themes [`87cb2fe`](https://github.com/eea/volto-eea-design-system/commit/87cb2fe7e4cd5c2872299756f493e371abcbb05f)
|
|
13
|
+
- Cleanup [`2b128df`](https://github.com/eea/volto-eea-design-system/commit/2b128dface95b560588a343f1ddf7bbaf3efb320)
|
|
14
|
+
- perf(eol): change to lf [`78b2955`](https://github.com/eea/volto-eea-design-system/commit/78b2955ff73d9436134d1a6399040b2d7c7f5714)
|
|
15
|
+
- refactor(contentBox): restructure the component to be more flexible [`f0d2de6`](https://github.com/eea/volto-eea-design-system/commit/f0d2de67e43fafa10052871f99ac841c83cf8157)
|
|
16
|
+
- chore(contentBox) : add lint changes [`5aaf740`](https://github.com/eea/volto-eea-design-system/commit/5aaf740594f0001b1672bb6dc18d973f55c881f0)
|
|
17
|
+
- feat(contentBox) : add new Content Box component [`2ebbb47`](https://github.com/eea/volto-eea-design-system/commit/2ebbb47fe685f9809aa3572263be376d9688371e)
|
|
18
|
+
|
|
7
19
|
#### [0.5.1](https://github.com/eea/volto-eea-design-system/compare/0.5.0...0.5.1)
|
|
8
20
|
|
|
21
|
+
> 13 June 2022
|
|
22
|
+
|
|
23
|
+
- change(header): hero integration fixes [`#193`](https://github.com/eea/volto-eea-design-system/pull/193)
|
|
9
24
|
- Autobuild of docusaurus docs [`ac5df8e`](https://github.com/eea/volto-eea-design-system/commit/ac5df8edab41d37e118d34c6a4b35a64428643d0)
|
|
10
25
|
- change(hero): added styles for adding dark overlay to hero [`bf1d292`](https://github.com/eea/volto-eea-design-system/commit/bf1d292fecfa8a6b222558f0d93f48e19bf6b8ea)
|
|
11
26
|
- Autobuild of docusaurus docs [`3192671`](https://github.com/eea/volto-eea-design-system/commit/31926711a83da6b7744249fd3c801e87ae6910d5)
|
package/package.json
CHANGED
package/src/semantic.less
CHANGED
|
@@ -257,6 +257,10 @@
|
|
|
257
257
|
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/relatedContent';
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
+
& {
|
|
261
|
+
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/contentBox';
|
|
262
|
+
}
|
|
263
|
+
|
|
260
264
|
& {
|
|
261
265
|
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/downloadLabeledIcon';
|
|
262
266
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Container } from 'semantic-ui-react';
|
|
3
|
+
|
|
4
|
+
function ContentBox({ children, ...rest }) {
|
|
5
|
+
return (
|
|
6
|
+
<div className={`eea content-box ${rest.variant}`}>
|
|
7
|
+
{rest.container ? <Container>{children}</Container> : children}
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default ContentBox;
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
// add padding to containers on edit section so that we display add and delete buttons
|
|
13
|
-
.section-edit
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
.section-edit {
|
|
14
|
+
.container:not(.content-box-inner) {
|
|
15
|
+
width: auto !important;
|
|
16
|
+
padding: 0 3rem;
|
|
17
|
+
}
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
.contentWidth(@offset) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@type: 'extra';
|
|
2
|
+
@element: 'contentBox';
|
|
3
|
+
|
|
4
|
+
@import (multiple) '../../theme.config';
|
|
5
|
+
|
|
6
|
+
/*-------------------
|
|
7
|
+
CONTENT BOX
|
|
8
|
+
--------------------*/
|
|
9
|
+
|
|
10
|
+
.content-box {
|
|
11
|
+
width: @contentBoxWidth;
|
|
12
|
+
background-color: @contentBoxBackgroundColor;
|
|
13
|
+
color: @contentBoxColorInverted;
|
|
14
|
+
margin-bottom: @mediumGap;
|
|
15
|
+
|
|
16
|
+
position: relative;
|
|
17
|
+
margin-right: -50vw;
|
|
18
|
+
margin-left: -50vw;
|
|
19
|
+
right: 50%;
|
|
20
|
+
left: 50%;
|
|
21
|
+
|
|
22
|
+
.ui.container {
|
|
23
|
+
padding-top: @contentBoxContainerMarginTop;
|
|
24
|
+
padding-bottom: @contentBoxContainerMarginBottom;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.primary {
|
|
28
|
+
background-color: @contentBoxBackgroundColorPrimary;
|
|
29
|
+
color: @contentBoxColor;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.secondary {
|
|
33
|
+
background-color: @contentBoxBackgroundColorSecondary;
|
|
34
|
+
color: @contentBoxColor;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.tertiary {
|
|
38
|
+
background-color: @contentBoxBackgroundColorTertiary;
|
|
39
|
+
color: @contentBoxColor;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*******************************
|
|
2
|
+
Content Box
|
|
3
|
+
*******************************/
|
|
4
|
+
|
|
5
|
+
/* Content Box */
|
|
6
|
+
@contentBoxWidth : 100vw;
|
|
7
|
+
@contentBoxColor : @white;
|
|
8
|
+
@contentBoxBackgroundColor: @grey-1;
|
|
9
|
+
@contentBoxColorInverted : @black;
|
|
10
|
+
|
|
11
|
+
/* Themes */
|
|
12
|
+
@contentBoxBackgroundColorPrimary: @primaryColor;
|
|
13
|
+
@contentBoxBackgroundColorSecondary: @secondaryColor;
|
|
14
|
+
@contentBoxBackgroundColorTertiary: @tertiaryColor;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/* Container */
|
|
18
|
+
@contentBoxContainerMarginTop : @bigGap;
|
|
19
|
+
@contentBoxContainerMarginBottom : @bigGap;
|