Skip to content

Antd Upgrade #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: UI fixes
  • Loading branch information
raheeliftikhar5 committed Jul 26, 2023
commit 9f7a49b3118a7c755465e128d808fa1183016edf
12 changes: 7 additions & 5 deletions client/packages/lowcoder-design/src/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,13 @@ const DropDownMenuItemCss = `
`;

const DropdownMenu = styled(AntdMenu)`
padding: 8px;
background: #ffffff;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
border-radius: 8px;
${DropDownMenuItemCss}
&&& {
padding: 8px;
background: #ffffff;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
border-radius: 8px;
${DropDownMenuItemCss}
}
`;
const StyleableDropDownSubMenu = (props: { className?: string } & SubMenuProps) => {
const { className, ...restProps } = props;
Expand Down
126 changes: 66 additions & 60 deletions client/packages/lowcoder-design/src/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,52 +25,54 @@ const buttonStyleConfig = {
}
`,
primary: css`
background: #4965f2;
border: 1px solid #4965f2;
color: #ffffff;

&.ant-btn-background-ghost {
background-color: #fafbff;
color: #4965f2;
border-color: #c9d1fc;
&&& {
background: #4965f2;
border: 1px solid #4965f2;
color: #ffffff;

:hover {
color: #315efb;
background-color: #f5faff;
border-color: #c2d6ff;
&.ant-btn-background-ghost {
background-color: #fafbff;
color: #4965f2;
border-color: #c9d1fc;

:hover {
color: #315efb;
background-color: #f5faff;
border-color: #c2d6ff;
}

:focus {
color: #315efb;
background-color: #f5faff;
border-color: #c2d6ff;
}
}

:focus {
color: #315efb;
background-color: #f5faff;
border-color: #c2d6ff;
background: #4965f2;
border: 1px solid #4965f2;
color: #ffffff;
}
}

:focus {
background: #4965f2;
border: 1px solid #4965f2;
color: #ffffff;
}
:hover {
border: 1px solid #315efb;
background: #315efb;
color: #ffffff;
}

:hover {
border: 1px solid #315efb;
background: #315efb;
color: #ffffff;
}
:disabled {
:hover {
border: 1px solid #dbe1fd;
background: #dbe1fd;
color: #ffffff;
opacity: 1;
}

:disabled {
:hover {
border: 1px solid #dbe1fd;
background: #dbe1fd;
color: #ffffff;
opacity: 1;
}

border: 1px solid #dbe1fd;
background: #dbe1fd;
color: #ffffff;
opacity: 1;
}
`,
blue: css`
Expand Down Expand Up @@ -98,37 +100,41 @@ const buttonStyleConfig = {
}
`,
link: css`
color: #4955f2;
border-color: #c9d1fc;
background-color: #fafbff;

&:hover {
color: #315efb;
border-color: #c2d6ff;
background-color: #f9fbff;
}

&:focus {
color: #315efb;
border-color: #c2d6ff;
background-color: #f9fbff;
&&& {
color: #4955f2;
border-color: #c9d1fc;
background-color: #fafbff;

&:hover {
color: #315efb;
border-color: #c2d6ff;
background-color: #f9fbff;
}

&:focus {
color: #315efb;
border-color: #c2d6ff;
background-color: #f9fbff;
}
}
`,
delete: css`
color: #f73131;
border-color: #fccdcd;
background-color: #fef4f4;

&:hover {
&&& {
color: #f73131;
border-color: #fccdcd;
background-color: #feecec;
}

&:focus {
color: #f73131;
border-color: #fccdcd;
background-color: #feecec;
background-color: #fef4f4;

&:hover {
color: #f73131;
border-color: #fccdcd;
background-color: #feecec;
}

&:focus {
color: #f73131;
border-color: #fccdcd;
background-color: #feecec;
}
}
`,
};
Expand All @@ -142,7 +148,7 @@ const StyledAntdButton = styled(Button)<{ $buttonType: TacoButtonType; $loading:
text-align: center;
line-height: 13px;
font-size: 13px;
border-radius: 4px;
// border-radius: 4px;

&.ant-btn {
box-shadow: none;
Expand Down
4 changes: 4 additions & 0 deletions client/packages/lowcoder-design/src/components/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const SimplePopover = (props: {
);
return (
<Popover
overlayInnerStyle={{padding: 0}}
align={{
offset: [-12, 0, 0, 0],
}}
Expand Down Expand Up @@ -161,6 +162,9 @@ const EditPopover = (props: EditPopoverProps) => {

return (
<Popover
arrow={false}
overlayStyle={{paddingTop: '15px'}}
overlayInnerStyle={{padding: 0}}
content={() => (
<>
<Wedge />
Expand Down
45 changes: 24 additions & 21 deletions client/packages/lowcoder/src/components/LinkPlusButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,33 @@ const Icon = styled.div`
`;

const Btn = styled(TacoButton)`
height: 13px;
padding: 0;
color: #4965f2;
border: none;
display: flex;
align-items: center;
font-size: 13px;
line-height: 13px;
box-shadow: none;

:hover {
color: #315efb;
border: none;
background-color: #ffffff;
}
&&& {

:focus {
color: #315efb;
height: 13px;
padding: 0;
color: #4965f2;
border: none;
background-color: #ffffff;
}
display: flex;
align-items: center;
font-size: 13px;
line-height: 13px;
box-shadow: none;

:hover {
color: #315efb;
border: none;
background-color: #ffffff;
}

:focus {
color: #315efb;
border: none;
background-color: #ffffff;
}

&:hover ${Icon} g {
stroke: #315efb;
&:hover ${Icon} g {
stroke: #315efb;
}
}
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,38 @@ export function getButtonStyle(buttonStyle: ButtonStyleType) {
const hoverColor = genHoverColor(buttonStyle.background);
const activeColor = genActiveColor(buttonStyle.background);
return css`
border-radius: ${buttonStyle.radius};
margin: ${buttonStyle.margin};
padding: ${buttonStyle.padding};
&:not(:disabled) {
// click animation color
--antd-wave-shadow-color: ${buttonStyle.border};
border-color: ${buttonStyle.border};
color: ${buttonStyle.text};
background-color: ${buttonStyle.background};
&&& {
border-radius: ${buttonStyle.radius};
margin: ${buttonStyle.margin};
padding: ${buttonStyle.padding};

:hover,
:focus {
color: ${buttonStyle.text};
background-color: ${hoverColor};
border-color: ${buttonStyle.border === buttonStyle.background
? hoverColor
: buttonStyle.border};
}

:active {
&:not(:disabled) {
// click animation color
--antd-wave-shadow-color: ${buttonStyle.border};
border-color: ${buttonStyle.border};
color: ${buttonStyle.text};
background-color: ${activeColor};
border-color: ${buttonStyle.border === buttonStyle.background
? activeColor
: buttonStyle.border};
background-color: ${buttonStyle.background};
border-radius: ${buttonStyle.radius};
margin: ${buttonStyle.margin};
padding: ${buttonStyle.padding};

:hover,
:focus {
color: ${buttonStyle.text};
background-color: ${hoverColor};
border-color: ${buttonStyle.border === buttonStyle.background
? hoverColor
: buttonStyle.border};
}

:active {
color: ${buttonStyle.text};
background-color: ${activeColor};
border-color: ${buttonStyle.border === buttonStyle.background
? activeColor
: buttonStyle.border};
}
}
}

`;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const Dropdown = styled(AntdDropdown)`
`;

const CreateDropdownMenu = styled(AntdMenu)`
&&& {

width: fit-content;
min-width: 110px;
padding: 8px;
Expand All @@ -54,7 +56,9 @@ const CreateDropdownMenu = styled(AntdMenu)`
font-size: 13px;
color: #333333;
line-height: 13px;
display: flex;
}
}
`;

const CreateMenuItem = styled.div`
Expand Down
36 changes: 19 additions & 17 deletions client/packages/lowcoder/src/pages/common/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,25 +142,27 @@ const LoginBtn = styled(TacoButton)`
margin-right: 4px;
`;
const GrayBtn = styled(TacoButton)`
color: #ffffff;
background: #8b8fa34c;
border: none;
height: 28px;
padding: 4px 13px;
margin-right: 8px;
cursor: pointer;
--antd-wave-shadow-color: #8b8fa34c;

&:hover {
background: #666666;
color: #ffffff;
border: none;
}

&:focus {
background: #666666;
&&& {
color: #ffffff;
background: #8b8fa34c;
border: none;
height: 28px;
padding: 4px 13px;
margin-right: 8px;
cursor: pointer;
--antd-wave-shadow-color: #8b8fa34c;

&:hover {
background: #666666;
color: #ffffff;
border: none;
}

&:focus {
background: #666666;
color: #ffffff;
border: none;
}
}
`;

Expand Down
Loading