From 6720db8c4d5df514fe9ec147aa1ba8bddc67227e Mon Sep 17 00:00:00 2001 From: Alexey Safronov Date: Fri, 27 Dec 2019 14:09:57 +0300 Subject: [PATCH 1/8] web: Components: Added new properties description --- web/ASC.Web.Components/src/components/text-input/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/ASC.Web.Components/src/components/text-input/README.md b/web/ASC.Web.Components/src/components/text-input/README.md index 96af5d1801..2ccf95fb37 100644 --- a/web/ASC.Web.Components/src/components/text-input/README.md +++ b/web/ASC.Web.Components/src/components/text-input/README.md @@ -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 | From 4b844cc12af7237d5f7169fd715bd8111dfe730f Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Fri, 27 Dec 2019 14:13:59 +0300 Subject: [PATCH 2/8] Web: Components: DropDown: Fixed device detect --- web/ASC.Web.Components/src/components/drop-down/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/ASC.Web.Components/src/components/drop-down/index.js b/web/ASC.Web.Components/src/components/drop-down/index.js index 7b20725bcb..242ccfd432 100644 --- a/web/ASC.Web.Components/src/components/drop-down/index.js +++ b/web/ASC.Web.Components/src/components/drop-down/index.js @@ -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 && } {maxHeight ? Date: Fri, 27 Dec 2019 14:25:05 +0300 Subject: [PATCH 3/8] ASC.Web.Components: link-with-dropdown: added fontWeight prop --- .../src/components/link-with-dropdown/README.md | 1 + .../src/components/link-with-dropdown/index.js | 6 +++++- .../link-with-dropdown/link-with-dropdown.stories.js | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web/ASC.Web.Components/src/components/link-with-dropdown/README.md b/web/ASC.Web.Components/src/components/link-with-dropdown/README.md index 3a62e9063f..05f00a6ea8 100644 --- a/web/ASC.Web.Components/src/components/link-with-dropdown/README.md +++ b/web/ASC.Web.Components/src/components/link-with-dropdown/README.md @@ -26,6 +26,7 @@ import { LinkWithDropdown } from "asc-web-components"; | `data` | `array` | - | - | - | Array of objects, each can contain `` 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 | | diff --git a/web/ASC.Web.Components/src/components/link-with-dropdown/index.js b/web/ASC.Web.Components/src/components/link-with-dropdown/index.js index e7a4d1f553..277861eabb 100644 --- a/web/ASC.Web.Components/src/components/link-with-dropdown/index.js +++ b/web/ASC.Web.Components/src/components/link-with-dropdown/index.js @@ -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 }) => ; 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, diff --git a/web/ASC.Web.Components/src/components/link-with-dropdown/link-with-dropdown.stories.js b/web/ASC.Web.Components/src/components/link-with-dropdown/link-with-dropdown.stories.js index 8915a6105b..846929c089 100644 --- a/web/ASC.Web.Components/src/components/link-with-dropdown/link-with-dropdown.stories.js +++ b/web/ASC.Web.Components/src/components/link-with-dropdown/link-with-dropdown.stories.js @@ -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)} From 8dcff0883ddebe5466a6642fca3e5a96818e455f Mon Sep 17 00:00:00 2001 From: Andrey Savihin Date: Fri, 27 Dec 2019 14:26:46 +0300 Subject: [PATCH 4/8] ASC.People: Home: fixed fontWeight in user list --- .../src/components/pages/Home/Section/Body/userContent.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/products/ASC.People/Client/src/components/pages/Home/Section/Body/userContent.js b/products/ASC.People/Client/src/components/pages/Home/Section/Body/userContent.js index 114262b761..835d06af93 100644 --- a/products/ASC.People/Client/src/components/pages/Home/Section/Body/userContent.js +++ b/products/ASC.People/Client/src/components/pages/Home/Section/Body/userContent.js @@ -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 }) => { :
} {groups} - {mobilePhone} - {email} + {mobilePhone} + {email} ); }; From 7f90d60533f233f5ea69d9771614170de89c34ae Mon Sep 17 00:00:00 2001 From: Alexey Safronov Date: Fri, 27 Dec 2019 14:40:48 +0300 Subject: [PATCH 5/8] web: Common: Fixed padding in AdvancedSelector --- .../AdvancedSelector/sub-components/StyledSelector.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/ASC.Web.Common/src/components/AdvancedSelector/sub-components/StyledSelector.js b/web/ASC.Web.Common/src/components/AdvancedSelector/sub-components/StyledSelector.js index 528594adaa..4f929a2070 100644 --- a/web/ASC.Web.Common/src/components/AdvancedSelector/sub-components/StyledSelector.js +++ b/web/ASC.Web.Common/src/components/AdvancedSelector/sub-components/StyledSelector.js @@ -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 => From 029ef24411d6269b047d9458971e0a28c1d16bbb Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Fri, 27 Dec 2019 14:41:01 +0300 Subject: [PATCH 6/8] Web: Components: ComboBox: Fixed default option color --- .../combobox/sub-components/combo-button.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/ASC.Web.Components/src/components/combobox/sub-components/combo-button.js b/web/ASC.Web.Components/src/components/combobox/sub-components/combo-button.js index e208bd4f9b..4d996efa90 100644 --- a/web/ASC.Web.Components/src/components/combobox/sub-components/combo-button.js +++ b/web/ASC.Web.Components/src/components/combobox/sub-components/combo-button.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 ( {innerContainer && - + {innerContainer} } {selectedOption && selectedOption.icon && - + {React.createElement(Icons[selectedOption.icon], { size: 'scale', - color: selectedOption.default ? arrowIconColor : boxIconColor, + color: defaultIconColor, isfill: true }) } From ce7e1544126b624f3f6e4ad811e0030e8e8d1c77 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Fri, 27 Dec 2019 14:41:11 +0300 Subject: [PATCH 7/8] web: components: bump version --- web/ASC.Web.Components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/ASC.Web.Components/package.json b/web/ASC.Web.Components/package.json index ff60da459e..b2da2f0651 100644 --- a/web/ASC.Web.Components/package.json +++ b/web/ASC.Web.Components/package.json @@ -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", From 1161f9a345290d63e4d3f64b4a51b2c5d4155f75 Mon Sep 17 00:00:00 2001 From: Alexey Safronov Date: Fri, 27 Dec 2019 14:41:16 +0300 Subject: [PATCH 8/8] web: common: bump version --- web/ASC.Web.Common/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/ASC.Web.Common/package.json b/web/ASC.Web.Common/package.json index f14eab629a..1e5022bf45 100644 --- a/web/ASC.Web.Common/package.json +++ b/web/ASC.Web.Common/package.json @@ -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": [