diff --git a/packages/design-system/.eslintrc.js b/packages/design-system/.eslintrc.js
index eb1410d232..77052a5c9e 100644
--- a/packages/design-system/.eslintrc.js
+++ b/packages/design-system/.eslintrc.js
@@ -4,25 +4,25 @@ module.exports = {
node: true,
},
extends: [
- "plugin:vue/essential",
- "eslint:recommended",
- "@vue/typescript/recommended",
- "@vue/prettier",
- "@vue/prettier/@typescript-eslint",
+ 'plugin:vue/essential',
+ 'eslint:recommended',
+ '@vue/typescript/recommended',
+ '@vue/prettier',
+ '@vue/prettier/@typescript-eslint',
],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
- "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
- "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
+ 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
},
- ignorePatterns: ["gulpfile.js"],
+ ignorePatterns: ['gulpfile.js'],
overrides: [
{
files: [
- "**/__tests__/*.{j,t}s?(x)",
- "**/tests/unit/**/*.spec.{j,t}s?(x)",
+ '**/__tests__/*.{j,t}s?(x)',
+ '**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true,
diff --git a/packages/design-system/.github/workflows/deploy.yml b/packages/design-system/.github/workflows/deploy.yml
index 2ab9ccee75..e36ce054ef 100644
--- a/packages/design-system/.github/workflows/deploy.yml
+++ b/packages/design-system/.github/workflows/deploy.yml
@@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
- NODE_OPTIONS: "--max_old_space_size=4096"
+ NODE_OPTIONS: '--max_old_space_size=4096'
steps:
- uses: actions/checkout@v2
- name: Build and deploy
@@ -37,4 +37,4 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
- directory: "storybook-static"
+ directory: 'storybook-static'
diff --git a/packages/design-system/.storybook/font-awesome-icons.js b/packages/design-system/.storybook/font-awesome-icons.js
index 78410be1d8..e5a2cb11d1 100644
--- a/packages/design-system/.storybook/font-awesome-icons.js
+++ b/packages/design-system/.storybook/font-awesome-icons.js
@@ -1,4 +1,4 @@
-import { library } from "@fortawesome/fontawesome-svg-core";
+import { library } from '@fortawesome/fontawesome-svg-core';
import {
faAngleDoubleLeft,
faAngleDown,
@@ -80,8 +80,8 @@ import {
faUndo,
faUsers,
faClock,
-} from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
+} from '@fortawesome/free-solid-svg-icons';
+import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
library.add(faAngleDoubleLeft);
library.add(faAngleDown);
diff --git a/packages/design-system/.storybook/fonts.scss b/packages/design-system/.storybook/fonts.scss
index 67902a3696..e6e5ab65d6 100644
--- a/packages/design-system/.storybook/fonts.scss
+++ b/packages/design-system/.storybook/fonts.scss
@@ -1 +1 @@
-@import url("https://fonts.googleapis.com/css?family=Open+Sans&display=swap");
+@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');
diff --git a/packages/design-system/.storybook/main.js b/packages/design-system/.storybook/main.js
index 0b70dedc38..9cd8b91c03 100644
--- a/packages/design-system/.storybook/main.js
+++ b/packages/design-system/.storybook/main.js
@@ -1,12 +1,12 @@
-const path = require("path");
+const path = require('path');
module.exports = {
- stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
- "@storybook/addon-links",
- "@storybook/addon-essentials",
- "storybook-addon-designs",
- "storybook-addon-themes",
+ '@storybook/addon-links',
+ '@storybook/addon-essentials',
+ 'storybook-addon-designs',
+ 'storybook-addon-themes',
],
webpackFinal: async (config, { configType }) => {
config.module.rules.push({
@@ -15,20 +15,20 @@ module.exports = {
{
resourceQuery: /module/,
use: [
- "vue-style-loader",
+ 'vue-style-loader',
{
- loader: "css-loader",
+ loader: 'css-loader',
options: {
modules: true,
},
},
- "sass-loader",
+ 'sass-loader',
],
- include: path.resolve(__dirname, "../"),
+ include: path.resolve(__dirname, '../'),
},
{
- use: ["vue-style-loader", "css-loader", "sass-loader"],
- include: path.resolve(__dirname, "../"),
+ use: ['vue-style-loader', 'css-loader', 'sass-loader'],
+ include: path.resolve(__dirname, '../'),
},
],
});
diff --git a/packages/design-system/.storybook/preview.js b/packages/design-system/.storybook/preview.js
index 5066de4ec9..4629255e49 100644
--- a/packages/design-system/.storybook/preview.js
+++ b/packages/design-system/.storybook/preview.js
@@ -1,7 +1,7 @@
-import "./font-awesome-icons";
-import "./storybook.scss";
+import './font-awesome-icons';
+import './storybook.scss';
-import Vue from "vue";
+import Vue from 'vue';
// https://github.com/storybookjs/storybook/issues/6153
Vue.prototype.toJSON = function () {
@@ -10,7 +10,7 @@ Vue.prototype.toJSON = function () {
export const parameters = {
actions: {
- argTypesRegex: "^on[A-Z].*",
+ argTypesRegex: '^on[A-Z].*',
},
controls: {
matchers: {
@@ -19,42 +19,42 @@ export const parameters = {
},
},
backgrounds: {
- default: "--color-background-xlight",
+ default: '--color-background-xlight',
values: [
{
- name: "--color-background-dark",
- value: "var(--color-background-dark)",
+ name: '--color-background-dark',
+ value: 'var(--color-background-dark)',
},
{
- name: "--color-background-base",
- value: "var(--color-background-base)",
+ name: '--color-background-base',
+ value: 'var(--color-background-base)',
},
{
- name: "--color-background-light",
- value: "var(--color-background-light)",
+ name: '--color-background-light',
+ value: 'var(--color-background-light)',
},
{
- name: "--color-background-lighter",
- value: "var(--color-background-lighter)",
+ name: '--color-background-lighter',
+ value: 'var(--color-background-lighter)',
},
{
- name: "--color-background-xlight",
- value: "var(--color-background-xlight)",
+ name: '--color-background-xlight',
+ value: 'var(--color-background-xlight)',
},
],
},
themes: {
list: [
{
- name: "dark",
- class: "theme-dark",
- color: "#000",
+ name: 'dark',
+ class: 'theme-dark',
+ color: '#000',
},
],
},
options: {
storySort: {
- order: ["Docs", "Styleguide", "Atoms"],
+ order: ['Docs', 'Styleguide', 'Atoms'],
},
},
};
diff --git a/packages/design-system/babel.config.js b/packages/design-system/babel.config.js
index 99916a7873..dcd852039e 100644
--- a/packages/design-system/babel.config.js
+++ b/packages/design-system/babel.config.js
@@ -1,3 +1,3 @@
module.exports = {
- presets: ["@vue/cli-plugin-babel/preset"],
+ presets: ['@vue/cli-plugin-babel/preset'],
};
diff --git a/packages/design-system/gulpfile.js b/packages/design-system/gulpfile.js
index c168856ee6..6c78d2b83d 100644
--- a/packages/design-system/gulpfile.js
+++ b/packages/design-system/gulpfile.js
@@ -1,36 +1,36 @@
-"use strict";
+'use strict';
-const gulp = require("gulp");
-const sass = require("gulp-dart-sass");
-const autoprefixer = require("gulp-autoprefixer");
-const cleanCSS = require("gulp-clean-css");
+const gulp = require('gulp');
+const sass = require('gulp-dart-sass');
+const autoprefixer = require('gulp-autoprefixer');
+const cleanCSS = require('gulp-clean-css');
-gulp.task("build:theme", gulp.series([compileTheme, copyThemeFonts]));
+gulp.task('build:theme', gulp.series([compileTheme, copyThemeFonts]));
gulp.task(
- "watch:theme",
+ 'watch:theme',
gulp.series([
- "build:theme",
+ 'build:theme',
() => {
- gulp.watch("./theme/src/**/*.scss", gulp.series(["build:theme"]));
+ gulp.watch('./theme/src/**/*.scss', gulp.series(['build:theme']));
},
- ])
+ ]),
);
function compileTheme() {
return gulp
- .src("./theme/src/*.scss")
+ .src('./theme/src/*.scss')
.pipe(sass.sync())
.pipe(
autoprefixer({
- browsers: ["ie > 9", "last 2 versions"],
+ browsers: ['ie > 9', 'last 2 versions'],
cascade: false,
- })
+ }),
)
.pipe(cleanCSS())
- .pipe(gulp.dest("./theme/dist"));
+ .pipe(gulp.dest('./theme/dist'));
}
function copyThemeFonts() {
- return gulp.src("./theme/src/fonts/**").pipe(gulp.dest("./theme/dist/fonts"));
+ return gulp.src('./theme/src/fonts/**').pipe(gulp.dest('./theme/dist/fonts'));
}
diff --git a/packages/design-system/jest.config.js b/packages/design-system/jest.config.js
index c6ec092f1a..ce8dfc33cd 100644
--- a/packages/design-system/jest.config.js
+++ b/packages/design-system/jest.config.js
@@ -1,3 +1,3 @@
module.exports = {
- preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel",
+ preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
};
diff --git a/packages/design-system/src/components/N8nButton/Button.stories.js b/packages/design-system/src/components/N8nButton/Button.stories.js
index ca12ca984d..722892afb6 100644
--- a/packages/design-system/src/components/N8nButton/Button.stories.js
+++ b/packages/design-system/src/components/N8nButton/Button.stories.js
@@ -1,69 +1,69 @@
-import N8nButton from "./Button.vue";
-import { action } from "@storybook/addon-actions";
+import N8nButton from './Button.vue';
+import { action } from '@storybook/addon-actions';
export default {
- title: "Atoms/Button",
+ title: 'Atoms/Button',
component: N8nButton,
argTypes: {
label: {
- control: "text",
+ control: 'text',
},
title: {
- control: "text",
+ control: 'text',
},
type: {
- control: "select",
- options: ["primary", "outline", "light", "text"],
+ control: 'select',
+ options: ['primary', 'outline', 'light', 'text'],
},
size: {
control: {
- type: "select",
- options: ["sm", "md", "lg"],
+ type: 'select',
+ options: ['sm', 'md', 'lg'],
},
},
loading: {
control: {
- type: "boolean",
+ type: 'boolean',
},
},
icon: {
control: {
- type: "text",
+ type: 'text',
},
},
iconSize: {
control: {
- type: "select",
- options: ["sm", "md", "lg"],
+ type: 'select',
+ options: ['sm', 'md', 'lg'],
},
},
circle: {
control: {
- type: "boolean",
+ type: 'boolean',
},
},
fullWidth: {
- type: "boolean",
+ type: 'boolean',
},
theme: {
- type: "select",
- options: ["success", "danger", "warning"],
+ type: 'select',
+ options: ['success', 'danger', 'warning'],
},
float: {
- type: "select",
- options: ["left", "right"],
+ type: 'select',
+ options: ['left', 'right'],
},
},
parameters: {
design: {
- type: "figma",
- url: "https://www.figma.com/file/DxLbnIyMK8X0uLkUguFV4n/n8n-design-system_v1?node-id=5%3A1147",
+ type: 'figma',
+ url: 'https://www.figma.com/file/DxLbnIyMK8X0uLkUguFV4n/n8n-design-system_v1?node-id=5%3A1147',
},
},
};
const methods = {
- onClick: action("click"),
+ onClick: action('click'),
};
const Template = (args, { argTypes }) => ({
@@ -77,7 +77,7 @@ const Template = (args, { argTypes }) => ({
export const Button = Template.bind({});
Button.args = {
- label: "Button",
+ label: 'Button',
};
const ManyTemplate = (args, { argTypes }) => ({
@@ -92,31 +92,31 @@ const ManyTemplate = (args, { argTypes }) => ({
export const Primary = ManyTemplate.bind({});
Primary.args = {
- type: "primary",
- label: "Button",
+ type: 'primary',
+ label: 'Button',
};
export const Outline = ManyTemplate.bind({});
Outline.args = {
- type: "outline",
- label: "Button",
+ type: 'outline',
+ label: 'Button',
};
export const Light = ManyTemplate.bind({});
Light.args = {
- type: "light",
- label: "Button",
+ type: 'light',
+ label: 'Button',
};
export const WithIcon = ManyTemplate.bind({});
WithIcon.args = {
- label: "Button",
- icon: "plus-circle",
+ label: 'Button',
+ icon: 'plus-circle',
};
export const Text = ManyTemplate.bind({});
Text.args = {
- type: "text",
- label: "Button",
- icon: "plus-circle",
+ type: 'text',
+ label: 'Button',
+ icon: 'plus-circle',
};
diff --git a/packages/design-system/src/components/N8nButton/Button.vue b/packages/design-system/src/components/N8nButton/Button.vue
index e673116a6e..8e6eba5a8d 100644
--- a/packages/design-system/src/components/N8nButton/Button.vue
+++ b/packages/design-system/src/components/N8nButton/Button.vue
@@ -30,18 +30,18 @@
diff --git a/packages/design-system/src/components/N8nButton/index.js b/packages/design-system/src/components/N8nButton/index.js
index e4c0ab2f2c..f477689bf3 100644
--- a/packages/design-system/src/components/N8nButton/index.js
+++ b/packages/design-system/src/components/N8nButton/index.js
@@ -1,3 +1,3 @@
-import N8nButton from "./Button.vue";
+import N8nButton from './Button.vue';
export default N8nButton;
diff --git a/packages/design-system/src/components/N8nIcon/Icon.stories.js b/packages/design-system/src/components/N8nIcon/Icon.stories.js
index 0a2a4ef498..103dc9d80b 100644
--- a/packages/design-system/src/components/N8nIcon/Icon.stories.js
+++ b/packages/design-system/src/components/N8nIcon/Icon.stories.js
@@ -1,21 +1,21 @@
-import N8nIcon from "./Icon.vue";
+import N8nIcon from './Icon.vue';
export default {
- title: "Atoms/Icon",
+ title: 'Atoms/Icon',
component: N8nIcon,
argTypes: {
icon: {
- control: "text",
+ control: 'text',
},
size: {
control: {
- type: "select",
- options: ["sm", "md", "lg"],
+ type: 'select',
+ options: ['sm', 'md', 'lg'],
},
},
spin: {
control: {
- type: "boolean",
+ type: 'boolean',
},
},
},
@@ -31,15 +31,15 @@ const Template = (args, { argTypes }) => ({
export const Clock = Template.bind({});
Clock.args = {
- icon: "clock",
+ icon: 'clock',
};
export const Plus = Template.bind({});
Plus.args = {
- icon: "plus",
+ icon: 'plus',
};
export const Stop = Template.bind({});
Stop.args = {
- icon: "stop",
+ icon: 'stop',
};
diff --git a/packages/design-system/src/components/N8nIcon/Icon.vue b/packages/design-system/src/components/N8nIcon/Icon.vue
index a9aa8af76c..a5bcf4159a 100644
--- a/packages/design-system/src/components/N8nIcon/Icon.vue
+++ b/packages/design-system/src/components/N8nIcon/Icon.vue
@@ -8,10 +8,10 @@