-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(typings): update TypeScript and use tslint-config-airbnb (#2942)
- Loading branch information
1 parent
1f01e14
commit caee404
Showing
214 changed files
with
3,511 additions
and
2,994 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
import * as React from 'react'; | ||
import * as React from 'react' | ||
|
||
import { SemanticShorthandItem } from '../..'; | ||
import { ButtonProps } from '../../elements/Button'; | ||
import { ModalProps } from '../../modules/Modal'; | ||
import { ModalContentProps } from '../../modules/Modal/ModalContent'; | ||
import { ModalHeaderProps } from '../../modules/Modal/ModalHeader'; | ||
import { SemanticShorthandItem } from '../..' | ||
import { ButtonProps } from '../../elements/Button' | ||
import { ModalProps } from '../../modules/Modal' | ||
import { ModalContentProps } from '../../modules/Modal/ModalContent' | ||
import { ModalHeaderProps } from '../../modules/Modal/ModalHeader' | ||
|
||
export interface ConfirmProps extends ModalProps { | ||
[key: string]: any; | ||
[key: string]: any | ||
|
||
/** The cancel button text. */ | ||
cancelButton?: SemanticShorthandItem<ButtonProps>; | ||
cancelButton?: SemanticShorthandItem<ButtonProps> | ||
|
||
/** The OK button text. */ | ||
confirmButton?: SemanticShorthandItem<ButtonProps>; | ||
confirmButton?: SemanticShorthandItem<ButtonProps> | ||
|
||
/** The ModalContent text. */ | ||
content?: SemanticShorthandItem<ModalContentProps>; | ||
content?: SemanticShorthandItem<ModalContentProps> | ||
|
||
/** The ModalHeader text. */ | ||
header?: SemanticShorthandItem<ModalHeaderProps>; | ||
header?: SemanticShorthandItem<ModalHeaderProps> | ||
|
||
/** | ||
* Called when the Modal is closed without clicking confirm. | ||
* | ||
* @param {SyntheticEvent} event - React's original SyntheticEvent. | ||
* @param {object} data - All props. | ||
*/ | ||
onCancel?: (event: React.MouseEvent<HTMLAnchorElement>, data: ConfirmProps) => void; | ||
onCancel?: (event: React.MouseEvent<HTMLAnchorElement>, data: ConfirmProps) => void | ||
|
||
/** | ||
* Called when the OK button is clicked. | ||
* | ||
* @param {SyntheticEvent} event - React's original SyntheticEvent. | ||
* @param {object} data - All props. | ||
*/ | ||
onConfirm?: (event: React.MouseEvent<HTMLAnchorElement>, data: ConfirmProps) => void; | ||
onConfirm?: (event: React.MouseEvent<HTMLAnchorElement>, data: ConfirmProps) => void | ||
|
||
/** Whether or not the modal is visible. */ | ||
open?: boolean; | ||
open?: boolean | ||
|
||
/** A confirm can vary in size. */ | ||
size?: 'fullscreen' | 'large' | 'mini' | 'small' | 'tiny'; | ||
size?: 'fullscreen' | 'large' | 'mini' | 'small' | 'tiny' | ||
} | ||
|
||
declare const Confirm: React.ComponentClass<ConfirmProps>; | ||
declare const Confirm: React.ComponentClass<ConfirmProps> | ||
|
||
export default Confirm; | ||
export default Confirm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { default, ConfirmProps } from './Confirm'; | ||
export { default, ConfirmProps } from './Confirm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
import * as React from 'react'; | ||
import * as React from 'react' | ||
|
||
export interface MountNodeProps { | ||
[key: string]: any; | ||
[key: string]: any | ||
|
||
/** Additional classes. */ | ||
className?: string; | ||
className?: string | ||
|
||
/** The DOM node where we will apply class names. Defaults to document.body. */ | ||
node?: HTMLElement; | ||
node?: HTMLElement | ||
} | ||
|
||
declare class MountNode extends React.Component<MountNodeProps, {}> { | ||
} | ||
declare class MountNode extends React.Component<MountNodeProps, {}> {} | ||
|
||
export default MountNode; | ||
export default MountNode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { default, MountNodeProps } from './MountNode'; | ||
export { default, MountNodeProps } from './MountNode' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
import * as React from 'react'; | ||
import * as React from 'react' | ||
|
||
import { SemanticShorthandItem } from '../..'; | ||
import { default as PaginationItem, PaginationItemProps } from './PaginationItem'; | ||
import { SemanticShorthandItem } from '../..' | ||
import { default as PaginationItem, PaginationItemProps } from './PaginationItem' | ||
|
||
export interface PaginationProps { | ||
[key: string]: any; | ||
[key: string]: any | ||
|
||
/** A pagination item can have an aria label. */ | ||
'aria-label'?: string; | ||
'aria-label'?: string | ||
|
||
/** Initial activePage value. */ | ||
defaultActivePage?: number | string; | ||
defaultActivePage?: number | string | ||
|
||
/** Index of the currently active page. */ | ||
activePage?: number | string; | ||
activePage?: number | string | ||
|
||
/** Number of always visible pages at the beginning and end. */ | ||
boundaryRange?: number | string; | ||
boundaryRange?: number | string | ||
|
||
/** A shorthand for PaginationItem. */ | ||
ellipsisItem?: SemanticShorthandItem<PaginationItemProps>; | ||
ellipsisItem?: SemanticShorthandItem<PaginationItemProps> | ||
|
||
/** A shorthand for PaginationItem. */ | ||
firstItem?: SemanticShorthandItem<PaginationItemProps>; | ||
firstItem?: SemanticShorthandItem<PaginationItemProps> | ||
|
||
/** A shorthand for PaginationItem. */ | ||
lastItem?: SemanticShorthandItem<PaginationItemProps>; | ||
lastItem?: SemanticShorthandItem<PaginationItemProps> | ||
|
||
/** A shorthand for PaginationItem. */ | ||
nextItem?: SemanticShorthandItem<PaginationItemProps>; | ||
nextItem?: SemanticShorthandItem<PaginationItemProps> | ||
|
||
/** A shorthand for PaginationItem. */ | ||
pageItem?: SemanticShorthandItem<PaginationItemProps>; | ||
pageItem?: SemanticShorthandItem<PaginationItemProps> | ||
|
||
/** A shorthand for PaginationItem. */ | ||
prevItem?: SemanticShorthandItem<PaginationItemProps>; | ||
prevItem?: SemanticShorthandItem<PaginationItemProps> | ||
|
||
/** | ||
* Called on change of an active page. | ||
* | ||
* @param {SyntheticEvent} event - React's original SyntheticEvent. | ||
* @param {object} data - All props. | ||
*/ | ||
onPageChange?: (event: React.MouseEvent<HTMLAnchorElement>, data: PaginationProps) => void; | ||
onPageChange?: (event: React.MouseEvent<HTMLAnchorElement>, data: PaginationProps) => void | ||
|
||
/** Number of always visible pages before and after the current one. */ | ||
siblingRange?: number | string; | ||
siblingRange?: number | string | ||
|
||
/** Total number of pages. */ | ||
totalPages: number | string; | ||
totalPages: number | string | ||
} | ||
|
||
declare class Pagination extends React.Component<PaginationProps, {}> { | ||
static Item: typeof PaginationItem; | ||
static Item: typeof PaginationItem | ||
} | ||
|
||
export default Pagination; | ||
export default Pagination |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
import * as React from 'react'; | ||
import * as React from 'react' | ||
|
||
export interface PaginationItemProps { | ||
[key: string]: any; | ||
[key: string]: any | ||
|
||
/** A pagination item can be active. */ | ||
active?: boolean; | ||
active?: boolean | ||
|
||
/** A pagination item can be disabled. */ | ||
disabled?: boolean; | ||
disabled?: boolean | ||
|
||
/** | ||
* Called on click. | ||
* | ||
* @param {SyntheticEvent} event - React's original SyntheticEvent. | ||
* @param {object} data - All props. | ||
*/ | ||
onClick?: (event: React.MouseEvent<HTMLAnchorElement>, data: PaginationItemProps) => void; | ||
onClick?: (event: React.MouseEvent<HTMLAnchorElement>, data: PaginationItemProps) => void | ||
|
||
/** | ||
* Called on key down. | ||
* | ||
* @param {SyntheticEvent} event - React's original SyntheticEvent. | ||
* @param {object} data - All props. | ||
*/ | ||
onKeyDown?: (event: React.MouseEvent<HTMLAnchorElement>, data: PaginationItemProps) => void; | ||
onKeyDown?: (event: React.MouseEvent<HTMLAnchorElement>, data: PaginationItemProps) => void | ||
|
||
/** A pagination should have a type. */ | ||
type?: 'ellipsisItem' | 'firstItem' | 'prevItem' | 'pageItem' | 'nextItem' | 'lastItem'; | ||
type?: 'ellipsisItem' | 'firstItem' | 'prevItem' | 'pageItem' | 'nextItem' | 'lastItem' | ||
} | ||
|
||
declare class PaginationItem extends React.Component<PaginationItemProps, {}> { | ||
} | ||
declare class PaginationItem extends React.Component<PaginationItemProps, {}> {} | ||
|
||
export default PaginationItem; | ||
export default PaginationItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { default, PaginationProps } from './Pagination'; | ||
export { default, PaginationProps } from './Pagination' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,113 @@ | ||
import * as React from 'react'; | ||
import * as React from 'react' | ||
|
||
export interface PortalProps { | ||
[key: string]: any; | ||
[key: string]: any | ||
|
||
/** Primary content. */ | ||
children?: React.ReactNode; | ||
children?: React.ReactNode | ||
|
||
/** Additional classes. */ | ||
className?: string; | ||
className?: string | ||
|
||
/** Controls whether or not the portal should close on a click outside. */ | ||
closeOnDocumentClick?: boolean; | ||
closeOnDocumentClick?: boolean | ||
|
||
/** Controls whether or not the portal should close when escape is pressed is displayed. */ | ||
closeOnEscape?: boolean; | ||
closeOnEscape?: boolean | ||
|
||
/** | ||
* Controls whether or not the portal should close when mousing out of the portal. | ||
* NOTE: This will prevent `closeOnTriggerMouseLeave` when mousing over the | ||
* gap from the trigger to the portal. | ||
*/ | ||
closeOnPortalMouseLeave?: boolean; | ||
closeOnPortalMouseLeave?: boolean | ||
|
||
/** | ||
* Controls whether or not the portal should close on a click on the portal background. | ||
* NOTE: This differs from closeOnDocumentClick: | ||
* - DocumentClick - any click not within the portal | ||
* - RootNodeClick - a click not within the portal but within the portal's wrapper | ||
*/ | ||
closeOnRootNodeClick?: boolean; | ||
closeOnRootNodeClick?: boolean | ||
|
||
/** Controls whether or not the portal should close on blur of the trigger. */ | ||
closeOnTriggerBlur?: boolean; | ||
closeOnTriggerBlur?: boolean | ||
|
||
/** Controls whether or not the portal should close on click of the trigger. */ | ||
closeOnTriggerClick?: boolean; | ||
closeOnTriggerClick?: boolean | ||
|
||
/** Controls whether or not the portal should close when mousing out of the trigger. */ | ||
closeOnTriggerMouseLeave?: boolean; | ||
closeOnTriggerMouseLeave?: boolean | ||
|
||
/** Initial value of open. */ | ||
defaultOpen?: boolean; | ||
defaultOpen?: boolean | ||
|
||
/** Event pool namespace that is used to handle component events. */ | ||
eventPool?: string; | ||
eventPool?: string | ||
|
||
/** The node where the portal should mount. */ | ||
mountNode?: any; | ||
mountNode?: any | ||
|
||
/** Milliseconds to wait before opening on mouse over */ | ||
mouseEnterDelay?: number; | ||
mouseEnterDelay?: number | ||
|
||
/** Milliseconds to wait before closing on mouse leave */ | ||
mouseLeaveDelay?: number; | ||
mouseLeaveDelay?: number | ||
|
||
/** | ||
* Called when a close event happens | ||
* | ||
* @param {SyntheticEvent} event - React's original SyntheticEvent. | ||
* @param {object} data - All props. | ||
*/ | ||
onClose?: (event: React.MouseEvent<HTMLElement>, data: PortalProps) => void; | ||
onClose?: (event: React.MouseEvent<HTMLElement>, data: PortalProps) => void | ||
|
||
/** | ||
* Called when the portal is mounted on the DOM | ||
* | ||
* @param {null} | ||
* @param {object} data - All props. | ||
*/ | ||
onMount?: (nothing: null, data: PortalProps) => void; | ||
onMount?: (nothing: null, data: PortalProps) => void | ||
|
||
/** | ||
* Called when an open event happens | ||
* | ||
* @param {SyntheticEvent} event - React's original SyntheticEvent. | ||
* @param {object} data - All props. | ||
*/ | ||
onOpen?: (event: React.MouseEvent<HTMLElement>, data: PortalProps) => void; | ||
onOpen?: (event: React.MouseEvent<HTMLElement>, data: PortalProps) => void | ||
|
||
/** | ||
* Called when the portal is unmounted from the DOM | ||
* | ||
* @param {null} | ||
* @param {object} data - All props. | ||
*/ | ||
onUnmount?: (nothing: null, data: PortalProps) => void; | ||
onUnmount?: (nothing: null, data: PortalProps) => void | ||
|
||
/** Controls whether or not the portal is displayed. */ | ||
open?: boolean; | ||
open?: boolean | ||
|
||
/** Controls whether or not the portal should open when the trigger is clicked. */ | ||
openOnTriggerClick?: boolean; | ||
openOnTriggerClick?: boolean | ||
|
||
/** Controls whether or not the portal should open on focus of the trigger. */ | ||
openOnTriggerFocus?: boolean; | ||
openOnTriggerFocus?: boolean | ||
|
||
/** Controls whether or not the portal should open when mousing over the trigger. */ | ||
openOnTriggerMouseEnter?: boolean; | ||
openOnTriggerMouseEnter?: boolean | ||
|
||
/** Controls whether the portal should be prepended to the mountNode instead of appended. */ | ||
prepend?: boolean; | ||
prepend?: boolean | ||
|
||
/** Any inline styles to the Portal container. */ | ||
style?: object; | ||
style?: object | ||
|
||
/** Element to be rendered in-place where the portal is defined. */ | ||
trigger?: React.ReactNode; | ||
trigger?: React.ReactNode | ||
} | ||
|
||
declare const Portal: React.ComponentClass<PortalProps>; | ||
declare const Portal: React.ComponentClass<PortalProps> | ||
|
||
export default Portal; | ||
export default Portal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { default, PortalProps } from './Portal'; | ||
export { default, PortalProps } from './Portal' |
Oops, something went wrong.