mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
Добавил тему "Веспера"
This commit is contained in:
parent
5d34090238
commit
aee4b662d5
148 changed files with 1331 additions and 1338 deletions
|
@ -1,7 +1,7 @@
|
|||
@import "src/styles/variables";
|
||||
@import 'src/styles/variables';
|
||||
|
||||
.icon {
|
||||
fill: $red;
|
||||
fill: $color_danger;
|
||||
stroke: none;
|
||||
|
||||
//path {
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
import React, { ButtonHTMLAttributes, DetailedHTMLProps, FC, memo, useMemo } from 'react';
|
||||
import React, {
|
||||
ButtonHTMLAttributes,
|
||||
DetailedHTMLProps,
|
||||
FC,
|
||||
memo,
|
||||
useMemo,
|
||||
} from 'react';
|
||||
|
||||
import Tippy from '@tippyjs/react';
|
||||
import classnames from 'classnames';
|
||||
|
@ -14,7 +20,17 @@ type IButtonProps = DetailedHTMLProps<
|
|||
HTMLButtonElement
|
||||
> & {
|
||||
size?: 'mini' | 'normal' | 'big' | 'giant' | 'micro' | 'small';
|
||||
color?: 'primary' | 'secondary' | 'outline' | 'link' | 'gray' | 'lab' | 'outline-white' | 'flat';
|
||||
color?:
|
||||
| 'primary'
|
||||
| 'danger'
|
||||
| 'info'
|
||||
| 'outline'
|
||||
| 'link'
|
||||
| 'gray'
|
||||
| 'flow'
|
||||
| 'lab'
|
||||
| 'outline-white'
|
||||
| 'flat';
|
||||
iconLeft?: IIcon;
|
||||
iconRight?: IIcon;
|
||||
title?: string;
|
||||
|
@ -65,7 +81,7 @@ const Button: FC<IButtonProps> = memo(
|
|||
children,
|
||||
iconOnly,
|
||||
round,
|
||||
]
|
||||
],
|
||||
);
|
||||
|
||||
const loaderSize = useMemo(() => {
|
||||
|
@ -79,9 +95,23 @@ const Button: FC<IButtonProps> = memo(
|
|||
return (
|
||||
<Tippy content={label || ''} disabled={!label}>
|
||||
<button className={computedClassName} {...props}>
|
||||
{iconLeft && <Icon icon={iconLeft} size={20} key={0} className={styles.icon_left} />}
|
||||
{iconLeft && (
|
||||
<Icon
|
||||
icon={iconLeft}
|
||||
size={20}
|
||||
key={0}
|
||||
className={styles.icon_left}
|
||||
/>
|
||||
)}
|
||||
{!!title ? <span>{title}</span> : children}
|
||||
{iconRight && <Icon icon={iconRight} size={20} key={2} className={styles.icon_right} />}
|
||||
{iconRight && (
|
||||
<Icon
|
||||
icon={iconRight}
|
||||
size={20}
|
||||
key={2}
|
||||
className={styles.icon_right}
|
||||
/>
|
||||
)}
|
||||
{loading && (
|
||||
<div className={styles.loading}>
|
||||
<LoaderCircle size={loaderSize} />
|
||||
|
@ -90,7 +120,7 @@ const Button: FC<IButtonProps> = memo(
|
|||
</button>
|
||||
</Tippy>
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
export { Button };
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@import "src/styles/variables";
|
||||
@import 'src/styles/variables';
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
|
@ -25,7 +25,7 @@
|
|||
cursor: pointer;
|
||||
margin: 0;
|
||||
|
||||
background: $button_bg_color;
|
||||
background: $color_primary;
|
||||
border-radius: $radius;
|
||||
|
||||
fill: white;
|
||||
|
@ -36,7 +36,8 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
transition: opacity 0.25s, filter 0.25s, box-shadow 0.25s, background-color 0.5s;
|
||||
transition: opacity 0.25s, filter 0.25s, box-shadow 0.25s,
|
||||
background-color 0.5s;
|
||||
|
||||
input {
|
||||
position: absolute;
|
||||
|
@ -68,10 +69,6 @@
|
|||
&:global(.disabled) {
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
&:active {
|
||||
box-shadow: transparentize(#e933a5, 0.6) 0 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:global(.stretchy) {
|
||||
|
@ -81,7 +78,7 @@
|
|||
|
||||
&:global(.disabled),
|
||||
&:global(.grey) {
|
||||
background: transparentize(white, 0.9);
|
||||
background: $gray_90;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
@ -117,26 +114,26 @@
|
|||
|
||||
&.outline {
|
||||
background: transparent;
|
||||
box-shadow: inset transparentize(white, 0.8) 0 0 0 2px;
|
||||
color: transparentize(white, 0.8);
|
||||
box-shadow: inset $gray_75 0 0 0 2px;
|
||||
color: $gray_75;
|
||||
|
||||
svg {
|
||||
fill: transparentize(white, 0.8);
|
||||
fill: $gray_75;
|
||||
}
|
||||
}
|
||||
|
||||
&.outline-white {
|
||||
background: transparent;
|
||||
box-shadow: inset transparentize(white, 0) 0 0 0 2px;
|
||||
color: transparentize(white, 0);
|
||||
box-shadow: inset $white 0 0 0 2px;
|
||||
color: $white;
|
||||
|
||||
svg {
|
||||
fill: transparentize(white, 0);
|
||||
fill: $white;
|
||||
}
|
||||
}
|
||||
|
||||
&.gray {
|
||||
background: lighten($content_bg, 8%);
|
||||
background: $content_bg_lightest;
|
||||
}
|
||||
|
||||
&.link {
|
||||
|
@ -233,22 +230,31 @@
|
|||
|
||||
.primary {
|
||||
@include outer_shadow;
|
||||
background: $red_gradient_alt;
|
||||
background: $primary_gradient;
|
||||
}
|
||||
|
||||
.secondary {
|
||||
.danger {
|
||||
@include outer_shadow;
|
||||
background: $green_gradient;
|
||||
background: $danger_gradient;
|
||||
}
|
||||
|
||||
.info {
|
||||
@include outer_shadow;
|
||||
background: $info_gradient;
|
||||
}
|
||||
|
||||
.lab {
|
||||
background: $blue;
|
||||
background: $lab_gradient;
|
||||
}
|
||||
|
||||
.flow {
|
||||
background: $flow_gradient;
|
||||
}
|
||||
|
||||
.flat {
|
||||
box-shadow: none;
|
||||
background: $comment_bg;
|
||||
color: darken(white, 20%);
|
||||
background: $content_bg_light;
|
||||
color: $gray_25;
|
||||
}
|
||||
|
||||
.loading {
|
||||
|
@ -260,5 +266,5 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparentize($content_bg, 0.1);
|
||||
background: $content_bg_backdrop;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@import "src/styles/variables";
|
||||
@import 'src/styles/variables';
|
||||
|
||||
.wrap {
|
||||
display: flex;
|
||||
|
@ -6,7 +6,6 @@
|
|||
|
||||
& > * {
|
||||
border-radius: 0;
|
||||
box-shadow: transparentize($color: #000000, $amount: 0.1) 1px 0;
|
||||
|
||||
&:last-child {
|
||||
border-radius: 0 $radius $radius 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@import "src/styles/variables";
|
||||
@import 'src/styles/variables';
|
||||
|
||||
.container {
|
||||
min-height: $info_height;
|
||||
|
@ -6,23 +6,23 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: $text_small;
|
||||
font: $font_14_regular;
|
||||
line-height: 1.2em;
|
||||
padding: $gap;
|
||||
background: transparentize(white, 0.9);
|
||||
background: $gray_90;
|
||||
|
||||
&:global(.danger) {
|
||||
color: white;
|
||||
background: transparentize($red, 0.5);
|
||||
background: $content_bg_danger;
|
||||
}
|
||||
|
||||
&:global(.warning) {
|
||||
color: white;
|
||||
background: transparentize($red, 0.5);
|
||||
background: $content_bg_danger;
|
||||
}
|
||||
|
||||
&:global(.primary) {
|
||||
color: white;
|
||||
background: transparentize($red, 0.5);
|
||||
background: $content_bg_danger;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@import "src/styles/variables";
|
||||
@import 'src/styles/variables';
|
||||
|
||||
.input {
|
||||
display: flex;
|
||||
|
@ -6,7 +6,7 @@
|
|||
color: inherit;
|
||||
|
||||
&.has_error {
|
||||
color: $red;
|
||||
color: $color_danger;
|
||||
}
|
||||
|
||||
&.has_prefix {
|
||||
|
@ -29,7 +29,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
.suffix, .prefix{
|
||||
.suffix,
|
||||
.prefix {
|
||||
fill: currentColor;
|
||||
stroke: currentColor;
|
||||
|
||||
|
|
|
@ -17,11 +17,12 @@
|
|||
}
|
||||
|
||||
&.has_error {
|
||||
box-shadow: inset $red 0 0 0 1px;
|
||||
box-shadow: inset $content_bg_danger 0 0 0 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.error, .title {
|
||||
.error,
|
||||
.title {
|
||||
pointer-events: none;
|
||||
touch-action: none;
|
||||
user-select: none;
|
||||
|
@ -37,7 +38,7 @@
|
|||
padding: 0 $gap * 0.5;
|
||||
border-radius: 4px;
|
||||
color: white;
|
||||
background-color: $red;
|
||||
background-color: $content_bg_danger;
|
||||
bottom: 0;
|
||||
right: $gap * 0.5;
|
||||
transform: translate(0, 50%);
|
||||
|
@ -57,12 +58,14 @@
|
|||
color: $input_grey_color;
|
||||
text-transform: uppercase;
|
||||
|
||||
.focused &, .not_empty & {
|
||||
.focused &,
|
||||
.not_empty & {
|
||||
transform: translate(0, -100%) scale(0.75);
|
||||
}
|
||||
|
||||
.focused.has_error &, .not_empty.has_error & {
|
||||
.focused.has_error &,
|
||||
.not_empty.has_error & {
|
||||
color: white;
|
||||
background-color: $red;
|
||||
background-color: $content_bg_danger;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
@import "src/styles/variables.scss";
|
||||
@import 'src/styles/variables.scss';
|
||||
|
||||
.toggle {
|
||||
height: 24px;
|
||||
width: 48px;
|
||||
flex: 0 0 48px;
|
||||
border-radius: 12px;
|
||||
background-color: transparentize(white, 0.9);
|
||||
background-color: $gray_90;
|
||||
display: flex;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
@ -33,7 +33,7 @@
|
|||
height: 18px;
|
||||
width: 18px;
|
||||
border-radius: 11px;
|
||||
background-color: darken(white, 50%);
|
||||
background-color: $gray_50;
|
||||
transform: translate(0, 0);
|
||||
transition: transform 0.25s, color 0.25s, background-color;
|
||||
}
|
||||
|
@ -45,19 +45,19 @@
|
|||
}
|
||||
|
||||
&.primary {
|
||||
background-color: $wisegreen;
|
||||
background-color: $color_primary;
|
||||
}
|
||||
|
||||
&.secondary {
|
||||
background-color: transparentize(white, 0.85);
|
||||
background-color: $gray_90;
|
||||
}
|
||||
|
||||
&.lab {
|
||||
background-color: $blue;
|
||||
background-color: $color_lab;
|
||||
}
|
||||
|
||||
&.danger {
|
||||
background-color: $red;
|
||||
background-color: $color_danger;
|
||||
}
|
||||
|
||||
&.monochrome {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue