Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit f4bda7d

Browse files
committed
update deps and add nullable type
1 parent 81f97c4 commit f4bda7d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+142
-106
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
"@types/jest-axe": "^2.2.2",
8383
"@types/lodash": "^4.14.118",
8484
"@types/node": "^10.3.2",
85-
"@types/react": "^16.3.17",
85+
"@types/react": "^16.7.17",
8686
"@types/react-custom-scrollbars": "^4.0.5",
87-
"@types/react-dom": "^16.0.6",
87+
"@types/react-dom": "^16.0.11",
8888
"@types/react-is": "^16.5.0",
8989
"@types/react-router": "^4.0.27",
9090
"awesome-typescript-loader": "^5.2.1",
@@ -151,7 +151,7 @@
151151
"ts-node": "^6.1.0",
152152
"tslint": "^5.11.0",
153153
"tslint-config-airbnb": "^5.11.1",
154-
"typescript": "~3.1.0",
154+
"typescript": "~3.2.2",
155155
"webpack": "^4.25.1",
156156
"webpack-dev-middleware": "^3.4.0",
157157
"webpack-hot-middleware": "^2.18.2"

src/components/Accordion/Accordion.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { Accessibility } from '../../lib/accessibility/types'
1717

1818
import {
1919
ComponentEventHandler,
20-
Extendable,
20+
ReactProps,
2121
ShorthandValue,
2222
ShorthandRenderFunction,
2323
} from '../../../types/utils'
@@ -72,7 +72,7 @@ export interface AccordionProps extends UIComponentProps, ChildrenComponentProps
7272
/**
7373
* An accordion allows users to toggle the display of sections of content.
7474
*/
75-
class Accordion extends AutoControlledComponent<Extendable<AccordionProps>, any> {
75+
class Accordion extends AutoControlledComponent<ReactProps<AccordionProps>, any> {
7676
static displayName = 'Accordion'
7777

7878
static className = 'ui-accordion'

src/components/Accordion/AccordionContent.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ContentComponentProps,
1111
commonPropTypes,
1212
} from '../../lib'
13-
import { Extendable, ComponentEventHandler } from '../../../types/utils'
13+
import { ReactProps, ComponentEventHandler } from '../../../types/utils'
1414

1515
export interface AccordionContentProps
1616
extends UIComponentProps,
@@ -31,7 +31,7 @@ export interface AccordionContentProps
3131
/**
3232
* A standard AccordionContent.
3333
*/
34-
class AccordionContent extends UIComponent<Extendable<AccordionContentProps>, any> {
34+
class AccordionContent extends UIComponent<ReactProps<AccordionContentProps>, any> {
3535
static displayName = 'AccordionContent'
3636

3737
static create: Function

src/components/Accordion/AccordionTitle.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
ChildrenComponentProps,
1212
commonPropTypes,
1313
} from '../../lib'
14-
import { Extendable, ComponentEventHandler } from '../../../types/utils'
14+
import { ReactProps, ComponentEventHandler } from '../../../types/utils'
1515

1616
export interface AccordionTitleProps
1717
extends UIComponentProps,
@@ -35,7 +35,7 @@ export interface AccordionTitleProps
3535
/**
3636
* A standard AccordionTitle.
3737
*/
38-
class AccordionTitle extends UIComponent<Extendable<AccordionTitleProps>, any> {
38+
class AccordionTitle extends UIComponent<ReactProps<AccordionTitleProps>, any> {
3939
static displayName = 'AccordionTitle'
4040

4141
static create: Function

src/components/Animation/Animation.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
} from '../../lib'
1111
import { AnimationProp } from '../../themes/types'
1212
import createAnimationStyles from '../../lib/createAnimationStyles'
13+
import { ReactPropsStrict } from '../../../types/utils'
1314

1415
export interface AnimationProps
1516
extends StyledComponentProps,
@@ -78,7 +79,7 @@ export interface AnimationProps
7879
/**
7980
* An animation allows the user to animate their own components.
8081
*/
81-
class Animation extends UIComponent<AnimationProps, any> {
82+
class Animation extends UIComponent<ReactPropsStrict<AnimationProps>, any> {
8283
static create: Function
8384

8485
static className = 'ui-animation'

src/components/Attachment/Attachment.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as PropTypes from 'prop-types'
22
import * as React from 'react'
33
import * as _ from 'lodash'
4-
import { Extendable, ShorthandValue } from '../../../types/utils'
4+
import { ReactProps, ShorthandValue } from '../../../types/utils'
55
import {
66
UIComponent,
77
customPropTypes,
@@ -38,7 +38,7 @@ export interface AttachmentProps extends UIComponentProps, ChildrenComponentProp
3838
/**
3939
* An Attachment displays a file attachment.
4040
*/
41-
class Attachment extends UIComponent<Extendable<AttachmentProps>, any> {
41+
class Attachment extends UIComponent<ReactProps<AttachmentProps>, any> {
4242
static create: Function
4343

4444
static className = 'ui-attachment'

src/components/Avatar/Avatar.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from 'react'
33
import Image from '../Image/Image'
44
import Label from '../Label/Label'
55
import Status from '../Status/Status'
6-
import { Extendable, ShorthandValue } from '../../../types/utils'
6+
import { ReactProps, ShorthandValue } from '../../../types/utils'
77
import {
88
createShorthandFactory,
99
customPropTypes,
@@ -35,7 +35,7 @@ export interface AvatarProps extends UIComponentProps {
3535
/**
3636
* An avatar is a graphic representation of user.
3737
*/
38-
class Avatar extends UIComponent<Extendable<AvatarProps>, any> {
38+
class Avatar extends UIComponent<ReactProps<AvatarProps>, any> {
3939
static create: Function
4040

4141
static className = 'ui-avatar'

src/components/Button/Button.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Icon from '../Icon/Icon'
1717
import Slot from '../Slot/Slot'
1818
import { buttonBehavior } from '../../lib/accessibility'
1919
import { Accessibility } from '../../lib/accessibility/types'
20-
import { ComponentEventHandler, Extendable, ShorthandValue } from '../../../types/utils'
20+
import { ComponentEventHandler, ReactProps, ShorthandValue } from '../../../types/utils'
2121
import ButtonGroup from './ButtonGroup'
2222

2323
export interface ButtonProps
@@ -83,7 +83,7 @@ export interface ButtonState {
8383
* - for disabled buttons, add 'disabled' attribute so that the state is properly recognized by the screen reader
8484
* - if button includes icon only, textual representation needs to be provided by using 'title', 'aria-label', or 'aria-labelledby' attributes
8585
*/
86-
class Button extends UIComponent<Extendable<ButtonProps>, ButtonState> {
86+
class Button extends UIComponent<ReactProps<ButtonProps>, ButtonState> {
8787
static create: Function
8888

8989
public static displayName = 'Button'

src/components/Button/ButtonGroup.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as PropTypes from 'prop-types'
22
import * as React from 'react'
33
import * as _ from 'lodash'
44

5-
import { Extendable, ShorthandValue } from '../../../types/utils'
5+
import { ReactProps, ShorthandValue } from '../../../types/utils'
66
import {
77
UIComponent,
88
childrenExist,
@@ -28,7 +28,7 @@ export interface ButtonGroupProps
2828
/**
2929
* A button group presents multiple related actions.
3030
*/
31-
class ButtonGroup extends UIComponent<Extendable<ButtonGroupProps>, any> {
31+
class ButtonGroup extends UIComponent<ReactProps<ButtonGroupProps>, any> {
3232
public static displayName = 'ButtonGroup'
3333

3434
public static className = 'ui-buttons'

src/components/Chat/Chat.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as React from 'react'
55
import { childrenExist, customPropTypes, UIComponent, commonPropTypes } from '../../lib'
66
import ChatItem from './ChatItem'
77
import ChatMessage from './ChatMessage'
8-
import { Extendable, ShorthandValue } from '../../../types/utils'
8+
import { ReactProps, ShorthandValue } from '../../../types/utils'
99
import { Accessibility, AccessibilityActionHandlers } from '../../lib/accessibility/types'
1010
import { chatBehavior } from '../../lib/accessibility'
1111
import { UIComponentProps, ChildrenComponentProps } from '../../lib/commonPropInterfaces'
@@ -24,7 +24,7 @@ export interface ChatProps extends UIComponentProps, ChildrenComponentProps {
2424
/**
2525
* A Chat displays messages between users.
2626
*/
27-
class Chat extends UIComponent<Extendable<ChatProps>, any> {
27+
class Chat extends UIComponent<ReactProps<ChatProps>, any> {
2828
static className = 'ui-chat'
2929

3030
static displayName = 'Chat'

src/components/Chat/ChatItem.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22
import * as PropTypes from 'prop-types'
33

4-
import { Extendable, ShorthandValue } from '../../../types/utils'
4+
import { ReactProps, ShorthandValue } from '../../../types/utils'
55
import {
66
childrenExist,
77
createShorthandFactory,
@@ -29,7 +29,7 @@ export interface ChatItemProps extends UIComponentProps, ChildrenComponentProps
2929
/**
3030
* A chat item represents a single event in a chat.
3131
*/
32-
class ChatItem extends UIComponent<Extendable<ChatItemProps>, any> {
32+
class ChatItem extends UIComponent<ReactProps<ChatItemProps>, any> {
3333
static className = 'ui-chat__item'
3434
static create: Function
3535
static displayName = 'ChatItem'

src/components/Chat/ChatMessage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
ContentComponentProps,
1414
commonPropTypes,
1515
} from '../../lib'
16-
import { Extendable, ShorthandValue } from '../../../types/utils'
16+
import { ReactProps, ShorthandValue } from '../../../types/utils'
1717
import { chatMessageBehavior } from '../../lib/accessibility'
1818
import { Accessibility, AccessibilityActionHandlers } from '../../lib/accessibility/types'
1919

@@ -43,7 +43,7 @@ export interface ChatMessageProps
4343
/**
4444
* A chat message represents a single statement communicated to a user.
4545
*/
46-
class ChatMessage extends UIComponent<Extendable<ChatMessageProps>, any> {
46+
class ChatMessage extends UIComponent<ReactProps<ChatMessageProps>, any> {
4747
static className = 'ui-chat__message'
4848

4949
static create: Function

src/components/Divider/Divider.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
ContentComponentProps,
1212
commonPropTypes,
1313
} from '../../lib'
14-
import { Extendable } from '../../../types/utils'
14+
import { ReactProps } from '../../../types/utils'
1515

1616
export interface DividerProps
1717
extends UIComponentProps,
@@ -31,7 +31,7 @@ export interface DividerProps
3131
/**
3232
* A divider visually segments content into groups.
3333
*/
34-
class Divider extends UIComponent<Extendable<DividerProps>, any> {
34+
class Divider extends UIComponent<ReactProps<DividerProps>, any> {
3535
static displayName = 'Divider'
3636

3737
static create: Function

src/components/Form/Form.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ChildrenComponentProps,
1111
commonPropTypes,
1212
} from '../../lib'
13-
import { ComponentEventHandler, Extendable, ShorthandValue } from '../../../types/utils'
13+
import { ComponentEventHandler, ReactProps, ShorthandValue } from '../../../types/utils'
1414
import FormField from './FormField'
1515

1616
export interface FormProps extends UIComponentProps, ChildrenComponentProps {
@@ -33,7 +33,7 @@ export interface FormProps extends UIComponentProps, ChildrenComponentProps {
3333
* @accessibility
3434
* Label needs to be provided by using 'aria-label', or 'aria-labelledby' attributes on the <form> element.
3535
*/
36-
class Form extends UIComponent<Extendable<FormProps>, any> {
36+
class Form extends UIComponent<ReactProps<FormProps>, any> {
3737
static create: Function
3838

3939
public static displayName = 'Form'

src/components/Form/FormField.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ChildrenComponentProps,
1111
commonPropTypes,
1212
} from '../../lib'
13-
import { Extendable, ShorthandValue } from '../../../types/utils'
13+
import { ReactProps, ShorthandValue } from '../../../types/utils'
1414
import Text from '../Text/Text'
1515
import Input from '../Input/Input'
1616
import Slot from '../Slot/Slot'
@@ -44,7 +44,7 @@ export interface FormFieldProps extends UIComponentProps, ChildrenComponentProps
4444
/**
4545
* A field is a form element containing a label and an input.
4646
*/
47-
class FormField extends UIComponent<Extendable<FormFieldProps>, any> {
47+
class FormField extends UIComponent<ReactProps<FormFieldProps>, any> {
4848
public static displayName = 'FormField'
4949

5050
public static className = 'ui-form__field'

src/components/Grid/Grid.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
commonPropTypes,
1111
ContentComponentProps,
1212
} from '../../lib'
13-
import { Extendable } from '../../../types/utils'
13+
import { ReactProps } from '../../../types/utils'
1414
import { Accessibility } from '../../lib/accessibility/types'
1515
import { defaultBehavior } from '../../lib/accessibility'
1616
import ReactNode = React.ReactNode
@@ -38,7 +38,7 @@ export interface GridProps
3838
* @accessibility This is example usage of the accessibility tag.
3939
* This should be replaced with the actual description after the PR is merged
4040
*/
41-
class Grid extends UIComponent<Extendable<GridProps>, any> {
41+
class Grid extends UIComponent<ReactProps<GridProps>, any> {
4242
public static displayName = 'Grid'
4343

4444
public static className = 'ui-grid'

src/components/Header/Header.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
commonPropTypes,
1212
} from '../../lib'
1313
import HeaderDescription from './HeaderDescription'
14-
import { Extendable, ShorthandValue } from '../../../types/utils'
14+
import { ReactProps, ShorthandValue } from '../../../types/utils'
1515

1616
export interface HeaderProps
1717
extends UIComponentProps,
@@ -34,7 +34,7 @@ export interface HeaderProps
3434
* - when the description property is used in header, readers will narrate both header content and description within the element.
3535
* In addition to that, both will be displayed in the list of headings.
3636
*/
37-
class Header extends UIComponent<Extendable<HeaderProps>, any> {
37+
class Header extends UIComponent<ReactProps<HeaderProps>, any> {
3838
static className = 'ui-header'
3939

4040
static displayName = 'Header'

src/components/Header/HeaderDescription.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
ContentComponentProps,
1010
commonPropTypes,
1111
} from '../../lib'
12-
import { Extendable } from '../../../types/utils'
12+
import { ReactProps } from '../../../types/utils'
1313

1414
export interface HeaderDescriptionProps
1515
extends UIComponentProps,
@@ -19,7 +19,7 @@ export interface HeaderDescriptionProps
1919
/**
2020
* A header's description provides more detailed information.
2121
*/
22-
class HeaderDescription extends UIComponent<Extendable<HeaderDescriptionProps>, any> {
22+
class HeaderDescription extends UIComponent<ReactProps<HeaderDescriptionProps>, any> {
2323
static create: Function
2424

2525
static className = 'ui-header__description'

src/components/Icon/Icon.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { iconBehavior } from '../../lib/accessibility/'
1111
import { Accessibility } from '../../lib/accessibility/types'
1212

1313
import { SvgIconSpec } from '../../themes/types'
14-
import { Extendable } from '../../../types/utils'
14+
import { ReactProps } from '../../../types/utils'
1515

1616
export type IconXSpacing = 'none' | 'before' | 'after' | 'both'
1717
export type IconSize =
@@ -54,7 +54,7 @@ export interface IconProps extends UIComponentProps {
5454
/**
5555
* An icon is a glyph used to represent something else.
5656
*/
57-
class Icon extends UIComponent<Extendable<IconProps>, any> {
57+
class Icon extends UIComponent<ReactProps<IconProps>, any> {
5858
static create: Function
5959

6060
static className = 'ui-icon'

src/components/Image/Image.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createShorthandFactory, UIComponent, UIComponentProps, commonPropTypes
55
import { imageBehavior } from '../../lib/accessibility'
66
import { Accessibility } from '../../lib/accessibility/types'
77

8-
import { Extendable } from '../../../types/utils'
8+
import { ReactProps } from '../../../types/utils'
99

1010
export interface ImageProps extends UIComponentProps {
1111
/**
@@ -37,7 +37,7 @@ export interface ImageProps extends UIComponentProps {
3737
* - when image has role='presentation' then screen readers navigate to the element in scan/virtual mode. To avoid this, the attribute "aria-hidden='true'" is applied by the default image behavior
3838
* - when alt property is used in combination with aria-label, arialabbeledby or title, additional screen readers verification is needed as each screen reader handles this combination differently.
3939
*/
40-
class Image extends UIComponent<Extendable<ImageProps>, any> {
40+
class Image extends UIComponent<ReactProps<ImageProps>, any> {
4141
static create: Function
4242

4343
static className = 'ui-image'

src/components/Input/Input.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
ChildrenComponentProps,
1313
commonPropTypes,
1414
} from '../../lib'
15-
import { Extendable, ShorthandValue, ComponentEventHandler } from '../../../types/utils'
15+
import { ReactProps, ShorthandValue, ComponentEventHandler } from '../../../types/utils'
1616
import Icon from '../Icon/Icon'
1717
import Ref from '../Ref/Ref'
1818
import Slot from '../Slot/Slot'
@@ -76,7 +76,7 @@ export interface InputState {
7676
* Other considerations:
7777
* - if input is search, then use "role='search'"
7878
*/
79-
class Input extends AutoControlledComponent<Extendable<InputProps>, InputState> {
79+
class Input extends AutoControlledComponent<ReactProps<InputProps>, InputState> {
8080
private inputDomElement: HTMLInputElement
8181

8282
static className = 'ui-input'

src/components/ItemLayout/ItemLayout.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from '../../lib'
1313
import Layout from '../Layout/Layout'
1414
import { ComponentSlotClasses, ICSSInJSStyle } from '../../themes/types'
15-
import { Extendable } from '../../../types/utils'
15+
import { ReactProps } from '../../../types/utils'
1616

1717
export interface ItemLayoutProps extends UIComponentProps, ContentComponentProps<any> {
1818
contentMedia?: any
@@ -58,7 +58,7 @@ export interface ItemLayoutProps extends UIComponentProps, ContentComponentProps
5858
/**
5959
* The Item Layout handles layout styles for menu items, list items and other similar item templates.
6060
*/
61-
class ItemLayout extends UIComponent<Extendable<ItemLayoutProps>, any> {
61+
class ItemLayout extends UIComponent<ReactProps<ItemLayoutProps>, any> {
6262
static create: Function
6363

6464
static displayName = 'ItemLayout'

0 commit comments

Comments
 (0)