From 1046aa5cb3eb81c5b438855a865b51a6ad202e8d Mon Sep 17 00:00:00 2001 From: "k.sidorov" Date: Wed, 31 Jul 2019 17:30:42 +0300 Subject: [PATCH] =?UTF-8?q?[NF]=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20@role=20=D0=BA=20=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=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 => (