2023-06-04 08:16:25 +00:00
|
|
|
import styled, { css } from "styled-components";
|
2023-05-15 07:42:39 +00:00
|
|
|
import Base from "../themes/base";
|
2023-05-15 19:19:30 +00:00
|
|
|
import { AddRoleButton, EveryoneRoleIcon } from "./svg";
|
2023-05-15 07:42:39 +00:00
|
|
|
|
2023-05-16 11:12:01 +00:00
|
|
|
const StyledFillingRoleSelector = styled.div`
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: 4px;
|
|
|
|
`;
|
2023-05-15 07:42:39 +00:00
|
|
|
|
|
|
|
const StyledRow = styled.div`
|
|
|
|
height: 48px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
gap: 8px;
|
|
|
|
`;
|
|
|
|
|
2023-05-17 09:09:30 +00:00
|
|
|
const StyledUserRow = styled.div`
|
|
|
|
height: 48px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
.content {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
gap: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.user-with-role {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-05-15 07:42:39 +00:00
|
|
|
const StyledNumber = styled.div`
|
|
|
|
font-weight: 600;
|
|
|
|
font-size: 14px;
|
|
|
|
line-height: 16px;
|
|
|
|
color: #a3a9ae;
|
|
|
|
`;
|
|
|
|
|
2023-05-17 09:09:30 +00:00
|
|
|
const StyledAvatar = styled.img`
|
|
|
|
height: 32px;
|
|
|
|
width: 32px;
|
|
|
|
border-radius: 50%;
|
|
|
|
`;
|
|
|
|
|
2023-05-15 07:42:39 +00:00
|
|
|
const StyledAddRoleButton = styled(AddRoleButton)`
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
|
|
|
|
path {
|
|
|
|
fill: ${(props) => props.color};
|
|
|
|
}
|
|
|
|
|
|
|
|
rect {
|
|
|
|
stroke: ${(props) => props.color};
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-05-15 19:19:30 +00:00
|
|
|
const StyledEveryoneRoleIcon = styled(EveryoneRoleIcon)`
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
`;
|
|
|
|
|
2023-05-15 07:42:39 +00:00
|
|
|
const StyledRole = styled.div`
|
|
|
|
font-weight: 600;
|
|
|
|
font-size: 14px;
|
|
|
|
line-height: 16px;
|
|
|
|
`;
|
|
|
|
|
2023-05-17 09:09:30 +00:00
|
|
|
const StyledAssignedRole = styled.div`
|
|
|
|
padding-left: 4px;
|
2023-06-04 08:16:25 +00:00
|
|
|
${(props) =>
|
|
|
|
props.theme.interfaceDirection === "rtl" &&
|
|
|
|
css`
|
|
|
|
padding-right: 4px;
|
|
|
|
padding-left: auto;
|
|
|
|
`}
|
2023-05-17 09:09:30 +00:00
|
|
|
color: rgba(170, 170, 170, 1);
|
|
|
|
|
|
|
|
::before {
|
|
|
|
content: "(";
|
|
|
|
}
|
|
|
|
::after {
|
|
|
|
content: ")";
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-05-15 19:19:30 +00:00
|
|
|
const StyledEveryoneRoleContainer = styled.div`
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
.title {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.role-description {
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 10px;
|
|
|
|
line-height: 14px;
|
|
|
|
color: #657077;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const StyledTooltip = styled.div`
|
|
|
|
background: #f8f7bf;
|
2023-05-29 14:48:38 +00:00
|
|
|
color: #333;
|
2023-05-15 19:19:30 +00:00
|
|
|
border-radius: 6px;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 12px;
|
|
|
|
line-height: 16px;
|
|
|
|
padding: 8px 12px;
|
2023-05-16 11:12:01 +00:00
|
|
|
height: 48px;
|
|
|
|
box-sizing: border-box;
|
2023-05-17 13:46:50 +00:00
|
|
|
margin: 8px 0;
|
2023-05-15 19:19:30 +00:00
|
|
|
`;
|
|
|
|
|
2023-05-15 07:42:39 +00:00
|
|
|
StyledFillingRoleSelector.defaultProps = { theme: Base };
|
|
|
|
|
|
|
|
export {
|
|
|
|
StyledFillingRoleSelector,
|
|
|
|
StyledRow,
|
|
|
|
StyledNumber,
|
|
|
|
StyledAddRoleButton,
|
2023-05-15 19:19:30 +00:00
|
|
|
StyledEveryoneRoleIcon,
|
2023-05-15 07:42:39 +00:00
|
|
|
StyledRole,
|
2023-05-15 19:19:30 +00:00
|
|
|
StyledEveryoneRoleContainer,
|
|
|
|
StyledTooltip,
|
2023-05-17 09:09:30 +00:00
|
|
|
StyledAssignedRole,
|
|
|
|
StyledAvatar,
|
|
|
|
StyledUserRow,
|
2023-05-15 07:42:39 +00:00
|
|
|
};
|