n8n/packages/design-system/theme/src/step.scss
Mutasem Aldmour 5bd8f7c93e
Implement design system (#2050)
* split up main, sass imports, import new nds

* migrate most buttons

* update sizes based on feedback

* update copy buttons

* update executions list

* fix issues

* force message box buttons

* update warning color

* update more buttons

* wrap message box buttons

* update last component

* lint fixes

* add build report step

* breakout imports

* set package.json

* fix notification bug

* clean up imports

* use build directories directly

* update imports

* remove xl size

* update number inputs

* fix input width

* update line height, fix icon bug

* fix up editor

* fix spacing between buttons

* Reset line height

* revert changes to this

* revert changes

* clean up button sizes

* change to outline

* update select height

* update tooltip

* remove build report step

* clean up impl

* remove regenerator runtime

* add design system repo

* apply editorconfig

* apply editor config prettier

* lint issue

* switch to tabs

* switch to single space

* update eslintrc

* remove git modules

* update sass package

* support dart sass

* add build

* update dependency

* update contributing.md

* set repo

* update versions

* add tslint step

* update spacing to spaces, add dev step

* add test step

* add test step

* update browser lint rc

* remove .github

* delete .gitignore

* set comment for icons

* remove preview link

* update button interface

* update types

* set types

* clean up intro

* update intro

* remove assets

* move into preview

* remove headline comment

* reduce theme build

* loading executions

* match deps versions

* match deps versions

* fix lint issues

* fix lint issues

* update callback

* disable codacy for docs.css

* fix storybook issues

* add design system to docker image

* update spacing around delete sort button

* set line height to stop juggling headline

* update sizes

* clean up vars

* fix scss issues

* update button vars

* add shade color

* fix button without click

* fix buttons bug

* fix bug with executions list

* clean up theme

* update link styling

* fix typo

* run prettier

* 🎨 code format

* 🎨 code format

* 🔥 remove empty files

*  N8n 2284 new inputs (#2075)

* implement inputs

* prettier fixes

* revert unnessary change

* move input components and tooltip

* remove form elements

* move select

* update input placements

* update sizes

* update credentails

* clean up select size

* fix caret issue

* update inputs

* clean up select

* fix tags dropdown border

* clean up tags input

* fix workflow name bug

* clean up select here

* add sizes template

* fix option caret

* fix input sizes

* update date input size

* remove tags input override

* update prop

* update input size

* center run data inputs

* update disabled colors

* update execution header

* update scrollbar

* update text area spacing

* fix items in header

* update run data tooltip

* remove popover

* update prefix positions

* add filterable demo

* address design issues

* fix input issues, flip boolean input to text

* update input sufffix colors

* remove override

* speed up switch, fix toggle spacing issue

* update icon

* remove icon classes

* clean up inputs

* clean up inputs with icons

* update input spacing again

* update suffix position

* build

* Add support for xlarge inputs

* fix input issues

* fix input issue

* update listeners

* update number inputs for settings

* update append/prepend spacing

* clean up inputs, set expression input as text

* fix type errors

* fix workflow number input

* fix tags dropdown bug

* fix bugs

* fix menu item bug

* remove font weight from link element

* remove default

* fix select option

* fix contrast issues

* allow overflow x for multi selects

* fix icon

* update options select

* fix issue that resolves expression to null

* update how actions are centered

* fix up selects

* update selects to support limiting size

* update option styles

*  Apply suggestions BHesseldieck

Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>

* 🎨 code format

Co-authored-by: Jan <janober@users.noreply.github.com>
Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>
Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>

*  Revert "🔥 remove empty files"

This reverts commit e91ace4e52.

*  Remove private from n8n-design-system package

* 🎨 Change to spaces to stay consistent with editorconfig & others
package files

*  Fix year in license

Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>
Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-08-29 13:36:17 +02:00

317 lines
5.4 KiB
SCSS

@use "mixins/mixins";
@use "./common/var";
@include mixins.b(step) {
position: relative;
flex-shrink: 1;
@include mixins.pseudo(last-of-type) {
@include mixins.e(line) {
display: none;
}
// 只有未设置 space 的情况下才自适应宽度
@include mixins.when(flex) {
flex-basis: auto !important;
flex-shrink: 0;
flex-grow: 0;
}
@include mixins.e((main, description)) {
padding-right: 0;
}
}
@include mixins.e(head) {
position: relative;
width: 100%;
@include mixins.when(process) {
color: var(--color-text-dark);
border-color: var(--color-text-dark);
}
@include mixins.when(wait) {
color: var(--color-text-lighter);
border-color: var(--color-text-lighter);
}
@include mixins.when(success) {
color: var(--color-success);
border-color: var(--color-success);
}
@include mixins.when(error) {
color: var(--color-danger);
border-color: var(--color-danger);
}
@include mixins.when(finish) {
color: var(--color-primary);
border-color: var(--color-primary);
}
}
@include mixins.e(icon) {
position: relative;
z-index: 1;
display: inline-flex;
justify-content: center;
align-items: center;
width: 24px;
height: 24px;
font-size: 14px;
box-sizing: border-box;
background: var.$color-white;
transition: 0.15s ease-out;
@include mixins.when(text) {
border-radius: 50%;
border: 2px solid;
border-color: inherit;
}
@include mixins.when(icon) {
width: 40px;
}
}
@include mixins.e(icon-inner) {
display: inline-block;
user-select: none;
text-align: center;
font-weight: bold;
line-height: 1;
color: inherit;
&[class*='el-icon']:not(.is-status) {
font-size: 25px;
font-weight: normal;
}
// 组件自身表示状态的图标
@include mixins.when(status) {
transform: translateY(1px);
}
}
@include mixins.e(line) {
position: absolute;
border-color: inherit;
background-color: var(--color-text-lighter);
}
@include mixins.e(line-inner) {
display: block;
border-width: 1px;
border-style: solid;
border-color: inherit;
transition: 0.15s ease-out;
box-sizing: border-box;
width: 0;
height: 0;
}
@include mixins.e(main) {
white-space: normal;
text-align: left;
}
@include mixins.e(title) {
font-size: 16px;
line-height: 38px;
@include mixins.when(process) {
font-weight: bold;
color: var(--color-text-dark);
}
@include mixins.when(wait) {
color: var(--color-text-lighter);
}
@include mixins.when(success) {
color: var(--color-success);
}
@include mixins.when(error) {
color: var(--color-danger);
}
@include mixins.when(finish) {
color: var(--color-primary);
}
}
@include mixins.e(description) {
padding-right: 10%;
margin-top: -5px;
font-size: 12px;
line-height: 20px;
font-weight: normal;
@include mixins.when(process) {
color: var(--color-text-dark);
}
@include mixins.when(wait) {
color: var(--color-text-lighter);
}
@include mixins.when(success) {
color: var(--color-success);
}
@include mixins.when(error) {
color: var(--color-danger);
}
@include mixins.when(finish) {
color: var(--color-primary);
}
}
@include mixins.when(horizontal) {
display: inline-block;
@include mixins.e(line) {
height: 2px;
top: 11px;
left: 0;
right: 0;
}
}
@include mixins.when(vertical) {
display: flex;
@include mixins.e(head) {
flex-grow: 0;
width: 24px;
}
@include mixins.e(main) {
padding-left: 10px;
flex-grow: 1;
}
@include mixins.e(title) {
line-height: 24px;
padding-bottom: 8px;
}
@include mixins.e(line) {
width: 2px;
top: 0;
bottom: 0;
left: 11px;
}
@include mixins.e(icon) {
@include mixins.when(icon) {
width: 24px;
}
}
}
@include mixins.when(center) {
@include mixins.e(head) {
text-align: center;
}
@include mixins.e(main) {
text-align: center;
}
@include mixins.e(description) {
padding-left: 20%;
padding-right: 20%;
}
@include mixins.e(line) {
left: 50%;
right: -50%;
}
}
@include mixins.when(simple) {
display: flex;
align-items: center;
@include mixins.e(head) {
width: auto;
font-size: 0;
padding-right: 10px;
}
@include mixins.e(icon) {
background: transparent;
width: 16px;
height: 16px;
font-size: 12px;
}
@include mixins.e(icon-inner) {
&[class*='el-icon']:not(.is-status) {
font-size: 18px;
}
&.is-status {
transform: scale(0.8) translateY(1px);
}
}
@include mixins.e(main) {
position: relative;
display: flex;
align-items: stretch;
flex-grow: 1;
}
@include mixins.e(title) {
font-size: 16px;
line-height: 20px;
}
@include mixins.pseudo('not(:last-of-type)') {
@include mixins.e(title) {
max-width: 50%;
word-break: break-all;
}
}
@include mixins.e(arrow) {
flex-grow: 1;
display: flex;
align-items: center;
justify-content: center;
&::before,
&::after {
content: '';
display: inline-block;
position: absolute;
height: 15px;
width: 1px;
background: var(--color-text-lighter);
}
&::before {
transform: rotate(-45deg) translateY(-4px);
transform-origin: 0 0;
}
&::after {
transform: rotate(45deg) translateY(4px);
transform-origin: 100% 100%;
}
}
@include mixins.pseudo(last-of-type) {
@include mixins.e(arrow) {
display: none;
}
}
}
}