@eeacms/volto-eea-design-system 0.6.0 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -4,8 +4,25 @@ 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.6.1](https://github.com/eea/volto-eea-design-system/compare/0.6.0...0.6.1)
8
+
9
+ - Autobuild of docusaurus docs [`aa070d4`](https://github.com/eea/volto-eea-design-system/commit/aa070d4397a7369cc439d78b6355a9e6f0c5c3ff)
10
+ - feat(headers): added underlined titles with theming support [`af67561`](https://github.com/eea/volto-eea-design-system/commit/af675616f9e002458501cf8b90742514153a298f)
11
+ - refactor(heading): move underline story and update controls [`2c9bfd2`](https://github.com/eea/volto-eea-design-system/commit/2c9bfd279eafc44435d223be326f9496856c2154)
12
+ - chore(countup): package for statistics [`26fcd09`](https://github.com/eea/volto-eea-design-system/commit/26fcd09bbd8d44119d5ca957542863be8c64836b)
13
+ - refactor(underlinedTitle): Restore text variation dropdown control [`bd8c611`](https://github.com/eea/volto-eea-design-system/commit/bd8c61129d2c80475af8d0e9310412d5c3a82169)
14
+ - refactor(underlineTitle): add content box for different variations [`0878915`](https://github.com/eea/volto-eea-design-system/commit/087891535059d6c2d7d2c2accded20f6ba601bb5)
15
+ - refactor(underlinedTitle): add control for changing heading size [`211f515`](https://github.com/eea/volto-eea-design-system/commit/211f5158bff2b437aac60f26ba63f9adb6be540a)
16
+ - refactor(utilities): add color variation for headings and text [`7e3a779`](https://github.com/eea/volto-eea-design-system/commit/7e3a779ec4fa3b712fcd32124f6f83ab784d2223)
17
+ - refactor(utilities): update border bottom utility and restore line height for headings [`7fe4a7b`](https://github.com/eea/volto-eea-design-system/commit/7fe4a7b9fee579d213fe3945a4e548ff089784bd)
18
+ - refactor(headings): update the line height of headers according to docusaurus instructions [`9da19b3`](https://github.com/eea/volto-eea-design-system/commit/9da19b3e1ea1fd93431e00edf3dc9a443e94f27a)
19
+ - feat(UnderlinedTitle): create story and necessary utilities [`8beb56b`](https://github.com/eea/volto-eea-design-system/commit/8beb56b64ca76fb9f0f6df0f3554e64449a64868)
20
+
7
21
  #### [0.6.0](https://github.com/eea/volto-eea-design-system/compare/0.5.5...0.6.0)
8
22
 
23
+ > 1 July 2022
24
+
25
+ - Pagination, Item refactoring, docusaurus updates, fixes from custom [`#205`](https://github.com/eea/volto-eea-design-system/pull/205)
9
26
  - [Tokens] Letter spacing update [`#189`](https://github.com/eea/volto-eea-design-system/pull/189)
10
27
  - Refactor docusaurus [`#180`](https://github.com/eea/volto-eea-design-system/pull/180)
11
28
  - [R2] Pagination [`#162`](https://github.com/eea/volto-eea-design-system/pull/162)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
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",
@@ -22,7 +22,8 @@
22
22
  "dependencies": {
23
23
  "@eeacms/volto-corsproxy": "*",
24
24
  "remixicon": "2.5.0",
25
- "react-slick": "^0.28.1"
25
+ "react-slick": "^0.28.1",
26
+ "react-countup": "^6.3.0"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@cypress/code-coverage": "^3.9.5",
@@ -0,0 +1,98 @@
1
+ import React from 'react';
2
+ import { Header, Divider, Container } from 'semantic-ui-react';
3
+ import ContentBox from '../ContentBox/ContentBox';
4
+
5
+ export default {
6
+ title: 'Components/Heading/Underlined',
7
+ component: Divider,
8
+ argTypes: {
9
+ tag: {
10
+ name: 'Tag',
11
+ defaultValue: 'h2',
12
+ options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
13
+ control: { type: 'select' },
14
+ description: 'Heading HTML tag',
15
+ table: {
16
+ defaultValue: { summary: 'h2' },
17
+ type: { summary: 'string' },
18
+ },
19
+ },
20
+ title: {
21
+ description: 'Title text',
22
+ table: {
23
+ defaultValue: {
24
+ summary: '',
25
+ },
26
+ type: {
27
+ summary: 'string',
28
+ },
29
+ },
30
+ },
31
+ bordered: {
32
+ description: 'Bottom border for title',
33
+ table: {
34
+ defaultValue: { summary: 'true' },
35
+ type: { summary: 'boolean' },
36
+ },
37
+ },
38
+ variation: {
39
+ name: 'Heading variation',
40
+ defaultValue: 'tertiary',
41
+ options: ['primary', 'secondary', 'tertiary'],
42
+ control: { type: 'select' },
43
+ description: 'Text color variation',
44
+ table: {
45
+ defaultValue: { summary: 'tertiary' },
46
+ type: { summary: 'string' },
47
+ },
48
+ },
49
+ variant: {
50
+ name: 'Background variation',
51
+ defaultValue: 'default',
52
+ options: ['default', 'primary', 'secondary', 'tertiary'],
53
+ control: { type: 'select' },
54
+ description: 'Color variation',
55
+ table: {
56
+ defaultValue: { summary: 'default' },
57
+ type: { summary: 'string' },
58
+ },
59
+ },
60
+ },
61
+ };
62
+
63
+ export const Default = (args) => {
64
+ return (
65
+ <ContentBox variant={args.variant}>
66
+ <Container className="content-box-inner">
67
+ <Header
68
+ as={args.tag}
69
+ className={`${args.variation} ${args.bordered ? 'bordered' : ''}`}
70
+ >
71
+ {args.title}
72
+ </Header>
73
+ <p>
74
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
75
+ commodo ligula eget dolor. Aenean massa strong. Cum sociis natoque
76
+ penatibus et magnis dis parturient montes, nascetur ridiculus mus.
77
+ Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
78
+ Nulla consequat massa quis enim. Donec pede justo, fringilla vel,
79
+ aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut,
80
+ imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede link
81
+ mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum
82
+ semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula,
83
+ porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante,
84
+ dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla
85
+ ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam
86
+ ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi.
87
+ </p>
88
+ </Container>
89
+ </ContentBox>
90
+ );
91
+ };
92
+ Default.args = {
93
+ tag: 'h2',
94
+ title: 'At a glance',
95
+ bordered: true,
96
+ variation: 'tertiary',
97
+ variant: 'default',
98
+ };
@@ -33,16 +33,25 @@
33
33
  &.primary {
34
34
  background-color: @contentBoxBackgroundColorPrimary;
35
35
  color: @contentBoxColor;
36
+ .header {
37
+ color: @contentBoxColor !important;
38
+ }
36
39
  }
37
40
 
38
41
  &.secondary {
39
42
  background-color: @contentBoxBackgroundColorSecondary;
40
43
  color: @contentBoxColor;
44
+ .header {
45
+ color: @contentBoxColor !important;
46
+ }
41
47
  }
42
48
 
43
49
  &.tertiary {
44
50
  background-color: @contentBoxBackgroundColorTertiary;
45
51
  color: @contentBoxColor;
52
+ .header {
53
+ color: @contentBoxColor !important;
54
+ }
46
55
  }
47
56
  }
48
57
 
@@ -24,7 +24,7 @@
24
24
  @googleFontRequest : '@{googleFontName}:@{googleFontSizes}&subset=@{googleSubset}';
25
25
 
26
26
 
27
- @bold : 600;
27
+ @bold : @font-weight-7;
28
28
  @normal : normal;
29
29
 
30
30
  /*-------------------
@@ -70,7 +70,7 @@
70
70
  ---------------*/
71
71
 
72
72
  @headerLineHeight : 1.25;
73
- @headerFontWeight : 700;
73
+ @headerFontWeight : @font-weight-7;
74
74
 
75
75
  @h1 : unit((48 / @fontSize), rem);
76
76
  @h2 : unit((40 / @fontSize), rem);
@@ -176,8 +176,8 @@
176
176
  @pageBackground : @white;
177
177
  @pageOverflowX : hidden;
178
178
 
179
- @lineHeight : 1.5;
180
- @mobileLineHeight : 1.5;
179
+ @lineHeight : @font-lineheight-3;
180
+ @mobileLineHeight : @font-lineheight-3;
181
181
  @textColor : rgba(0, 0, 0, 1);
182
182
 
183
183
  /*-------------------
@@ -1,4 +1,11 @@
1
- // Color utilities
1
+ // Color
2
+ h1, h2, h3, h4, h5, h6, p, span, .header {
3
+ &.primary { color: @primaryColor !important; }
4
+ &.secondary { color: @secondaryColor !important; }
5
+ &.tertiary { color: @tertiaryColor !important; }
6
+ &.white { color: @white !important; }
7
+ }
8
+
2
9
  .color-fg-primary { color: @primaryColor !important; }
3
10
  .color-fg-secondary { color: @secondaryColor !important; }
4
11
  .color-fg-tertiary { color: @tertiaryColor !important; }
@@ -20,18 +27,18 @@
20
27
  z-index: 0;
21
28
  }
22
29
 
23
- // Display utilities
30
+ // Flexbox
24
31
  .d-flex { display: flex !important; }
25
32
  .flex-items-start { align-items: flex-start !important; }
26
33
  .flex-items-end { align-items: flex-end !important; }
27
34
  .flex-items-center { align-items: center !important; }
28
35
 
29
- // Align text utilities
36
+ // Align text
30
37
  .text-left { text-align: left !important; }
31
38
  .text-center { text-align: center !important;}
32
39
  .text-right { text-align: right !important; }
33
40
 
34
- //Quotes utilities
41
+ // Quotes
35
42
  .quoted::before {
36
43
  content: "\ec51";
37
44
  font-family: 'remixicon' !important;
@@ -40,3 +47,9 @@
40
47
  content: "\ec52";
41
48
  font-family: 'remixicon' !important;
42
49
  }
50
+
51
+ // Borders
52
+ .bordered {
53
+ border-bottom: @border-size-1 solid !important;
54
+ padding-bottom: @rem-space-2 !important;
55
+ }