Merge branch 'master' of https://github.com/ONLYOFFICE/CommunityServer-AspNetCore
This commit is contained in:
commit
775aa0236b
@ -31,6 +31,7 @@ const getFormatedGroups = (user, status) => {
|
||||
type='action'
|
||||
title={temp[0].label}
|
||||
fontSize='12px'
|
||||
fontWeight={600}
|
||||
color={linkColor}
|
||||
onClick={temp[0].onClick}
|
||||
>
|
||||
@ -43,6 +44,7 @@ const getFormatedGroups = (user, status) => {
|
||||
containerWidth='160px'
|
||||
title={temp[0].label}
|
||||
fontSize='12px'
|
||||
fontWeight={600}
|
||||
color={linkColor}
|
||||
data={temp}
|
||||
>
|
||||
@ -95,6 +97,7 @@ const UserContent = ({ user, history, settings }) => {
|
||||
as="div"
|
||||
color={sideInfoColor}
|
||||
fontSize='12px'
|
||||
fontWeight={600}
|
||||
title={title}
|
||||
truncate={true}
|
||||
>
|
||||
@ -103,8 +106,8 @@ const UserContent = ({ user, history, settings }) => {
|
||||
: <div style={headDepartmentStyle}></div>
|
||||
}
|
||||
{groups}
|
||||
<Link type='page' title={mobilePhone} fontSize='12px' color={sideInfoColor} onClick={onPhoneClick} isTextOverflow={true}>{mobilePhone}</Link>
|
||||
<Link containerWidth='220px' type='page' title={email} fontSize='12px' color={sideInfoColor} onClick={onEmailClick} isTextOverflow={true}>{email}</Link>
|
||||
<Link type='page' title={mobilePhone} fontSize='12px' fontWeight={600} color={sideInfoColor} onClick={onPhoneClick} isTextOverflow={true}>{mobilePhone}</Link>
|
||||
<Link containerWidth='220px' type='page' title={email} fontSize='12px' fontWeight={600} color={sideInfoColor} onClick={onEmailClick} isTextOverflow={true}>{email}</Link>
|
||||
</RowContent>
|
||||
);
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "asc-web-common",
|
||||
"version": "1.0.32",
|
||||
"version": "1.0.33",
|
||||
"description": "Ascensio System SIA common components and solutions library",
|
||||
"license": "AGPL-3.0",
|
||||
"files": [
|
||||
|
@ -32,8 +32,7 @@ const dropdownStyles = css`
|
||||
|
||||
display: grid;
|
||||
/* background-color: gold; */
|
||||
padding: 16px 16px 0 16px;
|
||||
grid-row-gap: 16px;
|
||||
padding: 0 16px 0 16px;
|
||||
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: 30px 1fr;
|
||||
@ -80,13 +79,15 @@ const StyledSelector = styled(Container)`
|
||||
|
||||
${props => (props.displayType === "dropdown" ? dropdownStyles : asideStyles)}
|
||||
|
||||
padding-top: 16px;
|
||||
|
||||
.column-options {
|
||||
grid-area: column-options;
|
||||
box-sizing: border-box;
|
||||
|
||||
display: grid;
|
||||
/* background-color: red; */
|
||||
padding: 16px 16px 0 16px;
|
||||
padding: 0 16px 0 16px;
|
||||
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: ${props =>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "asc-web-components",
|
||||
"version": "1.0.287",
|
||||
"version": "1.0.288",
|
||||
"description": "Ascensio System SIA component library",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "dist/asc-web-components.js",
|
||||
|
@ -75,6 +75,10 @@ const StyledComboButton = styled.div`
|
||||
|
||||
const StyledOptionalItem = styled.div`
|
||||
margin-right: 8px;
|
||||
|
||||
path {
|
||||
fill: ${props => props.color && props.color};
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledIcon = styled.div`
|
||||
@ -115,6 +119,7 @@ class ComboButton extends React.Component {
|
||||
|
||||
const boxIconColor = isDisabled ? '#D0D5DA' : '#333333';
|
||||
const arrowIconColor = isDisabled ? '#D0D5DA' : '#A3A9AE';
|
||||
const defaultIconColor = selectedOption.default ? arrowIconColor : boxIconColor;
|
||||
|
||||
return (
|
||||
<StyledComboButton
|
||||
@ -128,16 +133,16 @@ class ComboButton extends React.Component {
|
||||
size={size}
|
||||
>
|
||||
{innerContainer &&
|
||||
<StyledOptionalItem className={innerContainerClassName}>
|
||||
<StyledOptionalItem className={innerContainerClassName} color={defaultIconColor}>
|
||||
{innerContainer}
|
||||
</StyledOptionalItem>
|
||||
}
|
||||
{selectedOption && selectedOption.icon &&
|
||||
<StyledIcon>
|
||||
<StyledIcon className="forceColor">
|
||||
{React.createElement(Icons[selectedOption.icon],
|
||||
{
|
||||
size: 'scale',
|
||||
color: selectedOption.default ? arrowIconColor : boxIconColor,
|
||||
color: defaultIconColor,
|
||||
isfill: true
|
||||
})
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ class DropDown extends React.PureComponent {
|
||||
render() {
|
||||
const { maxHeight, withArrow, withBackdrop, children, open } = this.props;
|
||||
const { directionX, directionY, width } = this.state;
|
||||
const isTablet = window.innerWidth <= 1024; //TODO: Make some better
|
||||
const isTablet = window.innerWidth < 1024; //TODO: Make some better
|
||||
const itemHeight = isTablet ? 36 : 32;
|
||||
const fullHeight = children && children.length * itemHeight;
|
||||
const calculatedHeight = ((fullHeight > 0) && (fullHeight < maxHeight)) ? fullHeight : maxHeight;
|
||||
@ -129,7 +129,6 @@ class DropDown extends React.PureComponent {
|
||||
directionY={directionY}
|
||||
{...dropDownMaxHeightProp}
|
||||
>
|
||||
|
||||
{withArrow && <Arrow directionX={directionX} />}
|
||||
{maxHeight
|
||||
? <FixedSizeList
|
||||
|
@ -26,6 +26,7 @@ import { LinkWithDropdown } from "asc-web-components";
|
||||
| `data` | `array` | - | - | - | Array of objects, each can contain `<DropDownItem />` props |
|
||||
| `dropdownType` | `oneOf` | ✅ | `alwaysDotted, appearDottedAfterHover` | - | Type of dropdown: alwaysDotted is always show dotted style and icon of arrow, appearDottedAfterHover is show dotted style and icon arrow only after hover |
|
||||
| `fontSize` | `string` | - | - | `13px` | Font size of link |
|
||||
| `fontWeight` |`number, string`| - | - | - | Font weight of link |
|
||||
| `id` | `string` | - | - | - | Accepts id |
|
||||
| `isBold` | `bool` | - | - | `false` | Set font weight |
|
||||
| `isSemitransparent` | `bool` | - | - | `false` | Set css-property 'opacity' to 0.5. Usually apply for users with "pending" status | |
|
||||
|
@ -9,13 +9,14 @@ import { handleAnyClick } from "../../utils/event";
|
||||
import isEqual from "lodash/isEqual";
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const SimpleLinkWithDropdown = ({ isBold, fontSize, isTextOverflow, isHovered, isSemitransparent, color, title, dropdownType, data,
|
||||
const SimpleLinkWithDropdown = ({ isBold, fontSize, fontWeight, isTextOverflow, isHovered, isSemitransparent, color, title, dropdownType, data,
|
||||
...props
|
||||
}) => <a {...props}></a>;
|
||||
|
||||
SimpleLinkWithDropdown.propTypes = {
|
||||
isBold: PropTypes.bool,
|
||||
fontSize: PropTypes.number,
|
||||
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
||||
isTextOverflow: PropTypes.bool,
|
||||
isHovered: PropTypes.bool,
|
||||
isSemitransparent: PropTypes.bool,
|
||||
@ -169,6 +170,7 @@ class LinkWithDropdown extends React.Component {
|
||||
dropdownType,
|
||||
isTextOverflow,
|
||||
fontSize,
|
||||
fontWeight,
|
||||
color,
|
||||
isBold,
|
||||
title,
|
||||
@ -199,6 +201,7 @@ class LinkWithDropdown extends React.Component {
|
||||
isTextOverflow={isTextOverflow}
|
||||
truncate={isTextOverflow}
|
||||
fontSize={fontSize}
|
||||
fontWeight={fontWeight}
|
||||
color={color}
|
||||
isBold={isBold}
|
||||
title={title}
|
||||
@ -238,6 +241,7 @@ LinkWithDropdown.propTypes = {
|
||||
data: PropTypes.array,
|
||||
dropdownType: PropTypes.oneOf(["alwaysDashed", "appearDashedAfterHover"]).isRequired,
|
||||
fontSize: PropTypes.string,
|
||||
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
||||
isBold: PropTypes.bool,
|
||||
isSemitransparent: PropTypes.bool,
|
||||
isTextOverflow: PropTypes.bool,
|
||||
|
@ -40,6 +40,7 @@ storiesOf('Components|LinkWithDropdown', module)
|
||||
dropdownType={select('dropdownType', dropdownType, 'alwaysDashed')}
|
||||
color={color('color', '#333333')}
|
||||
fontSize={text('fontSize', '13px')}
|
||||
fontWeight={text('fontWeight', '400')}
|
||||
isBold={boolean('isBold', false)}
|
||||
title={text('title', undefined)}
|
||||
isTextOverflow={boolean('isTextOverflow', false)}
|
||||
|
@ -44,3 +44,5 @@ const mask = [/\d/, /\d/, "/", /\d/, /\d/, "/", /\d/, /\d/, /\d/, /\d/];
|
||||
| `type` | `string` | | `text`, `password` | `text` | Supported type of the input fields. |
|
||||
| `value` | `string` | ✅ | - | - | Value of the input |
|
||||
| `withBorder` | `bool` | - | - | `true` | Indicates that component contain border |
|
||||
| `fontWeight` | `number`, `string` | - | - | - | Sets the font weight |
|
||||
| `isBold` | `bool` | - | - | `false` | Sets font weight value to 600 |
|
||||
|
Loading…
Reference in New Issue
Block a user