@eeacms/volto-hero-block 0.2.0 → 2.0.0
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/.coverage.babel.config.js +1 -1
- package/.i18n.babel.config.js +1 -0
- package/.project.eslintrc.js +3 -1
- package/CHANGELOG.md +53 -31
- package/README.md +5 -25
- package/babel.config.js +1 -1
- package/cypress.config.js +26 -0
- package/jest-addon.config.js +4 -4
- package/package.json +17 -16
- package/src/components/Blocks/Hero/Edit.jsx +6 -3
- package/src/components/Blocks/Hero/Hero.jsx +16 -6
- package/src/components/Blocks/Hero/index.js +1 -2
- package/src/components/Blocks/Hero/schema.js +72 -66
- package/src/helpers.js +1 -1
- package/cypress.json +0 -17
|
@@ -2,7 +2,7 @@ const defaultBabel = require('@plone/volto/babel');
|
|
|
2
2
|
|
|
3
3
|
function applyDefault(api) {
|
|
4
4
|
const voltoBabel = defaultBabel(api);
|
|
5
|
-
voltoBabel.plugins.push('
|
|
5
|
+
voltoBabel.plugins.push('istanbul');
|
|
6
6
|
return voltoBabel;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@plone/volto/babel');
|
package/.project.eslintrc.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
|
-
const projectRootPath = fs.
|
|
4
|
+
const projectRootPath = fs.existsSync('./project')
|
|
5
|
+
? fs.realpathSync('./project')
|
|
6
|
+
: fs.realpathSync('./../../../');
|
|
5
7
|
const packageJson = require(path.join(projectRootPath, 'package.json'));
|
|
6
8
|
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions;
|
|
7
9
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,50 +4,72 @@ 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
|
-
|
|
7
|
+
### [2.0.0](https://github.com/eea/volto-hero-block/compare/1.0.0...2.0.0) - 15 November 2022
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- fix(hero): image dimensions when full width and height isn't enabled [`69fb38e`](https://github.com/eea/volto-hero-block/commit/69fb38e9410f2a241a5d3babca9a712df946f859)
|
|
11
|
-
- change(hero): re-added quoted option to the hero block [`d8c9c59`](https://github.com/eea/volto-hero-block/commit/d8c9c59d7e7e5feaf592a52f9cc6ff23abca2fa2)
|
|
9
|
+
#### :nail_care: Enhancements
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
- refactor(Styling): Use schemaEnhancer in favor of StyleWrapper [Alin Voinea - [`dacf4db`](https://github.com/eea/volto-hero-block/commit/dacf4db6c59a584639f13c7ce8a3d7bd808ea64c)]
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
#### :house: Internal changes
|
|
16
14
|
|
|
15
|
+
- style(volto-hero-block): set correctly the background color [Miu Razvan - [`9358a17`](https://github.com/eea/volto-hero-block/commit/9358a1777c25664cbfe9c66a6c9054521a11ff24)]
|
|
17
16
|
|
|
18
|
-
####
|
|
17
|
+
#### :hammer_and_wrench: Others
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
- test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`b8f0971`](https://github.com/eea/volto-hero-block/commit/b8f0971b21a5334d40c1b8f5103cea61d9ffe6f1)]
|
|
20
|
+
## [1.0.0](https://github.com/eea/volto-hero-block/compare/0.2.0...1.0.0) - 28 October 2022
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
#### :nail_care: Enhancements
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
- refactor(volto-slate): Upgrade to @plone/volto-slate - refs #153447 [Alin Voinea - [`8e9aef4`](https://github.com/eea/volto-hero-block/commit/8e9aef42b9e92cca4666526b083f6f64bb5adfa8)]
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
#### :hammer_and_wrench: Others
|
|
27
27
|
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
28
|
+
- Remove cypress.json [Alin Voinea - [`593bdf2`](https://github.com/eea/volto-hero-block/commit/593bdf207ca4fd3f2393117b6f64a44727881ad0)]
|
|
29
|
+
- test(cypress): Upgrade to Cypress 10 / Razzle 4 [Alin Voinea - [`edd48a5`](https://github.com/eea/volto-hero-block/commit/edd48a5c13824bce5e03e46790f1890656b340d8)]
|
|
30
|
+
- Cleanup [Alin Voinea - [`9d72ee7`](https://github.com/eea/volto-hero-block/commit/9d72ee7a06d1c6fed46586d30bb85eae39e670bf)]
|
|
31
|
+
### [0.2.0](https://github.com/eea/volto-hero-block/compare/0.1.4...0.2.0) - 6 July 2022
|
|
32
32
|
|
|
33
|
-
####
|
|
33
|
+
#### :bug: Bug Fixes
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
- fix(hero): image dimensions when full width and height isn't enabled [David Ichim - [`69fb38e`](https://github.com/eea/volto-hero-block/commit/69fb38e9410f2a241a5d3babca9a712df946f859)]
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
- change(hero): added image overlay option [`647ef2c`](https://github.com/eea/volto-hero-block/commit/647ef2ce68848ac38b71977485021b17e8c2f540)
|
|
39
|
-
- Fix Hero image type [`fb2188a`](https://github.com/eea/volto-hero-block/commit/fb2188ac604cfc57ba26ea482e799ca867a412ad)
|
|
40
|
-
- Fix external vs internal image [`5e447e9`](https://github.com/eea/volto-hero-block/commit/5e447e9a4e35229d9a29b74ad230a2e1e659bbea)
|
|
41
|
-
- Fix block title [`db8de23`](https://github.com/eea/volto-hero-block/commit/db8de237f523e8cb9b96c2702818b529805fd36e)
|
|
42
|
-
- Support external images [`196902a`](https://github.com/eea/volto-hero-block/commit/196902ac0214cefb8a4bdc643f0424bc7c318282)
|
|
43
|
-
- Update slate footnote support [`c1522b4`](https://github.com/eea/volto-hero-block/commit/c1522b4164dbe6de01771d211d7e0bf3009f44d4)
|
|
44
|
-
- Use justify content for text and button as well [`08599cc`](https://github.com/eea/volto-hero-block/commit/08599cc45546d9b349128c4f8ce9c01318385811)
|
|
45
|
-
- Add dependencies [`30e2881`](https://github.com/eea/volto-hero-block/commit/30e2881a2a97a899e7f4cc614a0405c300ac6fee)
|
|
37
|
+
#### :nail_care: Enhancements
|
|
46
38
|
|
|
47
|
-
|
|
39
|
+
- change(hero): implemented meta alignment and renamed several options for consistency [David Ichim - [`df08d80`](https://github.com/eea/volto-hero-block/commit/df08d80201b079a083e8c742e763c7b144fb5724)]
|
|
40
|
+
- change(hero): re-added quoted option to the hero block [David Ichim - [`d8c9c59`](https://github.com/eea/volto-hero-block/commit/d8c9c59d7e7e5feaf592a52f9cc6ff23abca2fa2)]
|
|
48
41
|
|
|
49
|
-
|
|
42
|
+
### [0.1.4](https://github.com/eea/volto-hero-block/compare/0.1.3...0.1.4) - 30 June 2022
|
|
50
43
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
### [0.1.3](https://github.com/eea/volto-hero-block/compare/0.1.2...0.1.3) - 30 June 2022
|
|
45
|
+
|
|
46
|
+
### [0.1.2](https://github.com/eea/volto-hero-block/compare/0.1.1...0.1.2) - 16 June 2022
|
|
47
|
+
|
|
48
|
+
#### :nail_care: Enhancements
|
|
49
|
+
|
|
50
|
+
- change(hero): wrap hero-block-image within a wrapper class [David Ichim - [`2802c41`](https://github.com/eea/volto-hero-block/commit/2802c41ee8eba4c34bf6d4b4766ebafb24056602)]
|
|
51
|
+
- change(hero): added spaced and inverted options to the main schema [David Ichim - [`b6865cd`](https://github.com/eea/volto-hero-block/commit/b6865cdc6dfae0d486f43fccfb31fa555af3a536)]
|
|
52
|
+
- change(hero): output h2 from slate instead of p tag [David Ichim - [`0b2a4c5`](https://github.com/eea/volto-hero-block/commit/0b2a4c5070cc2bf97f31ff4cf74ade0e27434d91)]
|
|
53
|
+
|
|
54
|
+
### [0.1.1](https://github.com/eea/volto-hero-block/compare/0.1.0...0.1.1) - 13 June 2022
|
|
55
|
+
|
|
56
|
+
#### :nail_care: Enhancements
|
|
57
|
+
|
|
58
|
+
- change(hero): added image overlay option [David Ichim - [`647ef2c`](https://github.com/eea/volto-hero-block/commit/647ef2ce68848ac38b71977485021b17e8c2f540)]
|
|
59
|
+
|
|
60
|
+
#### :hammer_and_wrench: Others
|
|
61
|
+
|
|
62
|
+
- Fix Hero image type [Alin Voinea - [`fb2188a`](https://github.com/eea/volto-hero-block/commit/fb2188ac604cfc57ba26ea482e799ca867a412ad)]
|
|
63
|
+
- Fix external vs internal image [Alin Voinea - [`5e447e9`](https://github.com/eea/volto-hero-block/commit/5e447e9a4e35229d9a29b74ad230a2e1e659bbea)]
|
|
64
|
+
- Fix block title [Alin Voinea - [`db8de23`](https://github.com/eea/volto-hero-block/commit/db8de237f523e8cb9b96c2702818b529805fd36e)]
|
|
65
|
+
- Support external images [Miu Razvan - [`196902a`](https://github.com/eea/volto-hero-block/commit/196902ac0214cefb8a4bdc643f0424bc7c318282)]
|
|
66
|
+
- Update slate footnote support [Miu Razvan - [`c1522b4`](https://github.com/eea/volto-hero-block/commit/c1522b4164dbe6de01771d211d7e0bf3009f44d4)]
|
|
67
|
+
- Use justify content for text and button as well [Miu Razvan - [`08599cc`](https://github.com/eea/volto-hero-block/commit/08599cc45546d9b349128c4f8ce9c01318385811)]
|
|
68
|
+
- Add dependencies [Miu Razvan - [`30e2881`](https://github.com/eea/volto-hero-block/commit/30e2881a2a97a899e7f4cc614a0405c300ac6fee)]
|
|
69
|
+
### 0.1.0 - 10 June 2022
|
|
70
|
+
|
|
71
|
+
#### :hammer_and_wrench: Others
|
|
72
|
+
|
|
73
|
+
- jenkins file fix [David Ichim - [`3a51e37`](https://github.com/eea/volto-hero-block/commit/3a51e379dd70cb9c6045922050020e33fc896a74)]
|
|
74
|
+
- Initial commit [David Ichim - [`799ed92`](https://github.com/eea/volto-hero-block/commit/799ed92e506b9b0faded334c019f4a8ffc4b8d43)]
|
|
75
|
+
- Initial commit [ichim-david - [`b21bcfd`](https://github.com/eea/volto-hero-block/commit/b21bcfd42c775acc84179272fac0d6ecaad71430)]
|
package/README.md
CHANGED
|
@@ -15,35 +15,19 @@
|
|
|
15
15
|
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block-develop)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
[Volto](https://github.com/plone/volto) add-on
|
|
18
|
+
Enhanced Hero Block [Volto](https://github.com/plone/volto) add-on
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
22
|
Demo GIF
|
|
23
23
|
|
|
24
|
-
##
|
|
25
|
-
|
|
26
|
-
### Try volto-hero-block with Docker
|
|
27
|
-
|
|
28
|
-
1. Get the latest Docker images
|
|
24
|
+
## Upgrade
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
docker pull plone
|
|
32
|
-
docker pull plone/volto
|
|
33
|
-
```
|
|
26
|
+
### Upgrading to 2.x
|
|
34
27
|
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
1. Start Volto frontend
|
|
28
|
+
This version requires: `@plone/volto >= 16.0.0.alpha.46` (schemaEnhancer / addStyling).
|
|
41
29
|
|
|
42
|
-
|
|
43
|
-
docker run -it --rm -p 3000:3000 --link plone -e ADDONS="@eeacms/volto-hero-block" plone/volto
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
1. Go to http://localhost:3000
|
|
30
|
+
## Getting started
|
|
47
31
|
|
|
48
32
|
### Add volto-hero-block to your Volto project
|
|
49
33
|
|
|
@@ -97,10 +81,6 @@ All Rights Reserved.
|
|
|
97
81
|
|
|
98
82
|
See [LICENSE.md](https://github.com/eea/volto-hero-block/blob/master/LICENSE.md) for details.
|
|
99
83
|
|
|
100
|
-
## Funding
|
|
101
|
-
|
|
102
|
-
[European Environment Agency (EU)](http://eea.europa.eu)
|
|
103
|
-
volto-addon-template/blob/master/LICENSE.md) for details.
|
|
104
84
|
|
|
105
85
|
## Funding
|
|
106
86
|
|
package/babel.config.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const { defineConfig } = require('cypress');
|
|
2
|
+
|
|
3
|
+
module.exports = defineConfig({
|
|
4
|
+
viewportWidth: 1280,
|
|
5
|
+
defaultCommandTimeout: 8888,
|
|
6
|
+
chromeWebSecurity: false,
|
|
7
|
+
reporter: 'junit',
|
|
8
|
+
video: true,
|
|
9
|
+
retries: {
|
|
10
|
+
runMode: 8,
|
|
11
|
+
openMode: 0,
|
|
12
|
+
},
|
|
13
|
+
reporterOptions: {
|
|
14
|
+
mochaFile: 'cypress/reports/cypress-[hash].xml',
|
|
15
|
+
jenkinsMode: true,
|
|
16
|
+
toConsole: true,
|
|
17
|
+
},
|
|
18
|
+
e2e: {
|
|
19
|
+
setupNodeEvents(on, config) {
|
|
20
|
+
// e2e testing node events setup code
|
|
21
|
+
require('@cypress/code-coverage/task')(on, config);
|
|
22
|
+
return config;
|
|
23
|
+
},
|
|
24
|
+
baseUrl: 'http://localhost:3000',
|
|
25
|
+
},
|
|
26
|
+
});
|
package/jest-addon.config.js
CHANGED
|
@@ -9,18 +9,18 @@ module.exports = {
|
|
|
9
9
|
'@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
|
|
10
10
|
'@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
11
11
|
'@package/(.*)$': '<rootDir>/src/$1',
|
|
12
|
+
'@root/(.*)$': '<rootDir>/src/$1',
|
|
12
13
|
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
|
|
13
14
|
'@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
|
|
14
|
-
'volto-slate
|
|
15
|
+
'@plone/volto-slate':
|
|
16
|
+
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
|
|
15
17
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
16
18
|
'load-volto-addons':
|
|
17
19
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
|
20
|
+
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
18
21
|
},
|
|
19
22
|
transform: {
|
|
20
23
|
'^.+\\.js(x)?$': 'babel-jest',
|
|
21
|
-
'^.+\\.css$': 'jest-css-modules',
|
|
22
|
-
'^.+\\.less$': 'jest-css-modules',
|
|
23
|
-
'^.+\\.scss$': 'jest-css-modules',
|
|
24
24
|
'^.+\\.(png)$': 'jest-file',
|
|
25
25
|
'^.+\\.(jpg)$': 'jest-file',
|
|
26
26
|
'^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-hero-block",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "@eeacms/volto-hero-block: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -17,33 +17,34 @@
|
|
|
17
17
|
"url": "git@github.com:eea/volto-hero-block.git"
|
|
18
18
|
},
|
|
19
19
|
"addons": [
|
|
20
|
-
"@eeacms/volto-object-widget"
|
|
21
|
-
"volto-slate"
|
|
20
|
+
"@eeacms/volto-object-widget"
|
|
22
21
|
],
|
|
23
22
|
"dependencies": {
|
|
24
|
-
"volto-slate": "*",
|
|
25
23
|
"@eeacms/volto-object-widget": "*"
|
|
26
24
|
},
|
|
27
25
|
"devDependencies": {
|
|
28
26
|
"@plone/scripts": "*",
|
|
29
|
-
"@cypress/code-coverage": "^3.
|
|
30
|
-
"babel-plugin-transform-class-properties": "^6.24.1"
|
|
27
|
+
"@cypress/code-coverage": "^3.10.0",
|
|
28
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
29
|
+
"md5": "^2.3.0"
|
|
31
30
|
},
|
|
32
31
|
"scripts": {
|
|
33
32
|
"release": "release-it",
|
|
33
|
+
"release-major-beta": "release-it major --preRelease=beta",
|
|
34
|
+
"release-beta": "release-it --preRelease=beta",
|
|
34
35
|
"bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
|
|
35
36
|
"test": "make test",
|
|
36
37
|
"test:fix": "make test-update",
|
|
37
38
|
"pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
|
|
38
|
-
"stylelint": "
|
|
39
|
-
"stylelint:overrides": "
|
|
40
|
-
"stylelint:fix": "
|
|
41
|
-
"prettier": "
|
|
42
|
-
"prettier:fix": "
|
|
43
|
-
"lint": "
|
|
44
|
-
"lint:fix": "
|
|
45
|
-
"i18n": "
|
|
46
|
-
"cypress:run": "
|
|
47
|
-
"cypress:open": "
|
|
39
|
+
"stylelint": "make stylelint",
|
|
40
|
+
"stylelint:overrides": "make stylelint-overrides",
|
|
41
|
+
"stylelint:fix": "make stylelint-fix",
|
|
42
|
+
"prettier": "make prettier",
|
|
43
|
+
"prettier:fix": "make prettier-fix",
|
|
44
|
+
"lint": "make lint",
|
|
45
|
+
"lint:fix": "make lint-fix",
|
|
46
|
+
"i18n": "make i18n",
|
|
47
|
+
"cypress:run": "make cypress-run",
|
|
48
|
+
"cypress:open": "make cypress-open"
|
|
48
49
|
}
|
|
49
50
|
}
|
|
@@ -7,9 +7,12 @@ import {
|
|
|
7
7
|
SidebarPortal,
|
|
8
8
|
UniversalLink,
|
|
9
9
|
} from '@plone/volto/components';
|
|
10
|
-
import SlateEditor from 'volto-slate/editor/SlateEditor';
|
|
11
|
-
import { handleKey } from 'volto-slate/blocks/Text/keyboard';
|
|
12
|
-
import {
|
|
10
|
+
import SlateEditor from '@plone/volto-slate/editor/SlateEditor';
|
|
11
|
+
import { handleKey } from '@plone/volto-slate/blocks/Text/keyboard';
|
|
12
|
+
import {
|
|
13
|
+
uploadContent,
|
|
14
|
+
saveSlateBlockSelection,
|
|
15
|
+
} from '@plone/volto-slate/actions';
|
|
13
16
|
|
|
14
17
|
import { createSlateHeader } from '@eeacms/volto-hero-block/helpers';
|
|
15
18
|
|
|
@@ -33,18 +33,28 @@ function Hero({
|
|
|
33
33
|
<div
|
|
34
34
|
className={cx(
|
|
35
35
|
'eea hero-block',
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
!image &&
|
|
37
|
+
backgroundVariant &&
|
|
38
|
+
!fullWidth &&
|
|
39
|
+
`color-bg-${backgroundVariant}`,
|
|
39
40
|
{
|
|
41
|
+
spaced,
|
|
42
|
+
inverted,
|
|
40
43
|
'full-height': fullHeight,
|
|
41
44
|
},
|
|
42
45
|
)}
|
|
43
46
|
>
|
|
44
47
|
<div
|
|
45
|
-
className={cx(
|
|
46
|
-
'
|
|
47
|
-
|
|
48
|
+
className={cx(
|
|
49
|
+
'hero-block-image-wrapper',
|
|
50
|
+
!image &&
|
|
51
|
+
backgroundVariant &&
|
|
52
|
+
fullWidth &&
|
|
53
|
+
`color-bg-${backgroundVariant}`,
|
|
54
|
+
{
|
|
55
|
+
'full-width': fullWidth,
|
|
56
|
+
},
|
|
57
|
+
)}
|
|
48
58
|
>
|
|
49
59
|
<div
|
|
50
60
|
className={cx('hero-block-image')}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { addStyling } from '@plone/volto/helpers';
|
|
2
|
+
|
|
3
|
+
export default () => {
|
|
2
4
|
return {
|
|
3
5
|
title: 'Hero',
|
|
4
6
|
fieldsets: [
|
|
@@ -66,69 +68,73 @@ export default ({ data }) => {
|
|
|
66
68
|
};
|
|
67
69
|
};
|
|
68
70
|
|
|
69
|
-
export const stylingSchema = (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
'
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
[
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
[
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
[
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
[
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
71
|
+
export const stylingSchema = (props) => {
|
|
72
|
+
const schema = addStyling(props);
|
|
73
|
+
schema.properties.styles.schema = {
|
|
74
|
+
title: 'Hero style',
|
|
75
|
+
block: 'hero',
|
|
76
|
+
fieldsets: [
|
|
77
|
+
{
|
|
78
|
+
id: 'default',
|
|
79
|
+
title: 'Default',
|
|
80
|
+
fields: [
|
|
81
|
+
'backgroundVariant',
|
|
82
|
+
'alignContent',
|
|
83
|
+
'textAlign',
|
|
84
|
+
'textVariant',
|
|
85
|
+
'buttonVariant',
|
|
86
|
+
'buttonAlign',
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
properties: {
|
|
91
|
+
backgroundVariant: {
|
|
92
|
+
title: 'Background theme',
|
|
93
|
+
choices: [
|
|
94
|
+
['primary', 'Primary'],
|
|
95
|
+
['secondary', 'Secondary'],
|
|
96
|
+
['tertiary', 'Tertiary'],
|
|
97
|
+
['grey', 'Grey'],
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
alignContent: {
|
|
101
|
+
title: 'Content align',
|
|
102
|
+
choices: [
|
|
103
|
+
['start', 'Top'],
|
|
104
|
+
['center', 'Center'],
|
|
105
|
+
['end', 'Bottom'],
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
textAlign: {
|
|
109
|
+
title: 'Text align',
|
|
110
|
+
widget: 'align',
|
|
111
|
+
actions: ['left', 'center', 'right'],
|
|
112
|
+
defaultValue: 'left',
|
|
113
|
+
},
|
|
114
|
+
textVariant: {
|
|
115
|
+
title: 'Text theme',
|
|
116
|
+
choices: [
|
|
117
|
+
['primary', 'Primary'],
|
|
118
|
+
['secondary', 'Secondary'],
|
|
119
|
+
['tertiary', 'Tertiary'],
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
buttonVariant: {
|
|
123
|
+
title: 'Button theme',
|
|
124
|
+
choices: [
|
|
125
|
+
['primary', 'Primary'],
|
|
126
|
+
['secondary', 'Secondary'],
|
|
127
|
+
['tertiary', 'Tertiary'],
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
buttonAlign: {
|
|
131
|
+
title: 'Button align',
|
|
132
|
+
widget: 'align',
|
|
133
|
+
actions: ['left', 'center', 'right'],
|
|
134
|
+
defaultValue: 'left',
|
|
135
|
+
},
|
|
131
136
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
required: [],
|
|
138
|
+
};
|
|
139
|
+
return schema;
|
|
140
|
+
};
|
package/src/helpers.js
CHANGED
package/cypress.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"baseUrl": "http://localhost:3000",
|
|
3
|
-
"viewportWidth": 1280,
|
|
4
|
-
"defaultCommandTimeout": 8888,
|
|
5
|
-
"chromeWebSecurity": false,
|
|
6
|
-
"reporter": "junit",
|
|
7
|
-
"video": true,
|
|
8
|
-
"retries": {
|
|
9
|
-
"runMode": 8,
|
|
10
|
-
"openMode": 0
|
|
11
|
-
},
|
|
12
|
-
"reporterOptions": {
|
|
13
|
-
"mochaFile": "cypress/reports/cypress-[hash].xml",
|
|
14
|
-
"jenkinsMode": true,
|
|
15
|
-
"toConsole": true
|
|
16
|
-
}
|
|
17
|
-
}
|