@eeacms/volto-eea-website-theme 0.7.5 → 0.7.6

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,11 +4,18 @@ 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.7.5](https://github.com/eea/volto-eea-website-theme/compare/0.7.4...0.7.5) - 27 September 2022
7
+ ### [0.7.6](https://github.com/eea/volto-eea-website-theme/compare/0.7.5...0.7.6) - 5 October 2022
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat(StyleWrapper): Re-enable textAlign and fontWeight - refs #148213 [Alin Voinea - [`98aba2a`](https://github.com/eea/volto-eea-website-theme/commit/98aba2a17bc876eedbe0547de12eb99024c5e2f7)]
8
12
 
9
13
  #### :bug: Bug Fixes
10
14
 
11
- - fix(block-style): Keep only Preset styles - refs #148213 [Alin Voinea - [`d372a7d`](https://github.com/eea/volto-eea-website-theme/commit/d372a7ddf6b4bd1820a5abcd3ea90f65a2932e52)]
15
+ - fix(List): Align slate list ul/ol to EEA Design System - refs #155248 [Alin Voinea - [`e4c3ab0`](https://github.com/eea/volto-eea-website-theme/commit/e4c3ab01850dac871fc274ef800cdb55f84b0118)]
16
+ - fix(accordion): Remove styled, fluid and set default theme secondary - refs #153783 [Alin Voinea - [`8ebb9ac`](https://github.com/eea/volto-eea-website-theme/commit/8ebb9ac385ab8030a47988d9750b5eba38cbdeb9)]
17
+
18
+ ### [0.7.5](https://github.com/eea/volto-eea-website-theme/compare/0.7.4...0.7.5) - 27 September 2022
12
19
 
13
20
  ### [0.7.4](https://github.com/eea/volto-eea-website-theme/compare/0.7.3...0.7.4) - 27 September 2022
14
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-theme",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "@eeacms/volto-eea-website-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -27,7 +27,8 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@cypress/code-coverage": "^3.9.5",
30
- "babel-plugin-transform-class-properties": "^6.24.1"
30
+ "babel-plugin-transform-class-properties": "^6.24.1",
31
+ "md5": "^2.3.0"
31
32
  },
32
33
  "scripts": {
33
34
  "release": "release-it",
@@ -12,12 +12,32 @@ export const StyleSchema = () => {
12
12
  title: 'Preset styles',
13
13
  fields: ['style_name'],
14
14
  },
15
+ {
16
+ id: 'text',
17
+ title: 'Text',
18
+ fields: ['textAlign', 'fontWeight'],
19
+ },
15
20
  ],
16
21
  properties: {
17
22
  style_name: {
18
23
  title: 'Style',
19
24
  widget: 'style_select',
20
25
  },
26
+ textAlign: {
27
+ title: 'Text align',
28
+ widget: 'style_text_align',
29
+ },
30
+ fontWeight: {
31
+ title: 'Font weight',
32
+ description: 'The weight (or boldness) of the font',
33
+ choices: [
34
+ ['300', 'Light'],
35
+ ['400', 'Regular'],
36
+ ['500', 'Medium'],
37
+ ['600', 'SemiBold'],
38
+ ['700', 'Bold'],
39
+ ],
40
+ },
21
41
  },
22
42
  required: [],
23
43
  };
package/src/index.js CHANGED
@@ -10,6 +10,7 @@ import { Icon } from '@plone/volto/components';
10
10
  import paintSVG from '@plone/volto/icons/paint.svg';
11
11
  import contentBoxSVG from './icons/content-box.svg';
12
12
  import voltoCustomMiddleware from './middleware/voltoCustom';
13
+ import { List } from 'semantic-ui-react';
13
14
 
14
15
  const applyConfig = (config) => {
15
16
  // EEA specific settings
@@ -28,6 +29,8 @@ const applyConfig = (config) => {
28
29
  // Apply accordion block customization
29
30
  if (config.blocks.blocksConfig.accordion) {
30
31
  config.blocks.blocksConfig.accordion.semanticIcon = 'ri-arrow-down-s-line';
32
+ config.blocks.blocksConfig.accordion.options = {};
33
+ config.blocks.blocksConfig.accordion.defaults.theme = 'secondary';
31
34
  }
32
35
 
33
36
  // Apply tabs block customization
@@ -76,8 +79,27 @@ const applyConfig = (config) => {
76
79
  },
77
80
  ];
78
81
 
79
- // Slate StyleMenu configuration
80
82
  if (config.settings.slate) {
83
+ // Align Slate Lists to EEA Design System
84
+ config.settings.slate.elements.ul = ({ attributes, children }) => (
85
+ <List bulleted as="ul" {...attributes}>
86
+ {children}
87
+ </List>
88
+ );
89
+
90
+ config.settings.slate.elements.ol = ({ attributes, children }) => (
91
+ <List ordered as="ol" {...attributes}>
92
+ {children}
93
+ </List>
94
+ );
95
+
96
+ config.settings.slate.elements.li = ({ attributes, children }) => (
97
+ <List.Item as="li" {...attributes}>
98
+ {children}
99
+ </List.Item>
100
+ );
101
+
102
+ // Slate StyleMenu configuration
81
103
  config.settings.slate.styleMenu = {
82
104
  ...(config.settings.slate.styleMenu || {}),
83
105
  blockStyles: [