@eeacms/volto-design-tokens 0.1.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/README.md.tpl ADDED
@@ -0,0 +1,80 @@
1
+ # <%= name %>
2
+
3
+ [![Releases](https://img.shields.io/github/v/release/eea/<%= name %>)](https://github.com/eea/<%= name %>/releases)
4
+
5
+ [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2F<%= name %>%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/<%= name %>/job/master/display/redirect)
6
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=<%= name %>-master&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-master)
7
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=<%= name %>-master&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-master)
8
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=<%= name %>-master&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-master)
9
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=<%= name %>-master&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-master)
10
+
11
+ [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2F<%= name %>%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/<%= name %>/job/develop/display/redirect)
12
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=<%= name %>-develop&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-develop)
13
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=<%= name %>-develop&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-develop)
14
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=<%= name %>-develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-develop)
15
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=<%= name %>-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-develop)
16
+
17
+
18
+ [Volto](https://github.com/plone/volto) add-on
19
+
20
+ ## Features
21
+
22
+ Demo GIF
23
+
24
+ ## Getting started
25
+
26
+ ### Add <%= name %> to your Volto project
27
+
28
+ 1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
29
+
30
+ 1. Start Volto frontend
31
+
32
+ * If you already have a volto project, just update `package.json`:
33
+
34
+ ```JSON
35
+ "addons": [
36
+ "<%= addonName %>"
37
+ ],
38
+
39
+ "dependencies": {
40
+ "<%= addonName %>": "*"
41
+ }
42
+ ```
43
+
44
+ * If not, create one:
45
+
46
+ ```
47
+ npm install -g yo @plone/generator-volto
48
+ yo @plone/volto my-volto-project --canary --addon <%= addonName %>
49
+ cd my-volto-project
50
+ ```
51
+
52
+ 1. Install new add-ons and restart Volto:
53
+
54
+ ```
55
+ yarn
56
+ yarn start
57
+ ```
58
+
59
+ 1. Go to http://localhost:3000
60
+
61
+ 1. Happy editing!
62
+
63
+ ## Release
64
+
65
+ See [RELEASE.md](https://github.com/eea/<%= name %>/blob/master/RELEASE.md).
66
+
67
+ ## How to contribute
68
+
69
+ See [DEVELOP.md](https://github.com/eea/<%= name %>/blob/master/DEVELOP.md).
70
+
71
+ ## Copyright and license
72
+
73
+ The Initial Owner of the Original Code is European Environment Agency (EEA).
74
+ All Rights Reserved.
75
+
76
+ See [LICENSE.md](https://github.com/eea/<%= name %>/blob/master/LICENSE.md) for details.
77
+
78
+ ## Funding
79
+
80
+ [European Environment Agency (EU)](http://eea.europa.eu)
package/RELEASE.md ADDED
@@ -0,0 +1,74 @@
1
+ ## Release
2
+
3
+ ### Automatic release using Jenkins
4
+
5
+ * The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
6
+ * It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
7
+ * The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
8
+ * Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
9
+ * As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
10
+ * The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
11
+ * You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
12
+ * Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
13
+
14
+ ### Manual release from the develop branch ( beta release )
15
+
16
+ #### Installation and configuration of release-it
17
+
18
+ You need to first install the [release-it](https://github.com/release-it/release-it) client.
19
+
20
+ ```
21
+ npm install -g release-it
22
+ ```
23
+
24
+ Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
25
+
26
+ Release-it is a tool that automates 4 important steps in the release process:
27
+
28
+ 1. Version increase in `package.json` ( increased from the current version in `package.json`)
29
+ 2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
30
+ 3. GitHub release on the commit with the changelog and package.json modification on the develop branch
31
+ 4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
32
+
33
+ To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
34
+
35
+ ```
36
+ export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
37
+ ```
38
+
39
+ To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
40
+
41
+ ```
42
+ echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
43
+ ```
44
+
45
+ #### Using release-it tool
46
+
47
+ There are 3 yarn scripts that can be run to do the release
48
+
49
+ ##### yarn release-beta
50
+
51
+ Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
52
+
53
+ ```
54
+ ? Select increment (next version):
55
+ ❯ prepatch (0.1.1-beta.0)
56
+ preminor (0.2.0-beta.0)
57
+ premajor (1.0.0-beta.0)
58
+ Other, please specify...
59
+ ```
60
+
61
+ ##### yarn release-major-beta
62
+
63
+ Same as `yarn release-beta`, but with premajor version pre-selected.
64
+
65
+ ##### yarn release
66
+
67
+ Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
68
+
69
+ #### Important notes
70
+
71
+ > Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
72
+
73
+ > Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
74
+
@@ -0,0 +1,17 @@
1
+ module.exports = function (api) {
2
+ api.cache(true);
3
+ const presets = ['razzle'];
4
+ const plugins = [
5
+ [
6
+ 'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
7
+ {
8
+ messagesDir: './build/messages/',
9
+ },
10
+ ],
11
+ ];
12
+
13
+ return {
14
+ plugins,
15
+ presets,
16
+ };
17
+ };
package/bootstrap ADDED
@@ -0,0 +1,41 @@
1
+ const path = require('path');
2
+ const fs = require('fs');
3
+ const ejs = require('ejs');
4
+
5
+ const currentDir = path.basename(process.cwd());
6
+
7
+ const bootstrap = function (ofile) {
8
+ fs.readFile(ofile, 'utf8', function (err, data) {
9
+ if (err) {
10
+ return console.log(err);
11
+ }
12
+ const result = ejs.render(data, {
13
+ addonName: `@eeacms/${currentDir}`,
14
+ name: currentDir
15
+ });
16
+ const output = ofile.replace('.tpl', '');
17
+ fs.writeFile(output, result, 'utf8', function (err) {
18
+ if (err) {
19
+ return console.log(err);
20
+ }
21
+ });
22
+ if (ofile.includes('.tpl')) {
23
+ fs.unlink(ofile, (err) => {
24
+ if (err) {
25
+ return console.error(err);
26
+ }
27
+ });
28
+ }
29
+ });
30
+ }
31
+
32
+ fs.readdir(".", { withFileTypes: true }, (err, dirents) => {
33
+ const files = dirents
34
+ .filter(dirent => dirent.isFile())
35
+ .map(dirent => dirent.name);
36
+ files.forEach(function (file) {
37
+ if (file != 'bootstrap') {
38
+ bootstrap(file);
39
+ }
40
+ });
41
+ });
@@ -0,0 +1,27 @@
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
+ require('cypress-fail-fast/plugin')(on, config);
23
+ return config;
24
+ },
25
+ baseUrl: 'http://localhost:3000',
26
+ },
27
+ });
@@ -0,0 +1,36 @@
1
+ module.exports = {
2
+ testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
3
+ collectCoverageFrom: [
4
+ 'src/addons/**/src/**/*.{js,jsx,ts,tsx}',
5
+ '!src/**/*.d.ts',
6
+ ],
7
+ moduleNameMapper: {
8
+ '\\.(css|less|scss|sass)$': 'identity-obj-proxy',
9
+ '@plone/volto/cypress': '<rootDir>/node_modules/@plone/volto/cypress',
10
+ '@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
11
+ '@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
12
+ '@package/(.*)$': '<rootDir>/src/$1',
13
+ '@root/(.*)$': '<rootDir>/src/$1',
14
+ '@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
15
+ '@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
16
+ '@plone/volto-slate':
17
+ '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
18
+ '~/(.*)$': '<rootDir>/src/$1',
19
+ 'load-volto-addons':
20
+ '<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
21
+ },
22
+ transform: {
23
+ '^.+\\.js(x)?$': 'babel-jest',
24
+ '^.+\\.(png)$': 'jest-file',
25
+ '^.+\\.(jpg)$': 'jest-file',
26
+ '^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
27
+ },
28
+ coverageThreshold: {
29
+ global: {
30
+ branches: 5,
31
+ functions: 5,
32
+ lines: 5,
33
+ statements: 5,
34
+ },
35
+ },
36
+ };
File without changes
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@eeacms/volto-design-tokens",
3
+ "version": "0.1.0",
4
+ "description": "@eeacms/volto-design-tokens: Volto add-on",
5
+ "main": "src/index.js",
6
+ "author": "European Environment Agency: IDM2 A-Team",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/eea/volto-design-tokens",
9
+ "keywords": [
10
+ "volto-addon",
11
+ "volto",
12
+ "plone",
13
+ "react"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git@github.com:eea/volto-design-tokens.git"
18
+ },
19
+ "dependencies": {},
20
+ "devDependencies": {
21
+ "@plone/scripts": "*",
22
+ "@cypress/code-coverage": "^3.10.0",
23
+ "cypress-fail-fast": "^5.0.1",
24
+ "babel-plugin-transform-class-properties": "^6.24.1",
25
+ "md5": "^2.3.0"
26
+ },
27
+ "scripts": {
28
+ "release": "release-it",
29
+ "release-major-beta": "release-it major --preRelease=beta",
30
+ "release-beta": "release-it --preRelease=beta",
31
+ "bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
32
+ "test": "make test",
33
+ "test:fix": "make test-update",
34
+ "pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
35
+ "stylelint": "make stylelint",
36
+ "stylelint:overrides": "make stylelint-overrides",
37
+ "stylelint:fix": "make stylelint-fix",
38
+ "prettier": "make prettier",
39
+ "prettier:fix": "make prettier-fix",
40
+ "lint": "make lint",
41
+ "lint:fix": "make lint-fix",
42
+ "i18n": "make i18n",
43
+ "cypress:run": "make cypress-run",
44
+ "cypress:open": "make cypress-open"
45
+ }
46
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "<%= addonName %>",
3
+ "version": "0.1.0",
4
+ "description": "<%= addonName %>: Volto add-on",
5
+ "main": "src/index.js",
6
+ "author": "European Environment Agency: IDM2 A-Team",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/eea/<%= name %>",
9
+ "keywords": [
10
+ "volto-addon",
11
+ "volto",
12
+ "plone",
13
+ "react"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git@github.com:eea/<%= name %>.git"
18
+ },
19
+ "dependencies": {},
20
+ "devDependencies": {
21
+ "@plone/scripts": "*",
22
+ "@cypress/code-coverage": "^3.10.0",
23
+ "cypress-fail-fast": "^5.0.1",
24
+ "babel-plugin-transform-class-properties": "^6.24.1",
25
+ "md5": "^2.3.0"
26
+ },
27
+ "scripts": {
28
+ "release": "release-it",
29
+ "release-major-beta": "release-it major --preRelease=beta",
30
+ "release-beta": "release-it --preRelease=beta",
31
+ "bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
32
+ "test": "make test",
33
+ "test:fix": "make test-update",
34
+ "pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
35
+ "stylelint": "make stylelint",
36
+ "stylelint:overrides": "make stylelint-overrides",
37
+ "stylelint:fix": "make stylelint-fix",
38
+ "prettier": "make prettier",
39
+ "prettier:fix": "make prettier-fix",
40
+ "lint": "make lint",
41
+ "lint:fix": "make lint-fix",
42
+ "i18n": "make i18n",
43
+ "cypress:run": "make cypress-run",
44
+ "cypress:open": "make cypress-open"
45
+ }
46
+ }
@@ -0,0 +1,14 @@
1
+ @border-size-0: 0px;
2
+ @border-size-1: 1px;
3
+ @border-size-2: 2px;
4
+ @border-size-3: 3px;
5
+ @border-size-4: 5px;
6
+ @border-size-5: 10px;
7
+ @radius-0: 0px;
8
+ @radius-1: 2px;
9
+ @radius-2: 5px;
10
+ @radius-3: 1rem;
11
+ @radius-4: 2rem;
12
+ @radius-5: 4rem;
13
+ @radius-6: 8rem;
14
+ @radius-round: 1e5px;
@@ -0,0 +1,63 @@
1
+ @brown-0: #fff6ec;
2
+ @brown-1: #ffedd8;
3
+ @brown-2: #e7bc91;
4
+ @brown-3: #bc8a5f;
5
+ @brown-4: #8b5e34;
6
+ @brown-5: #603808;
7
+ @brown-6: #3d2201;
8
+
9
+ @purple-0: #efebf2;
10
+ @purple-1: #dfd6e7;
11
+ @purple-2: #beadce;
12
+ @purple-3: #9e84b6;
13
+ @purple-4: #753aad;
14
+ @purple-5: #5c3285;
15
+ @purple-6: #3c096c;
16
+
17
+ @red-0: #fbeef8;
18
+ @red-1: #f6ddf0;
19
+ @red-2: #e7b2c0;
20
+ @red-3: #d78890;
21
+ @red-4: #c65b59;
22
+ @red-5: #b83230;
23
+ @red-6: #5c1918;
24
+
25
+ @green-0: #c8fff8;
26
+ @green-1: #a0e5dc;
27
+ @green-2: #78cac0;
28
+ @green-3: #50b0a4;
29
+ @green-4: #289588;
30
+ @green-5: #007b6c;
31
+ @green-6: #005248;
32
+
33
+ @yellow-0: #fef6cd;
34
+ @yellow-1: #fbec9b;
35
+ @yellow-2: #fad936;
36
+ @yellow-3: #fac50d;
37
+ @yellow-4: #fdaf20;
38
+ @yellow-5: #ff9933;
39
+ @yellow-6: #c35527;
40
+
41
+ @blue-0: #a0d7ff;
42
+ @blue-1: #47b3ff;
43
+ @blue-2: #0a99ff;
44
+ @blue-3: #0083e0;
45
+ @blue-4: #006bb8;
46
+ @blue-5: #004b7f;
47
+ @blue-6: #003052;
48
+
49
+ @blue-grey-0: #dae8f4;
50
+ @blue-grey-1: #accae5;
51
+ @blue-grey-2: #87a7c3;
52
+ @blue-grey-3: #6989a5;
53
+ @blue-grey-4: #4c677f;
54
+ @blue-grey-5: #3d5265;
55
+ @blue-grey-6: #2e3e4c;
56
+
57
+ @grey-0: #ffffff;
58
+ @grey-1: #f9f9f9;
59
+ @grey-2: #e6e7e8;
60
+ @grey-3: #bcbec0;
61
+ @grey-4: #747678;
62
+ @grey-5: #323232;
63
+ @grey-6: #000000;
package/src/fonts.less ADDED
@@ -0,0 +1,40 @@
1
+ @font-weight-1: 100;
2
+ @font-weight-2: 200;
3
+ @font-weight-3: 300;
4
+ @font-weight-4: 400;
5
+ @font-weight-5: 500;
6
+ @font-weight-6: 600;
7
+ @font-weight-7: 700;
8
+ @font-weight-8: 800;
9
+ @font-weight-9: 900;
10
+ @font-lineheight-00: 0.95;
11
+ @font-lineheight-0: 1.2;
12
+ @font-lineheight-1: 1.25;
13
+ @font-lineheight-2: 1.375;
14
+ @font-lineheight-3: 1.5;
15
+ @font-lineheight-4: 1.75;
16
+ @font-lineheight-5: 2;
17
+ @font-letterspacing-000: -0.02em;
18
+ @font-letterspacing-00: -0.015em;
19
+ @font-letterspacing-0: -0.01em;
20
+ @font-letterspacing-1: 0.01em;
21
+ @font-letterspacing-2: 0.015em;
22
+ @font-letterspacing-3: 0.02em;
23
+ @font-letterspacing-4: 0.075em;
24
+ @font-letterspacing-5: 0.15em;
25
+ @font-size-00: 0.75rem;
26
+ @font-size-0: 0.875rem;
27
+ @font-size-1: 1rem;
28
+ @font-size-2: 1.125rem;
29
+ @font-size-3: 1.25rem;
30
+ @font-size-4: 1.5rem;
31
+ @font-size-5: 1.625rem;
32
+ @font-size-6: 1.875rem;
33
+ @font-size-7: 2rem;
34
+ @font-size-8: 2.25rem;
35
+ @font-size-9: 2.5rem;
36
+ @font-size-10: 2.75rem;
37
+ @font-size-fluid-0: clamp(1.125rem, 2vw, 1.25rem);
38
+ @font-size-fluid-1: clamp(1.25rem, 4vw, 1.625rem);
39
+ @font-size-fluid-2: clamp(1.5rem, 6vw, 2rem);
40
+ @font-size-fluid-3: clamp(1.875rem, 9vw, 2.75rem);
package/src/index.js ADDED
@@ -0,0 +1,5 @@
1
+ const applyConfig = (config) => {
2
+ return config;
3
+ };
4
+
5
+ export default applyConfig;
@@ -0,0 +1,41 @@
1
+ @shadow-color: 220, 3%, 15%;
2
+ @shadow-strength: 1%;
3
+
4
+ @shadow-0: none;
5
+ @shadow-1: 0 1px 2px -1px hsla(@shadow-color, calc(@shadow-strength + 9%));
6
+ @shadow-2: 0 3px 5px -2px hsla(@shadow-color, calc(@shadow-strength + 3%)),
7
+ 0 7px 14px -5px hsla(@shadow-color, calc(@shadow-strength + 5%));
8
+ @shadow-3: 0 -1px 3px 0 hsla(@shadow-color, calc(@shadow-strength + 2%)),
9
+ 0 1px 2px -5px hsla(@shadow-color, calc(@shadow-strength + 2%)),
10
+ 0 2px 5px -5px hsla(@shadow-color, calc(@shadow-strength + 4%)),
11
+ 0 4px 12px -5px hsla(@shadow-color, calc(@shadow-strength + 5%)),
12
+ 0 12px 15px -5px hsla(@shadow-color, calc(@shadow-strength + 7%));
13
+ @shadow-4: 0 -2px 5px 0 hsla(@shadow-color, calc(@shadow-strength + 2%)),
14
+ 0 1px 1px -2px hsla(@shadow-color, calc(@shadow-strength + 3%)),
15
+ 0 2px 2px -2px hsla(@shadow-color, calc(@shadow-strength + 3%)),
16
+ 0 5px 5px -2px hsla(@shadow-color, calc(@shadow-strength + 4%)),
17
+ 0 9px 9px -2px hsla(@shadow-color, calc(@shadow-strength + 5%)),
18
+ 0 16px 16px -2px hsla(@shadow-color, calc(@shadow-strength + 6%));
19
+ @shadow-5: 0 -1px 2px 0 hsla(@shadow-color, calc(@shadow-strength + 2%)),
20
+ 0 2px 1px -2px hsla(@shadow-color, calc(@shadow-strength + 3%)),
21
+ 0 5px 5px -2px hsla(@shadow-color, calc(@shadow-strength + 3%)),
22
+ 0 10px 10px -2px hsla(@shadow-color, calc(@shadow-strength + 4%)),
23
+ 0 20px 20px -2px hsla(@shadow-color, calc(@shadow-strength + 5%)),
24
+ 0 40px 40px -2px hsla(@shadow-color, calc(@shadow-strength + 7%));
25
+ @shadow-6: 0 -1px 2px 0 hsla(@shadow-color, calc(@shadow-strength + 2%)),
26
+ 0 3px 2px -2px hsla(@shadow-color, calc(@shadow-strength + 3%)),
27
+ 0 7px 5px -2px hsla(@shadow-color, calc(@shadow-strength + 3%)),
28
+ 0 12px 10px -2px hsla(@shadow-color, calc(@shadow-strength + 4%)),
29
+ 0 22px 18px -2px hsla(@shadow-color, calc(@shadow-strength + 5%)),
30
+ 0 41px 33px -2px hsla(@shadow-color, calc(@shadow-strength + 6%)),
31
+ 0 100px 80px -2px hsla(@shadow-color, calc(@shadow-strength + 7%));
32
+ @inner-shadow-0: inset 0 0 0 1px
33
+ hsla(@shadow-color, calc(@shadow-strength + 9%));
34
+ @inner-shadow-1: inset 0 1px 2px 0
35
+ hsla(@shadow-color, calc(@shadow-strength + 9%));
36
+ @inner-shadow-2: inset 0 1px 4px 0
37
+ hsla(@shadow-color, calc(@shadow-strength + 9%));
38
+ @inner-shadow-3: inset 0 2px 8px 0
39
+ hsla(@shadow-color, calc(@shadow-strength + 9%));
40
+ @inner-shadow-4: inset 0 2px 14px 0
41
+ hsla(@shadow-color, calc(@shadow-strength + 9%));
@@ -0,0 +1,6 @@
1
+ // Blob
2
+ @radius-blob-1: 30% 70% 70% 30% / 53% 30% 70% 47%;
3
+ @radius-blob-2: 53% 47% 34% 66% / 63% 46% 54% 37%;
4
+ @radius-blob-3: 37% 63% 56% 44% / 49% 56% 44% 51%;
5
+ @radius-blob-4: 63% 37% 37% 63% / 43% 37% 63% 57%;
6
+ @radius-blob-5: 49% 51% 48% 52% / 57% 44% 56% 43%;
package/src/sizes.less ADDED
@@ -0,0 +1,106 @@
1
+ @spacer: 4px;
2
+
3
+ @space-025: @spacer * 0.25; //1px;
4
+ @space-05: @spacer * 0.5; //2px;
5
+ @space-1: @spacer * 1; //4px;
6
+ @space-2: @spacer * 2; //8px;
7
+ @space-3: @spacer * 3; //12px;
8
+ @space-3-5: @spacer * 3.5; //14px;
9
+ @space-4: @spacer * 4; //16px;
10
+ @space-5: @spacer * 5; //20px;
11
+ @space-6: @spacer * 6; //24px;
12
+ @space-7: @spacer * 7; //28px;
13
+ @space-7-5: @spacer * 7.5; //30px;
14
+ @space-8: @spacer * 8; //32px;
15
+ @space-9: @spacer * 9; //36px;
16
+ @space-10: @spacer * 10; //40px;
17
+ @space-11: @spacer * 11; //44px;
18
+ @space-12: @spacer * 12; //48px;
19
+ @space-13: @spacer * 13; //52px;
20
+ @space-14: @spacer * 14; //56px;
21
+ @space-15: @spacer * 15; //60px;
22
+ @space-16: @spacer * 16; //64px;
23
+ @space-17: @spacer * 17; //68px;
24
+ @space-18: @spacer * 18; //72px;
25
+ @space-19: @spacer * 19; //76px;
26
+ @space-20: @spacer * 20; //80px;
27
+
28
+ // space sizing, add missing values if needed
29
+ @space-24: @spacer * 24; //96px;
30
+
31
+ @space-28: @spacer * 28; //112px;
32
+
33
+ @space-32: @spacer * 32; //128px;
34
+
35
+ @space-35: @spacer * 35; //140px;
36
+
37
+ @rem-space-025: @1px;
38
+ @rem-space-050: @2px;
39
+ @rem-space-1: @4px;
40
+ @rem-space-2: @8px;
41
+ @rem-space-3: @12px;
42
+ @rem-space-3-5: @14px;
43
+ @rem-space-4: @16px;
44
+ @rem-space-5: @20px;
45
+ @rem-space-6: @24px;
46
+ @rem-space-7: @28px;
47
+ @rem-space-7-50: @30px;
48
+ @rem-space-8: @32px;
49
+ @rem-space-9: @36px;
50
+ @rem-space-10: @40px;
51
+ @rem-space-11: @44px;
52
+ @rem-space-12: @48px;
53
+ @rem-space-13: @52px;
54
+ @rem-space-14: @56px;
55
+ @rem-space-15: @60px;
56
+ @rem-space-16: @64px;
57
+ @rem-space-17: @68px;
58
+ @rem-space-18: @72px;
59
+ @rem-space-19: @76px;
60
+ @rem-space-20: @80px;
61
+
62
+ @em-space-025: @relative1px;
63
+ @em-space-050: @relative2px;
64
+ @em-space-1: @relative4px;
65
+ @em-space-2: @relative8px;
66
+ @em-space-3: @relative12px;
67
+ @em-space-3-50: @relative14px;
68
+ @em-space-4: @relative16px;
69
+ @em-space-5: @relative20px;
70
+ @em-space-6: @relative24px;
71
+ @em-space-7: @relative28px;
72
+ @em-space-7-50: @relative30px;
73
+ @em-space-8: @relative32px;
74
+ @em-space-9: @relative36px;
75
+ @em-space-10: @relative40px;
76
+ @em-space-11: @relative44px;
77
+ @em-space-12: @relative48px;
78
+ @em-space-13: @relative52px;
79
+ @em-space-14: @relative56px;
80
+ @em-space-15: @relative60px;
81
+ @em-space-16: @relative64px;
82
+ @em-space-17: @relative68px;
83
+ @em-space-18: @relative72px;
84
+ @em-space-19: @relative76px;
85
+ @em-space-20: @relative80px;
86
+
87
+ // Size scale
88
+ // Used for buttons, inputs, labels, avatars etc.
89
+ @size: @space-4;
90
+
91
+ @size-025: @size * 0.25; // 4px
92
+ @size-050: @size * 0.5; // 8px
93
+ @size-1: @size; // 16px
94
+ @size-2: @size-1 + @space-1; // 20px
95
+ @size-3: @size-2 + @space-1; // 24px
96
+ @size-4: @size-3 + @space-1; // 28px
97
+ @size-5: @size-4 + @space-1; // 32px
98
+ @size-6: @size-5 + @space-2; // 40px
99
+ @size-7: @size-6 + @space-2; // 48px
100
+ @size-8: @size-7 + @space-4; // 64px
101
+ @size-9: @size-8 + @space-4; // 80px
102
+ @size-10: @size-9 + @space-10; // 120px
103
+ @size-11: @size-10 + @space-10; // 160px
104
+ @size-12: @size-11 + @space-20; // 240px
105
+ @size-13: @size-12 + @space-20; // 320px
106
+ @size-14: @size-13 + @size-11; // 480px
@@ -0,0 +1,7 @@
1
+ @import 'borders';
2
+ @import 'colors';
3
+ @import 'fonts';
4
+ @import 'shadows';
5
+ @import 'shapes';
6
+ @import 'sizes';
7
+ @import 'z-index';