@eeacms/volto-eea-design-system 1.0.3 → 1.0.5

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,6 +4,30 @@ 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.5](https://github.com/eea/volto-eea-design-system/compare/1.0.4...1.0.5) - 28 March 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: improve full-width class [Miu Razvan - [`70bba7e`](https://github.com/eea/volto-eea-design-system/commit/70bba7e295dd237e7c579ef0446ff05e0c8529d8)]
12
+
13
+ #### :bug: Bug Fixes
14
+
15
+ - fix(banner): Add missing divider for time tag #327 from eea/banner-metadata [ichim-david - [`c46a583`](https://github.com/eea/volto-eea-design-system/commit/c46a58336ec9eb2ce75d2637f3197f417e8ca326)]
16
+ - fix(banner): Add missing divider for time tag [kreafox - [`7d68c39`](https://github.com/eea/volto-eea-design-system/commit/7d68c395d368a267baef4422df6e72f63d099b75)]
17
+
18
+ ### [1.0.4](https://github.com/eea/volto-eea-design-system/compare/1.0.3...1.0.4) - 27 March 2023
19
+
20
+ #### :rocket: New Features
21
+
22
+ - feat(copyright): Add copyright prefix - Image - refs #250724 [Alin Voinea - [`6a72772`](https://github.com/eea/volto-eea-design-system/commit/6a727723c15aee499ed7cedc9f364c5e2c8014bb)]
23
+
24
+ #### :house: Internal changes
25
+
26
+ - style(copyright): Cleanup useless min-height - refs #250724 [Alin Voinea - [`f2457df`](https://github.com/eea/volto-eea-design-system/commit/f2457df6376ac1a4d00f87eee90e61f66f7ffebb)]
27
+
28
+ #### :hammer_and_wrench: Others
29
+
30
+ - Back to dev [Alin Voinea - [`cfd6eba`](https://github.com/eea/volto-eea-design-system/commit/cfd6eba8b01eceff4e28ab7ab51b2457672ac172)]
7
31
  ### [1.0.3](https://github.com/eea/volto-eea-design-system/compare/1.0.2...1.0.3) - 24 March 2023
8
32
 
9
33
  #### :bug: Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
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",
@@ -52,6 +52,13 @@ export default {
52
52
  type: { summary: 'string' },
53
53
  },
54
54
  },
55
+ copyrightPrefix: {
56
+ table: {
57
+ category: 'Copyright',
58
+ defaultValue: { summary: '' },
59
+ type: { summary: 'string' },
60
+ },
61
+ },
55
62
  copyrightIcon: {
56
63
  table: {
57
64
  category: 'Copyright',
@@ -60,7 +67,6 @@ export default {
60
67
  },
61
68
  },
62
69
  copyrightPosition: {
63
- name: 'Position',
64
70
  control: {
65
71
  type: 'inline-radio',
66
72
  options: ['left', 'right'],
@@ -141,6 +147,7 @@ const Template = (args) => {
141
147
  </Banner.Metadata>
142
148
  )}
143
149
  <Copyright copyrightPosition={args.copyrightPosition}>
150
+ <Copyright.Prefix>{args.copyrightPrefix}</Copyright.Prefix>
144
151
  <Copyright.Icon>
145
152
  <Icon className={args.copyrightIcon} />
146
153
  </Copyright.Icon>
@@ -164,7 +171,8 @@ Default.args = {
164
171
  image: true,
165
172
  hideShareButton: false,
166
173
  hideDownloadButton: false,
174
+ copyrightPrefix: 'Image',
167
175
  copyrightPosition: 'left',
168
176
  copyrightIcon: 'ri-copyright-line',
169
- copyright: 'Image copyright: Velit fusce sed sem ut.',
177
+ copyright: 'John Smith, Well with Nature /EEA',
170
178
  };
@@ -13,6 +13,15 @@ function Copyright({ children, ...rest }) {
13
13
  );
14
14
  }
15
15
 
16
+ Copyright.Prefix = ({ children, ...rest }) =>
17
+ children ? (
18
+ <span {...rest} className={'icon-prefix'}>
19
+ {children}
20
+ </span>
21
+ ) : (
22
+ ''
23
+ );
24
+
16
25
  Copyright.Icon = ({ children, ...rest }) => (
17
26
  <span {...rest} className={'icon-wrapper'}>
18
27
  {children}
@@ -7,7 +7,6 @@ export default {
7
7
  component: Copyright,
8
8
  argTypes: {
9
9
  copyrightPosition: {
10
- name: 'Position',
11
10
  control: {
12
11
  type: 'inline-radio',
13
12
  options: ['left', 'right'],
@@ -24,10 +23,11 @@ export const Default = (args) => (
24
23
  <Container>
25
24
  <Segment className={'inverted'}>
26
25
  <Copyright copyrightPosition={args.copyrightPosition}>
26
+ <Copyright.Prefix>{args.copyrightPrefix}</Copyright.Prefix>
27
27
  <Copyright.Icon>
28
- <Icon className={args.icon} />
28
+ <Icon className={args.copyrightIcon} />
29
29
  </Copyright.Icon>
30
- <Copyright.Text>{args.text}</Copyright.Text>
30
+ <Copyright.Text>{args.copyright}</Copyright.Text>
31
31
  </Copyright>
32
32
  </Segment>
33
33
  </Container>
@@ -35,6 +35,7 @@ export const Default = (args) => (
35
35
 
36
36
  Default.args = {
37
37
  copyrightPosition: 'left',
38
- icon: 'ri-copyright-line',
39
- text: 'Image copyright: Velit fusce sed sem ut.',
38
+ copyrightPrefix: 'Image',
39
+ copyrightIcon: 'ri-copyright-line',
40
+ copyright: 'John Smith, Well with Nature /EEA',
40
41
  };
@@ -24,9 +24,9 @@ function Hero({
24
24
  alignContent,
25
25
  backgroundVariant,
26
26
  children,
27
-
28
27
  has_copyright,
29
28
  copyright,
29
+ copyrightPrefix,
30
30
  copyrightIcon,
31
31
  copyrightPosition,
32
32
  }) {
@@ -49,6 +49,7 @@ function Hero({
49
49
 
50
50
  {has_copyright && (
51
51
  <Copyright copyrightPosition={copyrightPosition}>
52
+ <Copyright.Prefix>{copyrightPrefix}</Copyright.Prefix>
52
53
  <Copyright.Icon>
53
54
  <Icon className={copyrightIcon} />
54
55
  </Copyright.Icon>
@@ -63,7 +63,6 @@ export default {
63
63
  },
64
64
  },
65
65
  copyrightPosition: {
66
- name: 'Position',
67
66
  control: {
68
67
  type: 'inline-radio',
69
68
  options: ['left', 'right'],
@@ -74,6 +73,13 @@ export default {
74
73
  defaultValue: { summary: '"left"' },
75
74
  },
76
75
  },
76
+ copyrightPrefix: {
77
+ table: {
78
+ category: 'Copyright',
79
+ defaultValue: { summary: '""' },
80
+ type: { summary: 'string' },
81
+ },
82
+ },
77
83
  copyrightIcon: {
78
84
  table: {
79
85
  category: 'Copyright',
@@ -130,8 +136,9 @@ Default.args = {
130
136
 
131
137
  has_copyright: true,
132
138
  copyrightPosition: 'left',
139
+ copyrightPrefix: 'Image',
133
140
  copyrightIcon: 'ri-copyright-line',
134
- copyright: 'Image copyright: Velit fusce sed sem ut.',
141
+ copyright: 'John Smith, Well with Nature /EEA',
135
142
  };
136
143
  Default.parameters = {
137
144
  controls: {
@@ -167,8 +174,9 @@ Playground.args = {
167
174
 
168
175
  has_copyright: true,
169
176
  copyrightPosition: 'left',
177
+ copyrightPrefix: 'Image',
170
178
  copyrightIcon: 'ri-copyright-line',
171
- copyright: 'Image copyright: Velit fusce sed sem ut.',
179
+ copyright: 'John Smith, Well with Nature /EEA',
172
180
  };
173
181
  Playground.argTypes = {
174
182
  fullWidth: {
@@ -253,6 +261,13 @@ Playground.argTypes = {
253
261
  type: { summary: 'string' },
254
262
  },
255
263
  },
264
+ copyrightPrefix: {
265
+ table: {
266
+ category: 'Copyright',
267
+ defaultValue: { summary: '""' },
268
+ type: { summary: 'string' },
269
+ },
270
+ },
256
271
  copyrightIcon: {
257
272
  table: {
258
273
  category: 'Copyright',
@@ -135,4 +135,5 @@
135
135
  @import (optional) "@{siteFolder}/@{addon}/@{addontype}s/@{addonelement}.overrides";
136
136
  }
137
137
 
138
+
138
139
  /* End Config */
@@ -2,6 +2,35 @@
2
2
  Theme Overrides
3
3
  *******************************/
4
4
 
5
+ body {
6
+ .contentWidth(0);
7
+ --toolbar-width: 0px;
8
+ --sidebar-width: 0px;
9
+
10
+ &.has-toolbar {
11
+ --toolbar-width: @toolbarWidth;
12
+ }
13
+
14
+ &.has-toolbar-collapsed {
15
+ --toolbar-width: @collapsedWidth;
16
+ }
17
+
18
+ &.has-sidebar {
19
+ --sidebar-width: @sidebarWidth;
20
+ }
21
+
22
+ &.has-sidebar-collapsed {
23
+ --sidebar-width: @collapsedWidth;
24
+ }
25
+
26
+ @media screen and (max-width: calc(@tabletBreakpoint - 1px)) {
27
+ &.has-toolbar,
28
+ &.has-toolbar-collapsed {
29
+ --toolbar-width: 0px;
30
+ }
31
+ }
32
+ }
33
+
5
34
  /* All Sizes */
6
35
  .ui.container {
7
36
  transition: width 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045),
@@ -88,10 +117,6 @@
88
117
  }
89
118
  }
90
119
 
91
- body {
92
- .contentWidth(0);
93
- }
94
-
95
120
  // WIP container fixes for edit interface
96
121
  @media only screen and (max-width: 1600px) {
97
122
  .has-sidebar.section-add .container,
@@ -116,33 +141,16 @@ body {
116
141
 
117
142
  .has--size--full:not(.block-editor-columnsBlock),
118
143
  .full-width {
144
+ @toolbarWidthCSS: var(--toolbar-width, 0px);
145
+ @sidebarWidthCSS: var(--sidebar-width, 0px);
146
+ @scrollbarWidthCSS: var(--scrollbar-width, @scrollbarWidth);
119
147
  position: relative;
120
- width: calc(100vw - var(--scrollbar-width, @scrollbarWidth)) !important;
148
+ width: calc(100vw - @toolbarWidthCSS - @sidebarWidthCSS - @scrollbarWidthCSS) !important;
121
149
  right: 50%;
122
150
  left: 50%;
123
151
  max-width: initial !important;
124
- margin-left: calc(-50vw + var(--scrollbar-width, @scrollbarWidth) / 2) !important;
125
- margin-right: calc(-50vw + var(--scrollbar-width, @scrollbarWidth) / 2) !important;
126
- }
127
-
128
- @media only screen and (min-width: @largestMobileScreen) {
129
- body.has-toolbar {
130
- .has--size--full:not(.block-editor-columnsBlock),
131
- .full-width {
132
- width: calc(100vw - @toolbarWidth - var(--scrollbar-width, @scrollbarWidth)) !important;
133
- margin-left: calc(-50vw + (@toolbarWidth + var(--scrollbar-width, @scrollbarWidth)) / 2) !important;
134
- margin-right: calc(-50vw + (@toolbarWidth + var(--scrollbar-width, @scrollbarWidth)) / 2) !important;
135
- }
136
- }
137
-
138
- body.has-toolbar-collapsed {
139
- .has--size--full:not(.block-editor-columnsBlock),
140
- .full-width {
141
- width: calc(100vw - @toolbarWidthMin - var(--scrollbar-width, @scrollbarWidth)) !important;
142
- margin-left: calc(-50vw + (var(--scrollbar-width, @scrollbarWidth) + @toolbarWidthMin) / 2) !important;
143
- margin-right: calc(-50vw + (var(--scrollbar-width, @scrollbarWidth) + @toolbarWidthMin) / 2) !important;
144
- }
145
- }
152
+ margin-left: calc(-50vw + (@toolbarWidthCSS + @sidebarWidthCSS + @scrollbarWidthCSS) / 2) !important;
153
+ margin-right: calc(-50vw + (@toolbarWidthCSS + @sidebarWidthCSS + @scrollbarWidthCSS) / 2) !important;
146
154
  }
147
155
 
148
156
  .has--size--full:not(.block-editor-columnsBlock) .ui.grid {
@@ -2,6 +2,10 @@
2
2
  Container
3
3
  *******************************/
4
4
 
5
+ @toolbarWidth: 80px;
6
+ @sidebarWidth: 375px;
7
+ @collapsedWidth: 20px;
8
+
5
9
  /*-------------------
6
10
  Element
7
11
  --------------------*/
@@ -41,15 +41,15 @@
41
41
  }
42
42
 
43
43
  .metadata {
44
+ margin-bottom: @rem-space-3;
44
45
  font-size: @mobileMetadataFontSize;
45
46
  line-height: @mobileMetadataLineHeight;
46
- margin-bottom: @rem-space-3;
47
47
 
48
48
  .field.type {
49
49
  font-weight: @metadataTypeFontWeight;
50
50
  }
51
51
 
52
- span.field:not(:last-child)::after {
52
+ .field:not(:last-child)::after {
53
53
  content: @metadataFieldDividerContent;
54
54
  }
55
55
  }
@@ -110,10 +110,10 @@
110
110
  /*Share Popup*/
111
111
 
112
112
  .ui.popup.share-popup {
113
+ position: initial; // without position initial popper cannot correctly place popup
114
+ min-width: @sharePopupMinWidth;
113
115
  padding: @sharePopupPadding;
114
116
  filter: @sharePopupFilter;
115
- min-width: @sharePopupMinWidth;
116
- position: initial; // without position initial popper cannot correctly place popup
117
117
 
118
118
  p {
119
119
  font-size: @sharePopupFontSize;
@@ -14,7 +14,6 @@
14
14
  display: flex;
15
15
  color: @copyrightContentColor;
16
16
  font-size: @copyrightContentFontSize;
17
- min-height: @copyrightMinHeight;
18
17
  align-items: @copyrightAlignItems;
19
18
  line-height: @copyrightLineHeight;
20
19
  gap: @copyrightContentPaddingRight;
@@ -12,8 +12,7 @@
12
12
  @copyrightWrapperPaddingLeft: @rem-space-3;
13
13
  @copyrightWrapperPaddingRight: @rem-space-3;
14
14
  @copyrightWrapperBottom: @rem-space-4;
15
- @copyrightMinHeight: @rem-space-8;
16
- @copyrightAlignItems: center;
15
+ @copyrightAlignItems: start;
17
16
 
18
17
  /* Image block */
19
18
  @floatImageLeftMaxWidth: 50%;