From 1046aa5cb3eb81c5b438855a865b51a6ad202e8d Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Wed, 31 Jul 2019 17:30:42 +0300 Subject: [PATCH 01/39] =?UTF-8?q?[NF]=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20@role=20=D0=BA=20=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=D0=BC=20p.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/field/OptionField.tsx | 6 ++++-- packages/core/src/field/OptionFieldItem.tsx | 9 +++++++-- packages/desktop/src/button/Button.tsx | 15 +++------------ .../desktop/src/checkbox-field/CheckboxField.tsx | 10 ++-------- packages/desktop/src/header-menu/HeaderMenu.tsx | 2 +- .../desktop/src/header-menu/HeaderMenuItem.tsx | 3 ++- packages/desktop/src/link/BlockLink.tsx | 4 +++- packages/desktop/src/link/FileLink.tsx | 4 +++- packages/desktop/src/link/Link.tsx | 1 + packages/desktop/src/list/List.tsx | 4 ++-- packages/desktop/src/nav-link/NavLink.tsx | 2 ++ packages/desktop/src/notice/Notice.tsx | 2 +- packages/desktop/src/pagination/Pagination.tsx | 4 +++- .../desktop/src/pagination/PaginationLink.tsx | 4 +++- packages/desktop/src/text-field/TextField.tsx | 13 ++----------- packages/mobile/src/button/Button.tsx | 15 +++------------ packages/mobile/src/link/BlockLink.tsx | 4 +++- packages/mobile/src/link/FileLink.tsx | 4 +++- packages/mobile/src/link/Link.tsx | 1 + packages/mobile/src/list/List.tsx | 4 ++-- packages/mobile/src/nav-link/NavLink.tsx | 2 ++ packages/mobile/src/notice/Notice.tsx | 2 +- packages/mobile/src/pagination/Pagination.tsx | 4 +++- packages/mobile/src/pagination/PaginationLink.tsx | 4 +++- 24 files changed, 60 insertions(+), 63 deletions(-) diff --git a/packages/core/src/field/OptionField.tsx b/packages/core/src/field/OptionField.tsx index 05fe07453..838950ae4 100644 --- a/packages/core/src/field/OptionField.tsx +++ b/packages/core/src/field/OptionField.tsx @@ -1,7 +1,7 @@ -import React, {ReactNode, FocusEventHandler, KeyboardEventHandler} from 'react' +import React, {FocusEventHandler, KeyboardEventHandler, ReactNode} from 'react' import styled from '../styled' -import {Typo, Box, Flex, FlexItem, BoxProps} from '../primitive' +import {Box, BoxProps, Flex, FlexItem, Typo} from '../primitive' import {Spacer} from '../spacer' export interface OptionFieldProps { @@ -33,6 +33,8 @@ export const OptionField: React.FunctionComponent = (props) => = ({ + checked, disabled, icon, label, @@ -24,6 +26,9 @@ export const OptionFieldItem: React.FunctionComponent = ({ reverse, }) => ( void @@ -165,6 +155,7 @@ export const Button: FunctionComponent = (props) => ( onBlur={props.onBlur} children={(renderProps) => ( ( diff --git a/packages/desktop/src/header-menu/HeaderMenu.tsx b/packages/desktop/src/header-menu/HeaderMenu.tsx index 1c8d15768..14b3b0f1d 100644 --- a/packages/desktop/src/header-menu/HeaderMenu.tsx +++ b/packages/desktop/src/header-menu/HeaderMenu.tsx @@ -8,7 +8,7 @@ export interface HeaderMenuProps { } export const HeaderMenu: FC = (props) => ( - + {props.children.map((item, i) => ( 0 ? 6 : 0}> = (props) => ( cursor="pointer" tabIndex={props.tabIndex} href={props.href} + role="menuitem" target={props.target} download={props.download} rel={props.rel} diff --git a/packages/desktop/src/link/BlockLink.tsx b/packages/desktop/src/link/BlockLink.tsx index 519b3c8c2..8cf2f1283 100644 --- a/packages/desktop/src/link/BlockLink.tsx +++ b/packages/desktop/src/link/BlockLink.tsx @@ -1,6 +1,6 @@ import React, {FC} from 'react' -import {LinkControl, RenderChild, Lnk, Card} from '@qiwi/pijma-core' +import {Card, LinkControl, Lnk, RenderChild} from '@qiwi/pijma-core' export interface BlockLinkProps { onClick?: (href?: string, target?: string, download?: string | boolean, rel?: string) => void @@ -33,6 +33,8 @@ export const BlockLink: FC = (props) => ( rel={props.rel} children={(renderProps) => ( = (props) => ( = (props) => ( ]: number} = { } export const List: FunctionComponent = props => ( - + {props.children.map((item, index) => ( - 0 ? ItemIndent[props.type] : 0}> + 0 ? ItemIndent[props.type] : 0} role="listitem"> {props.type === 'number' ? ( {index + 1}. diff --git a/packages/desktop/src/nav-link/NavLink.tsx b/packages/desktop/src/nav-link/NavLink.tsx index d3b2d5fda..658f5c0e3 100644 --- a/packages/desktop/src/nav-link/NavLink.tsx +++ b/packages/desktop/src/nav-link/NavLink.tsx @@ -29,6 +29,8 @@ export const NavLink: FC = (props) => ( = ({icon, title, children}) => ( - + = ({ onChange={onChange} children={renderProps => ( = props => ( onClick={props.onClick} children={renderProps => ( = (props) => ( props.stub ? ( - + {props.title ? ( ) : ( diff --git a/packages/mobile/src/button/Button.tsx b/packages/mobile/src/button/Button.tsx index 7f9319d82..2c5257b7c 100644 --- a/packages/mobile/src/button/Button.tsx +++ b/packages/mobile/src/button/Button.tsx @@ -1,16 +1,6 @@ -import React, {FunctionComponent, ReactNode, Fragment} from 'react' +import React, {Fragment, FunctionComponent, ReactNode} from 'react' -import { - ButtonControl, - Spinner, - Card, - Pos, - Flex, - FlexItem, - Typo, - Btn, - Stub, -} from '@qiwi/pijma-core' +import {Btn, ButtonControl, Card, Flex, FlexItem, Pos, Spinner, Stub, Typo} from '@qiwi/pijma-core' export interface ButtonProps { onClick?: () => void @@ -155,6 +145,7 @@ export const Button: FunctionComponent = (props) => ( onBlur={props.onBlur} children={(renderProps) => ( void @@ -33,6 +33,8 @@ export const BlockLink: FC = (props) => ( rel={props.rel} children={(renderProps) => ( = (props) => ( = (props) => ( ]: number} = { } export const List: FunctionComponent = props => ( - + {props.children.map((item, index) => ( - 0 ? ItemIndent[props.type] : 0}> + 0 ? ItemIndent[props.type] : 0} role="listitem"> {props.type === 'number' ? ( {index + 1}. diff --git a/packages/mobile/src/nav-link/NavLink.tsx b/packages/mobile/src/nav-link/NavLink.tsx index 4318b736b..d7935434b 100644 --- a/packages/mobile/src/nav-link/NavLink.tsx +++ b/packages/mobile/src/nav-link/NavLink.tsx @@ -28,6 +28,8 @@ export const NavLink: FC = (props) => ( = ({icon, title, children}) => ( - + > = ({ onChange={onChange} children={renderProps => ( = props => ( onClick={props.onClick} children={renderProps => ( Date: Tue, 6 Aug 2019 10:54:50 +0300 Subject: [PATCH 02/39] [NF] @role for elements Accordion, Content, Breadcrumbs --- packages/desktop/src/block-accordion/BlockAccordion.tsx | 3 +++ packages/desktop/src/block-content/BlockContent.tsx | 2 ++ packages/desktop/src/breadcrumbs/Breadcrumbs.tsx | 2 +- packages/mobile/src/block-accordion/BlockAccordion.tsx | 2 ++ packages/mobile/src/block-content/BlockContent.tsx | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/desktop/src/block-accordion/BlockAccordion.tsx b/packages/desktop/src/block-accordion/BlockAccordion.tsx index 69761e327..e0657974a 100644 --- a/packages/desktop/src/block-accordion/BlockAccordion.tsx +++ b/packages/desktop/src/block-accordion/BlockAccordion.tsx @@ -29,6 +29,7 @@ export const BlockAccordion: FunctionComponent< BlockAccordionProps > = ({items, indent = 'm', tabIndex = 0, opened, onChange}) => ( + items={items} opened={opened} onChange={onChange} @@ -37,6 +38,8 @@ export const BlockAccordion: FunctionComponent< {renderProps.items.map((item, index) => ( ]: export const BlockContent: FC = ({indent = 'm', children}) => ( diff --git a/packages/desktop/src/breadcrumbs/Breadcrumbs.tsx b/packages/desktop/src/breadcrumbs/Breadcrumbs.tsx index eff04762f..dc86abfc7 100644 --- a/packages/desktop/src/breadcrumbs/Breadcrumbs.tsx +++ b/packages/desktop/src/breadcrumbs/Breadcrumbs.tsx @@ -13,7 +13,7 @@ export const Breadcrumbs: FC = ({children}) => ( {i > 0 ? ( - + ­ diff --git a/packages/mobile/src/block-accordion/BlockAccordion.tsx b/packages/mobile/src/block-accordion/BlockAccordion.tsx index 6a717dde3..f8262062b 100644 --- a/packages/mobile/src/block-accordion/BlockAccordion.tsx +++ b/packages/mobile/src/block-accordion/BlockAccordion.tsx @@ -28,6 +28,8 @@ export const BlockAccordion: FunctionComponent< {renderProps.items.map((item, index) => ( 0 ? '0 -1px 0 #e6e6e6' diff --git a/packages/mobile/src/block-content/BlockContent.tsx b/packages/mobile/src/block-content/BlockContent.tsx index 200b04a43..22a565a26 100644 --- a/packages/mobile/src/block-content/BlockContent.tsx +++ b/packages/mobile/src/block-content/BlockContent.tsx @@ -13,6 +13,8 @@ const BlockContentIdent: { [indent in NonNullable]: export const BlockContent: FC = ({indent = 'm', children}) => ( From bf73d5e5ec970e893c8681d07e97d01b8a99eb9c Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Tue, 6 Aug 2019 12:23:26 +0300 Subject: [PATCH 03/39] [NF] @role for core elements Block, Grid, Input and rf Button, Popup --- packages/core/src/block/Block.tsx | 2 ++ packages/core/src/grid/Grid.tsx | 2 +- packages/core/src/input/BasicInput.tsx | 1 + packages/desktop/src/button/Button.tsx | 1 + packages/desktop/src/modal/SimpleModal.tsx | 4 +++- packages/mobile/src/button/Button.tsx | 1 + packages/mobile/src/modal/SimpleModal.tsx | 4 +++- 7 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/core/src/block/Block.tsx b/packages/core/src/block/Block.tsx index c8c20c709..01d5487bf 100644 --- a/packages/core/src/block/Block.tsx +++ b/packages/core/src/block/Block.tsx @@ -13,6 +13,8 @@ export interface BlockProps { export const Block: FC = (props) => ( = ({gutter = 20, columns = 12, layout = columns const rowBlocksCount: number = columns / layoutSum * layoutLength return ( - + {Children.map(elements, (child: ReactNode, index: number) => ( = (props) => { /> ) : ( diff --git a/packages/desktop/src/button/Button.tsx b/packages/desktop/src/button/Button.tsx index a243df06b..4a1e76407 100644 --- a/packages/desktop/src/button/Button.tsx +++ b/packages/desktop/src/button/Button.tsx @@ -156,6 +156,7 @@ export const Button: FunctionComponent = (props) => ( children={(renderProps) => ( = (props) => ( )} children={( - + {props.closable && props.onHide ? ( = (props) => ( children={(renderProps) => ( = (props) => ( )} children={( - + {props.closable && props.onHide ? ( Date: Tue, 6 Aug 2019 14:58:15 +0300 Subject: [PATCH 04/39] [NF] option field parameters for checkbox, switch, radio --- packages/core/src/field/OptionField.tsx | 3 ++- packages/core/src/field/OptionFieldItem.tsx | 4 +++- packages/desktop/src/checkbox-field/CheckboxField.tsx | 2 ++ packages/desktop/src/checkbox/Checkbox.tsx | 1 + packages/desktop/src/radio-field/RadioField.tsx | 2 ++ packages/desktop/src/switch-field/SwitchField.tsx | 2 ++ packages/desktop/src/switch/Switch.tsx | 1 + packages/mobile/src/checkbox-field/CheckboxField.tsx | 2 ++ packages/mobile/src/checkbox/Checkbox.tsx | 1 + packages/mobile/src/radio-field/RadioField.tsx | 2 ++ packages/mobile/src/switch-field/SwitchField.tsx | 2 ++ packages/mobile/src/switch/Switch.tsx | 1 + 12 files changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/core/src/field/OptionField.tsx b/packages/core/src/field/OptionField.tsx index 838950ae4..49d874ab8 100644 --- a/packages/core/src/field/OptionField.tsx +++ b/packages/core/src/field/OptionField.tsx @@ -8,6 +8,7 @@ export interface OptionFieldProps { title?: ReactNode hint?: ReactNode help?: ReactNode + role?: string tabIndex?: number autoFocus?: boolean onFocus: FocusEventHandler @@ -33,7 +34,7 @@ export const OptionField: React.FunctionComponent = (props) => = ({ onMouseEnter, onMouseLeave, reverse, + role, }) => ( ( ( = props => ( onKeyDown={renderProps.onKeyDown} children={( ( ( diff --git a/packages/desktop/src/switch-field/SwitchField.tsx b/packages/desktop/src/switch-field/SwitchField.tsx index c4c076b2c..ab999c80a 100644 --- a/packages/desktop/src/switch-field/SwitchField.tsx +++ b/packages/desktop/src/switch-field/SwitchField.tsx @@ -25,6 +25,7 @@ const SwitchField: FunctionComponent< onBlur={props.onBlur} children={(renderProps) => ( ( = props => ( onKeyDown={renderProps.onKeyDown} children={( ( ( diff --git a/packages/mobile/src/checkbox/Checkbox.tsx b/packages/mobile/src/checkbox/Checkbox.tsx index 840637741..c0bba02c2 100644 --- a/packages/mobile/src/checkbox/Checkbox.tsx +++ b/packages/mobile/src/checkbox/Checkbox.tsx @@ -23,6 +23,7 @@ const Checkbox: FunctionComponent = props => ( onKeyDown={renderProps.onKeyDown} children={( ( ( diff --git a/packages/mobile/src/switch-field/SwitchField.tsx b/packages/mobile/src/switch-field/SwitchField.tsx index c4c076b2c..ab999c80a 100644 --- a/packages/mobile/src/switch-field/SwitchField.tsx +++ b/packages/mobile/src/switch-field/SwitchField.tsx @@ -25,6 +25,7 @@ const SwitchField: FunctionComponent< onBlur={props.onBlur} children={(renderProps) => ( ( = props => ( onKeyDown={renderProps.onKeyDown} children={( Date: Tue, 6 Aug 2019 15:09:02 +0300 Subject: [PATCH 05/39] [RF] Change simple modal to alertdialog @role --- packages/desktop/src/modal/SimpleModal.tsx | 2 +- packages/mobile/src/modal/SimpleModal.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/desktop/src/modal/SimpleModal.tsx b/packages/desktop/src/modal/SimpleModal.tsx index eb328fc1d..09f678763 100644 --- a/packages/desktop/src/modal/SimpleModal.tsx +++ b/packages/desktop/src/modal/SimpleModal.tsx @@ -100,7 +100,7 @@ const SimpleModal: FunctionComponent = (props) => ( )} children={( - + {props.closable && props.onHide ? ( = (props) => ( )} children={( - + {props.closable && props.onHide ? ( Date: Tue, 6 Aug 2019 15:16:33 +0300 Subject: [PATCH 06/39] [NF] @role for mask input --- packages/core/src/input/BasicInput.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/input/BasicInput.tsx b/packages/core/src/input/BasicInput.tsx index 1c67c5e15..b6e04072f 100644 --- a/packages/core/src/input/BasicInput.tsx +++ b/packages/core/src/input/BasicInput.tsx @@ -58,6 +58,7 @@ export const BasicInput: FunctionComponent = (props) => { return ( props.mask ? ( Date: Tue, 6 Aug 2019 15:25:58 +0300 Subject: [PATCH 07/39] [RF] change button labels (brand,simple => labelledby) --- packages/desktop/src/button/Button.tsx | 3 ++- packages/mobile/src/button/Button.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/desktop/src/button/Button.tsx b/packages/desktop/src/button/Button.tsx index 4a1e76407..d44222b81 100644 --- a/packages/desktop/src/button/Button.tsx +++ b/packages/desktop/src/button/Button.tsx @@ -156,7 +156,8 @@ export const Button: FunctionComponent = (props) => ( children={(renderProps) => ( = (props) => ( children={(renderProps) => ( Date: Mon, 26 Aug 2019 14:31:15 +0300 Subject: [PATCH 08/39] fix after merge --- packages/desktop/src/link/FileLink.tsx | 12 ++++-------- packages/mobile/src/link/FileLink.tsx | 10 ++++------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/packages/desktop/src/link/FileLink.tsx b/packages/desktop/src/link/FileLink.tsx index 93c28f7d0..630adfb59 100644 --- a/packages/desktop/src/link/FileLink.tsx +++ b/packages/desktop/src/link/FileLink.tsx @@ -1,7 +1,6 @@ import React, {FC} from 'react' -import {LinkControl, Lnk, FlexItem, Flex, IconWrapper} from '@qiwi/pijma-core' -import {Icon} from '@qiwi/pijma-media' +import {LinkControl, Lnk, FlexItem, Flex, Icon} from '@qiwi/pijma-core' import {Text} from '../typography' export interface FileLinkProps { @@ -36,8 +35,6 @@ export const FileLink: FC = (props) => ( = (props) => ( mr={2} shrink={0} > - - - + /> = (props) => ( mr={2} shrink={0} > - - - + /> Date: Mon, 16 Sep 2019 13:50:00 +0300 Subject: [PATCH 09/39] add @role for core/Icon --- packages/core/src/icon/Icon.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/icon/Icon.tsx b/packages/core/src/icon/Icon.tsx index 3e0a6066e..1ab9dfbd2 100644 --- a/packages/core/src/icon/Icon.tsx +++ b/packages/core/src/icon/Icon.tsx @@ -200,7 +200,7 @@ export const Icon: FC = ({ size = 6, color = '#000', }) => ( - + ) From 3f423046a829b89b7a21e14fdafad3ea243b1aef Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Mon, 16 Sep 2019 13:55:24 +0300 Subject: [PATCH 10/39] add @role for core/image --- packages/core/src/image/Image.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/image/Image.tsx b/packages/core/src/image/Image.tsx index ac11ccb24..07106e94e 100644 --- a/packages/core/src/image/Image.tsx +++ b/packages/core/src/image/Image.tsx @@ -36,6 +36,7 @@ export const Image: FC = ({ children={(renderProps) => ( renderProps.loaded ? ( Date: Mon, 16 Sep 2019 15:15:40 +0300 Subject: [PATCH 11/39] change @role for desktop/block-accordion --- packages/desktop/src/block-accordion/BlockAccordion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop/src/block-accordion/BlockAccordion.tsx b/packages/desktop/src/block-accordion/BlockAccordion.tsx index 5d415d72e..87b53a28a 100644 --- a/packages/desktop/src/block-accordion/BlockAccordion.tsx +++ b/packages/desktop/src/block-accordion/BlockAccordion.tsx @@ -36,7 +36,7 @@ export const BlockAccordion: FunctionComponent ( Date: Mon, 16 Sep 2019 15:16:21 +0300 Subject: [PATCH 12/39] change @role for mobile/block-accordion --- packages/mobile/src/block-accordion/BlockAccordion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mobile/src/block-accordion/BlockAccordion.tsx b/packages/mobile/src/block-accordion/BlockAccordion.tsx index 02235082b..89a93ebbe 100644 --- a/packages/mobile/src/block-accordion/BlockAccordion.tsx +++ b/packages/mobile/src/block-accordion/BlockAccordion.tsx @@ -26,7 +26,7 @@ export const BlockAccordion: FunctionComponent ( 0 From 3b57dd08295846b5f4ef586f0dfe4bcfac804aa7 Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Mon, 16 Sep 2019 15:26:51 +0300 Subject: [PATCH 13/39] add @role for desktop/breadcrumbs --- .../desktop/src/breadcrumbs/Breadcrumbs.tsx | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/packages/desktop/src/breadcrumbs/Breadcrumbs.tsx b/packages/desktop/src/breadcrumbs/Breadcrumbs.tsx index dc86abfc7..aadb1f04f 100644 --- a/packages/desktop/src/breadcrumbs/Breadcrumbs.tsx +++ b/packages/desktop/src/breadcrumbs/Breadcrumbs.tsx @@ -8,21 +8,23 @@ export interface BreadcrumbsProps { } export const Breadcrumbs: FC = ({children}) => ( - - {children.map((item, i) => ( - - {i > 0 ? ( - - - • - - ­ - - ) : ( - null - )} - - - ))} - + + + {children.map((item, i) => ( + + {i > 0 ? ( + + + • + + ­ + + ) : ( + null + )} + + + ))} + + ) From 00451dd207c87ed64438c6b4cb65eff5b51fb12b Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Mon, 16 Sep 2019 15:27:23 +0300 Subject: [PATCH 14/39] add @role for mobile/breadcrumbs --- .../mobile/src/breadcrumbs/Breadcrumbs.tsx | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/packages/mobile/src/breadcrumbs/Breadcrumbs.tsx b/packages/mobile/src/breadcrumbs/Breadcrumbs.tsx index eff04762f..5c4949002 100644 --- a/packages/mobile/src/breadcrumbs/Breadcrumbs.tsx +++ b/packages/mobile/src/breadcrumbs/Breadcrumbs.tsx @@ -8,21 +8,23 @@ export interface BreadcrumbsProps { } export const Breadcrumbs: FC = ({children}) => ( - - {children.map((item, i) => ( - - {i > 0 ? ( - - - • - - ­ - - ) : ( - null - )} - - - ))} - + + + {children.map((item, i) => ( + + {i > 0 ? ( + + + • + + ­ + + ) : ( + null + )} + + + ))} + + ) From 759f77c188a50846fcba5f32c9f2f77518f31c11 Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Mon, 16 Sep 2019 16:04:29 +0300 Subject: [PATCH 15/39] refactor @role for desktop/button --- packages/desktop/src/button/Button.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/desktop/src/button/Button.tsx b/packages/desktop/src/button/Button.tsx index 0cd1dd097..160962290 100644 --- a/packages/desktop/src/button/Button.tsx +++ b/packages/desktop/src/button/Button.tsx @@ -165,6 +165,9 @@ export const Button: FunctionComponent = (props) => ( onBlur={props.onBlur} children={(renderProps) => ( Date: Mon, 16 Sep 2019 16:05:20 +0300 Subject: [PATCH 16/39] refactor @role for mobile/button --- packages/mobile/src/button/Button.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/mobile/src/button/Button.tsx b/packages/mobile/src/button/Button.tsx index 7f9319d82..b86c51646 100644 --- a/packages/mobile/src/button/Button.tsx +++ b/packages/mobile/src/button/Button.tsx @@ -155,6 +155,9 @@ export const Button: FunctionComponent = (props) => ( onBlur={props.onBlur} children={(renderProps) => ( Date: Mon, 16 Sep 2019 16:40:38 +0300 Subject: [PATCH 17/39] add @role for desktop/oops --- packages/desktop/src/oops/Oops.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop/src/oops/Oops.tsx b/packages/desktop/src/oops/Oops.tsx index 92787661a..0386e2c42 100644 --- a/packages/desktop/src/oops/Oops.tsx +++ b/packages/desktop/src/oops/Oops.tsx @@ -11,7 +11,7 @@ export interface OopsProps { } export const Oops: FC = ({logo, error, title, content, footer}) => ( - + Date: Mon, 16 Sep 2019 16:41:07 +0300 Subject: [PATCH 18/39] add @role for mobile/oops --- packages/mobile/src/oops/Oops.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mobile/src/oops/Oops.tsx b/packages/mobile/src/oops/Oops.tsx index fa04fae53..e2ae48cb5 100644 --- a/packages/mobile/src/oops/Oops.tsx +++ b/packages/mobile/src/oops/Oops.tsx @@ -11,7 +11,7 @@ export interface ErrorPageProps { } export const Oops: FC = ({logo, error, title, content, footer}) => ( - + Date: Mon, 16 Sep 2019 16:46:57 +0300 Subject: [PATCH 19/39] add @role for mobile/text --- packages/mobile/src/typography/Text.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mobile/src/typography/Text.tsx b/packages/mobile/src/typography/Text.tsx index 5ebb4b99f..e786763f6 100644 --- a/packages/mobile/src/typography/Text.tsx +++ b/packages/mobile/src/typography/Text.tsx @@ -45,6 +45,7 @@ const TextColor: { [color in NonNullable]: string } = { export const Text: FunctionComponent = ({display, compact, size, bold, color, decoration, transform, transition, align, clamp, children}) => ( Date: Mon, 16 Sep 2019 16:47:17 +0300 Subject: [PATCH 20/39] add @role for desktop/text --- packages/desktop/src/typography/Text.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/desktop/src/typography/Text.tsx b/packages/desktop/src/typography/Text.tsx index 2d5632c16..7f473091d 100644 --- a/packages/desktop/src/typography/Text.tsx +++ b/packages/desktop/src/typography/Text.tsx @@ -45,6 +45,7 @@ const TextColor: { [color in NonNullable]: string } = { export const Text: FunctionComponent = ({display, compact, size, bold, color, decoration, transform, transition, align, clamp, children}) => ( Date: Tue, 17 Sep 2019 11:04:17 +0300 Subject: [PATCH 21/39] rf @role for desktop/button --- packages/desktop/src/button/Button.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/desktop/src/button/Button.tsx b/packages/desktop/src/button/Button.tsx index 160962290..680ec2233 100644 --- a/packages/desktop/src/button/Button.tsx +++ b/packages/desktop/src/button/Button.tsx @@ -1,4 +1,4 @@ -import React, {FunctionComponent, ReactNode, Fragment} from 'react' +import React, {FunctionComponent, Fragment, ReactElement} from 'react' import { ButtonControl, @@ -22,7 +22,7 @@ export interface ButtonProps { size: 'accent' | 'normal' | 'minor' type: 'button' | 'submit' text?: string - icon?: ReactNode + icon?: ReactElement loading?: boolean stub?: boolean } @@ -231,10 +231,10 @@ export const Button: FunctionComponent = (props) => ( width={6} height={6} transition="all 300ms cubic-bezier(0.4, 0.0, 0.2, 1)" - css={{ - fill: props.disabled ? '#666' : props.kind === 'brand' ? '#fff' : '#000', - }} - children={props.icon} + children={React.cloneElement(props.icon, { + color: props.disabled ? '#666' : props.kind === 'brand' ? '#fff' : '#000', + size: 1, + })} /> ) : ( null From 0518431d09799a501ba80ddf7c88e7bdc31ea217 Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Tue, 17 Sep 2019 11:05:45 +0300 Subject: [PATCH 22/39] rf @role for mobile/button --- packages/mobile/src/button/Button.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/mobile/src/button/Button.tsx b/packages/mobile/src/button/Button.tsx index b86c51646..fa3d621c9 100644 --- a/packages/mobile/src/button/Button.tsx +++ b/packages/mobile/src/button/Button.tsx @@ -1,4 +1,4 @@ -import React, {FunctionComponent, ReactNode, Fragment} from 'react' +import React, {FunctionComponent, Fragment, ReactElement} from 'react' import { ButtonControl, @@ -22,7 +22,7 @@ export interface ButtonProps { size: 'accent' | 'normal' | 'minor' type: 'button' | 'submit' text?: string - icon?: ReactNode + icon?: ReactElement loading?: boolean stub?: boolean } @@ -219,10 +219,10 @@ export const Button: FunctionComponent = (props) => ( width={iconSize[props.size]} height={iconSize[props.size]} transition="all 300ms cubic-bezier(0.4, 0.0, 0.2, 1)" - css={{ - fill: props.disabled ? '#666' : props.kind === 'brand' ? '#fff' : '#000', - }} - children={props.icon} + children={React.cloneElement(props.icon, { + color: props.disabled ? '#666' : props.kind === 'brand' ? '#fff' : '#000', + size: 1, + })} /> ) : ( null From 9b1d727363c300061a84c28190b631c61ba3b18f Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Tue, 17 Sep 2019 13:57:15 +0300 Subject: [PATCH 23/39] rf @role for desktop/checkboxfield --- packages/core/src/field/OptionFieldItem.tsx | 3 +-- packages/desktop/src/checkbox-field/CheckboxField.tsx | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/field/OptionFieldItem.tsx b/packages/core/src/field/OptionFieldItem.tsx index 261af2ca6..0b0fbe1d8 100644 --- a/packages/core/src/field/OptionFieldItem.tsx +++ b/packages/core/src/field/OptionFieldItem.tsx @@ -25,10 +25,9 @@ export const OptionFieldItem: React.FunctionComponent = ({ onMouseEnter, onMouseLeave, reverse, - role, }) => ( ( Date: Tue, 17 Sep 2019 13:58:11 +0300 Subject: [PATCH 24/39] rf @role for mobile/checkboxfield --- packages/mobile/src/checkbox-field/CheckboxField.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/mobile/src/checkbox-field/CheckboxField.tsx b/packages/mobile/src/checkbox-field/CheckboxField.tsx index 376f7556f..6a6d96c4c 100644 --- a/packages/mobile/src/checkbox-field/CheckboxField.tsx +++ b/packages/mobile/src/checkbox-field/CheckboxField.tsx @@ -25,6 +25,8 @@ const CheckboxField: FunctionComponent< onBlur={props.onBlur} children={(renderProps) => ( Date: Wed, 18 Sep 2019 11:40:46 +0300 Subject: [PATCH 25/39] rf @role for core/basicinput and desktop+mobile textfield/passfield --- packages/core/src/input/BasicInput.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/src/input/BasicInput.tsx b/packages/core/src/input/BasicInput.tsx index b6e04072f..75f132cb1 100644 --- a/packages/core/src/input/BasicInput.tsx +++ b/packages/core/src/input/BasicInput.tsx @@ -54,11 +54,11 @@ export const BasicInput: FunctionComponent = (props) => { onBlur: props.onBlur, onKeyDown: props.onKeyDown, onKeyUp: props.onKeyUp, + role: 'textbox', } return ( props.mask ? ( = (props) => { /> ) : ( From 41fa93bfbdc8e142e12fed1e66aa89199df5fb4a Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Wed, 18 Sep 2019 11:41:39 +0300 Subject: [PATCH 26/39] add @alt for icon --- packages/core/src/icon/Icon.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/icon/Icon.tsx b/packages/core/src/icon/Icon.tsx index 1ab9dfbd2..5ceeb5956 100644 --- a/packages/core/src/icon/Icon.tsx +++ b/packages/core/src/icon/Icon.tsx @@ -200,7 +200,7 @@ export const Icon: FC = ({ size = 6, color = '#000', }) => ( - + ) From 5e4d7b6e76fe24b20bac1f722b38d3ae209596e2 Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Wed, 18 Sep 2019 11:51:45 +0300 Subject: [PATCH 27/39] rf @alt for icon + add alt to svg interface --- packages/core/src/icon/Icon.tsx | 2 +- packages/core/src/primitive/Svg.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/icon/Icon.tsx b/packages/core/src/icon/Icon.tsx index 5ceeb5956..946c74111 100644 --- a/packages/core/src/icon/Icon.tsx +++ b/packages/core/src/icon/Icon.tsx @@ -200,7 +200,7 @@ export const Icon: FC = ({ size = 6, color = '#000', }) => ( - + ) diff --git a/packages/core/src/primitive/Svg.ts b/packages/core/src/primitive/Svg.ts index 1870e6bae..ec1fdb491 100644 --- a/packages/core/src/primitive/Svg.ts +++ b/packages/core/src/primitive/Svg.ts @@ -9,6 +9,7 @@ interface SvgProps { transition?: string transform?: string transformOrigin?: string + alt?: string } export const SvgNonProps = ['width', 'height', 'animation', 'transition', 'transform', 'transformOrigin'] From 5454fe745e80b4a346be5d5da45783855ae3f01a Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Wed, 18 Sep 2019 12:13:34 +0300 Subject: [PATCH 28/39] rf @role for desktop/breadcrumbs --- packages/desktop/src/breadcrumbs/Breadcrumbs.md | 1 + packages/desktop/src/breadcrumbs/Breadcrumbs.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/desktop/src/breadcrumbs/Breadcrumbs.md b/packages/desktop/src/breadcrumbs/Breadcrumbs.md index c8130c797..e6b031bed 100644 --- a/packages/desktop/src/breadcrumbs/Breadcrumbs.md +++ b/packages/desktop/src/breadcrumbs/Breadcrumbs.md @@ -1,6 +1,7 @@ ```jsx = ({children}) => ( - +export const Breadcrumbs: FC = ({title, children}) => ( + {children.map((item, i) => ( {i > 0 ? ( - + ­ From fd407145c8220fb46a2a9cf1b8e33a6cf1f8230d Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Wed, 18 Sep 2019 12:14:52 +0300 Subject: [PATCH 29/39] rf @role for mobile/breadcrumbs --- packages/mobile/src/breadcrumbs/Breadcrumbs.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/mobile/src/breadcrumbs/Breadcrumbs.tsx b/packages/mobile/src/breadcrumbs/Breadcrumbs.tsx index 5c4949002..d369fc7b3 100644 --- a/packages/mobile/src/breadcrumbs/Breadcrumbs.tsx +++ b/packages/mobile/src/breadcrumbs/Breadcrumbs.tsx @@ -4,11 +4,12 @@ import {NavLink, NavLinkProps} from '../nav-link' import {Paragraph} from '../typography' export interface BreadcrumbsProps { + title?: string children: NavLinkProps[] } -export const Breadcrumbs: FC = ({children}) => ( - +export const Breadcrumbs: FC = ({title, children}) => ( + {children.map((item, i) => ( From 5d25d0d634dd6dd061730b247c404449e3a82e8d Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Wed, 18 Sep 2019 12:29:08 +0300 Subject: [PATCH 30/39] delete @role for navlink mobile and desktop --- packages/desktop/src/nav-link/NavLink.tsx | 2 -- packages/mobile/src/breadcrumbs/Breadcrumbs.md | 1 + packages/mobile/src/nav-link/NavLink.tsx | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/desktop/src/nav-link/NavLink.tsx b/packages/desktop/src/nav-link/NavLink.tsx index 23a1d44af..fd0fb3f1b 100644 --- a/packages/desktop/src/nav-link/NavLink.tsx +++ b/packages/desktop/src/nav-link/NavLink.tsx @@ -29,8 +29,6 @@ export const NavLink: FC = (props) => ( = (props) => ( Date: Wed, 18 Sep 2019 12:29:55 +0300 Subject: [PATCH 31/39] delete @role for button mobile and desktop --- packages/desktop/src/button/Button.tsx | 1 - packages/mobile/src/button/Button.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/desktop/src/button/Button.tsx b/packages/desktop/src/button/Button.tsx index 680ec2233..8e4a077aa 100644 --- a/packages/desktop/src/button/Button.tsx +++ b/packages/desktop/src/button/Button.tsx @@ -165,7 +165,6 @@ export const Button: FunctionComponent = (props) => ( onBlur={props.onBlur} children={(renderProps) => ( = (props) => ( onBlur={props.onBlur} children={(renderProps) => ( Date: Wed, 18 Sep 2019 12:31:53 +0300 Subject: [PATCH 32/39] delete @role for all links mobile and desktop --- packages/desktop/src/link/BlockLink.tsx | 3 +-- packages/desktop/src/link/Link.tsx | 2 +- packages/mobile/src/link/BlockLink.tsx | 3 +-- packages/mobile/src/link/FileLink.tsx | 3 +-- packages/mobile/src/link/Link.tsx | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/desktop/src/link/BlockLink.tsx b/packages/desktop/src/link/BlockLink.tsx index 8cf2f1283..84b24b271 100644 --- a/packages/desktop/src/link/BlockLink.tsx +++ b/packages/desktop/src/link/BlockLink.tsx @@ -33,8 +33,7 @@ export const BlockLink: FC = (props) => ( rel={props.rel} children={(renderProps) => ( = (props) => ( = (props) => ( rel={props.rel} children={(renderProps) => ( = (props) => ( = (props) => ( Date: Wed, 18 Sep 2019 12:55:20 +0300 Subject: [PATCH 33/39] fix checkbox field --- .../src/checkbox-field/CheckboxField.tsx | 136 +++++++++++------- .../src/checkbox-field/CheckboxField.tsx | 136 +++++++++++------- 2 files changed, 170 insertions(+), 102 deletions(-) diff --git a/packages/desktop/src/checkbox-field/CheckboxField.tsx b/packages/desktop/src/checkbox-field/CheckboxField.tsx index 019255629..35d1516a3 100644 --- a/packages/desktop/src/checkbox-field/CheckboxField.tsx +++ b/packages/desktop/src/checkbox-field/CheckboxField.tsx @@ -7,6 +7,9 @@ import { OptionField, OptionFieldItem, Box, + Stub, + Spacer, + Flex, } from '@qiwi/pijma-core' import CheckboxFieldProps from './CheckboxFieldProps' @@ -14,59 +17,90 @@ import CheckboxFieldOptionModel from './CheckboxFieldOptionModel' const CheckboxField: FunctionComponent< CheckboxFieldProps, any> -> = props => ( - , any> - tabIndex={props.tabIndex} - options={props.options} - values={props.values} - equals={props.equals} - onChange={props.onChange} - onFocus={props.onFocus} - onBlur={props.onBlur} - children={(renderProps) => ( - ( - - key={index} - disabled={option.disabled} - value={option.value} - onClick={option.onClick} - onMouseEnter={option.onMouseEnter} - onMouseLeave={renderProps.onMouseLeave} - children={(renderOptionProps) => ( - - - - )} - label={option.label} - description={option.description} - onClick={renderOptionProps.onClick} - onMouseLeave={renderOptionProps.onMouseLeave} - onMouseEnter={renderOptionProps.onMouseEnter} + > = props => ( + props.stub ? ( + + + + {[33, 38, 30].map((width: number, id: number) => ( + + + + - )} - /> + + ))} - /> - )} - /> + + + ) : ( + , any> + tabIndex={props.tabIndex} + options={props.options} + values={props.values} + equals={props.equals} + onChange={props.onChange} + onFocus={props.onFocus} + onBlur={props.onBlur} + children={(renderProps) => ( + ( + + key={index} + disabled={option.disabled} + value={option.value} + onClick={option.onClick} + onMouseEnter={option.onMouseEnter} + onMouseLeave={renderProps.onMouseLeave} + children={(renderOptionProps) => ( + + + + )} + label={option.label} + description={option.description} + onClick={renderOptionProps.onClick} + onMouseLeave={renderOptionProps.onMouseLeave} + onMouseEnter={renderOptionProps.onMouseEnter} + /> + )} + /> + ))} + /> + )} + /> + ) ) export default CheckboxField diff --git a/packages/mobile/src/checkbox-field/CheckboxField.tsx b/packages/mobile/src/checkbox-field/CheckboxField.tsx index 6a6d96c4c..104e148d5 100644 --- a/packages/mobile/src/checkbox-field/CheckboxField.tsx +++ b/packages/mobile/src/checkbox-field/CheckboxField.tsx @@ -6,7 +6,10 @@ import { Check, OptionField, OptionFieldItem, + Stub, Box, + Flex, + Spacer, } from '@qiwi/pijma-core' import CheckboxFieldProps from './CheckboxFieldProps' @@ -14,59 +17,90 @@ import CheckboxFieldOptionModel from './CheckboxFieldOptionModel' const CheckboxField: FunctionComponent< CheckboxFieldProps, any> -> = props => ( - , any> - tabIndex={props.tabIndex} - options={props.options} - values={props.values} - equals={props.equals} - onChange={props.onChange} - onFocus={props.onFocus} - onBlur={props.onBlur} - children={(renderProps) => ( - ( - - key={index} - disabled={option.disabled} - value={option.value} - onClick={option.onClick} - onMouseEnter={option.onMouseEnter} - onMouseLeave={renderProps.onMouseLeave} - children={(renderOptionProps) => ( - - - - )} - label={option.label} - description={option.description} - onClick={renderOptionProps.onClick} - onMouseEnter={renderOptionProps.onMouseEnter} - onMouseLeave={renderOptionProps.onMouseLeave} + > = props => ( + props.stub ? ( + + + + {[33, 38, 30].map((width: number, id: number) => ( + + + + - )} - /> + + ))} - /> - )} - /> + + + ) : ( + , any> + tabIndex={props.tabIndex} + options={props.options} + values={props.values} + equals={props.equals} + onChange={props.onChange} + onFocus={props.onFocus} + onBlur={props.onBlur} + children={(renderProps) => ( + ( + + key={index} + disabled={option.disabled} + value={option.value} + onClick={option.onClick} + onMouseEnter={option.onMouseEnter} + onMouseLeave={renderProps.onMouseLeave} + children={(renderOptionProps) => ( + + + + )} + label={option.label} + description={option.description} + onClick={renderOptionProps.onClick} + onMouseEnter={renderOptionProps.onMouseEnter} + onMouseLeave={renderOptionProps.onMouseLeave} + /> + )} + /> + ))} + /> + )} + /> + ) ) export default CheckboxField From 373a8736103442919053d00a0054ace2750460a3 Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Wed, 18 Sep 2019 16:16:47 +0300 Subject: [PATCH 34/39] rf @role for headermenu --- .../desktop/src/header-menu/HeaderMenu.tsx | 22 ++++++++++--------- .../src/header-menu/HeaderMenuItem.tsx | 1 + packages/desktop/src/typography/Text.tsx | 1 - 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/desktop/src/header-menu/HeaderMenu.tsx b/packages/desktop/src/header-menu/HeaderMenu.tsx index 14b3b0f1d..08e537918 100644 --- a/packages/desktop/src/header-menu/HeaderMenu.tsx +++ b/packages/desktop/src/header-menu/HeaderMenu.tsx @@ -1,6 +1,6 @@ import React, {FC} from 'react' -import {Flex, FlexItem} from '@qiwi/pijma-core' +import {Flex, FlexItem, Box} from '@qiwi/pijma-core' import {HeaderMenuItem, HeaderMenuItemProps} from './HeaderMenuItem' export interface HeaderMenuProps { @@ -8,13 +8,15 @@ export interface HeaderMenuProps { } export const HeaderMenu: FC = (props) => ( - - {props.children.map((item, i) => ( - 0 ? 6 : 0}> - - - ))} - + + + {props.children.map((item, i) => ( + 0 ? 6 : 0}> + + + ))} + + ) diff --git a/packages/desktop/src/header-menu/HeaderMenuItem.tsx b/packages/desktop/src/header-menu/HeaderMenuItem.tsx index 60be8e2bd..c8c1a18ff 100644 --- a/packages/desktop/src/header-menu/HeaderMenuItem.tsx +++ b/packages/desktop/src/header-menu/HeaderMenuItem.tsx @@ -36,6 +36,7 @@ export const HeaderMenuItem: FC = (props) => ( tabIndex={props.tabIndex} href={props.href} role="menuitem" + aria-label={props.title} target={props.target} download={props.download} rel={props.rel} diff --git a/packages/desktop/src/typography/Text.tsx b/packages/desktop/src/typography/Text.tsx index 7f473091d..2d5632c16 100644 --- a/packages/desktop/src/typography/Text.tsx +++ b/packages/desktop/src/typography/Text.tsx @@ -45,7 +45,6 @@ const TextColor: { [color in NonNullable]: string } = { export const Text: FunctionComponent = ({display, compact, size, bold, color, decoration, transform, transition, align, clamp, children}) => ( Date: Wed, 18 Sep 2019 16:24:44 +0300 Subject: [PATCH 35/39] delete @role for textfield --- packages/desktop/src/text-field/TextField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop/src/text-field/TextField.tsx b/packages/desktop/src/text-field/TextField.tsx index d14e96f31..f594ae155 100644 --- a/packages/desktop/src/text-field/TextField.tsx +++ b/packages/desktop/src/text-field/TextField.tsx @@ -6,7 +6,7 @@ import TextFieldProps from './TextFieldProps' const TextField: FunctionComponent = (props) => ( props.stub ? ( - + {props.title ? ( ) : ( From ecf1fa63f1a919c9ed73066920dcb5551ec087ee Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Wed, 18 Sep 2019 16:27:29 +0300 Subject: [PATCH 36/39] review fixes --- packages/desktop/src/link/FileLink.tsx | 13 ++----------- packages/desktop/src/pagination/PaginationLink.tsx | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/desktop/src/link/FileLink.tsx b/packages/desktop/src/link/FileLink.tsx index 630adfb59..ea1b9b589 100644 --- a/packages/desktop/src/link/FileLink.tsx +++ b/packages/desktop/src/link/FileLink.tsx @@ -56,20 +56,11 @@ export const FileLink: FC = (props) => ( mr={2} shrink={0} > - + = props => ( children={renderProps => ( Date: Thu, 19 Sep 2019 09:01:41 +0300 Subject: [PATCH 37/39] title for desktop/blocklink --- packages/core/src/link/LinkControl.tsx | 1 + packages/desktop/src/link/BlockLink.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/core/src/link/LinkControl.tsx b/packages/core/src/link/LinkControl.tsx index 1522d3684..c5bec5822 100644 --- a/packages/core/src/link/LinkControl.tsx +++ b/packages/core/src/link/LinkControl.tsx @@ -7,6 +7,7 @@ export interface LinkControlProps { onFocus?: () => void onBlur?: () => void href?: string + title?: string target?: string download?: string | boolean rel?: string diff --git a/packages/desktop/src/link/BlockLink.tsx b/packages/desktop/src/link/BlockLink.tsx index 84b24b271..6a464222d 100644 --- a/packages/desktop/src/link/BlockLink.tsx +++ b/packages/desktop/src/link/BlockLink.tsx @@ -28,6 +28,7 @@ export const BlockLink: FC = (props) => ( onFocus={props.onFocus} onBlur={props.onBlur} href={props.href} + title={props.title} target={props.target} download={props.download} rel={props.rel} From 112d15be1d9a9197d2a6950ae630c058fdbb15ab Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Thu, 19 Sep 2019 09:03:44 +0300 Subject: [PATCH 38/39] title for mobile/blocklink --- packages/mobile/src/link/BlockLink.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mobile/src/link/BlockLink.tsx b/packages/mobile/src/link/BlockLink.tsx index 84b24b271..6a464222d 100644 --- a/packages/mobile/src/link/BlockLink.tsx +++ b/packages/mobile/src/link/BlockLink.tsx @@ -28,6 +28,7 @@ export const BlockLink: FC = (props) => ( onFocus={props.onFocus} onBlur={props.onBlur} href={props.href} + title={props.title} target={props.target} download={props.download} rel={props.rel} From 2a9986bf3e7615d6bd34f018d052a91b40abbabf Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Thu, 19 Sep 2019 09:18:51 +0300 Subject: [PATCH 39/39] turn label to string --- packages/core/src/field/OptionFieldItem.tsx | 4 ++-- .../desktop/src/checkbox-field/CheckboxFieldOptionModel.ts | 2 +- packages/desktop/src/nav-link/NavLink.tsx | 1 + packages/desktop/src/radio-field/RadioFieldOptionModel.ts | 2 +- packages/desktop/src/switch-field/SwitchFieldOptionModel.ts | 2 +- .../mobile/src/checkbox-field/CheckboxFieldOptionModel.ts | 2 +- packages/mobile/src/radio-field/RadioFieldOptionModel.ts | 2 +- packages/mobile/src/switch-field/SwitchFieldOptionModel.ts | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/core/src/field/OptionFieldItem.tsx b/packages/core/src/field/OptionFieldItem.tsx index 0b0fbe1d8..71ee2c51c 100644 --- a/packages/core/src/field/OptionFieldItem.tsx +++ b/packages/core/src/field/OptionFieldItem.tsx @@ -8,7 +8,7 @@ export interface OptionFieldItemProps { reverse?: boolean role?: string icon: ReactNode - label: ReactNode + label: string description?: ReactNode onClick: MouseEventHandler onMouseEnter: MouseEventHandler @@ -29,7 +29,7 @@ export const OptionFieldItem: React.FunctionComponent = ({ extends OptionModel { - label: ReactNode + label: string description?: ReactNode } diff --git a/packages/desktop/src/nav-link/NavLink.tsx b/packages/desktop/src/nav-link/NavLink.tsx index fd0fb3f1b..a062241a9 100644 --- a/packages/desktop/src/nav-link/NavLink.tsx +++ b/packages/desktop/src/nav-link/NavLink.tsx @@ -29,6 +29,7 @@ export const NavLink: FC = (props) => ( extends OptionModel { - label: ReactNode + label: string description?: ReactNode } diff --git a/packages/desktop/src/switch-field/SwitchFieldOptionModel.ts b/packages/desktop/src/switch-field/SwitchFieldOptionModel.ts index 27772af38..3f00adc86 100644 --- a/packages/desktop/src/switch-field/SwitchFieldOptionModel.ts +++ b/packages/desktop/src/switch-field/SwitchFieldOptionModel.ts @@ -3,6 +3,6 @@ import {ReactNode} from 'react' import {OptionModel} from '@qiwi/pijma-core' export default interface SwitchFieldOptionModel extends OptionModel { - label: ReactNode + label: string description?: ReactNode } diff --git a/packages/mobile/src/checkbox-field/CheckboxFieldOptionModel.ts b/packages/mobile/src/checkbox-field/CheckboxFieldOptionModel.ts index c44f636b7..dd7dd0d68 100644 --- a/packages/mobile/src/checkbox-field/CheckboxFieldOptionModel.ts +++ b/packages/mobile/src/checkbox-field/CheckboxFieldOptionModel.ts @@ -3,6 +3,6 @@ import {ReactNode} from 'react' import {OptionModel} from '@qiwi/pijma-core' export default interface CheckboxFieldOptionModel extends OptionModel { - label: ReactNode + label: string description?: ReactNode } diff --git a/packages/mobile/src/radio-field/RadioFieldOptionModel.ts b/packages/mobile/src/radio-field/RadioFieldOptionModel.ts index e7422a2b1..a811b28b3 100644 --- a/packages/mobile/src/radio-field/RadioFieldOptionModel.ts +++ b/packages/mobile/src/radio-field/RadioFieldOptionModel.ts @@ -3,6 +3,6 @@ import {ReactNode} from 'react' import {OptionModel} from '@qiwi/pijma-core' export default interface RadioFieldOptionModel extends OptionModel { - label: ReactNode + label: string description?: ReactNode } diff --git a/packages/mobile/src/switch-field/SwitchFieldOptionModel.ts b/packages/mobile/src/switch-field/SwitchFieldOptionModel.ts index 27772af38..3f00adc86 100644 --- a/packages/mobile/src/switch-field/SwitchFieldOptionModel.ts +++ b/packages/mobile/src/switch-field/SwitchFieldOptionModel.ts @@ -3,6 +3,6 @@ import {ReactNode} from 'react' import {OptionModel} from '@qiwi/pijma-core' export default interface SwitchFieldOptionModel extends OptionModel { - label: ReactNode + label: string description?: ReactNode }