2022-09-06 01:51:57 +00:00
|
|
|
import {colors, theme, vars} from 'app/client/ui2018/cssVars';
|
2021-10-01 14:24:23 +00:00
|
|
|
import {icon} from 'app/client/ui2018/icons';
|
|
|
|
import {input, styled} from 'grainjs';
|
|
|
|
import {cssMenuItem} from 'popweasel';
|
|
|
|
|
|
|
|
// Styled elements used for rendering a user, e.g. in the UserManager, Billing, etc.
|
|
|
|
// There is a general structure, but enough small variation that there is no helper at this point.
|
|
|
|
//
|
|
|
|
// cssMemberListItem(
|
|
|
|
// cssMemberImage(
|
|
|
|
// createUserImage(getFullUser(member), 'large')
|
|
|
|
// ),
|
|
|
|
// cssMemberText(
|
|
|
|
// cssMemberPrimary(NAME),
|
|
|
|
// cssMemberSecondary(EMAIL),
|
2021-10-25 16:54:04 +00:00
|
|
|
// cssMemberType(DESCRIPTION),
|
2021-10-01 14:24:23 +00:00
|
|
|
// )
|
|
|
|
// )
|
|
|
|
|
|
|
|
export const cssMemberListItem = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
width: 460px;
|
2021-10-25 16:54:04 +00:00
|
|
|
min-height: 64px;
|
2021-10-01 14:24:23 +00:00
|
|
|
margin: 0 auto;
|
|
|
|
padding: 12px 0;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssMemberImage = styled('div', `
|
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
|
|
|
margin: 0 4px;
|
|
|
|
border-radius: 20px;
|
|
|
|
background-color: ${colors.lightGreen};
|
|
|
|
background-size: cover;
|
|
|
|
|
|
|
|
.${cssMemberListItem.className}-removed & {
|
|
|
|
opacity: 0.4;
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssMemberText = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
margin: 2px 12px;
|
|
|
|
flex: 1 1 0;
|
|
|
|
min-width: 0px;
|
|
|
|
font-size: ${vars.mediumFontSize};
|
|
|
|
|
|
|
|
.${cssMemberListItem.className}-removed & {
|
|
|
|
opacity: 0.4;
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssMemberPrimary = styled('span', `
|
|
|
|
font-weight: bold;
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.text};
|
2021-10-01 14:24:23 +00:00
|
|
|
padding: 2px 0;
|
|
|
|
|
|
|
|
.${cssMenuItem.className}-sel & {
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.menuItemSelectedFg};
|
2021-10-01 14:24:23 +00:00
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssMemberSecondary = styled('span', `
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.lightText};
|
2021-10-01 14:24:23 +00:00
|
|
|
/* the following just undo annoying bootstrap styles that apply to all labels */
|
2021-10-25 16:54:04 +00:00
|
|
|
margin: 0px;
|
|
|
|
font-weight: normal;
|
|
|
|
padding: 2px 0;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
.${cssMenuItem.className}-sel & {
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.menuItemSelectedFg};
|
2021-10-25 16:54:04 +00:00
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssMemberType = styled('span', `
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.lightText};
|
2021-10-25 16:54:04 +00:00
|
|
|
/* the following just undo annoying bootstrap styles that apply to all labels */
|
|
|
|
margin: 0px;
|
|
|
|
font-weight: normal;
|
|
|
|
padding: 2px 0;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
.${cssMenuItem.className}-sel & {
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.menuItemSelectedFg};
|
2021-10-25 16:54:04 +00:00
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssMemberTypeProblem = styled('span', `
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.errorText};
|
2021-10-25 16:54:04 +00:00
|
|
|
/* the following just undo annoying bootstrap styles that apply to all labels */
|
2021-10-01 14:24:23 +00:00
|
|
|
margin: 0px;
|
|
|
|
font-weight: normal;
|
|
|
|
padding: 2px 0;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
.${cssMenuItem.className}-sel & {
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.menuItemSelectedFg};
|
2021-10-01 14:24:23 +00:00
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssMemberBtn = styled('div', `
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&-disabled {
|
|
|
|
opacity: 0.3;
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssRemoveIcon = styled(icon, `
|
2022-09-06 01:51:57 +00:00
|
|
|
background-color: ${theme.lightText};
|
2021-10-01 14:24:23 +00:00
|
|
|
margin: 12px 0;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssEmailInputContainer = styled('div', `
|
|
|
|
position: relative;
|
|
|
|
display: flex;
|
|
|
|
height: 42px;
|
|
|
|
padding: 0 3px;
|
|
|
|
margin: 16px 63px;
|
2022-09-06 01:51:57 +00:00
|
|
|
border: 1px solid ${theme.inputBorder};
|
2021-10-01 14:24:23 +00:00
|
|
|
border-radius: 3px;
|
|
|
|
font-size: ${vars.mediumFontSize};
|
|
|
|
outline: none;
|
|
|
|
|
|
|
|
&-green {
|
2022-09-06 01:51:57 +00:00
|
|
|
border: 1px solid ${theme.inputValid};
|
2021-10-01 14:24:23 +00:00
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssEmailInput = styled(input, `
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.inputFg};
|
|
|
|
background-color: ${theme.inputBg};
|
2021-10-01 14:24:23 +00:00
|
|
|
flex: 1 1 0;
|
|
|
|
line-height: 42px;
|
|
|
|
font-size: ${vars.mediumFontSize};
|
|
|
|
font-family: ${vars.fontFamily};
|
|
|
|
outline: none;
|
|
|
|
border: none;
|
2022-09-06 01:51:57 +00:00
|
|
|
|
|
|
|
&::placeholder {
|
|
|
|
color: ${theme.inputPlaceholderFg};
|
|
|
|
}
|
2021-10-01 14:24:23 +00:00
|
|
|
`);
|
|
|
|
|
|
|
|
export const cssMailIcon = styled(icon, `
|
|
|
|
margin: 12px 8px 12px 13px;
|
2022-09-06 01:51:57 +00:00
|
|
|
background-color: ${theme.lightText};
|
2021-10-01 14:24:23 +00:00
|
|
|
`);
|