some many UI fixes

This commit is contained in:
Virginie Ky 2019-11-29 20:16:33 +01:00
parent 945906a819
commit dfc9288a1e
25 changed files with 82 additions and 82 deletions

View File

@ -37,26 +37,26 @@ const Wrapper = styled.div`
} }
.gradientOff { .gradientOff {
background-image: linear-gradient(to bottom right, #f65a1d, #f68e0e); background-color: #f64d0a;
color: white !important; color: white !important;
z-index: 0 !important; z-index: 0 !important;
&:active, &:active,
:hover { :hover {
box-shadow: inset -1px 1px 3px rgba(0, 0, 0, 0.1); box-shadow: inset -1px 1px 3px rgba(0, 0, 0, 0.1);
background-image: linear-gradient(to bottom right, #f65a1d, #f68e0e); background-color: #f64d0a;
color: white !important; color: white !important;
z-index: 0 !important; z-index: 0 !important;
} }
} }
.gradientOn { .gradientOn {
background-image: linear-gradient(to bottom right, #005eea, #0097f6); background-color: #007eff;
color: white !important; color: white !important;
box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.1); box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.1);
&:active, &:active,
:hover { :hover {
background-image: linear-gradient(to bottom right, #005eea, #0097f6); background-color: #007eff;
color: white !important; color: white !important;
z-index: 0 !important; z-index: 0 !important;
} }

View File

@ -7,6 +7,7 @@ const Link = styled.div`
font-weight: 400; font-weight: 400;
color: #007eff; color: #007eff;
cursor: pointer; cursor: pointer;
font-size: 13px;
&:before { &:before {
content: '\f013'; content: '\f013';
margin-right: 7px; margin-right: 7px;

View File

@ -2,8 +2,6 @@ import styled from 'styled-components';
const NameWrapper = styled.div` const NameWrapper = styled.div`
position: relative; position: relative;
padding-left: 38px;
padding-right: 38px;
line-height: 30px; line-height: 30px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -13,13 +11,13 @@ const NameWrapper = styled.div`
${({ isOverEditBlock, isOverRemove, isSelected }) => { ${({ isOverEditBlock, isOverRemove, isSelected }) => {
if (isOverRemove) { if (isOverRemove) {
return ` return `
color: #f64d0a color: #f64d0a;
`; `;
} }
if (isSelected || isOverEditBlock) { if (isSelected || isOverEditBlock) {
return ` return `
color: #007eff color: #007eff;
`; `;
} }
}} }}

View File

@ -19,7 +19,12 @@ const Wrapper = styled.div`
.sub_wrapper { .sub_wrapper {
position: relative; position: relative;
cursor: pointer; cursor: pointer;
background: ${({ isOverEditBlock, isOverRemove, isSelected, isSub }) => { background-color: ${({
isOverEditBlock,
isOverRemove,
isSelected,
isSub,
}) => {
if (isOverRemove) { if (isOverRemove) {
return '#ffe9e0'; return '#ffe9e0';
} else if (isSelected || isOverEditBlock) { } else if (isSelected || isOverEditBlock) {
@ -34,7 +39,25 @@ const Wrapper = styled.div`
${({ isOverEditBlock, isOverRemove, isSelected }) => ${({ isOverEditBlock, isOverRemove, isSelected }) =>
getColor(isOverRemove, isSelected, isOverEditBlock)}; getColor(isOverRemove, isSelected, isOverEditBlock)};
border-radius: 2px; border-radius: 2px;
padding-left: 38px;
padding-right: 38px;
${({ isSub }) =>
isSub &&
css`
padding-left: 12px !important;
padding-right: 12px !important;
.grab,
.remove {
display: none;
}
`}
.name { .name {
font-size: 13px;
font-weight: 500;
${({ isOverRemove }) => ${({ isOverRemove }) =>
isOverRemove && isOverRemove &&
css` css`

View File

@ -57,7 +57,6 @@ const DraggedField = forwardRef(
<SubWrapper <SubWrapper
className="sub_wrapper" className="sub_wrapper"
isSelected={isSelected} isSelected={isSelected}
isSub={isSub}
isOverEditBlock={isOverEditBlock} isOverEditBlock={isOverEditBlock}
isOverRemove={isOverRemove} isOverRemove={isOverRemove}
onMouseEnter={() => { onMouseEnter={() => {

View File

@ -4,7 +4,7 @@ const getColor = (isOverRemove, isSelected, isOverEditBlock) => {
} else if (isSelected || isOverEditBlock) { } else if (isSelected || isOverEditBlock) {
return '#aed4fb'; return '#aed4fb';
} else { } else {
return '#E3E9F3'; return '#e9eaeb';
} }
}; };

View File

@ -3,8 +3,15 @@ import PlusButton from '../PlusButton';
const Button = styled(PlusButton)` const Button = styled(PlusButton)`
transform: rotate(-90deg); transform: rotate(-90deg);
transition: background-color 0.2s linear; transition: background-color 0.1s linear;
transition: transform 0.2s ease-in-out; transition: transform 0.1s ease-in-out;
&:hover {
background-color: #aed4fb;
:before,
:after {
background-color: #007eff;
}
}
${({ hasError }) => { ${({ hasError }) => {
if (hasError) { if (hasError) {
@ -18,11 +25,6 @@ const Button = styled(PlusButton)`
}} }}
&.isOpen { &.isOpen {
transform: rotate(-45deg); transform: rotate(-45deg);
background-color: #aed4fb;
:before,
:after {
background-color: #007eff;
}
} }
`; `;

View File

@ -10,7 +10,7 @@ const ComponentWrapper = styled.div`
&:before { &:before {
content: '&'; content: '&';
position: absolute; position: absolute;
top: -37px; top: -30px;
left: 22px; left: 22px;
height: 100%; height: 100%;
width: 2px; width: 2px;
@ -23,7 +23,7 @@ const ComponentWrapper = styled.div`
padding-bottom: 5px; padding-bottom: 5px;
} }
> div:last-of-type { > div:last-of-type {
margin-bottom: 18px; margin-bottom: 22px;
} }
} }
`; `;

View File

@ -6,8 +6,8 @@ const ComponentsPicker = styled.div`
transition: max-height 0.2s ease-out; transition: max-height 0.2s ease-out;
> div { > div {
margin-top: 19px; margin-top: 15px;
padding: 23px 18px 22px 18px; padding: 23px 18px 26px 18px;
background-color: #f2f3f4; background-color: #f2f3f4;
} }
@ -18,6 +18,7 @@ const ComponentsPicker = styled.div`
`} `}
.componentPickerTitle { .componentPickerTitle {
margin-bottom: 18px;
color: #919bae; color: #919bae;
font-weight: 600; font-weight: 600;
font-size: 13px; font-size: 13px;

View File

@ -3,7 +3,10 @@ import styled from 'styled-components';
const DynamicZoneWrapper = styled.div` const DynamicZoneWrapper = styled.div`
position: relative; position: relative;
padding-top: 10px; padding-top: 10px;
margin-bottom: 18px; margin-bottom: 15px;
& + & {
padding-top: 13px;
}
`; `;
export default DynamicZoneWrapper; export default DynamicZoneWrapper;

View File

@ -1,11 +1,11 @@
import styled from 'styled-components'; import styled from 'styled-components';
const Label = styled.div` const Label = styled.div`
padding: 13px 20px; padding: 9px 20px;
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 600;
position: relative; position: relative;
min-height: 68px; min-height: 64px;
&:after { &:after {
content: '• '; content: '• ';
position: absolute; position: absolute;

View File

@ -8,7 +8,7 @@ const Wrapper = styled.div`
position: absolute; position: absolute;
display: none; display: none;
top: 10px; top: 10px;
left: calc(50% + 46px); left: calc(50% + 38px);
> span { > span {
letter-spacing: 0.5px; letter-spacing: 0.5px;
text-transform: uppercase; text-transform: uppercase;

View File

@ -1,39 +0,0 @@
import styled, { css } from 'styled-components';
const Button = styled.button`
width: 100%;
height: 37px;
margin-bottom: 27px;
text-align: center;
border: 1px solid rgba(227, 233, 243, 0.75);
border-top: 1px solid
${({ doesPreviousFieldContainErrorsAndIsClosed }) =>
doesPreviousFieldContainErrorsAndIsClosed
? '#FFA784'
: 'rgba(227, 233, 243, 0.75)'};
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
${({ withBorderRadius }) => {
if (withBorderRadius) {
return css`
border-radius: 2px;
`;
}
}}
color: #007eff;
font-size: 12px;
font-weight: 700;
-webkit-font-smoothing: antialiased;
line-height: 37px;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 0.5px;
> i,
> svg {
margin-right: 10px;
}
`;
export default Button;

View File

@ -2,6 +2,9 @@ import styled from 'styled-components';
const Wrapper = styled.div` const Wrapper = styled.div`
position: relative; position: relative;
.row {
margin-bottom: 4px;
}
${({ isFromDynamicZone }) => { ${({ isFromDynamicZone }) => {
if (isFromDynamicZone) { if (isFromDynamicZone) {

View File

@ -205,7 +205,7 @@ const Item = ({
showRightCarret = false; showRightCarret = false;
} }
} }
console.log(type);
return ( return (
<DraggedFieldWithPreview <DraggedFieldWithPreview
goTo={goTo} goTo={goTo}

View File

@ -5,11 +5,17 @@ const FormWrapper = styled.div`
background: #ffffff; background: #ffffff;
border-radius: 2px; border-radius: 2px;
box-shadow: 0 2px 4px #e3e9f3; box-shadow: 0 2px 4px #e3e9f3;
margin-bottom: 14px; margin-bottom: 3px;
> div { > div {
margin-right: 0; margin-right: 0;
margin-left: 0; margin-left: 0;
} }
.row {
margin-bottom: 4px;
&:last-of-type {
margin-bottom: 0;
}
}
`; `;
export default FormWrapper; export default FormWrapper;

View File

@ -3,7 +3,7 @@ import styled from 'styled-components';
const Container = styled.div` const Container = styled.div`
min-width: 200px; min-width: 200px;
font-size: 1.3rem; font-size: 1.3rem;
padding-bottom: 30px; padding-bottom: 26px;
.labelFile { .labelFile {
margin-bottom: 9px; margin-bottom: 9px;

View File

@ -1,7 +1,7 @@
import styled from 'styled-components'; import styled from 'styled-components';
const Wrapper = styled.div` const Wrapper = styled.div`
padding-bottom: 30px; padding-bottom: 26px;
label { label {
margin-bottom: 1rem; margin-bottom: 1rem;

View File

@ -9,7 +9,7 @@ const NonRepeatableWrapper = styled.div`
return ` return `
position: relative; position: relative;
height: 108px; height: 108px;
margin-bottom: 25px !important; margin-bottom: 21px !important;
background-color: #fafafb; background-color: #fafafb;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
@ -49,6 +49,7 @@ const NonRepeatableWrapper = styled.div`
if (isFromDynamicZone) { if (isFromDynamicZone) {
return ` return `
background-color: #fff; background-color: #fff;
padding: 0 10px !important;
`; `;
} }

View File

@ -4,9 +4,10 @@ const beforeStyle = `
content: ' '; content: ' ';
position: absolute; position: absolute;
display: block; display: block;
width: 2px; width: 14px;
left: 17px; height: 2px;
top: 10px; left: 11px;
top: 17px;
bottom: 10px; bottom: 10px;
z-index: 9; z-index: 9;
`; `;
@ -15,9 +16,10 @@ const afterStyle = `
content: ' '; content: ' ';
position: absolute; position: absolute;
display: block; display: block;
height: 2px; height: 14px;
top: 17px; width: 2px;
left: 10px; left: 17px;
top: 11px;
right: 10px; right: 10px;
z-index: 9; z-index: 9;
`; `;

View File

@ -3,7 +3,7 @@ import styled, { css } from 'styled-components';
const Button = styled.button` const Button = styled.button`
width: 100%; width: 100%;
height: 37px; height: 37px;
margin-bottom: 25px; margin-bottom: 21px;
padding: 0 0 3px 0; padding: 0 0 3px 0;
text-align: center; text-align: center;
border: 1px solid rgba(227, 233, 243, 0.75); border: 1px solid rgba(227, 233, 243, 0.75);

View File

@ -1,8 +1,8 @@
import styled from 'styled-components'; import styled from 'styled-components';
const Separator = styled.div` const Separator = styled.div`
margin-top: 14px; margin-top: 17px;
margin-bottom: 23px; margin-bottom: 24px;
border-top: 1px solid #f6f6f6; border-top: 1px solid #f6f6f6;
`; `;

View File

@ -1,7 +1,7 @@
import styled from 'styled-components'; import styled from 'styled-components';
const Wrapper = styled.div` const Wrapper = styled.div`
padding-bottom: 2.8rem; padding-bottom: 2.4rem;
font-size: 1.3rem; font-size: 1.3rem;
font-family: 'Lato'; font-family: 'Lato';
label { label {

View File

@ -7,7 +7,7 @@
"components.AddFilterCTA.add": "Filters", "components.AddFilterCTA.add": "Filters",
"components.AddFilterCTA.hide": "Filters", "components.AddFilterCTA.hide": "Filters",
"components.DraggableAttr.edit": "Click to edit", "components.DraggableAttr.edit": "Click to edit",
"components.DynamicZone.add-compo": "Add a component to {componentName}", "components.DynamicZone.add-compo": "Add to {componentName}",
"components.DynamicZone.pick-compo": "Pick one component", "components.DynamicZone.pick-compo": "Pick one component",
"components.DynamicZone.missing.singular": "There is {count} missing component", "components.DynamicZone.missing.singular": "There is {count} missing component",
"components.DynamicZone.missing.plural": "There is {count} missing components", "components.DynamicZone.missing.plural": "There is {count} missing components",

View File

@ -7,7 +7,7 @@
"components.AddFilterCTA.add": "Filtres", "components.AddFilterCTA.add": "Filtres",
"components.AddFilterCTA.hide": "Filtres", "components.AddFilterCTA.hide": "Filtres",
"components.DraggableAttr.edit": "Cliquez pour modifier", "components.DraggableAttr.edit": "Cliquez pour modifier",
"components.DynamicZone.add-compo": "Ajouter un composant à {componentName}", "components.DynamicZone.add-compo": "Ajouter à {componentName}",
"components.DynamicZone.pick-compo": "Choisir un composant", "components.DynamicZone.pick-compo": "Choisir un composant",
"components.DynamicZone.missing.singular": "{count} composant manquant", "components.DynamicZone.missing.singular": "{count} composant manquant",
"components.DynamicZone.missing.plural": "{count} composants manquants", "components.DynamicZone.missing.plural": "{count} composants manquants",