From 9cc1b19ab0ff0c5c06f9af38b9f6fdabc5e38429 Mon Sep 17 00:00:00 2001 From: "U-SWRI16\\svogel" Date: Fri, 27 Oct 2017 19:38:55 -0500 Subject: [PATCH 01/32] Adding props export to all elements. --- types/reactstrap/index.d.ts | 152 +++++++++--------- types/reactstrap/lib/Alert.d.ts | 7 +- types/reactstrap/lib/Badge.d.ts | 5 +- types/reactstrap/lib/Breadcrumb.d.ts | 5 +- types/reactstrap/lib/BreadcrumbItem.d.ts | 6 +- types/reactstrap/lib/Button.d.ts | 5 +- types/reactstrap/lib/ButtonDropdown.d.ts | 12 +- types/reactstrap/lib/ButtonGroup.d.ts | 5 +- types/reactstrap/lib/ButtonToolbar.d.ts | 5 +- types/reactstrap/lib/Card.d.ts | 6 +- types/reactstrap/lib/CardBlock.d.ts | 6 +- types/reactstrap/lib/CardBody.d.ts | 5 +- types/reactstrap/lib/CardColumns.d.ts | 5 +- types/reactstrap/lib/CardDeck.d.ts | 5 +- types/reactstrap/lib/CardFooter.d.ts | 5 +- types/reactstrap/lib/CardGroup.d.ts | 5 +- types/reactstrap/lib/CardHeader.d.ts | 5 +- types/reactstrap/lib/CardImg.d.ts | 5 +- types/reactstrap/lib/CardImgOverlay.d.ts | 5 +- types/reactstrap/lib/CardLink.d.ts | 5 +- types/reactstrap/lib/CardSubtitle.d.ts | 5 +- types/reactstrap/lib/CardText.d.ts | 5 +- types/reactstrap/lib/CardTitle.d.ts | 5 +- types/reactstrap/lib/Col.d.ts | 5 +- types/reactstrap/lib/Collapse.d.ts | 5 +- types/reactstrap/lib/Container.d.ts | 5 +- types/reactstrap/lib/Dropdown.d.ts | 7 +- types/reactstrap/lib/DropdownItem.d.ts | 5 +- types/reactstrap/lib/DropdownMenu.d.ts | 5 +- types/reactstrap/lib/DropdownToggle.d.ts | 5 +- types/reactstrap/lib/Fade.d.ts | 5 +- types/reactstrap/lib/Form.d.ts | 5 +- types/reactstrap/lib/FormFeedback.d.ts | 5 +- types/reactstrap/lib/FormGroup.d.ts | 5 +- types/reactstrap/lib/FormText.d.ts | 5 +- types/reactstrap/lib/Input.d.ts | 5 +- types/reactstrap/lib/InputGroup.d.ts | 5 +- types/reactstrap/lib/InputGroupAddon.d.ts | 5 +- types/reactstrap/lib/InputGroupButton.d.ts | 5 +- types/reactstrap/lib/Jumbotron.d.ts | 5 +- types/reactstrap/lib/Label.d.ts | 5 +- types/reactstrap/lib/ListGroup.d.ts | 5 +- types/reactstrap/lib/ListGroupItem.d.ts | 7 +- .../reactstrap/lib/ListGroupItemHeading.d.ts | 5 +- types/reactstrap/lib/ListGroupItemText.d.ts | 5 +- types/reactstrap/lib/Media.d.ts | 5 +- types/reactstrap/lib/Modal.d.ts | 5 +- types/reactstrap/lib/ModalBody.d.ts | 5 +- types/reactstrap/lib/ModalFooter.d.ts | 5 +- types/reactstrap/lib/ModalHeader.d.ts | 5 +- types/reactstrap/lib/Nav.d.ts | 5 +- types/reactstrap/lib/NavDropdown.d.ts | 12 +- types/reactstrap/lib/NavItem.d.ts | 5 +- types/reactstrap/lib/NavLink.d.ts | 5 +- types/reactstrap/lib/Navbar.d.ts | 5 +- types/reactstrap/lib/NavbarBrand.d.ts | 5 +- types/reactstrap/lib/NavbarToggler.d.ts | 5 +- types/reactstrap/lib/Pagination.d.ts | 5 +- types/reactstrap/lib/PaginationItem.d.ts | 5 +- types/reactstrap/lib/PaginationLink.d.ts | 5 +- types/reactstrap/lib/Popover.d.ts | 5 +- types/reactstrap/lib/PopoverContent.d.ts | 5 +- types/reactstrap/lib/PopoverTitle.d.ts | 5 +- types/reactstrap/lib/Progress.d.ts | 5 +- types/reactstrap/lib/Row.d.ts | 5 +- types/reactstrap/lib/TabContent.d.ts | 5 +- types/reactstrap/lib/TabPane.d.ts | 5 +- types/reactstrap/lib/Table.d.ts | 5 +- types/reactstrap/lib/Tag.d.ts | 5 +- types/reactstrap/lib/TetherContent.d.ts | 5 +- types/reactstrap/lib/Tooltip.d.ts | 9 +- types/reactstrap/lib/Uncontrolled.d.ts | 42 ++--- 72 files changed, 238 insertions(+), 333 deletions(-) diff --git a/types/reactstrap/index.d.ts b/types/reactstrap/index.d.ts index 81d4cec5bd..f653585c8f 100644 --- a/types/reactstrap/index.d.ts +++ b/types/reactstrap/index.d.ts @@ -8,80 +8,78 @@ export interface CSSModule { [className: string]: string; } -export { default as Alert } from './lib/Alert'; -export { default as Badge } from './lib/Badge'; -export { default as Breadcrumb } from './lib/Breadcrumb'; -export { default as BreadcrumbItem } from './lib/BreadcrumbItem'; -export { default as Button } from './lib/Button'; -export { default as ButtonDropdown } from './lib/ButtonDropdown'; -export { default as ButtonGroup } from './lib/ButtonGroup'; -export { default as ButtonToolbar } from './lib/ButtonToolbar'; -export { default as Card } from './lib/Card'; -export { default as CardBody } from './lib/CardBody'; -export { default as CardBlock } from './lib/CardBlock'; -export { default as CardColumns } from './lib/CardColumns'; -export { default as CardDeck } from './lib/CardDeck'; -export { default as CardFooter } from './lib/CardFooter'; -export { default as CardGroup } from './lib/CardGroup'; -export { default as CardHeader } from './lib/CardHeader'; -export { default as CardImg } from './lib/CardImg'; -export { default as CardImgOverlay } from './lib/CardImgOverlay'; -export { default as CardLink } from './lib/CardLink'; -export { default as CardSubtitle } from './lib/CardSubtitle'; -export { default as CardText } from './lib/CardText'; -export { default as CardTitle } from './lib/CardTitle'; -export { default as Col } from './lib/Col'; -export { default as Collapse } from './lib/Collapse'; -export { default as Container } from './lib/Container'; -export { default as Dropdown } from './lib/Dropdown'; -export { default as DropdownItem } from './lib/DropdownItem'; -export { default as DropdownMenu } from './lib/DropdownMenu'; -export { default as DropdownToggle } from './lib/DropdownToggle'; -export { default as Fade } from './lib/Fade'; -export { default as Form } from './lib/Form'; -export { default as FormFeedback } from './lib/FormFeedback'; -export { default as FormGroup } from './lib/FormGroup'; -export { default as FormText } from './lib/FormText'; -export { default as Input } from './lib/Input'; -export { default as InputGroup } from './lib/InputGroup'; -export { default as InputGroupAddon } from './lib/InputGroupAddon'; -export { default as InputGroupButton } from './lib/InputGroupButton'; -export { default as Jumbotron } from './lib/Jumbotron'; -export { default as Label } from './lib/Label'; -export { default as ListGroup } from './lib/ListGroup'; -export { default as ListGroupItem } from './lib/ListGroupItem'; -export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading'; -export { default as ListGroupItemText } from './lib/ListGroupItemText'; -export { default as Media } from './lib/Media'; -export { default as Modal } from './lib/Modal'; -export { default as ModalBody } from './lib/ModalBody'; -export { default as ModalFooter } from './lib/ModalFooter'; -export { default as ModalHeader } from './lib/ModalHeader'; -export { default as Nav } from './lib/Nav'; -export { default as Navbar } from './lib/Navbar'; -export { default as NavbarBrand } from './lib/NavbarBrand'; -export { default as NavbarToggler } from './lib/NavbarToggler'; -export { default as NavDropdown } from './lib/NavDropdown'; -export { default as NavItem } from './lib/NavItem'; -export { default as NavLink } from './lib/NavLink'; -export { default as Pagination } from './lib/Pagination'; -export { default as PaginationItem } from './lib/PaginationItem'; -export { default as PaginationLink } from './lib/PaginationLink'; -export { default as Popover } from './lib/Popover'; -export { default as PopoverContent } from './lib/PopoverContent'; -export { default as PopoverTitle } from './lib/PopoverTitle'; -export { default as Progress } from './lib/Progress'; -export { default as Row } from './lib/Row'; -export { default as TabContent } from './lib/TabContent'; -export { default as Table } from './lib/Table'; -export { default as TabPane } from './lib/TabPane'; -export { default as Tag } from './lib/Tag'; -export { default as TetherContent } from './lib/TetherContent'; -export { default as Tooltip } from './lib/Tooltip'; -export { - UncontrolledAlert, - UncontrolledButtonDropdown, - UncontrolledDropdown, - UncontrolledNavDropdown, - UncontrolledTooltip -} from './lib/Uncontrolled'; +export { Alert, AlertProps } from './lib/Alert'; +export { Badge, BadgeProps } from './lib/Badge'; +export { Breadcrumb, BreadcrumbProps } from './lib/Breadcrumb'; +export { BreadcrumbItem, BreadcrumbItemProps } from './lib/BreadcrumbItem'; +export { Button, ButtonProps } from './lib/Button'; +export { ButtonDropdown, ButtonDropdownProps } from './lib/ButtonDropdown'; +export { ButtonGroup, ButtonGroupProps } from './lib/ButtonGroup'; +export { ButtonToolbar, ButtonToolbarProps } from './lib/ButtonToolbar'; +export { Card, CardProps } from './lib/Card'; +export { CardBody, CardBodyProps } from './lib/CardBody'; +export { CardBlock, CardBlockProps } from './lib/CardBlock'; +export { CardColumns, CardColumnsProps } from './lib/CardColumns'; +export { CardDeck, CardDeckProps } from './lib/CardDeck'; +export { CardFooter, CardFooterProps } from './lib/CardFooter'; +export { CardGroup, CardGroupProps } from './lib/CardGroup'; +export { CardHeader, CardHeaderProps } from './lib/CardHeader'; +export { CardImg, CardImgProps } from './lib/CardImg'; +export { CardImgOverlay, CardImgOverlayProps } from './lib/CardImgOverlay'; +export { CardLink, CardLinkProps } from './lib/CardLink'; +export { CardSubtitle, CardSubtitleProps } from './lib/CardSubtitle'; +export { CardText, CardTextProps } from './lib/CardText'; +export { CardTitle, CardTitleProps } from './lib/CardTitle'; +export { Col, ColProps } from './lib/Col'; +export { Collapse, CollapseProps } from './lib/Collapse'; +export { Container, ContainerProps } from './lib/Container'; +export { Dropdown, DropdownProps } from './lib/Dropdown'; +export { DropdownItem, DropdownItemProps } from './lib/DropdownItem'; +export { DropdownMenu, DropdownMenuProps } from './lib/DropdownMenu'; +export { DropdownToggle, DropdownToggleProps } from './lib/DropdownToggle'; +export { Fade, FadeProps } from './lib/Fade'; +export { Form, FormProps } from './lib/Form'; +export { FormFeedback, FormFeedbackProps } from './lib/FormFeedback'; +export { FormGroup, FormGroupProps } from './lib/FormGroup'; +export { FormText, FormTextProps } from './lib/FormText'; +export { Input, InputProps } from './lib/Input'; +export { InputGroup, InputGroupProps } from './lib/InputGroup'; +export { InputGroupAddon, InputGroupAddonProps } from './lib/InputGroupAddon'; +export { InputGroupButton, InputGroupButtonProps } from './lib/InputGroupButton'; +export { Jumbotron, JumbotronProps } from './lib/Jumbotron'; +export { Label, LabelProps } from './lib/Label'; +export { ListGroup, ListGroupProps } from './lib/ListGroup'; +export { ListGroupItem, ListGroupItemProps } from './lib/ListGroupItem'; +export { ListGroupItemHeading, ListGroupItemHeadingProps } from './lib/ListGroupItemHeading'; +export { ListGroupItemText, ListGroupItemTextProps } from './lib/ListGroupItemText'; +export { Media, MediaProps } from './lib/Media'; +export { Modal, ModalProps } from './lib/Modal'; +export { ModalBody, ModalBodyProps } from './lib/ModalBody'; +export { ModalFooter, ModalFooterProps } from './lib/ModalFooter'; +export { ModalHeader, ModalHeaderProps } from './lib/ModalHeader'; +export { Nav, NavProps } from './lib/Nav'; +export { Navbar, NavbarProps } from './lib/Navbar'; +export { NavbarBrand, NavbarBrandProps } from './lib/NavbarBrand'; +export { NavbarToggler, NavbarTogglerProps } from './lib/NavbarToggler'; +export { NavDropdown, NavDropdownProps } from './lib/NavDropdown'; +export { NavItem, NavItemProps } from './lib/NavItem'; +export { NavLink, NavLinkProps } from './lib/NavLink'; +export { Pagination, PaginationProps } from './lib/Pagination'; +export { PaginationItem, PaginationItemProps } from './lib/PaginationItem'; +export { PaginationLink, PaginationLinkProps } from './lib/PaginationLink'; +export { Popover, PopoverProps } from './lib/Popover'; +export { PopoverContent, PopoverContentProps } from './lib/PopoverContent'; +export { PopoverTitle, PopoverTitleProps } from './lib/PopoverTitle'; +export { Progress, ProgressProps } from './lib/Progress'; +export { Row, RowProps } from './lib/Row'; +export { TabContent, TabContentProps } from './lib/TabContent'; +export { Table, TableProps } from './lib/Table'; +export { TabPane, TabPaneProps } from './lib/TabPane'; +export { Tag, TagProps } from './lib/Tag'; +export { TetherContent, TetherContentProps } from './lib/TetherContent'; +export { Tooltip, TooltipProps } from './lib/Tooltip'; +export { UncontrolledAlert, UncontrolledAlertProps } from './lib/Uncontrolled'; +export { UncontrolledButtonDropdown, UncontrolledButtonDropdownProps } from './lib/Uncontrolled'; +export { UncontrolledDropdown, UncontrolledDropdownProps } from './lib/Uncontrolled'; +export { UncontrolledNavDropdown, UncontrolledNavDropdownProps } from './lib/Uncontrolled'; +export { UncontrolledTooltip, UncontrolledTooltipProps } from './lib/Uncontrolled'; diff --git a/types/reactstrap/lib/Alert.d.ts b/types/reactstrap/lib/Alert.d.ts index e29d62cb0d..1b4f6eb884 100644 --- a/types/reactstrap/lib/Alert.d.ts +++ b/types/reactstrap/lib/Alert.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -export interface UncontrolledProps { +export interface UncontrolledAlertProps { className?: string; cssModule?: CSSModule; color?: string; @@ -10,10 +10,9 @@ export interface UncontrolledProps { transitionLeaveTimeout?: number; } -interface Props extends UncontrolledProps { +export interface AlertProps extends UncontrolledAlertProps { isOpen?: boolean; toggle?: () => void; } -declare var Alert: React.StatelessComponent; -export default Alert; +export const Alert: React.StatelessComponent; diff --git a/types/reactstrap/lib/Badge.d.ts b/types/reactstrap/lib/Badge.d.ts index 51f72e39d3..4c21dcac42 100644 --- a/types/reactstrap/lib/Badge.d.ts +++ b/types/reactstrap/lib/Badge.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface BadgeProps { color?: string; pill?: boolean; tag?: React.ReactType; @@ -8,5 +8,4 @@ interface Props { cssModule?: CSSModule; } -declare var Badge: React.StatelessComponent; -export default Badge; +export const Badge: React.StatelessComponent; diff --git a/types/reactstrap/lib/Breadcrumb.d.ts b/types/reactstrap/lib/Breadcrumb.d.ts index 54f581288c..26839e9140 100644 --- a/types/reactstrap/lib/Breadcrumb.d.ts +++ b/types/reactstrap/lib/Breadcrumb.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface BreadcrumbProps { tag?: string; className?: string; cssModule?: CSSModule; } -declare var Breadcrumb: React.StatelessComponent; -export default Breadcrumb; +export const Breadcrumb: React.StatelessComponent; diff --git a/types/reactstrap/lib/BreadcrumbItem.d.ts b/types/reactstrap/lib/BreadcrumbItem.d.ts index 0277305b21..d8deed883a 100644 --- a/types/reactstrap/lib/BreadcrumbItem.d.ts +++ b/types/reactstrap/lib/BreadcrumbItem.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface BreadcrumbItemProps { tag?: React.ReactType; active?: boolean; className?: string; @@ -10,6 +10,4 @@ interface Props { [others: string]: any; } -declare var BreadcrumbItem: React.StatelessComponent; -export default BreadcrumbItem; - +export const BreadcrumbItem: React.StatelessComponent; diff --git a/types/reactstrap/lib/Button.d.ts b/types/reactstrap/lib/Button.d.ts index e6ec222c14..e75c6f0b1c 100644 --- a/types/reactstrap/lib/Button.d.ts +++ b/types/reactstrap/lib/Button.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps { +export interface ButtonProps extends React.HTMLProps { outline?: boolean; active?: boolean; block?: boolean; @@ -17,5 +17,4 @@ interface Props extends React.HTMLProps { cssModule?: CSSModule; } -declare var Button: React.StatelessComponent; -export default Button; +export const Button: React.StatelessComponent; diff --git a/types/reactstrap/lib/ButtonDropdown.d.ts b/types/reactstrap/lib/ButtonDropdown.d.ts index 9ab54c7502..bb26a03685 100644 --- a/types/reactstrap/lib/ButtonDropdown.d.ts +++ b/types/reactstrap/lib/ButtonDropdown.d.ts @@ -1,12 +1,8 @@ -import { - UncontrolledProps as DropdownUncontrolledProps, - Props as DropdownProps -} from './Dropdown'; +import { UncontrolledDropdownProps, DropdownProps } from './Dropdown'; // tslint:disable-next-line -export interface UncontrolledProps extends DropdownUncontrolledProps { } +export interface UncontrolledButtonDropdownProps extends UncontrolledDropdownProps { } // tslint:disable-next-line -interface Props extends DropdownProps { } +export interface ButtonDropdownProps extends DropdownProps { } -declare var ButtonDropdown: React.StatelessComponent; -export default ButtonDropdown; \ No newline at end of file +export const ButtonDropdown: React.StatelessComponent; diff --git a/types/reactstrap/lib/ButtonGroup.d.ts b/types/reactstrap/lib/ButtonGroup.d.ts index d807ea33cf..033c3075f9 100644 --- a/types/reactstrap/lib/ButtonGroup.d.ts +++ b/types/reactstrap/lib/ButtonGroup.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface ButtonGroupProps { tag?: React.ReactType; 'aria-label'?: string; className?: string; @@ -10,5 +10,4 @@ interface Props { vertical?: boolean; } -declare var ButtonGroup: React.StatelessComponent; -export default ButtonGroup; +export const ButtonGroup: React.StatelessComponent; diff --git a/types/reactstrap/lib/ButtonToolbar.d.ts b/types/reactstrap/lib/ButtonToolbar.d.ts index fea31dd5d5..3e16b331c3 100644 --- a/types/reactstrap/lib/ButtonToolbar.d.ts +++ b/types/reactstrap/lib/ButtonToolbar.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface ButtonToolbarProps { tag?: React.ReactType; 'aria-label'?: string; className?: string; @@ -8,5 +8,4 @@ interface Props { role?: string; } -declare var ButtonToolbar: React.StatelessComponent; -export default ButtonToolbar; +export const ButtonToolbar: React.StatelessComponent; diff --git a/types/reactstrap/lib/Card.d.ts b/types/reactstrap/lib/Card.d.ts index 0dbde7f879..f6d0d5e265 100644 --- a/types/reactstrap/lib/Card.d.ts +++ b/types/reactstrap/lib/Card.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardProps { tag?: React.ReactType; inverse?: boolean; color?: string; @@ -11,6 +11,4 @@ interface Props { style?: React.CSSProperties; } -declare var Card: React.StatelessComponent; -export default Card; - +export const Card: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardBlock.d.ts b/types/reactstrap/lib/CardBlock.d.ts index 0aa31a63a7..905884b786 100644 --- a/types/reactstrap/lib/CardBlock.d.ts +++ b/types/reactstrap/lib/CardBlock.d.ts @@ -1,11 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardBlockProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardBlock: React.StatelessComponent; -export default CardBlock; - +export const CardBlock: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardBody.d.ts b/types/reactstrap/lib/CardBody.d.ts index 2b94e52ea8..eeb9c8fe8d 100644 --- a/types/reactstrap/lib/CardBody.d.ts +++ b/types/reactstrap/lib/CardBody.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardBodyProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardBody: React.StatelessComponent; -export default CardBody; +export const CardBody: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardColumns.d.ts b/types/reactstrap/lib/CardColumns.d.ts index 0cc1a80a1a..e1d00fa389 100644 --- a/types/reactstrap/lib/CardColumns.d.ts +++ b/types/reactstrap/lib/CardColumns.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardColumnsProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardColumns: React.StatelessComponent; -export default CardColumns; +export const CardColumns: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardDeck.d.ts b/types/reactstrap/lib/CardDeck.d.ts index 1a5882aa54..15b3660f9d 100644 --- a/types/reactstrap/lib/CardDeck.d.ts +++ b/types/reactstrap/lib/CardDeck.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardDeckProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardDeck: React.StatelessComponent; -export default CardDeck; +export const CardDeck: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardFooter.d.ts b/types/reactstrap/lib/CardFooter.d.ts index 0956cb06c9..2b320c48b5 100644 --- a/types/reactstrap/lib/CardFooter.d.ts +++ b/types/reactstrap/lib/CardFooter.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardFooterProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardFooter: React.StatelessComponent; -export default CardFooter; +export const CardFooter: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardGroup.d.ts b/types/reactstrap/lib/CardGroup.d.ts index 5c0a0a1ab1..93fdd04bb0 100644 --- a/types/reactstrap/lib/CardGroup.d.ts +++ b/types/reactstrap/lib/CardGroup.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardGroupProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardGroup: React.StatelessComponent; -export default CardGroup; +export const CardGroup: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardHeader.d.ts b/types/reactstrap/lib/CardHeader.d.ts index f063057c92..d9d942c3d8 100644 --- a/types/reactstrap/lib/CardHeader.d.ts +++ b/types/reactstrap/lib/CardHeader.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardHeaderProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardHeader: React.StatelessComponent; -export default CardHeader; +export const CardHeader: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardImg.d.ts b/types/reactstrap/lib/CardImg.d.ts index 1c3fee274b..dd479691b5 100644 --- a/types/reactstrap/lib/CardImg.d.ts +++ b/types/reactstrap/lib/CardImg.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardImgProps { tag?: React.ReactType; top?: boolean; bottom?: boolean; @@ -12,5 +12,4 @@ interface Props { alt?: string; } -declare var CardImg: React.StatelessComponent; -export default CardImg; +export const CardImg: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardImgOverlay.d.ts b/types/reactstrap/lib/CardImgOverlay.d.ts index 05519847b2..22333a55c2 100644 --- a/types/reactstrap/lib/CardImgOverlay.d.ts +++ b/types/reactstrap/lib/CardImgOverlay.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardImgOverlayProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardImgOverlay: React.StatelessComponent; -export default CardImgOverlay; +export const CardImgOverlay: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardLink.d.ts b/types/reactstrap/lib/CardLink.d.ts index 3edf6b24f8..9afc204f96 100644 --- a/types/reactstrap/lib/CardLink.d.ts +++ b/types/reactstrap/lib/CardLink.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardLinkProps { tag?: React.ReactType; getRef?: string | ((instance: HTMLButtonElement) => any); className?: string; @@ -8,5 +8,4 @@ interface Props { href?: string; } -declare var CardLink: React.StatelessComponent; -export default CardLink; +export const CardLink: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardSubtitle.d.ts b/types/reactstrap/lib/CardSubtitle.d.ts index bfacd4e794..36e847367c 100644 --- a/types/reactstrap/lib/CardSubtitle.d.ts +++ b/types/reactstrap/lib/CardSubtitle.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardSubtitleProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardSubtitle: React.StatelessComponent; -export default CardSubtitle; +export const CardSubtitle: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardText.d.ts b/types/reactstrap/lib/CardText.d.ts index 13177fba67..297a561d50 100644 --- a/types/reactstrap/lib/CardText.d.ts +++ b/types/reactstrap/lib/CardText.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardTextProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardText: React.StatelessComponent; -export default CardText; +export const CardText: React.StatelessComponent; diff --git a/types/reactstrap/lib/CardTitle.d.ts b/types/reactstrap/lib/CardTitle.d.ts index 2843800a4e..52b9556945 100644 --- a/types/reactstrap/lib/CardTitle.d.ts +++ b/types/reactstrap/lib/CardTitle.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface CardTitleProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var CardTitle: React.StatelessComponent; -export default CardTitle; +export const CardTitle: React.StatelessComponent; diff --git a/types/reactstrap/lib/Col.d.ts b/types/reactstrap/lib/Col.d.ts index a2ea76d607..cf2fd098fa 100644 --- a/types/reactstrap/lib/Col.d.ts +++ b/types/reactstrap/lib/Col.d.ts @@ -9,7 +9,7 @@ export type ColumnProps offset?: string | number }; -interface Props extends React.HTMLProps { +export interface ColProps extends React.HTMLProps { xs?: ColumnProps; sm?: ColumnProps; md?: ColumnProps; @@ -20,5 +20,4 @@ interface Props extends React.HTMLProps { widths?: string[]; } -declare var Col: React.StatelessComponent; -export default Col; +export const Col: React.StatelessComponent; diff --git a/types/reactstrap/lib/Collapse.d.ts b/types/reactstrap/lib/Collapse.d.ts index 50160bbcf6..5647bf68b3 100644 --- a/types/reactstrap/lib/Collapse.d.ts +++ b/types/reactstrap/lib/Collapse.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps { +export interface CollapseProps extends React.HTMLProps { isOpen?: boolean; classNames?: string; cssModule?: CSSModule; @@ -14,5 +14,4 @@ interface Props extends React.HTMLProps { onClosed?: () => void; } -declare var Collapse: React.StatelessComponent; -export default Collapse; +export const Collapse: React.StatelessComponent; diff --git a/types/reactstrap/lib/Container.d.ts b/types/reactstrap/lib/Container.d.ts index f49951ba26..08d702af4b 100644 --- a/types/reactstrap/lib/Container.d.ts +++ b/types/reactstrap/lib/Container.d.ts @@ -1,11 +1,10 @@ import { CSSModule } from '../index'; -interface Props { +export interface ContainerProps { tag?: React.ReactType; fluid?: boolean; className?: string; cssModule?: CSSModule; } -declare var Container: React.StatelessComponent; -export default Container; +export const Container: React.StatelessComponent; diff --git a/types/reactstrap/lib/Dropdown.d.ts b/types/reactstrap/lib/Dropdown.d.ts index 19d1500cbe..fce1de08b1 100644 --- a/types/reactstrap/lib/Dropdown.d.ts +++ b/types/reactstrap/lib/Dropdown.d.ts @@ -2,14 +2,14 @@ import { CSSModule } from '../index'; -export interface UncontrolledProps { +export interface UncontrolledDropdownProps { isOpen?: boolean; toggle?: () => void; className?: string; cssModule?: CSSModule; } -export interface Props extends UncontrolledProps { +export interface DropdownProps extends UncontrolledDropdownProps { disabled?: boolean; dropup?: boolean; group?: boolean; @@ -18,5 +18,4 @@ export interface Props extends UncontrolledProps { tether?: boolean | Tether.ITetherOptions; } -declare var Dropdown: React.StatelessComponent; -export default Dropdown; +export const Dropdown: React.StatelessComponent; diff --git a/types/reactstrap/lib/DropdownItem.d.ts b/types/reactstrap/lib/DropdownItem.d.ts index 6fae837041..fe9a33cf8e 100644 --- a/types/reactstrap/lib/DropdownItem.d.ts +++ b/types/reactstrap/lib/DropdownItem.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface DropdownItemProps { disabled?: boolean; divider?: boolean; tag?: React.ReactType; @@ -11,5 +11,4 @@ interface Props { href?: string; } -declare var DropdownItem: React.StatelessComponent; -export default DropdownItem; +export const DropdownItem: React.StatelessComponent; diff --git a/types/reactstrap/lib/DropdownMenu.d.ts b/types/reactstrap/lib/DropdownMenu.d.ts index 7fae41b04b..e206ebd6d9 100644 --- a/types/reactstrap/lib/DropdownMenu.d.ts +++ b/types/reactstrap/lib/DropdownMenu.d.ts @@ -1,11 +1,10 @@ import { CSSModule } from '../index'; -interface Props { +export interface DropdownMenuProps { tag?: React.ReactType; right?: boolean; className?: string; cssModule?: CSSModule; } -declare var DropdownMenu: React.StatelessComponent; -export default DropdownMenu; +export const DropdownMenu: React.StatelessComponent; diff --git a/types/reactstrap/lib/DropdownToggle.d.ts b/types/reactstrap/lib/DropdownToggle.d.ts index 5ef49db71f..df1cb7f845 100644 --- a/types/reactstrap/lib/DropdownToggle.d.ts +++ b/types/reactstrap/lib/DropdownToggle.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface DropdownToggleProps { caret?: boolean; className?: string; cssModule?: CSSModule; @@ -15,5 +15,4 @@ interface Props { size?: string; } -declare var DropdownToggle: React.StatelessComponent; -export default DropdownToggle; +export const DropdownToggle: React.StatelessComponent; diff --git a/types/reactstrap/lib/Fade.d.ts b/types/reactstrap/lib/Fade.d.ts index 30862d2e17..2c13430af9 100644 --- a/types/reactstrap/lib/Fade.d.ts +++ b/types/reactstrap/lib/Fade.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface FadeProps { baseClass?: string; baseClassIn?: string; tag?: React.ReactType; @@ -16,5 +16,4 @@ interface Props { onEnter?: () => void; } -declare var Fade: React.StatelessComponent; -export default Fade; +export const Fade: React.StatelessComponent; diff --git a/types/reactstrap/lib/Form.d.ts b/types/reactstrap/lib/Form.d.ts index dd06a2f855..4481bd8912 100644 --- a/types/reactstrap/lib/Form.d.ts +++ b/types/reactstrap/lib/Form.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps { +export interface FormProps extends React.HTMLProps { inline?: boolean; tag?: React.ReactType; getRef?: string | ((instance: HTMLButtonElement) => any); @@ -8,5 +8,4 @@ interface Props extends React.HTMLProps { cssModule?: CSSModule; } -declare var Form: React.StatelessComponent; -export default Form; +export const Form: React.StatelessComponent; diff --git a/types/reactstrap/lib/FormFeedback.d.ts b/types/reactstrap/lib/FormFeedback.d.ts index 7fde21b062..ac6f0f5003 100644 --- a/types/reactstrap/lib/FormFeedback.d.ts +++ b/types/reactstrap/lib/FormFeedback.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface FormFeedbackProps { tag?: string; className?: string; cssModule?: CSSModule; } -declare var FormFeedback: React.StatelessComponent; -export default FormFeedback; +export const FormFeedback: React.StatelessComponent; diff --git a/types/reactstrap/lib/FormGroup.d.ts b/types/reactstrap/lib/FormGroup.d.ts index 6031ff2f75..65c0da639b 100644 --- a/types/reactstrap/lib/FormGroup.d.ts +++ b/types/reactstrap/lib/FormGroup.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps { +export interface FormGroupProps extends React.HTMLProps { row?: boolean; check?: boolean; disabled?: boolean; @@ -10,5 +10,4 @@ interface Props extends React.HTMLProps { cssModule?: CSSModule; } -declare var FormGroup: React.StatelessComponent; -export default FormGroup; +export const FormGroup: React.StatelessComponent; diff --git a/types/reactstrap/lib/FormText.d.ts b/types/reactstrap/lib/FormText.d.ts index 3cfab3511e..c8af8f56c8 100644 --- a/types/reactstrap/lib/FormText.d.ts +++ b/types/reactstrap/lib/FormText.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface FormTextProps { inline?: boolean; tag?: React.ReactType; color?: string; @@ -8,5 +8,4 @@ interface Props { cssModule?: CSSModule; } -declare var FormText: React.StatelessComponent; -export default FormText; +export const FormText: React.StatelessComponent; diff --git a/types/reactstrap/lib/Input.d.ts b/types/reactstrap/lib/Input.d.ts index 541016ca02..0029367c90 100644 --- a/types/reactstrap/lib/Input.d.ts +++ b/types/reactstrap/lib/Input.d.ts @@ -33,7 +33,7 @@ interface Intermediate extends React.InputHTMLAttributes { size?: any; } -interface InputProps extends Intermediate { +export interface InputProps extends Intermediate { type?: InputType; size?: string; state?: string; @@ -48,5 +48,4 @@ interface InputProps extends Intermediate { // Maybe reactstrap will support an 'isStatic' alias in the future } -declare var Input: React.StatelessComponent; -export default Input; +export const Input: React.StatelessComponent; diff --git a/types/reactstrap/lib/InputGroup.d.ts b/types/reactstrap/lib/InputGroup.d.ts index 2de95edc94..abd7fcd381 100644 --- a/types/reactstrap/lib/InputGroup.d.ts +++ b/types/reactstrap/lib/InputGroup.d.ts @@ -1,11 +1,10 @@ import { CSSModule } from '../index'; -interface Props { +export interface InputGroupProps { tag?: React.ReactType; size?: string; className?: string; cssModule?: CSSModule; } -declare var InputGroup: React.StatelessComponent; -export default InputGroup; +export const InputGroup: React.StatelessComponent; diff --git a/types/reactstrap/lib/InputGroupAddon.d.ts b/types/reactstrap/lib/InputGroupAddon.d.ts index a98eb5d821..7ddbc3b4c1 100644 --- a/types/reactstrap/lib/InputGroupAddon.d.ts +++ b/types/reactstrap/lib/InputGroupAddon.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface InputGroupAddonProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var InputGroupAddon: React.StatelessComponent; -export default InputGroupAddon; +export const InputGroupAddon: React.StatelessComponent; diff --git a/types/reactstrap/lib/InputGroupButton.d.ts b/types/reactstrap/lib/InputGroupButton.d.ts index fa7cb1995a..90a93ff8ed 100644 --- a/types/reactstrap/lib/InputGroupButton.d.ts +++ b/types/reactstrap/lib/InputGroupButton.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface InputGroupButtonProps { tag?: React.ReactType; groupClassName?: string; groupAttributes?: any; @@ -9,5 +9,4 @@ interface Props { color?: string; } -declare var InputGroupButton: React.StatelessComponent; -export default InputGroupButton; +export const InputGroupButton: React.StatelessComponent; diff --git a/types/reactstrap/lib/Jumbotron.d.ts b/types/reactstrap/lib/Jumbotron.d.ts index cc1f65c956..4ade1eabaa 100644 --- a/types/reactstrap/lib/Jumbotron.d.ts +++ b/types/reactstrap/lib/Jumbotron.d.ts @@ -1,11 +1,10 @@ import { CSSModule } from '../index'; -interface Props { +export interface JumbotronProps { tag?: React.ReactType; fluid?: boolean; className?: string; cssModule?: CSSModule; } -declare var Jumbotron: React.StatelessComponent; -export default Jumbotron; +export const Jumbotron: React.StatelessComponent; diff --git a/types/reactstrap/lib/Label.d.ts b/types/reactstrap/lib/Label.d.ts index eb496d90a3..3688aaf233 100644 --- a/types/reactstrap/lib/Label.d.ts +++ b/types/reactstrap/lib/Label.d.ts @@ -5,7 +5,7 @@ interface Intermediate extends React.LabelHTMLAttributes { size?: any; } -interface Props extends Intermediate { +export interface LabelProps extends Intermediate { hidden?: boolean; check?: boolean; inline?: boolean; @@ -22,5 +22,4 @@ interface Props extends Intermediate { xl?: ColumnProps; } -declare var Label: React.StatelessComponent; -export default Label; +export const Label: React.StatelessComponent; diff --git a/types/reactstrap/lib/ListGroup.d.ts b/types/reactstrap/lib/ListGroup.d.ts index 861c7a1d06..bef63da796 100644 --- a/types/reactstrap/lib/ListGroup.d.ts +++ b/types/reactstrap/lib/ListGroup.d.ts @@ -1,11 +1,10 @@ import { CSSModule } from '../index'; -interface Props { +export interface ListGroupProps { tag?: React.ReactType; flush?: boolean; className?: string; cssModule?: CSSModule; } -declare var ListGroup: React.StatelessComponent; -export default ListGroup; +export const ListGroup: React.StatelessComponent; diff --git a/types/reactstrap/lib/ListGroupItem.d.ts b/types/reactstrap/lib/ListGroupItem.d.ts index b2241998dc..44a70b6ec4 100644 --- a/types/reactstrap/lib/ListGroupItem.d.ts +++ b/types/reactstrap/lib/ListGroupItem.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface ListGroupItemProps { tag?: React.ReactType; active?: boolean; disabled?: boolean; @@ -9,9 +9,8 @@ interface Props { className?: string; cssModule?: CSSModule; href?: string; - + onClick?: React.MouseEventHandler; } -declare var ListGroupItem: React.StatelessComponent; -export default ListGroupItem; +export const ListGroupItem: React.StatelessComponent; diff --git a/types/reactstrap/lib/ListGroupItemHeading.d.ts b/types/reactstrap/lib/ListGroupItemHeading.d.ts index 869a6b2708..f44317f541 100644 --- a/types/reactstrap/lib/ListGroupItemHeading.d.ts +++ b/types/reactstrap/lib/ListGroupItemHeading.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface ListGroupItemHeadingProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var ListGroupItemHeading: React.StatelessComponent; -export default ListGroupItemHeading; +export const ListGroupItemHeading: React.StatelessComponent; diff --git a/types/reactstrap/lib/ListGroupItemText.d.ts b/types/reactstrap/lib/ListGroupItemText.d.ts index df263f30d8..a19803e4fe 100644 --- a/types/reactstrap/lib/ListGroupItemText.d.ts +++ b/types/reactstrap/lib/ListGroupItemText.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface ListGroupItemTextProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var ListGroupItemText: React.StatelessComponent; -export default ListGroupItemText; +export const ListGroupItemText: React.StatelessComponent; diff --git a/types/reactstrap/lib/Media.d.ts b/types/reactstrap/lib/Media.d.ts index c5408d85d7..9276c0708f 100644 --- a/types/reactstrap/lib/Media.d.ts +++ b/types/reactstrap/lib/Media.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface MediaProps { body?: boolean; bottom?: boolean; className?: string; @@ -17,5 +17,4 @@ interface Props { alt?: string; } -declare var Media: React.StatelessComponent; -export default Media; +export const Media: React.StatelessComponent; diff --git a/types/reactstrap/lib/Modal.d.ts b/types/reactstrap/lib/Modal.d.ts index 1e239fbe12..eb7d2a0f15 100644 --- a/types/reactstrap/lib/Modal.d.ts +++ b/types/reactstrap/lib/Modal.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface ModalProps { isOpen?: boolean; autoFocus?: boolean; size?: string; @@ -19,5 +19,4 @@ interface Props { fade?: boolean; } -declare var Modal: React.StatelessComponent; -export default Modal; +export const Modal: React.StatelessComponent; diff --git a/types/reactstrap/lib/ModalBody.d.ts b/types/reactstrap/lib/ModalBody.d.ts index 98933b2fc2..1238f7d54a 100644 --- a/types/reactstrap/lib/ModalBody.d.ts +++ b/types/reactstrap/lib/ModalBody.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface ModalBodyProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var ModalBody: React.StatelessComponent; -export default ModalBody; +export const ModalBody: React.StatelessComponent; diff --git a/types/reactstrap/lib/ModalFooter.d.ts b/types/reactstrap/lib/ModalFooter.d.ts index 84b3da7ec8..d7cafe275b 100644 --- a/types/reactstrap/lib/ModalFooter.d.ts +++ b/types/reactstrap/lib/ModalFooter.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface ModalFooterProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var ModalFooter: React.StatelessComponent; -export default ModalFooter; +export const ModalFooter: React.StatelessComponent; diff --git a/types/reactstrap/lib/ModalHeader.d.ts b/types/reactstrap/lib/ModalHeader.d.ts index 494c9685a3..5792fea0d1 100644 --- a/types/reactstrap/lib/ModalHeader.d.ts +++ b/types/reactstrap/lib/ModalHeader.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface ModalHeaderProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; @@ -8,5 +8,4 @@ interface Props { toggle?: () => void; } -declare var ModalHeader: React.StatelessComponent; -export default ModalHeader; +export const ModalHeader: React.StatelessComponent; diff --git a/types/reactstrap/lib/Nav.d.ts b/types/reactstrap/lib/Nav.d.ts index c646e94304..e42556fadd 100644 --- a/types/reactstrap/lib/Nav.d.ts +++ b/types/reactstrap/lib/Nav.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps { +export interface NavProps extends React.HTMLProps { inline?: boolean; disabled?: boolean; tabs?: boolean; @@ -13,5 +13,4 @@ interface Props extends React.HTMLProps { vertical?: boolean; } -declare var Nav: React.StatelessComponent; -export default Nav; +export const Nav: React.StatelessComponent; diff --git a/types/reactstrap/lib/NavDropdown.d.ts b/types/reactstrap/lib/NavDropdown.d.ts index 6b480d495a..dfa15afa17 100644 --- a/types/reactstrap/lib/NavDropdown.d.ts +++ b/types/reactstrap/lib/NavDropdown.d.ts @@ -1,12 +1,8 @@ -import { - UncontrolledProps as DropdownUncontrolledProps, - Props as DropdownProps -} from './Dropdown'; +import { UncontrolledDropdownProps, DropdownProps } from './Dropdown'; // tslint:disable-next-line -export interface UncontrolledProps extends DropdownUncontrolledProps { } +export interface UncontrolledNavDropdownProps extends UncontrolledDropdownProps { } // tslint:disable-next-line -interface Props extends DropdownProps { } +export interface NavDropdownProps extends DropdownProps { } -declare var NavDropdown: React.StatelessComponent; -export default NavDropdown; \ No newline at end of file +export const NavDropdown: React.StatelessComponent; diff --git a/types/reactstrap/lib/NavItem.d.ts b/types/reactstrap/lib/NavItem.d.ts index db19f92c56..8e6e7631d2 100644 --- a/types/reactstrap/lib/NavItem.d.ts +++ b/types/reactstrap/lib/NavItem.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface NavItemProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var NavItem: React.StatelessComponent; -export default NavItem; +export const NavItem: React.StatelessComponent; diff --git a/types/reactstrap/lib/NavLink.d.ts b/types/reactstrap/lib/NavLink.d.ts index 2871fad72e..13f5710551 100644 --- a/types/reactstrap/lib/NavLink.d.ts +++ b/types/reactstrap/lib/NavLink.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps { +export interface NavLinkProps extends React.HTMLProps { tag?: React.ReactType; getRef?: string | ((instance: HTMLButtonElement) => any); disabled?: boolean; @@ -11,5 +11,4 @@ interface Props extends React.HTMLProps { href?: string; } -declare var NavLink: React.StatelessComponent; -export default NavLink; +export const NavLink: React.StatelessComponent; diff --git a/types/reactstrap/lib/Navbar.d.ts b/types/reactstrap/lib/Navbar.d.ts index 58f9235140..76616a7be2 100644 --- a/types/reactstrap/lib/Navbar.d.ts +++ b/types/reactstrap/lib/Navbar.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface NavbarProps { light?: boolean; dark?: boolean; inverse?: boolean; @@ -16,5 +16,4 @@ interface Props { expand?: boolean | string; } -declare var Navbar: React.StatelessComponent; -export default Navbar; +export const Navbar: React.StatelessComponent; diff --git a/types/reactstrap/lib/NavbarBrand.d.ts b/types/reactstrap/lib/NavbarBrand.d.ts index 3748a2903f..0aa80597b9 100644 --- a/types/reactstrap/lib/NavbarBrand.d.ts +++ b/types/reactstrap/lib/NavbarBrand.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps { +export interface NavbarBrandProps extends React.HTMLProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var NavbarBrand: React.StatelessComponent; -export default NavbarBrand; +export const NavbarBrand: React.StatelessComponent; diff --git a/types/reactstrap/lib/NavbarToggler.d.ts b/types/reactstrap/lib/NavbarToggler.d.ts index 282eeaa672..5dd2df7057 100644 --- a/types/reactstrap/lib/NavbarToggler.d.ts +++ b/types/reactstrap/lib/NavbarToggler.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps { +export interface NavbarTogglerProps extends React.HTMLProps { tag?: React.ReactType; type?: string; className?: string; @@ -9,5 +9,4 @@ interface Props extends React.HTMLProps { left?: boolean; } -declare var NavbarToggler: React.StatelessComponent; -export default NavbarToggler; +export const NavbarToggler: React.StatelessComponent; diff --git a/types/reactstrap/lib/Pagination.d.ts b/types/reactstrap/lib/Pagination.d.ts index a34401be35..3b19364c30 100644 --- a/types/reactstrap/lib/Pagination.d.ts +++ b/types/reactstrap/lib/Pagination.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface PaginationProps { className?: string; cssModule?: CSSModule; size?: string; } -declare var Pagination: React.StatelessComponent; -export default Pagination; +export const Pagination: React.StatelessComponent; diff --git a/types/reactstrap/lib/PaginationItem.d.ts b/types/reactstrap/lib/PaginationItem.d.ts index 183a7e9d84..3ed0400dcd 100644 --- a/types/reactstrap/lib/PaginationItem.d.ts +++ b/types/reactstrap/lib/PaginationItem.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface PaginationItemProps { className?: string; cssModule?: CSSModule; active?: boolean; @@ -8,5 +8,4 @@ interface Props { tag?: React.ReactType; } -declare var PaginationItem: React.StatelessComponent; -export default PaginationItem; +export const PaginationItem: React.StatelessComponent; diff --git a/types/reactstrap/lib/PaginationLink.d.ts b/types/reactstrap/lib/PaginationLink.d.ts index 16e194578d..5c2a1d5711 100644 --- a/types/reactstrap/lib/PaginationLink.d.ts +++ b/types/reactstrap/lib/PaginationLink.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps { +export interface PaginationLinkProps extends React.HTMLProps { 'aria-label'?: string; className?: string; cssModule?: CSSModule; @@ -9,5 +9,4 @@ interface Props extends React.HTMLProps { tag?: React.ReactType; } -declare var PaginationLink: React.StatelessComponent; -export default PaginationLink; +export const PaginationLink: React.StatelessComponent; diff --git a/types/reactstrap/lib/Popover.d.ts b/types/reactstrap/lib/Popover.d.ts index b779a33ede..69fe27cb88 100644 --- a/types/reactstrap/lib/Popover.d.ts +++ b/types/reactstrap/lib/Popover.d.ts @@ -20,7 +20,7 @@ type Placement | 'left middle' | 'left bottom'; -interface Props { +export interface PopoverProps { placement?: Placement; target: string; isOpen?: boolean; @@ -30,5 +30,4 @@ interface Props { toggle?: () => void; } -declare var Popover: React.StatelessComponent; -export default Popover; +export const Popover: React.StatelessComponent; diff --git a/types/reactstrap/lib/PopoverContent.d.ts b/types/reactstrap/lib/PopoverContent.d.ts index cac45d14cb..a062d4d2c9 100644 --- a/types/reactstrap/lib/PopoverContent.d.ts +++ b/types/reactstrap/lib/PopoverContent.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface PopoverContentProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var PopoverContent: React.StatelessComponent; -export default PopoverContent; +export const PopoverContent: React.StatelessComponent; diff --git a/types/reactstrap/lib/PopoverTitle.d.ts b/types/reactstrap/lib/PopoverTitle.d.ts index 796de02658..e21bdd1729 100644 --- a/types/reactstrap/lib/PopoverTitle.d.ts +++ b/types/reactstrap/lib/PopoverTitle.d.ts @@ -1,10 +1,9 @@ import { CSSModule } from '../index'; -interface Props { +export interface PopoverTitleProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; } -declare var PopoverTitle: React.StatelessComponent; -export default PopoverTitle; +export const PopoverTitle: React.StatelessComponent; diff --git a/types/reactstrap/lib/Progress.d.ts b/types/reactstrap/lib/Progress.d.ts index 09c4304373..5f67befa37 100644 --- a/types/reactstrap/lib/Progress.d.ts +++ b/types/reactstrap/lib/Progress.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface ProgressProps { bar?: boolean; multi?: boolean; tag?: string; @@ -14,5 +14,4 @@ interface Props { barClassName?: string; } -declare var Progress: React.StatelessComponent; -export default Progress; +export const Progress: React.StatelessComponent; diff --git a/types/reactstrap/lib/Row.d.ts b/types/reactstrap/lib/Row.d.ts index 1ffbb9f7e6..5a57601a0a 100644 --- a/types/reactstrap/lib/Row.d.ts +++ b/types/reactstrap/lib/Row.d.ts @@ -1,11 +1,10 @@ import { CSSModule } from '../index'; -interface Props extends React.HTMLProps< HTMLElement> { +export interface RowProps extends React.HTMLProps< HTMLElement> { className?: string; cssModule?: CSSModule; tag?: React.ReactType; noGutters?: boolean; } -declare var Row: React.StatelessComponent; -export default Row; +export const Row: React.StatelessComponent; diff --git a/types/reactstrap/lib/TabContent.d.ts b/types/reactstrap/lib/TabContent.d.ts index af6feec078..5a8654ded9 100644 --- a/types/reactstrap/lib/TabContent.d.ts +++ b/types/reactstrap/lib/TabContent.d.ts @@ -1,11 +1,10 @@ import { CSSModule } from '../index'; -interface Props { +export interface TabContentProps { tag?: React.ReactType; activeTab?: number | string; className?: string; cssModule?: CSSModule; } -declare var TabContent: React.StatelessComponent; -export default TabContent; +export const TabContent: React.StatelessComponent; diff --git a/types/reactstrap/lib/TabPane.d.ts b/types/reactstrap/lib/TabPane.d.ts index 9eead420be..c1c7c1f470 100644 --- a/types/reactstrap/lib/TabPane.d.ts +++ b/types/reactstrap/lib/TabPane.d.ts @@ -1,11 +1,10 @@ import { CSSModule } from '../index'; -interface Props { +export interface TabPaneProps { tag?: React.ReactType; className?: string; cssModule?: CSSModule; tabId?: number | string; } -declare var TabPane: React.StatelessComponent; -export default TabPane; +export const TabPane: React.StatelessComponent; diff --git a/types/reactstrap/lib/Table.d.ts b/types/reactstrap/lib/Table.d.ts index ec8bfc43fd..f65af70e60 100644 --- a/types/reactstrap/lib/Table.d.ts +++ b/types/reactstrap/lib/Table.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface TableProps { className?: string; cssModule?: CSSModule; size?: string; @@ -14,5 +14,4 @@ interface Props { responsiveTag?: React.ReactType; } -declare var Table: React.StatelessComponent; -export default Table; +export const Table: React.StatelessComponent; diff --git a/types/reactstrap/lib/Tag.d.ts b/types/reactstrap/lib/Tag.d.ts index 7dce8876f2..bbc94d2120 100644 --- a/types/reactstrap/lib/Tag.d.ts +++ b/types/reactstrap/lib/Tag.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -interface Props { +export interface TagProps { color?: string; pill?: boolean; tag?: React.ReactType; @@ -8,5 +8,4 @@ interface Props { cssModule?: CSSModule; } -declare var Tag: React.StatelessComponent; -export default Tag; +export const Tag: React.StatelessComponent; diff --git a/types/reactstrap/lib/TetherContent.d.ts b/types/reactstrap/lib/TetherContent.d.ts index cbc22373e3..2ebe419ed5 100644 --- a/types/reactstrap/lib/TetherContent.d.ts +++ b/types/reactstrap/lib/TetherContent.d.ts @@ -2,7 +2,7 @@ import { CSSModule } from '../index'; -interface Props { +export interface TetherContentProps { className?: string; cssModule?: CSSModule; arrow?: string; @@ -14,5 +14,4 @@ interface Props { style?: React.CSSProperties; } -declare var TetherContent: React.StatelessComponent; -export default TetherContent; +export const TetherContent: React.StatelessComponent; diff --git a/types/reactstrap/lib/Tooltip.d.ts b/types/reactstrap/lib/Tooltip.d.ts index 9dba615084..9afa72f233 100644 --- a/types/reactstrap/lib/Tooltip.d.ts +++ b/types/reactstrap/lib/Tooltip.d.ts @@ -20,7 +20,7 @@ type Placement | 'left middle' | 'left bottom'; -export interface UncontrolledProps { +export interface UncontrolledTooltipProps { placement?: Placement; target: string; disabled?: boolean; @@ -32,12 +32,9 @@ export interface UncontrolledProps { delay?: number | { show: number, hide: number }; } -interface Props extends UncontrolledProps { +export interface TooltipProps extends UncontrolledTooltipProps { toggle?: () => void; isOpen?: boolean; } - - -declare var Tooltip: React.StatelessComponent; -export default Tooltip; +export const Tooltip: React.StatelessComponent; diff --git a/types/reactstrap/lib/Uncontrolled.d.ts b/types/reactstrap/lib/Uncontrolled.d.ts index 151ee012d3..b3b292dd6b 100644 --- a/types/reactstrap/lib/Uncontrolled.d.ts +++ b/types/reactstrap/lib/Uncontrolled.d.ts @@ -1,29 +1,17 @@ -import { - UncontrolledProps as AlertUncontrolledProps -} from './Alert'; -import { - UncontrolledProps as ButtonDropdownUncontrolledProps -} from './ButtonDropdown'; -import { - UncontrolledProps as DropdownUncontrolledProps -} from './Dropdown'; -import { - UncontrolledProps as NavDropdownUncontrolledProps -} from './NavDropdown'; -import { - UncontrolledProps as TooltipUncontrolledProps -} from './Tooltip'; +import { UncontrolledAlertProps } from './Alert'; +import { UncontrolledButtonDropdownProps } from './ButtonDropdown'; +import { UncontrolledDropdownProps } from './Dropdown'; +import { UncontrolledNavDropdownProps } from './NavDropdown'; +import { UncontrolledTooltipProps } from './Tooltip'; -declare var UncontrolledAlert: React.StatelessComponent; -declare var UncontrolledButtonDropdown: React.StatelessComponent; -declare var UncontrolledDropdown: React.StatelessComponent; -declare var UncontrolledNavDropdown: React.StatelessComponent; -declare var UncontrolledTooltip: React.StatelessComponent; +export const UncontrolledAlert: React.StatelessComponent; +export const UncontrolledButtonDropdown: React.StatelessComponent; +export const UncontrolledDropdown: React.StatelessComponent; +export const UncontrolledNavDropdown: React.StatelessComponent; +export const UncontrolledTooltip: React.StatelessComponent; -export { - UncontrolledAlert, - UncontrolledButtonDropdown, - UncontrolledDropdown, - UncontrolledNavDropdown, - UncontrolledTooltip -} \ No newline at end of file +export { UncontrolledAlertProps } from './Alert'; +export { UncontrolledButtonDropdownProps } from './ButtonDropdown'; +export { UncontrolledDropdownProps } from './Dropdown'; +export { UncontrolledNavDropdownProps } from './NavDropdown'; +export { UncontrolledTooltipProps } from './Tooltip'; From b0b139c633d6b1fe8fa973b9ee8df20c0477a3a0 Mon Sep 17 00:00:00 2001 From: FaithForHumans Date: Fri, 10 Nov 2017 19:22:40 -0600 Subject: [PATCH 02/32] Adding export defaults back. --- types/reactstrap/lib/Alert.d.ts | 1 + types/reactstrap/lib/Badge.d.ts | 1 + types/reactstrap/lib/Breadcrumb.d.ts | 1 + types/reactstrap/lib/BreadcrumbItem.d.ts | 1 + types/reactstrap/lib/Button.d.ts | 1 + types/reactstrap/lib/ButtonDropdown.d.ts | 1 + types/reactstrap/lib/ButtonGroup.d.ts | 1 + types/reactstrap/lib/ButtonToolbar.d.ts | 1 + types/reactstrap/lib/Card.d.ts | 1 + types/reactstrap/lib/CardBlock.d.ts | 1 + types/reactstrap/lib/CardBody.d.ts | 1 + types/reactstrap/lib/CardColumns.d.ts | 1 + types/reactstrap/lib/CardDeck.d.ts | 1 + types/reactstrap/lib/CardFooter.d.ts | 1 + types/reactstrap/lib/CardGroup.d.ts | 1 + types/reactstrap/lib/CardHeader.d.ts | 1 + types/reactstrap/lib/CardImg.d.ts | 1 + types/reactstrap/lib/CardImgOverlay.d.ts | 1 + types/reactstrap/lib/CardLink.d.ts | 1 + types/reactstrap/lib/CardSubtitle.d.ts | 1 + types/reactstrap/lib/CardText.d.ts | 1 + types/reactstrap/lib/CardTitle.d.ts | 1 + types/reactstrap/lib/Col.d.ts | 1 + types/reactstrap/lib/Collapse.d.ts | 1 + types/reactstrap/lib/Container.d.ts | 1 + types/reactstrap/lib/Dropdown.d.ts | 1 + types/reactstrap/lib/DropdownItem.d.ts | 1 + types/reactstrap/lib/DropdownMenu.d.ts | 1 + types/reactstrap/lib/DropdownToggle.d.ts | 1 + types/reactstrap/lib/Fade.d.ts | 1 + types/reactstrap/lib/Form.d.ts | 1 + types/reactstrap/lib/FormFeedback.d.ts | 1 + types/reactstrap/lib/FormGroup.d.ts | 1 + types/reactstrap/lib/FormText.d.ts | 1 + types/reactstrap/lib/Input.d.ts | 1 + types/reactstrap/lib/InputGroup.d.ts | 1 + types/reactstrap/lib/InputGroupAddon.d.ts | 1 + types/reactstrap/lib/InputGroupButton.d.ts | 1 + types/reactstrap/lib/Jumbotron.d.ts | 1 + types/reactstrap/lib/Label.d.ts | 1 + types/reactstrap/lib/ListGroup.d.ts | 1 + types/reactstrap/lib/ListGroupItem.d.ts | 1 + types/reactstrap/lib/ListGroupItemHeading.d.ts | 1 + types/reactstrap/lib/ListGroupItemText.d.ts | 1 + types/reactstrap/lib/Media.d.ts | 1 + types/reactstrap/lib/Modal.d.ts | 1 + types/reactstrap/lib/ModalBody.d.ts | 1 + types/reactstrap/lib/ModalFooter.d.ts | 1 + types/reactstrap/lib/ModalHeader.d.ts | 1 + types/reactstrap/lib/Nav.d.ts | 1 + types/reactstrap/lib/NavDropdown.d.ts | 1 + types/reactstrap/lib/NavItem.d.ts | 1 + types/reactstrap/lib/NavLink.d.ts | 1 + types/reactstrap/lib/Navbar.d.ts | 1 + types/reactstrap/lib/NavbarBrand.d.ts | 1 + types/reactstrap/lib/NavbarToggler.d.ts | 1 + types/reactstrap/lib/Pagination.d.ts | 1 + types/reactstrap/lib/PaginationItem.d.ts | 1 + types/reactstrap/lib/PaginationLink.d.ts | 1 + types/reactstrap/lib/Popover.d.ts | 1 + types/reactstrap/lib/PopoverContent.d.ts | 1 + types/reactstrap/lib/PopoverTitle.d.ts | 1 + types/reactstrap/lib/Progress.d.ts | 1 + types/reactstrap/lib/Row.d.ts | 1 + types/reactstrap/lib/TabContent.d.ts | 1 + types/reactstrap/lib/TabPane.d.ts | 1 + types/reactstrap/lib/Table.d.ts | 1 + types/reactstrap/lib/Tag.d.ts | 1 + types/reactstrap/lib/TetherContent.d.ts | 1 + types/reactstrap/lib/Tooltip.d.ts | 1 + 70 files changed, 70 insertions(+) diff --git a/types/reactstrap/lib/Alert.d.ts b/types/reactstrap/lib/Alert.d.ts index 1b4f6eb884..6ce7c0fe0e 100644 --- a/types/reactstrap/lib/Alert.d.ts +++ b/types/reactstrap/lib/Alert.d.ts @@ -16,3 +16,4 @@ export interface AlertProps extends UncontrolledAlertProps { } export const Alert: React.StatelessComponent; +export default Alert; diff --git a/types/reactstrap/lib/Badge.d.ts b/types/reactstrap/lib/Badge.d.ts index 4c21dcac42..328e3abf36 100644 --- a/types/reactstrap/lib/Badge.d.ts +++ b/types/reactstrap/lib/Badge.d.ts @@ -9,3 +9,4 @@ export interface BadgeProps { } export const Badge: React.StatelessComponent; +export default Badge; diff --git a/types/reactstrap/lib/Breadcrumb.d.ts b/types/reactstrap/lib/Breadcrumb.d.ts index 26839e9140..62ccf477a9 100644 --- a/types/reactstrap/lib/Breadcrumb.d.ts +++ b/types/reactstrap/lib/Breadcrumb.d.ts @@ -7,3 +7,4 @@ export interface BreadcrumbProps { } export const Breadcrumb: React.StatelessComponent; +export default Breadcrumb; diff --git a/types/reactstrap/lib/BreadcrumbItem.d.ts b/types/reactstrap/lib/BreadcrumbItem.d.ts index d8deed883a..81d18f0f76 100644 --- a/types/reactstrap/lib/BreadcrumbItem.d.ts +++ b/types/reactstrap/lib/BreadcrumbItem.d.ts @@ -11,3 +11,4 @@ export interface BreadcrumbItemProps { } export const BreadcrumbItem: React.StatelessComponent; +export default BreadcrumbItem; diff --git a/types/reactstrap/lib/Button.d.ts b/types/reactstrap/lib/Button.d.ts index cf5348d659..f4a8b4e4cd 100644 --- a/types/reactstrap/lib/Button.d.ts +++ b/types/reactstrap/lib/Button.d.ts @@ -18,3 +18,4 @@ export interface ButtonProps extends React.HTMLProps { } export const Button: React.StatelessComponent; +export default Button; diff --git a/types/reactstrap/lib/ButtonDropdown.d.ts b/types/reactstrap/lib/ButtonDropdown.d.ts index bb26a03685..284818f88f 100644 --- a/types/reactstrap/lib/ButtonDropdown.d.ts +++ b/types/reactstrap/lib/ButtonDropdown.d.ts @@ -6,3 +6,4 @@ export interface UncontrolledButtonDropdownProps extends UncontrolledDropdownPro export interface ButtonDropdownProps extends DropdownProps { } export const ButtonDropdown: React.StatelessComponent; +export default ButtonDropdown; diff --git a/types/reactstrap/lib/ButtonGroup.d.ts b/types/reactstrap/lib/ButtonGroup.d.ts index 033c3075f9..cf51a29326 100644 --- a/types/reactstrap/lib/ButtonGroup.d.ts +++ b/types/reactstrap/lib/ButtonGroup.d.ts @@ -11,3 +11,4 @@ export interface ButtonGroupProps { } export const ButtonGroup: React.StatelessComponent; +export default ButtonGroup; diff --git a/types/reactstrap/lib/ButtonToolbar.d.ts b/types/reactstrap/lib/ButtonToolbar.d.ts index 3e16b331c3..e57b84337a 100644 --- a/types/reactstrap/lib/ButtonToolbar.d.ts +++ b/types/reactstrap/lib/ButtonToolbar.d.ts @@ -9,3 +9,4 @@ export interface ButtonToolbarProps { } export const ButtonToolbar: React.StatelessComponent; +export default ButtonToolbar; diff --git a/types/reactstrap/lib/Card.d.ts b/types/reactstrap/lib/Card.d.ts index f6d0d5e265..8398d3b631 100644 --- a/types/reactstrap/lib/Card.d.ts +++ b/types/reactstrap/lib/Card.d.ts @@ -12,3 +12,4 @@ export interface CardProps { } export const Card: React.StatelessComponent; +export default Card; diff --git a/types/reactstrap/lib/CardBlock.d.ts b/types/reactstrap/lib/CardBlock.d.ts index 905884b786..a4eae1cf6e 100644 --- a/types/reactstrap/lib/CardBlock.d.ts +++ b/types/reactstrap/lib/CardBlock.d.ts @@ -7,3 +7,4 @@ export interface CardBlockProps { } export const CardBlock: React.StatelessComponent; +export default CardBlock; diff --git a/types/reactstrap/lib/CardBody.d.ts b/types/reactstrap/lib/CardBody.d.ts index eeb9c8fe8d..9ff4ba1f7e 100644 --- a/types/reactstrap/lib/CardBody.d.ts +++ b/types/reactstrap/lib/CardBody.d.ts @@ -7,3 +7,4 @@ export interface CardBodyProps { } export const CardBody: React.StatelessComponent; +export default CardBody; diff --git a/types/reactstrap/lib/CardColumns.d.ts b/types/reactstrap/lib/CardColumns.d.ts index e1d00fa389..4853240671 100644 --- a/types/reactstrap/lib/CardColumns.d.ts +++ b/types/reactstrap/lib/CardColumns.d.ts @@ -7,3 +7,4 @@ export interface CardColumnsProps { } export const CardColumns: React.StatelessComponent; +export default CardColumns; diff --git a/types/reactstrap/lib/CardDeck.d.ts b/types/reactstrap/lib/CardDeck.d.ts index 15b3660f9d..963d617383 100644 --- a/types/reactstrap/lib/CardDeck.d.ts +++ b/types/reactstrap/lib/CardDeck.d.ts @@ -7,3 +7,4 @@ export interface CardDeckProps { } export const CardDeck: React.StatelessComponent; +export default CardDeck; diff --git a/types/reactstrap/lib/CardFooter.d.ts b/types/reactstrap/lib/CardFooter.d.ts index 2b320c48b5..415406a14c 100644 --- a/types/reactstrap/lib/CardFooter.d.ts +++ b/types/reactstrap/lib/CardFooter.d.ts @@ -7,3 +7,4 @@ export interface CardFooterProps { } export const CardFooter: React.StatelessComponent; +export default CardFooter; diff --git a/types/reactstrap/lib/CardGroup.d.ts b/types/reactstrap/lib/CardGroup.d.ts index 93fdd04bb0..be69f617e7 100644 --- a/types/reactstrap/lib/CardGroup.d.ts +++ b/types/reactstrap/lib/CardGroup.d.ts @@ -7,3 +7,4 @@ export interface CardGroupProps { } export const CardGroup: React.StatelessComponent; +export default CardGroup; diff --git a/types/reactstrap/lib/CardHeader.d.ts b/types/reactstrap/lib/CardHeader.d.ts index d9d942c3d8..e9a468e2e4 100644 --- a/types/reactstrap/lib/CardHeader.d.ts +++ b/types/reactstrap/lib/CardHeader.d.ts @@ -7,3 +7,4 @@ export interface CardHeaderProps { } export const CardHeader: React.StatelessComponent; +export default CardHeader; diff --git a/types/reactstrap/lib/CardImg.d.ts b/types/reactstrap/lib/CardImg.d.ts index dd479691b5..76bd9a18f2 100644 --- a/types/reactstrap/lib/CardImg.d.ts +++ b/types/reactstrap/lib/CardImg.d.ts @@ -13,3 +13,4 @@ export interface CardImgProps { } export const CardImg: React.StatelessComponent; +export default CardImg; diff --git a/types/reactstrap/lib/CardImgOverlay.d.ts b/types/reactstrap/lib/CardImgOverlay.d.ts index 22333a55c2..0511d38e8b 100644 --- a/types/reactstrap/lib/CardImgOverlay.d.ts +++ b/types/reactstrap/lib/CardImgOverlay.d.ts @@ -7,3 +7,4 @@ export interface CardImgOverlayProps { } export const CardImgOverlay: React.StatelessComponent; +export default CardImgOverlay; diff --git a/types/reactstrap/lib/CardLink.d.ts b/types/reactstrap/lib/CardLink.d.ts index 7aa8492438..68ef38fa62 100644 --- a/types/reactstrap/lib/CardLink.d.ts +++ b/types/reactstrap/lib/CardLink.d.ts @@ -9,3 +9,4 @@ export interface CardLinkProps { } export const CardLink: React.StatelessComponent; +export default CardLink; diff --git a/types/reactstrap/lib/CardSubtitle.d.ts b/types/reactstrap/lib/CardSubtitle.d.ts index 36e847367c..5c2cbe574f 100644 --- a/types/reactstrap/lib/CardSubtitle.d.ts +++ b/types/reactstrap/lib/CardSubtitle.d.ts @@ -7,3 +7,4 @@ export interface CardSubtitleProps { } export const CardSubtitle: React.StatelessComponent; +export default CardSubtitle; diff --git a/types/reactstrap/lib/CardText.d.ts b/types/reactstrap/lib/CardText.d.ts index 297a561d50..1b411717f5 100644 --- a/types/reactstrap/lib/CardText.d.ts +++ b/types/reactstrap/lib/CardText.d.ts @@ -7,3 +7,4 @@ export interface CardTextProps { } export const CardText: React.StatelessComponent; +export default CardText; diff --git a/types/reactstrap/lib/CardTitle.d.ts b/types/reactstrap/lib/CardTitle.d.ts index 52b9556945..483a47adb7 100644 --- a/types/reactstrap/lib/CardTitle.d.ts +++ b/types/reactstrap/lib/CardTitle.d.ts @@ -7,3 +7,4 @@ export interface CardTitleProps { } export const CardTitle: React.StatelessComponent; +export default CardTitle; diff --git a/types/reactstrap/lib/Col.d.ts b/types/reactstrap/lib/Col.d.ts index cf2fd098fa..c1bc6a0cd9 100644 --- a/types/reactstrap/lib/Col.d.ts +++ b/types/reactstrap/lib/Col.d.ts @@ -21,3 +21,4 @@ export interface ColProps extends React.HTMLProps { } export const Col: React.StatelessComponent; +export default Col; diff --git a/types/reactstrap/lib/Collapse.d.ts b/types/reactstrap/lib/Collapse.d.ts index 5647bf68b3..d926fd677d 100644 --- a/types/reactstrap/lib/Collapse.d.ts +++ b/types/reactstrap/lib/Collapse.d.ts @@ -15,3 +15,4 @@ export interface CollapseProps extends React.HTMLProps { } export const Collapse: React.StatelessComponent; +export default Collapse; diff --git a/types/reactstrap/lib/Container.d.ts b/types/reactstrap/lib/Container.d.ts index 08d702af4b..63906b7bf3 100644 --- a/types/reactstrap/lib/Container.d.ts +++ b/types/reactstrap/lib/Container.d.ts @@ -8,3 +8,4 @@ export interface ContainerProps { } export const Container: React.StatelessComponent; +export default Container; diff --git a/types/reactstrap/lib/Dropdown.d.ts b/types/reactstrap/lib/Dropdown.d.ts index fce1de08b1..93a0ee1ce5 100644 --- a/types/reactstrap/lib/Dropdown.d.ts +++ b/types/reactstrap/lib/Dropdown.d.ts @@ -19,3 +19,4 @@ export interface DropdownProps extends UncontrolledDropdownProps { } export const Dropdown: React.StatelessComponent; +export default Dropdown; diff --git a/types/reactstrap/lib/DropdownItem.d.ts b/types/reactstrap/lib/DropdownItem.d.ts index d8d4718563..194d89bf0b 100644 --- a/types/reactstrap/lib/DropdownItem.d.ts +++ b/types/reactstrap/lib/DropdownItem.d.ts @@ -13,3 +13,4 @@ export interface DropdownItemProps { } export const DropdownItem: React.StatelessComponent; +export default DropdownItem; diff --git a/types/reactstrap/lib/DropdownMenu.d.ts b/types/reactstrap/lib/DropdownMenu.d.ts index e206ebd6d9..1bbf642a09 100644 --- a/types/reactstrap/lib/DropdownMenu.d.ts +++ b/types/reactstrap/lib/DropdownMenu.d.ts @@ -8,3 +8,4 @@ export interface DropdownMenuProps { } export const DropdownMenu: React.StatelessComponent; +export default DropdownMenu; diff --git a/types/reactstrap/lib/DropdownToggle.d.ts b/types/reactstrap/lib/DropdownToggle.d.ts index df1cb7f845..8f395b998d 100644 --- a/types/reactstrap/lib/DropdownToggle.d.ts +++ b/types/reactstrap/lib/DropdownToggle.d.ts @@ -16,3 +16,4 @@ export interface DropdownToggleProps { } export const DropdownToggle: React.StatelessComponent; +export default DropdownToggle; diff --git a/types/reactstrap/lib/Fade.d.ts b/types/reactstrap/lib/Fade.d.ts index 2c13430af9..ab77d7fb61 100644 --- a/types/reactstrap/lib/Fade.d.ts +++ b/types/reactstrap/lib/Fade.d.ts @@ -17,3 +17,4 @@ export interface FadeProps { } export const Fade: React.StatelessComponent; +export default Fade; diff --git a/types/reactstrap/lib/Form.d.ts b/types/reactstrap/lib/Form.d.ts index 7e61d24429..507b617a12 100644 --- a/types/reactstrap/lib/Form.d.ts +++ b/types/reactstrap/lib/Form.d.ts @@ -9,3 +9,4 @@ export interface FormProps extends React.HTMLProps { } export const Form: React.StatelessComponent; +export default Form; diff --git a/types/reactstrap/lib/FormFeedback.d.ts b/types/reactstrap/lib/FormFeedback.d.ts index ac6f0f5003..e9479bc53d 100644 --- a/types/reactstrap/lib/FormFeedback.d.ts +++ b/types/reactstrap/lib/FormFeedback.d.ts @@ -7,3 +7,4 @@ export interface FormFeedbackProps { } export const FormFeedback: React.StatelessComponent; +export default FormFeedback; diff --git a/types/reactstrap/lib/FormGroup.d.ts b/types/reactstrap/lib/FormGroup.d.ts index 65c0da639b..c3e4d384db 100644 --- a/types/reactstrap/lib/FormGroup.d.ts +++ b/types/reactstrap/lib/FormGroup.d.ts @@ -11,3 +11,4 @@ export interface FormGroupProps extends React.HTMLProps { } export const FormGroup: React.StatelessComponent; +export default FormGroup; diff --git a/types/reactstrap/lib/FormText.d.ts b/types/reactstrap/lib/FormText.d.ts index c8af8f56c8..ca4e1858fe 100644 --- a/types/reactstrap/lib/FormText.d.ts +++ b/types/reactstrap/lib/FormText.d.ts @@ -9,3 +9,4 @@ export interface FormTextProps { } export const FormText: React.StatelessComponent; +export default FormText; diff --git a/types/reactstrap/lib/Input.d.ts b/types/reactstrap/lib/Input.d.ts index d332718152..cc7377ca1f 100644 --- a/types/reactstrap/lib/Input.d.ts +++ b/types/reactstrap/lib/Input.d.ts @@ -49,3 +49,4 @@ export interface InputProps extends Intermediate { } export const Input: React.StatelessComponent; +export default Input; diff --git a/types/reactstrap/lib/InputGroup.d.ts b/types/reactstrap/lib/InputGroup.d.ts index abd7fcd381..9a6ac719bb 100644 --- a/types/reactstrap/lib/InputGroup.d.ts +++ b/types/reactstrap/lib/InputGroup.d.ts @@ -8,3 +8,4 @@ export interface InputGroupProps { } export const InputGroup: React.StatelessComponent; +export default InputGroup; diff --git a/types/reactstrap/lib/InputGroupAddon.d.ts b/types/reactstrap/lib/InputGroupAddon.d.ts index 7ddbc3b4c1..63ac88c455 100644 --- a/types/reactstrap/lib/InputGroupAddon.d.ts +++ b/types/reactstrap/lib/InputGroupAddon.d.ts @@ -7,3 +7,4 @@ export interface InputGroupAddonProps { } export const InputGroupAddon: React.StatelessComponent; +export default InputGroupAddon; diff --git a/types/reactstrap/lib/InputGroupButton.d.ts b/types/reactstrap/lib/InputGroupButton.d.ts index 90a93ff8ed..f51c61b3d1 100644 --- a/types/reactstrap/lib/InputGroupButton.d.ts +++ b/types/reactstrap/lib/InputGroupButton.d.ts @@ -10,3 +10,4 @@ export interface InputGroupButtonProps { } export const InputGroupButton: React.StatelessComponent; +export default InputGroupButton; diff --git a/types/reactstrap/lib/Jumbotron.d.ts b/types/reactstrap/lib/Jumbotron.d.ts index 4ade1eabaa..885bbe5f8f 100644 --- a/types/reactstrap/lib/Jumbotron.d.ts +++ b/types/reactstrap/lib/Jumbotron.d.ts @@ -8,3 +8,4 @@ export interface JumbotronProps { } export const Jumbotron: React.StatelessComponent; +export default Jumbotron; diff --git a/types/reactstrap/lib/Label.d.ts b/types/reactstrap/lib/Label.d.ts index 3688aaf233..26728059e0 100644 --- a/types/reactstrap/lib/Label.d.ts +++ b/types/reactstrap/lib/Label.d.ts @@ -23,3 +23,4 @@ export interface LabelProps extends Intermediate { } export const Label: React.StatelessComponent; +export default Label; diff --git a/types/reactstrap/lib/ListGroup.d.ts b/types/reactstrap/lib/ListGroup.d.ts index bef63da796..aec7fa4045 100644 --- a/types/reactstrap/lib/ListGroup.d.ts +++ b/types/reactstrap/lib/ListGroup.d.ts @@ -8,3 +8,4 @@ export interface ListGroupProps { } export const ListGroup: React.StatelessComponent; +export default ListGroup; diff --git a/types/reactstrap/lib/ListGroupItem.d.ts b/types/reactstrap/lib/ListGroupItem.d.ts index 44a70b6ec4..5b610f87e2 100644 --- a/types/reactstrap/lib/ListGroupItem.d.ts +++ b/types/reactstrap/lib/ListGroupItem.d.ts @@ -14,3 +14,4 @@ export interface ListGroupItemProps { } export const ListGroupItem: React.StatelessComponent; +export default ListGroupItem; diff --git a/types/reactstrap/lib/ListGroupItemHeading.d.ts b/types/reactstrap/lib/ListGroupItemHeading.d.ts index f44317f541..3e8d83a0dc 100644 --- a/types/reactstrap/lib/ListGroupItemHeading.d.ts +++ b/types/reactstrap/lib/ListGroupItemHeading.d.ts @@ -7,3 +7,4 @@ export interface ListGroupItemHeadingProps { } export const ListGroupItemHeading: React.StatelessComponent; +export default ListGroupItemHeading; diff --git a/types/reactstrap/lib/ListGroupItemText.d.ts b/types/reactstrap/lib/ListGroupItemText.d.ts index a19803e4fe..ad83a45831 100644 --- a/types/reactstrap/lib/ListGroupItemText.d.ts +++ b/types/reactstrap/lib/ListGroupItemText.d.ts @@ -7,3 +7,4 @@ export interface ListGroupItemTextProps { } export const ListGroupItemText: React.StatelessComponent; +export default ListGroupItemText; diff --git a/types/reactstrap/lib/Media.d.ts b/types/reactstrap/lib/Media.d.ts index 9276c0708f..17b65f25f0 100644 --- a/types/reactstrap/lib/Media.d.ts +++ b/types/reactstrap/lib/Media.d.ts @@ -18,3 +18,4 @@ export interface MediaProps { } export const Media: React.StatelessComponent; +export default Media; diff --git a/types/reactstrap/lib/Modal.d.ts b/types/reactstrap/lib/Modal.d.ts index eb7d2a0f15..77122f64b4 100644 --- a/types/reactstrap/lib/Modal.d.ts +++ b/types/reactstrap/lib/Modal.d.ts @@ -20,3 +20,4 @@ export interface ModalProps { } export const Modal: React.StatelessComponent; +export default Modal; diff --git a/types/reactstrap/lib/ModalBody.d.ts b/types/reactstrap/lib/ModalBody.d.ts index 1238f7d54a..a2693cbf28 100644 --- a/types/reactstrap/lib/ModalBody.d.ts +++ b/types/reactstrap/lib/ModalBody.d.ts @@ -7,3 +7,4 @@ export interface ModalBodyProps { } export const ModalBody: React.StatelessComponent; +export default ModalBody; diff --git a/types/reactstrap/lib/ModalFooter.d.ts b/types/reactstrap/lib/ModalFooter.d.ts index d7cafe275b..0241dcde84 100644 --- a/types/reactstrap/lib/ModalFooter.d.ts +++ b/types/reactstrap/lib/ModalFooter.d.ts @@ -7,3 +7,4 @@ export interface ModalFooterProps { } export const ModalFooter: React.StatelessComponent; +export default ModalFooter; diff --git a/types/reactstrap/lib/ModalHeader.d.ts b/types/reactstrap/lib/ModalHeader.d.ts index 5792fea0d1..a235d73183 100644 --- a/types/reactstrap/lib/ModalHeader.d.ts +++ b/types/reactstrap/lib/ModalHeader.d.ts @@ -9,3 +9,4 @@ export interface ModalHeaderProps { } export const ModalHeader: React.StatelessComponent; +export default ModalHeader; diff --git a/types/reactstrap/lib/Nav.d.ts b/types/reactstrap/lib/Nav.d.ts index e42556fadd..23bf1e58c5 100644 --- a/types/reactstrap/lib/Nav.d.ts +++ b/types/reactstrap/lib/Nav.d.ts @@ -14,3 +14,4 @@ export interface NavProps extends React.HTMLProps { } export const Nav: React.StatelessComponent; +export default Nav; diff --git a/types/reactstrap/lib/NavDropdown.d.ts b/types/reactstrap/lib/NavDropdown.d.ts index dfa15afa17..22e408489b 100644 --- a/types/reactstrap/lib/NavDropdown.d.ts +++ b/types/reactstrap/lib/NavDropdown.d.ts @@ -6,3 +6,4 @@ export interface UncontrolledNavDropdownProps extends UncontrolledDropdownProps export interface NavDropdownProps extends DropdownProps { } export const NavDropdown: React.StatelessComponent; +export default NavDropdown; diff --git a/types/reactstrap/lib/NavItem.d.ts b/types/reactstrap/lib/NavItem.d.ts index 8e6e7631d2..cb32a4fad1 100644 --- a/types/reactstrap/lib/NavItem.d.ts +++ b/types/reactstrap/lib/NavItem.d.ts @@ -7,3 +7,4 @@ export interface NavItemProps { } export const NavItem: React.StatelessComponent; +export default NavItem; diff --git a/types/reactstrap/lib/NavLink.d.ts b/types/reactstrap/lib/NavLink.d.ts index 1fd7d14abc..7fa907c453 100644 --- a/types/reactstrap/lib/NavLink.d.ts +++ b/types/reactstrap/lib/NavLink.d.ts @@ -12,3 +12,4 @@ export interface NavLinkProps extends React.HTMLProps { } export const NavLink: React.StatelessComponent; +export default NavLink; diff --git a/types/reactstrap/lib/Navbar.d.ts b/types/reactstrap/lib/Navbar.d.ts index 76616a7be2..fd52feeae8 100644 --- a/types/reactstrap/lib/Navbar.d.ts +++ b/types/reactstrap/lib/Navbar.d.ts @@ -17,3 +17,4 @@ export interface NavbarProps { } export const Navbar: React.StatelessComponent; +export default Navbar; diff --git a/types/reactstrap/lib/NavbarBrand.d.ts b/types/reactstrap/lib/NavbarBrand.d.ts index 0aa80597b9..8e3328ab81 100644 --- a/types/reactstrap/lib/NavbarBrand.d.ts +++ b/types/reactstrap/lib/NavbarBrand.d.ts @@ -7,3 +7,4 @@ export interface NavbarBrandProps extends React.HTMLProps { } export const NavbarBrand: React.StatelessComponent; +export default NavbarBrand; diff --git a/types/reactstrap/lib/NavbarToggler.d.ts b/types/reactstrap/lib/NavbarToggler.d.ts index 5dd2df7057..1855e2c41c 100644 --- a/types/reactstrap/lib/NavbarToggler.d.ts +++ b/types/reactstrap/lib/NavbarToggler.d.ts @@ -10,3 +10,4 @@ export interface NavbarTogglerProps extends React.HTMLProps { } export const NavbarToggler: React.StatelessComponent; +export default NavbarToggler; diff --git a/types/reactstrap/lib/Pagination.d.ts b/types/reactstrap/lib/Pagination.d.ts index 3b19364c30..dd1a0c9d51 100644 --- a/types/reactstrap/lib/Pagination.d.ts +++ b/types/reactstrap/lib/Pagination.d.ts @@ -7,3 +7,4 @@ export interface PaginationProps { } export const Pagination: React.StatelessComponent; +export default Pagination; diff --git a/types/reactstrap/lib/PaginationItem.d.ts b/types/reactstrap/lib/PaginationItem.d.ts index 3ed0400dcd..1e8efa8712 100644 --- a/types/reactstrap/lib/PaginationItem.d.ts +++ b/types/reactstrap/lib/PaginationItem.d.ts @@ -9,3 +9,4 @@ export interface PaginationItemProps { } export const PaginationItem: React.StatelessComponent; +export default PaginationItem; diff --git a/types/reactstrap/lib/PaginationLink.d.ts b/types/reactstrap/lib/PaginationLink.d.ts index 5c2a1d5711..c57bee37ac 100644 --- a/types/reactstrap/lib/PaginationLink.d.ts +++ b/types/reactstrap/lib/PaginationLink.d.ts @@ -10,3 +10,4 @@ export interface PaginationLinkProps extends React.HTMLProps } export const PaginationLink: React.StatelessComponent; +export default PaginationLink; diff --git a/types/reactstrap/lib/Popover.d.ts b/types/reactstrap/lib/Popover.d.ts index 69fe27cb88..e9e757572e 100644 --- a/types/reactstrap/lib/Popover.d.ts +++ b/types/reactstrap/lib/Popover.d.ts @@ -31,3 +31,4 @@ export interface PopoverProps { } export const Popover: React.StatelessComponent; +export default Popover; diff --git a/types/reactstrap/lib/PopoverContent.d.ts b/types/reactstrap/lib/PopoverContent.d.ts index a062d4d2c9..ea72f4dfb4 100644 --- a/types/reactstrap/lib/PopoverContent.d.ts +++ b/types/reactstrap/lib/PopoverContent.d.ts @@ -7,3 +7,4 @@ export interface PopoverContentProps { } export const PopoverContent: React.StatelessComponent; +export default PopoverContent; diff --git a/types/reactstrap/lib/PopoverTitle.d.ts b/types/reactstrap/lib/PopoverTitle.d.ts index e21bdd1729..9711058424 100644 --- a/types/reactstrap/lib/PopoverTitle.d.ts +++ b/types/reactstrap/lib/PopoverTitle.d.ts @@ -7,3 +7,4 @@ export interface PopoverTitleProps { } export const PopoverTitle: React.StatelessComponent; +export default PopoverTitle; diff --git a/types/reactstrap/lib/Progress.d.ts b/types/reactstrap/lib/Progress.d.ts index 5f67befa37..9ab522746c 100644 --- a/types/reactstrap/lib/Progress.d.ts +++ b/types/reactstrap/lib/Progress.d.ts @@ -15,3 +15,4 @@ export interface ProgressProps { } export const Progress: React.StatelessComponent; +export default Progress; diff --git a/types/reactstrap/lib/Row.d.ts b/types/reactstrap/lib/Row.d.ts index 5a57601a0a..30d202e919 100644 --- a/types/reactstrap/lib/Row.d.ts +++ b/types/reactstrap/lib/Row.d.ts @@ -8,3 +8,4 @@ export interface RowProps extends React.HTMLProps< HTMLElement> { } export const Row: React.StatelessComponent; +export default Row; diff --git a/types/reactstrap/lib/TabContent.d.ts b/types/reactstrap/lib/TabContent.d.ts index 5a8654ded9..1aced21b02 100644 --- a/types/reactstrap/lib/TabContent.d.ts +++ b/types/reactstrap/lib/TabContent.d.ts @@ -8,3 +8,4 @@ export interface TabContentProps { } export const TabContent: React.StatelessComponent; +export default TabContent; diff --git a/types/reactstrap/lib/TabPane.d.ts b/types/reactstrap/lib/TabPane.d.ts index c1c7c1f470..1d588e7304 100644 --- a/types/reactstrap/lib/TabPane.d.ts +++ b/types/reactstrap/lib/TabPane.d.ts @@ -8,3 +8,4 @@ export interface TabPaneProps { } export const TabPane: React.StatelessComponent; +export default TabPane; diff --git a/types/reactstrap/lib/Table.d.ts b/types/reactstrap/lib/Table.d.ts index f65af70e60..b49c6a5920 100644 --- a/types/reactstrap/lib/Table.d.ts +++ b/types/reactstrap/lib/Table.d.ts @@ -15,3 +15,4 @@ export interface TableProps { } export const Table: React.StatelessComponent; +export default Table; diff --git a/types/reactstrap/lib/Tag.d.ts b/types/reactstrap/lib/Tag.d.ts index bbc94d2120..0f2ed5bd07 100644 --- a/types/reactstrap/lib/Tag.d.ts +++ b/types/reactstrap/lib/Tag.d.ts @@ -9,3 +9,4 @@ export interface TagProps { } export const Tag: React.StatelessComponent; +export default Tag; diff --git a/types/reactstrap/lib/TetherContent.d.ts b/types/reactstrap/lib/TetherContent.d.ts index 2ebe419ed5..7dd32ae381 100644 --- a/types/reactstrap/lib/TetherContent.d.ts +++ b/types/reactstrap/lib/TetherContent.d.ts @@ -15,3 +15,4 @@ export interface TetherContentProps { } export const TetherContent: React.StatelessComponent; +export default TetherContent; diff --git a/types/reactstrap/lib/Tooltip.d.ts b/types/reactstrap/lib/Tooltip.d.ts index 9afa72f233..21a99707e8 100644 --- a/types/reactstrap/lib/Tooltip.d.ts +++ b/types/reactstrap/lib/Tooltip.d.ts @@ -38,3 +38,4 @@ export interface TooltipProps extends UncontrolledTooltipProps { } export const Tooltip: React.StatelessComponent; +export default Tooltip; From 3022724dfabf8dcfc28d8e29995e53ae2da957a0 Mon Sep 17 00:00:00 2001 From: FaithForHumans Date: Sat, 11 Nov 2017 11:46:44 -0600 Subject: [PATCH 03/32] Fixing line length issue --- types/reactstrap/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/reactstrap/index.d.ts b/types/reactstrap/index.d.ts index 86f4bf0bd8..ff6f8201b3 100644 --- a/types/reactstrap/index.d.ts +++ b/types/reactstrap/index.d.ts @@ -1,6 +1,10 @@ // Type definitions for reactstrap 5.0 // Project: https://github.com/reactstrap/reactstrap#readme -// Definitions by: Ali Hammad Baig , Marco Falkenberg , Danilo Barros , Fábio Paiva , FaithForHumans +// Definitions by: Ali Hammad Baig + Marco Falkenberg + Danilo Barros + Fábio Paiva + FaithForHumans // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From 7339043a326321481e43279e68a375712edecbec Mon Sep 17 00:00:00 2001 From: FaithForHumans Date: Sat, 11 Nov 2017 11:52:28 -0600 Subject: [PATCH 04/32] Forgotten comments... --- types/reactstrap/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/reactstrap/index.d.ts b/types/reactstrap/index.d.ts index ff6f8201b3..ae06cdd7cf 100644 --- a/types/reactstrap/index.d.ts +++ b/types/reactstrap/index.d.ts @@ -1,10 +1,10 @@ // Type definitions for reactstrap 5.0 // Project: https://github.com/reactstrap/reactstrap#readme // Definitions by: Ali Hammad Baig - Marco Falkenberg - Danilo Barros - Fábio Paiva - FaithForHumans +// Marco Falkenberg +// Danilo Barros +// Fábio Paiva +// FaithForHumans // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From c4df40988192332549420d7d700179873cec5ab4 Mon Sep 17 00:00:00 2001 From: Rodrigo Saboya Date: Sun, 26 Nov 2017 17:21:45 -0200 Subject: [PATCH 05/32] Updating definitions for Nes>=7.0.0. --- types/nes/client.d.ts | 17 ++-- types/nes/index.d.ts | 19 ++-- types/nes/test/broadcast-client.ts | 4 +- types/nes/test/broadcast-server.ts | 5 +- types/nes/test/nes-tests.ts | 99 +++++++++---------- types/nes/test/route-authentication-client.ts | 14 +-- types/nes/test/route-authentication-server.ts | 20 ++-- types/nes/test/route-invocation-client.ts | 14 +-- types/nes/test/route-invocation-server.ts | 9 +- types/nes/test/socket.ts | 10 +- types/nes/test/subscription-filter-client.ts | 12 +-- types/nes/test/subscription-filter-server.ts | 21 ++-- types/nes/test/subscriptions-client.ts | 12 +-- types/nes/test/subscriptions-server.ts | 11 +-- 14 files changed, 120 insertions(+), 147 deletions(-) diff --git a/types/nes/client.d.ts b/types/nes/client.d.ts index 8314894683..5d348b267e 100644 --- a/types/nes/client.d.ts +++ b/types/nes/client.d.ts @@ -1,6 +1,7 @@ -// Type definitions for nes 6.4.2 +// Type definitions for nes 7.0.0 // Project: https://github.com/hapijs/nes // Definitions by: Ivo Stratev +// Rodrigo Saboya // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare class Client { @@ -9,14 +10,14 @@ declare class Client { onConnect: () => void; onDisconnect: () => void; onUpdate: (message: any) => void; - connect(options: Client.ClientConnectOptions, callback: (err?: any) => void): void; - connect(callback: (err?: any) => void): void; - disconnect(): void; + connect(options: Client.ClientConnectOptions): Promise; + connect(): Promise; + disconnect(): Promise; id: any; // can be `null | number` but also the "socket" value from websocket message data. - request(options: string | Client.ClientRequestOptions, callback: (err: any, payload: any, statusCode?: number, headers?: Object) => void): void; - message(message: any, callback: (err: any, message: any) => void): void; - subscribe(path: string, handler: Client.Handler, callback: (err?: any) => void): void; - unsubscribe(path: string, handler: Client.Handler, callback: (err?: any) => void): void; + request(options: string | Client.ClientRequestOptions): Promise; + message(message: any): Promise; + subscribe(path: string, handler: Client.Handler): Promise; + unsubscribe(path: string, handler: Client.Handler): Promise; subscriptions(): string[]; overrideReconnectionAuth(auth: any): void; } diff --git a/types/nes/index.d.ts b/types/nes/index.d.ts index a6ed90a7b7..c4d26ecda0 100644 --- a/types/nes/index.d.ts +++ b/types/nes/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for nes 6.2.1 +// Type definitions for nes 7.0.0 // Project: https://github.com/hapijs/nes // Definitions by: Ivo Stratev +// Rodrigo Saboya // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -62,12 +63,12 @@ declare module nes { index?: boolean; } - export type ServerOnSubscribeWithParams = (socket: Socket, path: string, params: any, next: (err?: any) => void) => void; - export type ServerOnSubscribeWithoutParams = (socket: Socket, path: string, next: (err?: any) => void) => void; + export type ServerOnSubscribeWithParams = (socket: Socket, path: string, params: any) => Promise; + export type ServerOnSubscribeWithoutParams = (socket: Socket, path: string) => Promise; export type ServerOnSubscribe = ServerOnSubscribeWithParams | ServerOnSubscribeWithoutParams; - export type ServerOnUnSubscribeWithParams = (socket: Socket, path: string, params: any, next: () => void) => void; - export type ServerOnUnSubscribeWithoutParams = (socket: Socket, path: string, next: () => void) => void; + export type ServerOnUnSubscribeWithParams = (socket: Socket, path: string, params: any) => void; + export type ServerOnUnSubscribeWithoutParams = (socket: Socket, path: string) => void; export type ServerOnUnSubscribe = ServerOnUnSubscribeWithParams | ServerOnUnSubscribeWithoutParams; interface ServerSubscriptionOptions { @@ -91,10 +92,10 @@ declare module nes { id: string; app: Object; auth: nes.SocketAuthObject; - disconnect(callback?: () => void): void; - send(message: any, callback?: (err?: any) => void): void; - publish(path: string, message: any, callback?: (err?: any) => void): void; - revoke(path: string, message: any, callback?: (err?: any) => void): void; + disconnect(): Promise; + send(message: any): Promise; + publish(path: string, message: any): Promise; + revoke(path: string, message: any): Promise; } /** diff --git a/types/nes/test/broadcast-client.ts b/types/nes/test/broadcast-client.ts index 4c94b8c575..5563a202d3 100644 --- a/types/nes/test/broadcast-client.ts +++ b/types/nes/test/broadcast-client.ts @@ -3,7 +3,7 @@ import Nes = require('nes'); var client = new Nes.Client('ws://localhost'); -client.connect(function (err) { +client.connect().then(() => { client.onUpdate = function (update) { @@ -16,7 +16,7 @@ client.connect(function (err) { import NesClient = require('nes/client'); var client = new NesClient('ws://localhost'); -client.connect(function (err) { +client.connect().then(() => { client.onUpdate = function (update) { diff --git a/types/nes/test/broadcast-server.ts b/types/nes/test/broadcast-server.ts index dcfcb3400e..6ef8f7aafa 100644 --- a/types/nes/test/broadcast-server.ts +++ b/types/nes/test/broadcast-server.ts @@ -4,11 +4,10 @@ import Hapi = require('hapi'); import Nes = require('nes'); var server = new Hapi.Server(); -server.connection(); -server.register(Nes, function (err) { +server.register(Nes).then(() => { - server.start(function (err) { + return server.start().then(() => { server.broadcast('welcome!'); }); diff --git a/types/nes/test/nes-tests.ts b/types/nes/test/nes-tests.ts index 90afe68f3e..85cff1e208 100644 --- a/types/nes/test/nes-tests.ts +++ b/types/nes/test/nes-tests.ts @@ -2,66 +2,55 @@ import Hapi = require('hapi'); import Nes = require('nes'); var server: Hapi.Server = new Hapi.Server(); -server.connection({port: 8080}); -server.register(Nes, (regErr) => { - if(regErr) { - console.log('register err'); - console.log(regErr); - } else { - // No longer need to cast to Nes.Server as Hapi.Server has been modified directly. - // let wsServer: Nes.Server = server as Nes.Server; - let wsServer: Hapi.Server = server; - wsServer.subscription('/item/{id}'); - wsServer.route( { - method: 'GET', - path: '/test', - config: { - handler: (request, reply) => { - reply({test: 'passes ' + request.socket.id}); - } +server.register(Nes).then(() => { + // No longer need to cast to Nes.Server as Hapi.Server has been modified directly. + // let wsServer: Nes.Server = server as Nes.Server; + let wsServer: Hapi.Server = server; + wsServer.subscription('/item/{id}'); + wsServer.route( { + method: 'GET', + path: '/test', + config: { + handler: (request, h) => { + return {test: 'passes ' + request.socket.id}; } - }); - wsServer.start((err: any) => { - if(err) { - console.log('start err'); - console.log(err); - } else { - setTimeout(() => { - wsServer.publish('/item/5', { id: 5, status: 'complete' }); - wsServer.publish('/item/6', { id: 6, status: 'initial' }); - }, 100); - } - }); - } + } + }); + wsServer.start().then(() => { + setTimeout(() => { + wsServer.publish('/item/5', { id: 5, status: 'complete' }); + wsServer.publish('/item/6', { id: 6, status: 'initial' }); + }, 100); + }).catch((err) => { + console.log('start err'); + console.log(err); + }); +}).catch((regErr: any) => { + console.log('register err'); + console.log(regErr); }); let options: Nes.ClientConnectOptions = {delay: 3}; -let wsClient: Nes.Client = new Nes.Client('ws://localhost:8080', options); -wsClient.connect((err: any) => { - if(err) { - console.log('start err'); - console.log(err); - } else { - wsClient.subscribe('/item/5', (update) => { - wsClient.request('/test', (reqErr, payload, statusCode) => { - if(reqErr) { - console.log('request err'); - console.log(reqErr); - } else { - console.log(update); - console.log(payload); - if(payload.test === 'passes') { - process.exit(0); - } - } - }) - }, (subErr) => { - if(subErr) { - console.log('subscribe err'); - console.log(subErr); +let wsClient: Nes.Client = new Nes.Client('ws://localhost', options); +wsClient.connect().then(() => { + wsClient.subscribe('/item/5', (update) => { + wsClient.request('/test').then(({ payload, statusCode }) => { + console.log(update); + console.log(payload); + if(payload.test === 'passes') { + process.exit(0); } - }); - } + }).catch((reqErr: any) => { + console.log('request err'); + console.log(reqErr); + }) + }).catch((subErr: any) => { + console.log('subscribe err'); + console.log(subErr); + }); +}).catch((err: any) => { + console.log('start err'); + console.log(err); }); diff --git a/types/nes/test/route-authentication-client.ts b/types/nes/test/route-authentication-client.ts index fe57eb8d56..f1eb8b9659 100644 --- a/types/nes/test/route-authentication-client.ts +++ b/types/nes/test/route-authentication-client.ts @@ -3,12 +3,9 @@ import Nes = require('nes'); var client = new Nes.Client('ws://localhost'); -client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } }, function (err) { +client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } }).then(() => { - client.request('hello', function (err, payload) { // Can also request '/h' - - // payload -> 'Hello John Doe' - }); + client.request('hello'); }); // Added in addition to nes doc example code @@ -16,10 +13,7 @@ client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } import NesClient = require('nes/client'); var client = new NesClient('ws://localhost'); -client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } }, function (err) { +client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } }).then(() => { - client.request('hello', function (err, payload) { // Can also request '/h' - - // payload -> 'Hello John Doe' - }); + return client.request('hello'); }); diff --git a/types/nes/test/route-authentication-server.ts b/types/nes/test/route-authentication-server.ts index 5b4634d77d..2080f04ef4 100644 --- a/types/nes/test/route-authentication-server.ts +++ b/types/nes/test/route-authentication-server.ts @@ -8,7 +8,7 @@ import Nes = require('nes'); var server = new Hapi.Server(); server.connection(); -server.register([Basic, Nes], function (err) { +server.register([Basic, Nes]).then(() => { // Set up HTTP Basic authentication @@ -28,20 +28,20 @@ server.register([Basic, Nes], function (err) { } }; - var validate: Basic.ValidateFunc = function (request, username, password, callback) { + var validate: Basic.Validate = async (request, username, password, h) => { var user = users[username]; if (!user) { - return callback(null, false); + return { credentials: null, isValid: false }; } - Bcrypt.compare(password, user.password, function (err, isValid) { + let isValid = await Bcrypt.compare(password, user.password) - callback(err, isValid, { id: user.id, name: user.name }); - }); + return { isValid, credentials: { id: user.id, name: user.name } }; }; - server.auth.strategy('simple', 'basic', 'required', { validateFunc: validate }); + server.auth.strategy('simple', 'basic', { validateFunc: validate }); + server.auth.default('simple'); // Configure route with authentication @@ -50,12 +50,12 @@ server.register([Basic, Nes], function (err) { path: '/h', config: { id: 'hello', - handler: function (request, reply) { + handler: function (request, h) { - return reply('Hello ' + request.auth.credentials.name); + return 'Hello ' + request.auth.credentials.name; } } }); - server.start(function (err) { /* ... */ }); + return server.start(); }); diff --git a/types/nes/test/route-invocation-client.ts b/types/nes/test/route-invocation-client.ts index 7b144e3a9c..34c40fe151 100644 --- a/types/nes/test/route-invocation-client.ts +++ b/types/nes/test/route-invocation-client.ts @@ -3,12 +3,9 @@ import Nes = require('nes'); var client = new Nes.Client('ws://localhost'); -client.connect(function (err) { +client.connect().then(() => { - client.request('hello', function (err, payload) { // Can also request '/h' - - // payload -> 'world!' - }); + return client.request('hello'); }); // Added in addition to nes doc example code @@ -16,10 +13,7 @@ client.connect(function (err) { import NesClient = require('nes/client'); var client = new NesClient('ws://localhost'); -client.connect(function (err) { +client.connect().then(() => { - client.request('hello', function (err, payload) { // Can also request '/h' - - // payload -> 'world!' - }); + return client.request('hello'); }); diff --git a/types/nes/test/route-invocation-server.ts b/types/nes/test/route-invocation-server.ts index c32780baa9..d6893495c9 100644 --- a/types/nes/test/route-invocation-server.ts +++ b/types/nes/test/route-invocation-server.ts @@ -4,21 +4,20 @@ import Hapi = require('hapi'); import Nes = require('nes'); var server = new Hapi.Server(); -server.connection(); -server.register(Nes, function (err) { +server.register(Nes).then(() => { server.route({ method: 'GET', path: '/h', config: { id: 'hello', - handler: function (request, reply) { + handler: (request, h) => { - return reply('world!'); + return 'world!'; } } }); - server.start(function (err) { /* ... */ }); + return server.start(); }); diff --git a/types/nes/test/socket.ts b/types/nes/test/socket.ts index 7f7617d462..029dbb1d2f 100644 --- a/types/nes/test/socket.ts +++ b/types/nes/test/socket.ts @@ -4,13 +4,11 @@ import Nes = require('nes'); const socket: Nes.Socket = undefined; -const cb = () => { }; -socket.disconnect(cb); +socket.disconnect(); const s: string = socket.id; const o: Object = socket.app; const auth: Nes.SocketAuthObject = socket.auth; -const cb2 = (err?: any) => { }; -socket.send('message', (err?: any) => { }); -socket.publish('path', 'message', cb2); -socket.revoke('path', 'message', cb2); +socket.send('message'); +socket.publish('path', 'message'); +socket.revoke('path', 'message'); diff --git a/types/nes/test/subscription-filter-client.ts b/types/nes/test/subscription-filter-client.ts index 3f8d3ffb8b..05253539a4 100644 --- a/types/nes/test/subscription-filter-client.ts +++ b/types/nes/test/subscription-filter-client.ts @@ -6,15 +6,15 @@ var client = new Nes.Client('ws://localhost'); // Authenticate as 'john' -client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } }, function (err) { +client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } }).then(() => { - var handler: Nes.Handler = function (err, update) { + var handler: Nes.Handler = (update) => { // First publish is not received (filtered due to updater key) // update -> { id: 6, status: 'initial', updater: 'steve' } }; - client.subscribe('/items', handler, function (err) { }); + return client.subscribe('/items', handler); }); // Added in addition to nes doc example code @@ -25,13 +25,13 @@ var client = new NesClient('ws://localhost'); // Authenticate as 'john' -client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } }, function (err) { +client.connect({ auth: { headers: { authorization: 'Basic am9objpzZWNyZXQ=' } } }).then(() => { - var handler: NesClient.Handler = function (err, update) { + var handler: NesClient.Handler = (update) => { // First publish is not received (filtered due to updater key) // update -> { id: 6, status: 'initial', updater: 'steve' } }; - client.subscribe('/items', handler, function (err) { }); + return client.subscribe('/items', handler); }); diff --git a/types/nes/test/subscription-filter-server.ts b/types/nes/test/subscription-filter-server.ts index be2dda8d7f..7a63abf151 100644 --- a/types/nes/test/subscription-filter-server.ts +++ b/types/nes/test/subscription-filter-server.ts @@ -6,9 +6,8 @@ import Bcrypt = require('bcrypt'); import Nes = require('nes'); var server = new Hapi.Server(); -server.connection(); -server.register([Basic, Nes], function (err) { +server.register([Basic, Nes]).then(() => { // Set up HTTP Basic authentication @@ -28,31 +27,31 @@ server.register([Basic, Nes], function (err) { } }; - var validate: Basic.ValidateFunc = function (request, username, password, callback) { + var validate: Basic.Validate = async (request, username, password, h) => { var user = users[username]; if (!user) { - return callback(null, false); + return { credentials: null, isValid: false }; } - Bcrypt.compare(password, user.password, function (err, isValid) { + let isValid = await Bcrypt.compare(password, user.password) - callback(err, isValid, { id: user.id, name: user.name, username: user.username }); - }); + return { isValid, credentials: { id: user.id, name: user.name, username: user.username } }; }; - server.auth.strategy('simple', 'basic', 'required', { validateFunc: validate }); + server.auth.strategy('simple', 'basic', { validate }); + server.auth.default('simple') // Set up subscription server.subscription('/items', { - filter: function (path, message, options, next) { + filter: (path, message, options) => { - return next(message.updater !== options.credentials.username); + return message.updater !== options.credentials.username; } }); - server.start(function (err) { + server.start().then(() => { server.publish('/items', { id: 5, status: 'complete', updater: 'john' }); server.publish('/items', { id: 6, status: 'initial', updater: 'steve' }); diff --git a/types/nes/test/subscriptions-client.ts b/types/nes/test/subscriptions-client.ts index a9ac55fc6d..9f6150f90c 100644 --- a/types/nes/test/subscriptions-client.ts +++ b/types/nes/test/subscriptions-client.ts @@ -3,15 +3,15 @@ import Nes = require('nes'); var client = new Nes.Client('ws://localhost'); -client.connect(function (err) { + client.connect().then(() => {; - var handler: Nes.Handler = function (update, flags) { + var handler: Nes.Handler = (update, flags) => { // update -> { id: 5, status: 'complete' } // Second publish is not received (doesn't match) }; - client.subscribe('/item/5', handler, function (err) { }); + return client.subscribe('/item/5', handler); }); // Added in addition to nes doc example code @@ -19,13 +19,13 @@ client.connect(function (err) { import NesClient = require('nes/client'); var client = new NesClient('ws://localhost'); -client.connect(function (err) { +client.connect().then(() => { - var handler: NesClient.Handler = function (update, flags) { + var handler: NesClient.Handler = (update, flags) => { // update -> { id: 5, status: 'complete' } // Second publish is not received (doesn't match) }; - client.subscribe('/item/5', handler, function (err) { }); + return client.subscribe('/item/5', handler); }); diff --git a/types/nes/test/subscriptions-server.ts b/types/nes/test/subscriptions-server.ts index 23212f21ea..1280f2afd1 100644 --- a/types/nes/test/subscriptions-server.ts +++ b/types/nes/test/subscriptions-server.ts @@ -4,15 +4,14 @@ import Hapi = require('hapi'); import Nes = require('nes'); var server = new Hapi.Server(); -server.connection(); -server.register(Nes, function (err) { +server.register(Nes).then(() =>{; server.subscription('/item/{id}'); - server.start(function (err) { + return server.start().then(() => { - server.publish('/item/5', { id: 5, status: 'complete' }); - server.publish('/item/6', { id: 6, status: 'initial' }); + server.publish('/item/5', {id: 5, status: 'complete'}); + server.publish('/item/6', {id: 6, status: 'initial'}); }); -}); +}) From e8e3c6a23bdff84aa488a3e0d1ca30a45267c137 Mon Sep 17 00:00:00 2001 From: Rodrigo Saboya Date: Sun, 26 Nov 2017 22:25:04 -0200 Subject: [PATCH 06/32] Updating type definitions for hapi-auth-basic >= 5.0.0. --- types/hapi-auth-basic/hapi-auth-basic-tests.ts | 15 ++++++++------- types/hapi-auth-basic/index.d.ts | 16 +++++++++++----- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/types/hapi-auth-basic/hapi-auth-basic-tests.ts b/types/hapi-auth-basic/hapi-auth-basic-tests.ts index 7f78fe9f65..1a7192af6f 100644 --- a/types/hapi-auth-basic/hapi-auth-basic-tests.ts +++ b/types/hapi-auth-basic/hapi-auth-basic-tests.ts @@ -22,21 +22,22 @@ const users: {[index: string]: User} = { } }; -const validate: Basic.ValidateFunc = function (request, username, password, callback) { +const validate: Basic.Validate = async (request, username, password, h) => { const user = users[username]; if (!user) { - return callback(null, false); + return { isValid: false, credentials: null }; } - Bcrypt.compare(password, user.password, (err, isValid) => { + let isValid = await Bcrypt.compare(password, user.password) - callback(err, isValid, { id: user.id, name: user.name }); - }); + return { isValid, credentials: { id: user.id, name: user.name } }; }; -server.register(Basic, (err) => { +server.register(Basic).then(() => { + + server.auth.strategy('simple', 'basic', { validate }); + server.auth.default('simple'); - server.auth.strategy('simple', 'basic', { validateFunc: validate }); server.route({ method: 'GET', path: '/', config: { auth: 'simple' } }); }); diff --git a/types/hapi-auth-basic/index.d.ts b/types/hapi-auth-basic/index.d.ts index 54d463c2b3..ddf05c348a 100644 --- a/types/hapi-auth-basic/index.d.ts +++ b/types/hapi-auth-basic/index.d.ts @@ -1,18 +1,24 @@ -// Type definitions for hapi 4.2 +// Type definitions for hapi-bauth-basic 5.0.0 // Project: https://github.com/hapijs/hapi-auth-basic // Definitions by: AJP +// Rodrigo Saboya // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 import * as Hapi from 'hapi'; declare namespace Basic { - interface ValidateFuncCallback { - (err: Error | null, isValid: boolean, userCredentials?: any): void; + interface ValidateCustomResponse { + response: any, } - interface ValidateFunc { - (request: Hapi.Request, username: string, password: string, callback: ValidateFuncCallback): void; + interface ValidateResponse { + isValid: boolean, + credentials?: any, + } + + interface Validate { + (request: Hapi.Request, username: string, password: string, h: object): Promise; } } From ed9e0f6d14d9fb43ae5ff61dfeb213a37b510e91 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 29 Nov 2017 09:28:28 -0600 Subject: [PATCH 07/32] Update react-autosuggest signatures, documentation, use generic type - Convert Autosuggest component to a generic - Update the renderSuggestionsContainer signature - Add readme with usage example - Document component props - Export function types for easier reuse/passing in as props --- types/react-autosuggest/README.md | 28 ++ types/react-autosuggest/index.d.ts | 245 +++++++++++++----- .../react-autosuggest-tests.tsx | 14 +- 3 files changed, 218 insertions(+), 69 deletions(-) create mode 100644 types/react-autosuggest/README.md diff --git a/types/react-autosuggest/README.md b/types/react-autosuggest/README.md new file mode 100644 index 0000000000..44ff83ecc5 --- /dev/null +++ b/types/react-autosuggest/README.md @@ -0,0 +1,28 @@ +# react-autosuggest usage notes + +The definition uses generics for stronger typing. Read the [TypeScript deep dive on JSX Generic components](https://basarat.gitbooks.io/typescript/docs/jsx/tsx.html#react-jsx-tip-generic-components) for details on consuming these type definitions. + +## Example + +```jsx +import * as Autosuggest from 'react-autosuggest' +interface Language { + name: string + year: number +} + +const LanguageAutosuggest = Autosuggest as { new (): Autosuggest } + + +``` + +Find multiple full examples in `react-autosuggest-tests.tsx` diff --git a/types/react-autosuggest/index.d.ts b/types/react-autosuggest/index.d.ts index b1f080efe5..4c4d6caaed 100644 --- a/types/react-autosuggest/index.d.ts +++ b/types/react-autosuggest/index.d.ts @@ -1,88 +1,205 @@ -// Type definitions for react-autosuggest 9.3 +// Type definitions for react-autosuggest 9.3.2 // Project: http://react-autosuggest.js.org/ // Definitions by: Nicolas Schmitt // Philip Ottesen // Robert Essig // Terry Bayne // Christopher Deutsch +// Kevin Ross // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as React from 'react'; +import * as React from 'react' -declare class Autosuggest extends React.Component {} +declare class Autosuggest extends React.Component> {} -export = Autosuggest; +export = Autosuggest declare namespace Autosuggest { - interface SuggestionsFetchRequest { - value: string; - reason: 'input-changed' | 'input-focused' | 'escape-pressed' | 'suggestions-revealed' | 'suggestion-selected'; - } + /** + * Utilies types based on: + * https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-307871458 + */ - interface InputValues { - value: string; - valueBeforeUpDown?: string; - } + /** @internal */ + type Diff = ({ [P in T]: P } & + { [P in U]: never } & { [x: string]: never })[T] - interface RenderSuggestionParams { - query: string; - isHighlighted: boolean; - } + /** @internal */ + type Omit = Pick> - interface SuggestionHighlightedParams { - suggestion: any; - } + export interface SuggestionsFetchRequestedParams { + value: string + reason: + | 'input-changed' + | 'input-focused' + | 'escape-pressed' + | 'suggestions-revealed' + | 'suggestion-selected' + } - interface ChangeEvent { - newValue: string; - method: 'down' | 'up' | 'escape' | 'enter' | 'click' | 'type'; - } + export interface RenderSuggestionParams { + query: string + isHighlighted: boolean + } - interface BlurEvent { - highlightedSuggestion: any; - } + export interface SuggestionHighlightedParams { + suggestion: any + } - interface InputProps extends React.InputHTMLAttributes { - value: string; - onChange(event: React.FormEvent, params?: ChangeEvent): void; - onBlur?(event: React.FormEvent, params?: BlurEvent): void; - [key: string]: any; - } + export interface ChangeEvent { + newValue: string + method: 'down' | 'up' | 'escape' | 'enter' | 'click' | 'type' + } - interface SuggestionSelectedEventData { - suggestion: TSuggestion; - suggestionValue: string; - suggestionIndex: number; - sectionIndex: number | null; - method: 'click' | 'enter'; - } + export interface BlurEvent { + highlightedSuggestion: TSuggestion + } - type ThemeKey = 'container' | 'containerOpen' | 'input' | 'inputOpen' | 'inputFocused' | 'suggestionsContainer' | - 'suggestionsContainerOpen' | 'suggestionsList' | 'suggestion' | 'suggestionFirst' | 'suggestionHighlighted' | - 'sectionContainer' | 'sectionContainerFirst' | 'sectionTitle'; + export interface InputProps + extends Omit, 'onChange' | 'onBlur'> { + onChange(event: React.FormEvent, params?: ChangeEvent): void + onBlur?(event: React.FormEvent, params?: BlurEvent): void + value: string + [key: string]: any + } - type Theme = Record | Partial>; + export interface SuggestionSelectedEventData { + suggestion: TSuggestion + suggestionValue: string + suggestionIndex: number + sectionIndex: number | null + method: 'click' | 'enter' + } - interface AutosuggestProps extends React.Props { - suggestions: any[]; - onSuggestionsFetchRequested(request: SuggestionsFetchRequest): void; - onSuggestionsClearRequested?(): void; - getSuggestionValue(suggestion: any): any; - renderSuggestion(suggestion: any, params: RenderSuggestionParams): JSX.Element; - inputProps: InputProps; - onSuggestionSelected?(event: React.FormEvent, data: SuggestionSelectedEventData): void; - onSuggestionHighlighted?(params: SuggestionHighlightedParams): void; - shouldRenderSuggestions?(value: string): boolean; - alwaysRenderSuggestions?: boolean; - highlightFirstSuggestion?: boolean; - focusInputOnSuggestionClick?: boolean; - multiSection?: boolean; - renderSectionTitle?(section: any): JSX.Element; - getSectionSuggestions?(section: any): any[]; - renderInputComponent?(inputProps: InputProps): JSX.Element; - renderSuggestionsContainer?(containerProps: any, children: any, query: string): JSX.Element; - theme?: Theme; - id?: string; - } + export type ThemeKey = + | 'container' + | 'containerOpen' + | 'input' + | 'inputOpen' + | 'inputFocused' + | 'suggestionsContainer' + | 'suggestionsContainerOpen' + | 'suggestionsList' + | 'suggestion' + | 'suggestionFirst' + | 'suggestionHighlighted' + | 'sectionContainer' + | 'sectionContainerFirst' + | 'sectionTitle' + + export type Theme = + | Record + | Partial> + + export type RenderSuggestionsContainerParams = { + containerProps: { + id: string + key: string + ref: any + style: Object + } + children: React.ReactNode + query: string + } + + // export types for functions - allowing reuse externally - e.g. as props and bound in the constructor + export type GetSectionSuggestions = (section: any) => TSuggestion[] + export type GetSuggestionValue = (suggestion: TSuggestion) => string + export type OnSuggestionHighlighted = (params: SuggestionHighlightedParams) => void + export type SuggestionsFetchRequested = (request: SuggestionsFetchRequestedParams) => void + export type OnSuggestionsClearRequested = () => void + export type OnSuggestionSelected = ( + event: React.FormEvent, + data: SuggestionSelectedEventData, + ) => void + export type RenderInputComponent = ( + inputProps: InputProps, + ) => JSX.Element + export type RenderSuggestionsContainer = (params: RenderSuggestionsContainerParams) => JSX.Element + export type RenderSectionTitle = (section: any) => JSX.Element + export type RenderSuggestion = ( + suggestion: TSuggestion, + params: RenderSuggestionParams, + ) => JSX.Element + export type ShouldRenderSuggestions = (value: string) => boolean + + export interface AutosuggestProps { + /** + * Set it to true if you'd like to render suggestions even when the input is not focused. + */ + alwaysRenderSuggestions?: boolean + /** + * Set it to false if you don't want Autosuggest to keep the input focused when suggestions are clicked/tapped. + */ + focusInputOnSuggestionClick?: boolean + /** + * Implement it to teach Autosuggest where to find the suggestions for every section. + */ + getSectionSuggestions?: GetSectionSuggestions + /** + * Implement it to teach Autosuggest what should be the input value when suggestion is clicked. + */ + getSuggestionValue: GetSuggestionValue + /** + * Set it to true if you'd like Autosuggest to automatically highlight the first suggestion. + */ + highlightFirstSuggestion?: boolean + /** + * Use it only if you have multiple Autosuggest components on a page. + */ + id?: string + /** + * Pass through arbitrary props to the input. It must contain at least value and onChange. + */ + inputProps: InputProps + /** + * Set it to true if you'd like to display suggestions in multiple sections (with optional titles). + */ + multiSection?: boolean + /** + * Will be called every time the highlighted suggestion changes. + */ + onSuggestionHighlighted?: OnSuggestionHighlighted + /** + * Will be called every time you need to recalculate suggestions. + */ + onSuggestionsFetchRequested: SuggestionsFetchRequested + /** + * Will be called every time you need to set suggestions to []. + */ + onSuggestionsClearRequested?: OnSuggestionsClearRequested + /** + * Will be called every time suggestion is selected via mouse or keyboard. + */ + onSuggestionSelected?: OnSuggestionSelected + /** + * Use it only if you need to customize the rendering of the input. + */ + renderInputComponent?: RenderInputComponent + /** + * Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves. + */ + renderSuggestionsContainer?: RenderSuggestionsContainer + /** + * Use your imagination to define how section titles are rendered. + */ + renderSectionTitle?: RenderSectionTitle + /** + * Use your imagination to define how suggestions are rendered. + */ + renderSuggestion: RenderSuggestion + /** + * When the input is focused, Autosuggest will consult this function when to render suggestions. Use it, for example, if you want to display suggestions when input value is at least 2 characters long. + */ + shouldRenderSuggestions?: ShouldRenderSuggestions + /** + * These are the suggestions that will be displayed. Items can take an arbitrary shape. + */ + suggestions: TSuggestion[] + /** + * Use your imagination to style the Autosuggest. + */ + theme?: Theme + } } diff --git a/types/react-autosuggest/react-autosuggest-tests.tsx b/types/react-autosuggest/react-autosuggest-tests.tsx index 23841519e4..a8a6268445 100644 --- a/types/react-autosuggest/react-autosuggest-tests.tsx +++ b/types/react-autosuggest/react-autosuggest-tests.tsx @@ -15,6 +15,8 @@ function escapeRegexCharacters(str: string): string { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } +const LanguageAutosuggest = Autosuggest as { new (): Autosuggest } + export class ReactAutosuggestBasicTest extends React.Component { // region Fields static languages: Language[] = [ @@ -89,7 +91,7 @@ export class ReactAutosuggestBasicTest extends React.Component { sectionTitle: { color: 'blue' } }; - return { .bind(this) }; - return { return {section.title}; } - protected renderInputComponent(inputProps: Autosuggest.InputProps): JSX.Element { + protected renderInputComponent(inputProps: Autosuggest.InputProps): JSX.Element { return (
@@ -280,7 +282,7 @@ export class ReactAutosuggestMultipleTest extends React.Component { ); } - protected renderSuggestionsContainer(containerProps: any, children: any, query: string): JSX.Element { + protected renderSuggestionsContainer({containerProps, children, query}: Autosuggest.RenderSuggestionsContainerParams): JSX.Element { return (
{children} @@ -345,6 +347,8 @@ interface Person { twitter: string; } +const PersonAutosuggest = Autosuggest as { new (): Autosuggest } + export class ReactAutosuggestCustomTest extends React.Component { // region Fields static people: Person[] = [ @@ -386,7 +390,7 @@ export class ReactAutosuggestCustomTest extends React.Component { .bind(this) }; - return Date: Wed, 29 Nov 2017 09:38:47 -0600 Subject: [PATCH 08/32] lint --- types/react-autosuggest/index.d.ts | 155 +++++++++--------- .../react-autosuggest-tests.tsx | 4 +- 2 files changed, 79 insertions(+), 80 deletions(-) diff --git a/types/react-autosuggest/index.d.ts b/types/react-autosuggest/index.d.ts index 4c4d6caaed..78c11d6878 100644 --- a/types/react-autosuggest/index.d.ts +++ b/types/react-autosuggest/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-autosuggest 9.3.2 +// Type definitions for react-autosuggest 9.3 // Project: http://react-autosuggest.js.org/ // Definitions by: Nicolas Schmitt // Philip Ottesen @@ -9,11 +9,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as React from 'react' +import * as React from 'react'; declare class Autosuggest extends React.Component> {} -export = Autosuggest +export = Autosuggest; declare namespace Autosuggest { /** @@ -23,56 +23,56 @@ declare namespace Autosuggest { /** @internal */ type Diff = ({ [P in T]: P } & - { [P in U]: never } & { [x: string]: never })[T] + { [P in U]: never } & { [x: string]: never })[T]; /** @internal */ - type Omit = Pick> + type Omit = Pick>; - export interface SuggestionsFetchRequestedParams { - value: string + interface SuggestionsFetchRequestedParams { + value: string; reason: | 'input-changed' | 'input-focused' | 'escape-pressed' | 'suggestions-revealed' - | 'suggestion-selected' + | 'suggestion-selected'; } - export interface RenderSuggestionParams { - query: string - isHighlighted: boolean + interface RenderSuggestionParams { + query: string; + isHighlighted: boolean; } - export interface SuggestionHighlightedParams { - suggestion: any + interface SuggestionHighlightedParams { + suggestion: any; } - export interface ChangeEvent { - newValue: string - method: 'down' | 'up' | 'escape' | 'enter' | 'click' | 'type' + interface ChangeEvent { + newValue: string; + method: 'down' | 'up' | 'escape' | 'enter' | 'click' | 'type'; } - export interface BlurEvent { - highlightedSuggestion: TSuggestion + interface BlurEvent { + highlightedSuggestion: TSuggestion; } - export interface InputProps + interface InputProps extends Omit, 'onChange' | 'onBlur'> { - onChange(event: React.FormEvent, params?: ChangeEvent): void - onBlur?(event: React.FormEvent, params?: BlurEvent): void - value: string - [key: string]: any + onChange(event: React.FormEvent, params?: ChangeEvent): void; + onBlur?(event: React.FormEvent, params?: BlurEvent): void; + value: string; + [key: string]: any; } - export interface SuggestionSelectedEventData { - suggestion: TSuggestion - suggestionValue: string - suggestionIndex: number - sectionIndex: number | null - method: 'click' | 'enter' + interface SuggestionSelectedEventData { + suggestion: TSuggestion; + suggestionValue: string; + suggestionIndex: number; + sectionIndex: number | null; + method: 'click' | 'enter'; } - export type ThemeKey = + type ThemeKey = | 'container' | 'containerOpen' | 'input' @@ -86,120 +86,119 @@ declare namespace Autosuggest { | 'suggestionHighlighted' | 'sectionContainer' | 'sectionContainerFirst' - | 'sectionTitle' + | 'sectionTitle'; - export type Theme = + type Theme = | Record - | Partial> + | Partial>; - export type RenderSuggestionsContainerParams = { + interface RenderSuggestionsContainerParams { containerProps: { - id: string - key: string - ref: any - style: Object - } - children: React.ReactNode - query: string + id: string; + key: string; + ref: any; + style: any; + }; + children: React.ReactNode; + query: string; } - // export types for functions - allowing reuse externally - e.g. as props and bound in the constructor - export type GetSectionSuggestions = (section: any) => TSuggestion[] - export type GetSuggestionValue = (suggestion: TSuggestion) => string - export type OnSuggestionHighlighted = (params: SuggestionHighlightedParams) => void - export type SuggestionsFetchRequested = (request: SuggestionsFetchRequestedParams) => void - export type OnSuggestionsClearRequested = () => void - export type OnSuggestionSelected = ( + // types for functions - allowing reuse externally - e.g. as props and bound in the constructor + type GetSectionSuggestions = (section: any) => TSuggestion[]; + type GetSuggestionValue = (suggestion: TSuggestion) => string; + type OnSuggestionHighlighted = (params: SuggestionHighlightedParams) => void; + type SuggestionsFetchRequested = (request: SuggestionsFetchRequestedParams) => void; + type OnSuggestionsClearRequested = () => void; + type OnSuggestionSelected = ( event: React.FormEvent, data: SuggestionSelectedEventData, - ) => void - export type RenderInputComponent = ( - inputProps: InputProps, - ) => JSX.Element - export type RenderSuggestionsContainer = (params: RenderSuggestionsContainerParams) => JSX.Element - export type RenderSectionTitle = (section: any) => JSX.Element - export type RenderSuggestion = ( + ) => void; + type RenderInputComponent = (inputProps: InputProps) => JSX.Element; + type RenderSuggestionsContainer = (params: RenderSuggestionsContainerParams) => JSX.Element; + type RenderSectionTitle = (section: any) => JSX.Element; + type RenderSuggestion = ( suggestion: TSuggestion, params: RenderSuggestionParams, - ) => JSX.Element - export type ShouldRenderSuggestions = (value: string) => boolean + ) => JSX.Element; + type ShouldRenderSuggestions = (value: string) => boolean; - export interface AutosuggestProps { + interface AutosuggestProps { /** * Set it to true if you'd like to render suggestions even when the input is not focused. */ - alwaysRenderSuggestions?: boolean + alwaysRenderSuggestions?: boolean; /** * Set it to false if you don't want Autosuggest to keep the input focused when suggestions are clicked/tapped. */ - focusInputOnSuggestionClick?: boolean + focusInputOnSuggestionClick?: boolean; /** * Implement it to teach Autosuggest where to find the suggestions for every section. */ - getSectionSuggestions?: GetSectionSuggestions + getSectionSuggestions?: GetSectionSuggestions; /** * Implement it to teach Autosuggest what should be the input value when suggestion is clicked. */ - getSuggestionValue: GetSuggestionValue + getSuggestionValue: GetSuggestionValue; /** * Set it to true if you'd like Autosuggest to automatically highlight the first suggestion. */ - highlightFirstSuggestion?: boolean + highlightFirstSuggestion?: boolean; /** * Use it only if you have multiple Autosuggest components on a page. */ - id?: string + id?: string; /** * Pass through arbitrary props to the input. It must contain at least value and onChange. */ - inputProps: InputProps + inputProps: InputProps; /** * Set it to true if you'd like to display suggestions in multiple sections (with optional titles). */ - multiSection?: boolean + multiSection?: boolean; /** * Will be called every time the highlighted suggestion changes. */ - onSuggestionHighlighted?: OnSuggestionHighlighted + onSuggestionHighlighted?: OnSuggestionHighlighted; /** * Will be called every time you need to recalculate suggestions. */ - onSuggestionsFetchRequested: SuggestionsFetchRequested + onSuggestionsFetchRequested: SuggestionsFetchRequested; /** * Will be called every time you need to set suggestions to []. */ - onSuggestionsClearRequested?: OnSuggestionsClearRequested + onSuggestionsClearRequested?: OnSuggestionsClearRequested; /** * Will be called every time suggestion is selected via mouse or keyboard. */ - onSuggestionSelected?: OnSuggestionSelected + onSuggestionSelected?: OnSuggestionSelected; /** * Use it only if you need to customize the rendering of the input. */ - renderInputComponent?: RenderInputComponent + renderInputComponent?: RenderInputComponent; /** * Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves. */ - renderSuggestionsContainer?: RenderSuggestionsContainer + renderSuggestionsContainer?: RenderSuggestionsContainer; /** * Use your imagination to define how section titles are rendered. */ - renderSectionTitle?: RenderSectionTitle + renderSectionTitle?: RenderSectionTitle; /** * Use your imagination to define how suggestions are rendered. */ - renderSuggestion: RenderSuggestion + renderSuggestion: RenderSuggestion; /** - * When the input is focused, Autosuggest will consult this function when to render suggestions. Use it, for example, if you want to display suggestions when input value is at least 2 characters long. + * When the input is focused, Autosuggest will consult this function when to render suggestions. + * Use it, for example, if you want to display suggestions when input value is at least 2 characters long. */ - shouldRenderSuggestions?: ShouldRenderSuggestions + shouldRenderSuggestions?: ShouldRenderSuggestions; /** * These are the suggestions that will be displayed. Items can take an arbitrary shape. */ - suggestions: TSuggestion[] + suggestions: TSuggestion[]; /** * Use your imagination to style the Autosuggest. */ - theme?: Theme + theme?: Theme; } } diff --git a/types/react-autosuggest/react-autosuggest-tests.tsx b/types/react-autosuggest/react-autosuggest-tests.tsx index a8a6268445..753af3a552 100644 --- a/types/react-autosuggest/react-autosuggest-tests.tsx +++ b/types/react-autosuggest/react-autosuggest-tests.tsx @@ -15,7 +15,7 @@ function escapeRegexCharacters(str: string): string { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } -const LanguageAutosuggest = Autosuggest as { new (): Autosuggest } +const LanguageAutosuggest = Autosuggest as { new (): Autosuggest }; export class ReactAutosuggestBasicTest extends React.Component { // region Fields @@ -347,7 +347,7 @@ interface Person { twitter: string; } -const PersonAutosuggest = Autosuggest as { new (): Autosuggest } +const PersonAutosuggest = Autosuggest as { new (): Autosuggest }; export class ReactAutosuggestCustomTest extends React.Component { // region Fields From b0486477ad5ba9895f28f565c0d5238046df8b2c Mon Sep 17 00:00:00 2001 From: Rich Tagger Date: Thu, 30 Nov 2017 12:48:36 -0800 Subject: [PATCH 09/32] Update CharacterMetadata.applyEntity and Modifier.applyEntity null is how removal is indicated --- types/draft-js/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index 3eaa05aa30..ccc0fcf49e 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -797,7 +797,7 @@ declare namespace Draft { class CharacterMetadata { static applyStyle(record: CharacterMetadata, style: string): CharacterMetadata; static removeStyle(record: CharacterMetadata, style: string): CharacterMetadata; - static applyEntity(record: CharacterMetadata, entityKey: string): CharacterMetadata; + static applyEntity(record: CharacterMetadata, entityKey: string | null): CharacterMetadata; static applyEntity(record: CharacterMetadata): CharacterMetadata; /** * Use this function instead of the `CharacterMetadata` constructor. @@ -894,7 +894,7 @@ declare namespace Draft { static setBlockData(contentState: ContentState, selectionState: SelectionState, blockData: Immutable.Map): ContentState; static mergeBlockData(contentState: ContentState, selectionState: SelectionState, blockData: Immutable.Map): ContentState; - static applyEntity(contentState: ContentState, selectionState: SelectionState, entityKey: string): ContentState; + static applyEntity(contentState: ContentState, selectionState: SelectionState, entityKey: string | null): ContentState; } class RichTextEditorUtil { From d4efe01e5c6d48c8a6c13e271d44dc589961aa8e Mon Sep 17 00:00:00 2001 From: Nam Nguyen Thanh Date: Fri, 1 Dec 2017 16:46:01 +0700 Subject: [PATCH 10/32] Introduce new param for changeView --- types/fullcalendar/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/fullcalendar/index.d.ts b/types/fullcalendar/index.d.ts index 196de10898..4b0f600c6a 100644 --- a/types/fullcalendar/index.d.ts +++ b/types/fullcalendar/index.d.ts @@ -995,7 +995,7 @@ declare global { /** * Immediately switches to a different view. */ - fullCalendar(method: 'changeView', viewName: string): void; + fullCalendar(method: 'changeView', viewName: string, dateOrRange: moment.Moment | Date | string | TimeRange): void; /** * Moves the calendar one step back (either by a month, week, or day). From daaa8688f3a125835f192b2e0a5fb5d05e3403ca Mon Sep 17 00:00:00 2001 From: daphnes Date: Fri, 1 Dec 2017 13:13:29 +0100 Subject: [PATCH 11/32] [ElasticSearch] skipped missing in Shards & sort values for each document returned are also returned as part of the response --- types/elasticsearch/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index 8acc7e4097..1552652edd 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -131,6 +131,7 @@ declare module Elasticsearch { total: number; successful: number; failed: number; + skipped: number; } /** @@ -632,6 +633,7 @@ declare module Elasticsearch { fields?: any; highlight?: any; inner_hits?: any; + sort?: string[]; }[]; }; aggregations?: any; From 2c3a4232beece64ed9947db3ab34d127fdcc7865 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 1 Dec 2017 12:31:15 -0600 Subject: [PATCH 12/32] Add and additional basic test for backward compatibility --- types/react-autosuggest/index.d.ts | 2 +- .../react-autosuggest-tests.tsx | 126 +++++++++++++++++- 2 files changed, 126 insertions(+), 2 deletions(-) diff --git a/types/react-autosuggest/index.d.ts b/types/react-autosuggest/index.d.ts index 78c11d6878..c7f46200d1 100644 --- a/types/react-autosuggest/index.d.ts +++ b/types/react-autosuggest/index.d.ts @@ -11,7 +11,7 @@ import * as React from 'react'; -declare class Autosuggest extends React.Component> {} +declare class Autosuggest extends React.Component> {} export = Autosuggest; diff --git a/types/react-autosuggest/react-autosuggest-tests.tsx b/types/react-autosuggest/react-autosuggest-tests.tsx index 753af3a552..3747e8457b 100644 --- a/types/react-autosuggest/react-autosuggest-tests.tsx +++ b/types/react-autosuggest/react-autosuggest-tests.tsx @@ -15,9 +15,133 @@ function escapeRegexCharacters(str: string): string { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } +export class ReactAutosuggestBasicTest extends React.Component { + // region Fields + static languages: Language[] = [ + { + name: 'C', + year: 1972 + }, { + name: 'C#', + year: 2000 + }, { + name: 'C++', + year: 1983 + }, { + name: 'Clojure', + year: 2007 + }, { + name: 'Elm', + year: 2012 + }, { + name: 'Go', + year: 2009 + }, { + name: 'Haskell', + year: 1990 + }, { + name: 'Java', + year: 1995 + }, { + name: 'Javascript', + year: 1995 + }, { + name: 'Perl', + year: 1987 + }, { + name: 'PHP', + year: 1995 + }, { + name: 'Python', + year: 1991 + }, { + name: 'Ruby', + year: 1995 + }, { + name: 'Scala', + year: 2003 + } + ]; + // endregion region Constructor + constructor(props: any) { + super(props); + + this.state = { + value: '', + suggestions: this.getSuggestions('') + }; + } + // endregion region Rendering methods + render(): JSX.Element { + const {value, suggestions} = this.state; + const inputProps = { + placeholder: `Type 'c'`, + value, + onChange: this + .onChange + .bind(this) + }; + + const theme = { + input: 'themed-input-class', + container: 'themed-container-class', + suggestionFocused: 'active', + sectionTitle: { color: 'blue' } + }; + + return ; + } + + protected onSuggestionsSelected(event: React.FormEvent, data: Autosuggest.SuggestionSelectedEventData): void { + alert(`Selected language is ${data.suggestion.name} (${data.suggestion.year}).`); + } + + protected renderSuggestion(suggestion: Language, params: Autosuggest.RenderSuggestionParams): JSX.Element { + const className = params.isHighlighted ? "highlighted" : undefined; + return {suggestion.name}; + } + // endregion region Event handlers + protected onChange(event: React.FormEvent, {newValue, method}: any): void { + this.setState({value: newValue}); + } + + protected onSuggestionsFetchRequested({value}: any): void { + this.setState({ + suggestions: this.getSuggestions(value) + }); + } + // endregion region Helper methods + protected getSuggestions(value: string): Language[] { + const escapedValue = escapeRegexCharacters(value.trim()); + + if (escapedValue === '') { + return []; + } + + const regex = new RegExp('^' + escapedValue, 'i'); + + return ReactAutosuggestBasicTest + .languages + .filter(language => regex.test(language.name)); + } + + protected getSuggestionValue(suggestion: Language): string { return suggestion.name; } + // endregion +} + const LanguageAutosuggest = Autosuggest as { new (): Autosuggest }; -export class ReactAutosuggestBasicTest extends React.Component { +export class ReactAutosuggestTypedTest extends React.Component { // region Fields static languages: Language[] = [ { From 09b8dc2546a2669d50198d063b41a8fcec9e29df Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Sat, 2 Dec 2017 18:47:31 +0000 Subject: [PATCH 13/32] add some quill types --- types/quill/index.d.ts | 6 ++++++ types/quill/package.json | 6 ++++++ types/quill/quill-tests.ts | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 types/quill/package.json diff --git a/types/quill/index.d.ts b/types/quill/index.d.ts index 6325913519..7cad5330a2 100644 --- a/types/quill/index.d.ts +++ b/types/quill/index.d.ts @@ -2,8 +2,11 @@ // Project: https://github.com/quilljs/quill/ // Definitions by: Sumit // Guillaume +// James Garbutt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +import { Blot } from 'parchment/src/blot/abstract/blot'; + /** * A stricter type definition would be: * @@ -56,7 +59,9 @@ export interface QuillOptionsStatic { } export interface BoundsStatic { + bottom: number; left: number; + right: number; top: number; height: number; width: number; @@ -136,6 +141,7 @@ export class Quill implements EventEmitter { */ root: HTMLDivElement; clipboard: ClipboardStatic; + scroll: Blot; constructor(container: string | Element, options?: QuillOptionsStatic); deleteText(index: number, length: number, source?: Sources): DeltaStatic; disable(): void; diff --git a/types/quill/package.json b/types/quill/package.json new file mode 100644 index 0000000000..85d0ed05d1 --- /dev/null +++ b/types/quill/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "parchment": "^1.1.2" + } +} diff --git a/types/quill/quill-tests.ts b/types/quill/quill-tests.ts index 142c821ffa..f907092ed1 100644 --- a/types/quill/quill-tests.ts +++ b/types/quill/quill-tests.ts @@ -1,4 +1,5 @@ import { Quill, Delta, DeltaStatic, RangeStatic, StringMap } from 'quill'; +import { Blot } from 'parchment/src/blot/abstract/blot'; function test_quill() { const quillEditor = new Quill('#editor', { @@ -10,6 +11,11 @@ function test_quill() { }); } +function test_scroll() { + const quillEditor = new Quill('#editor'); + const blot: Blot = quillEditor.scroll; +} + function test_deleteText() { const quillEditor = new Quill('#editor'); quillEditor.deleteText(0, 10); From f3d99a176675b6a0ca8bd20f583ff272d56df644 Mon Sep 17 00:00:00 2001 From: Dmin Date: Sun, 3 Dec 2017 23:40:58 +0900 Subject: [PATCH 14/32] fix(algolia): geo-search parameters type --- types/algoliasearch/algoliasearch-tests.ts | 6 +++--- types/algoliasearch/index.d.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/types/algoliasearch/algoliasearch-tests.ts b/types/algoliasearch/algoliasearch-tests.ts index 1786b07af7..0814b0fc03 100644 --- a/types/algoliasearch/algoliasearch-tests.ts +++ b/types/algoliasearch/algoliasearch-tests.ts @@ -121,12 +121,12 @@ let _algoliaQueryParameters: AlgoliaQueryParameters = { disableTypoToleranceOnAttributes: '', aroundLatLng: '', aroundLatLngViaIP: '', - aroundRadius: '', + aroundRadius: 0, aroundPrecision: 0, minimumAroundRadius: 0, - insideBoundingBox: '', + insideBoundingBox: [[0]], queryType: '', - insidePolygon: '', + insidePolygon: [[0]], removeWordsIfNoResults: '', advancedSyntax: false, optionalWords: [''], diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index f068fc4e22..1a4b8f141a 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -1770,7 +1770,7 @@ Interface describing options available for gettings the logs * You can specify aroundRadius=all if you want to compute the geo distance without filtering in a geo area * https://github.com/algolia/algoliasearch-client-js#aroundradius */ - aroundRadius?: any; + aroundRadius?: number | 'all'; /** * Control the precision of a geo search * default: null @@ -1788,7 +1788,7 @@ Interface describing options available for gettings the logs * default: null * https://github.com/algolia/algoliasearch-client-js#insideboundingbox */ - insideBoundingBox?: string; + insideBoundingBox?: number[][]; /** * Selects how the query words are interpreted * default: 'prefixLast' @@ -1803,7 +1803,7 @@ Interface describing options available for gettings the logs * defauly: '' * https://github.com/algolia/algoliasearch-client-js#insidepolygon */ - insidePolygon?: string; + insidePolygon?: number[][]; /** * This option is used to select a strategy in order to avoid having an empty result page * default: 'none' From cd3935c6727d24a76680d0a263fcf982ec56d750 Mon Sep 17 00:00:00 2001 From: segayuu Date: Mon, 4 Dec 2017 10:58:29 +0900 Subject: [PATCH 15/32] Delete unnecessary rule invalidation setting --- types/chokidar/tslint.json | 73 +------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/types/chokidar/tslint.json b/types/chokidar/tslint.json index a41bf5d19a..705b12b2c0 100644 --- a/types/chokidar/tslint.json +++ b/types/chokidar/tslint.json @@ -1,79 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false + "no-trailing-whitespace": false } } From f1be10968fc8eb06d31e339f5c95a758b7b2afee Mon Sep 17 00:00:00 2001 From: segayuu Date: Mon, 4 Dec 2017 11:00:51 +0900 Subject: [PATCH 16/32] cleanup lint errors: no-padding, no-trailing-whitespace --- types/chokidar/index.d.ts | 5 +---- types/chokidar/tslint.json | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/types/chokidar/index.d.ts b/types/chokidar/index.d.ts index 229ffb556f..89104d6eb4 100644 --- a/types/chokidar/index.d.ts +++ b/types/chokidar/index.d.ts @@ -19,7 +19,6 @@ export interface WatchedPaths { } export class FSWatcher extends EventEmitter implements fs.FSWatcher { - /** * Constructs a new FSWatcher instance with optional WatchOptions parameter. */ @@ -52,7 +51,6 @@ export class FSWatcher extends EventEmitter implements fs.FSWatcher { } export interface WatchOptions { - /** * Indicates whether the process should continue to run as long as files are being watched. If * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`, @@ -86,7 +84,7 @@ export interface WatchOptions { * be relative to this. */ cwd?: string; - + /** * If set to true then the strings passed to .watch() and .add() are treated as literal path * names, even if they look like globs. Default: false. @@ -155,7 +153,6 @@ export interface WatchOptions { } export interface AwaitWriteFinishOptions { - /** * Amount of time in milliseconds for a file size to remain constant before emitting its event. */ diff --git a/types/chokidar/tslint.json b/types/chokidar/tslint.json index 705b12b2c0..65c83fb1e3 100644 --- a/types/chokidar/tslint.json +++ b/types/chokidar/tslint.json @@ -1,8 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "dt-header": false, - "no-padding": false, - "no-trailing-whitespace": false + "dt-header": false } } From 672a8926e1c3afb8f26c985a2692617e392fdcd9 Mon Sep 17 00:00:00 2001 From: segayuu Date: Mon, 4 Dec 2017 11:01:50 +0900 Subject: [PATCH 17/32] cleanup lint error: dt-header --- types/chokidar/index.d.ts | 2 +- types/chokidar/tslint.json | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/types/chokidar/index.d.ts b/types/chokidar/index.d.ts index 89104d6eb4..396ad10e0a 100644 --- a/types/chokidar/index.d.ts +++ b/types/chokidar/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for chokidar 1.7.1 +// Type definitions for chokidar 1.7 // Project: https://github.com/paulmillr/chokidar // Definitions by: Stefan Steinhart // Felix Becker diff --git a/types/chokidar/tslint.json b/types/chokidar/tslint.json index 65c83fb1e3..3db14f85ea 100644 --- a/types/chokidar/tslint.json +++ b/types/chokidar/tslint.json @@ -1,6 +1 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "dt-header": false - } -} +{ "extends": "dtslint/dt.json" } From b53f9eac8effb22d82379dbdfe517291fd155c02 Mon Sep 17 00:00:00 2001 From: Nam Nguyen Thanh Date: Mon, 4 Dec 2017 09:04:41 +0700 Subject: [PATCH 18/32] Change dataOrRange to optional param --- types/fullcalendar/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/fullcalendar/index.d.ts b/types/fullcalendar/index.d.ts index 4b0f600c6a..3d5ff28f12 100644 --- a/types/fullcalendar/index.d.ts +++ b/types/fullcalendar/index.d.ts @@ -995,7 +995,7 @@ declare global { /** * Immediately switches to a different view. */ - fullCalendar(method: 'changeView', viewName: string, dateOrRange: moment.Moment | Date | string | TimeRange): void; + fullCalendar(method: 'changeView', viewName: string, dateOrRange?: moment.Moment | Date | string | TimeRange): void; /** * Moves the calendar one step back (either by a month, week, or day). From 3628b8552d87631d708a75a156560a899d04b03a Mon Sep 17 00:00:00 2001 From: Polina Date: Mon, 4 Dec 2017 12:34:12 +0700 Subject: [PATCH 19/32] Update index.d.ts of Draft.js typings ContentState.CreateFromBlockArray() should have its second parameter as optional --- types/draft-js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index 3eaa05aa30..8a9924f596 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -746,7 +746,7 @@ declare namespace Draft { } class ContentState extends Record { - static createFromBlockArray(blocks: Array, entityMap: any): ContentState; + static createFromBlockArray(blocks: Array, entityMap?: any): ContentState; static createFromText(text: string, delimiter?: string): ContentState; createEntity(type: DraftEntityType, mutability: DraftEntityMutability, data?: Object): ContentState; From 96a344dd423111c9db0fe028cf57cb6a2ec9855b Mon Sep 17 00:00:00 2001 From: Li Yin Date: Mon, 4 Dec 2017 14:00:55 +0800 Subject: [PATCH 20/32] min, max can be string '-inf', '+inf', or '(number', as described in https://redis.io/commands/zrangebyscore --- types/ioredis/index.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/types/ioredis/index.d.ts b/types/ioredis/index.d.ts index ec1dbe3512..a0f1c06dcb 100644 --- a/types/ioredis/index.d.ts +++ b/types/ioredis/index.d.ts @@ -195,8 +195,8 @@ declare namespace IORedis { zrem(key: string, member: string, ...members: any[]): any; - zremrangebyscore(key: string, min: number, max: number, callback: (err: Error, res: any) => void): void; - zremrangebyscore(key: string, min: number, max: number): Promise; + zremrangebyscore(key: string, min: number | string, max: number | string, callback: (err: Error, res: any) => void): void; + zremrangebyscore(key: string, min: number | string, max: number | string): Promise; zremrangebyrank(key: string, start: number, stop: number, callback: (err: Error, res: any) => void): void; zremrangebyrank(key: string, start: number, stop: number): Promise; @@ -213,12 +213,12 @@ declare namespace IORedis { zrevrange(key: string, start: number, stop: number, withScores: "WITHSCORES", callback: (err: Error, res: any) => void): void; zrevrange(key: string, start: number, stop: number, withScores?: "WITHSCORES"): Promise; - zrangebyscore(key: string, min: number, max: number, ...args: string[]): any; + zrangebyscore(key: string, min: number | string, max: number | string, ...args: string[]): any; - zrevrangebyscore(key: string, max: number, min: number, ...args: string[]): any; + zrevrangebyscore(key: string, max: number | string, min: number | string, ...args: string[]): any; - zcount(key: string, min: number, max: number, callback: (err: Error, res: number) => void): void; - zcount(key: string, min: number, max: number): Promise; + zcount(key: string, min: number | string, max: number | string, callback: (err: Error, res: number) => void): void; + zcount(key: string, min: number | string, max: number | string): Promise; zcard(key: string, callback: (err: Error, res: number) => void): void; zcard(key: string): Promise; @@ -554,7 +554,7 @@ declare namespace IORedis { zrem(key: string, member: string, ...members: any[]): Pipeline; - zremrangebyscore(key: string, min: number, max: number, callback?: (err: Error, res: any) => void): Pipeline; + zremrangebyscore(key: string, min: number | string, max: number | string, callback?: (err: Error, res: any) => void): Pipeline; zremrangebyrank(key: string, start: number, stop: number, callback?: (err: Error, res: any) => void): Pipeline; @@ -568,11 +568,11 @@ declare namespace IORedis { zrevrange(key: string, start: number, stop: number, callback?: (err: Error, res: any) => void): Pipeline; zrevrange(key: string, start: number, stop: number, withScores: "WITHSCORES", callback?: (err: Error, res: any) => void): Pipeline; - zrangebyscore(key: string, min: number, max: number, ...args: string[]): Pipeline; + zrangebyscore(key: string, min: number | string, max: number | string, ...args: string[]): Pipeline; - zrevrangebyscore(key: string, max: number, min: number, ...args: string[]): Pipeline; + zrevrangebyscore(key: string, max: number | string, min: number | string, ...args: string[]): Pipeline; - zcount(key: string, min: number, max: number, callback?: (err: Error, res: number) => void): Pipeline; + zcount(key: string, min: number | string, max: number | string, callback?: (err: Error, res: number) => void): Pipeline; zcard(key: string, callback?: (err: Error, res: number) => void): Pipeline; From 886c0a0b655a549864a3374a6fcd57f0c55ac13f Mon Sep 17 00:00:00 2001 From: daphnes Date: Mon, 4 Dec 2017 12:26:48 +0100 Subject: [PATCH 21/32] Remove tabbing --- types/elasticsearch/index.d.ts | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index 8ab269768d..dbf836c6ae 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -620,30 +620,30 @@ export interface SearchParams extends GenericParams { type?: NameList; } - export interface SearchResponse { - took: number; - timed_out: boolean; - _scroll_id?: string; - _shards: ShardsResponse; - hits: { - total: number; - max_score: number; - hits: Array<{ - _index: string; - _type: string; - _id: string; - _score: number; - _source: T; - _version?: number; - _explanation?: Explanation; - fields?: any; - highlight?: any; - inner_hits?: any; - sort?: string[]; - }>; - }; - aggregations?: any; - } +export interface SearchResponse { + took: number; + timed_out: boolean; + _scroll_id?: string; + _shards: ShardsResponse; + hits: { + total: number; + max_score: number; + hits: Array<{ + _index: string; + _type: string; + _id: string; + _score: number; + _source: T; + _version?: number; + _explanation?: Explanation; + fields?: any; + highlight?: any; + inner_hits?: any; + sort?: string[]; + }>; + }; + aggregations?: any; +} export interface SearchShardsParams extends GenericParams { preference?: string; From d251c643c3e8c37dc4554751caf0238b69db5102 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Fri, 1 Dec 2017 12:52:38 -0800 Subject: [PATCH 22/32] Fix lint error: 'tslint:disable' is forbidden --- types/node/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 61fd375e6f..789e91997f 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -104,8 +104,8 @@ declare namespace setImmediate { declare function clearImmediate(immediateId: any): void; // TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version. -/* tslint:disable:callable-types */ interface NodeRequireFunction { +/* tslint:disable-next-line:callable-types */ (id: string): any; } From 8a3c0175f1955388e818cdab98de8c80cd70a5e3 Mon Sep 17 00:00:00 2001 From: Beeno Tung Date: Tue, 5 Dec 2017 00:22:50 +0800 Subject: [PATCH 23/32] Update index.d.ts added 'buffer' as Encoding type --- types/node-rsa/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/node-rsa/index.d.ts b/types/node-rsa/index.d.ts index faafdf7d24..63d569378d 100644 --- a/types/node-rsa/index.d.ts +++ b/types/node-rsa/index.d.ts @@ -122,7 +122,7 @@ declare namespace NodeRSA { type Encoding = | 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' - | 'base64' | 'hex' | 'binary'; + | 'base64' | 'hex' | 'binary' | 'buffer'; interface KeyComponents { n: Buffer; From ec54184e1bf53c8d3344fe1e3c2ccbe1033b1bd5 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Mon, 4 Dec 2017 10:39:31 -0600 Subject: [PATCH 24/32] JSX.Element -> React.ReactNode --- types/react-autosuggest/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/react-autosuggest/index.d.ts b/types/react-autosuggest/index.d.ts index c7f46200d1..444753bd54 100644 --- a/types/react-autosuggest/index.d.ts +++ b/types/react-autosuggest/index.d.ts @@ -113,13 +113,13 @@ declare namespace Autosuggest { event: React.FormEvent, data: SuggestionSelectedEventData, ) => void; - type RenderInputComponent = (inputProps: InputProps) => JSX.Element; - type RenderSuggestionsContainer = (params: RenderSuggestionsContainerParams) => JSX.Element; - type RenderSectionTitle = (section: any) => JSX.Element; + type RenderInputComponent = (inputProps: InputProps) => React.ReactNode; + type RenderSuggestionsContainer = (params: RenderSuggestionsContainerParams) => React.ReactNode; + type RenderSectionTitle = (section: any) => React.ReactNode; type RenderSuggestion = ( suggestion: TSuggestion, params: RenderSuggestionParams, - ) => JSX.Element; + ) => React.ReactNode; type ShouldRenderSuggestions = (value: string) => boolean; interface AutosuggestProps { From d105bd4c8d8a489690bad0099d1b95d1104379b5 Mon Sep 17 00:00:00 2001 From: John Gozde Date: Mon, 4 Dec 2017 10:27:42 -0700 Subject: [PATCH 25/32] Use ComponentType for React.Fragment --- types/react/index.d.ts | 16 ++++++---------- types/react/test/index.ts | 6 +++--- types/react/test/tsx.tsx | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index e41299fdb5..f9b199cbd5 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -265,7 +265,7 @@ declare namespace React { function isValidElement

(object: {} | null | undefined): object is ReactElement

; const Children: ReactChildren; - const Fragment: symbol | number; + const Fragment: ComponentType; const version: string; // @@ -281,10 +281,8 @@ declare namespace React { constructor(props: P, context?: any); // Disabling unified-signatures to have separate overloads. It's easier to understand this way. - // tslint:disable:unified-signatures - setState(f: (prevState: Readonly, props: P) => Pick, callback?: () => any): void; - setState(state: Pick, callback?: () => any): void; - // tslint:enable:unified-signatures + setState(f: (prevState: Readonly, props: P) => Pick, callback?: () => any): void; // tslint:disable-line:unified-signatures + setState(state: Pick, callback?: () => any): void; // tslint:disable-line:unified-signatures forceUpdate(callBack?: () => any): void; render(): ReactNode; @@ -3519,17 +3517,15 @@ declare namespace React { declare global { namespace JSX { - // tslint:disable:no-empty-interface - interface Element extends React.ReactElement { } + interface Element extends React.ReactElement { } // tslint:disable-line:no-empty-interface interface ElementClass extends React.Component { render(): React.ReactNode; } interface ElementAttributesProperty { props: {}; } interface ElementChildrenAttribute { children: {}; } - interface IntrinsicAttributes extends React.Attributes { } - interface IntrinsicClassAttributes extends React.ClassAttributes { } - // tslint:enable:no-empty-interface + interface IntrinsicAttributes extends React.Attributes { } // tslint:disable-line:no-empty-interface + interface IntrinsicClassAttributes extends React.ClassAttributes { } // tslint:disable-line:no-empty-interface interface IntrinsicElements { // HTML diff --git a/types/react/test/index.ts b/types/react/test/index.ts index 3c49215c8a..e8aabfa35c 100644 --- a/types/react/test/index.ts +++ b/types/react/test/index.ts @@ -164,7 +164,7 @@ const statelessElement: React.SFCElement = React.createElement(Stateles const domElement: React.DOMElement, HTMLDivElement> = React.createElement("div"); const htmlElement = React.createElement("input", { type: "text" }); const svgElement = React.createElement("svg", { accentHeight: 12 }); -const fragmentElement: React.ReactElement = React.createElement(React.Fragment, undefined, [React.createElement("div"), React.createElement("div")]); +const fragmentElement: React.ReactElement<{}> = React.createElement(React.Fragment, {}, [React.createElement("div"), React.createElement("div")]); const customProps: React.HTMLProps = props; const customDomElement = "my-element"; @@ -229,7 +229,7 @@ const notValid: boolean = React.isValidElement(props); // false const isValid = React.isValidElement(element); // true let domNode: Element = ReactDOM.findDOMNode(component); domNode = ReactDOM.findDOMNode(domNode); -const fragmentType: symbol | number = React.Fragment; +const fragmentType: React.ComponentType = React.Fragment; // // React Elements @@ -255,7 +255,7 @@ myComponent.reset(); // Refs // -------------------------------------------------------------------------- -// tslint:disable:no-empty-interface +// tslint:disable-next-line:no-empty-interface interface RCProps { } class RefComponent extends React.Component { diff --git a/types/react/test/tsx.tsx b/types/react/test/tsx.tsx index dd91b5a0bd..6322f8f234 100644 --- a/types/react/test/tsx.tsx +++ b/types/react/test/tsx.tsx @@ -63,3 +63,17 @@ const StatelessComponentWithoutProps: React.SFC = (props) => { return

; }; ; + +// Fragments +
+ + + Child 1 + Child 2 + + + Child 3 + Child 4 + + +
; From 5afa32483e299cc02ebb706fca6cddf79134ec1b Mon Sep 17 00:00:00 2001 From: John Gozde Date: Mon, 4 Dec 2017 11:33:33 -0700 Subject: [PATCH 26/32] Prefer disable-next-line --- types/react/index.d.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index f9b199cbd5..a2ea9bdc6c 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -281,8 +281,10 @@ declare namespace React { constructor(props: P, context?: any); // Disabling unified-signatures to have separate overloads. It's easier to understand this way. - setState(f: (prevState: Readonly, props: P) => Pick, callback?: () => any): void; // tslint:disable-line:unified-signatures - setState(state: Pick, callback?: () => any): void; // tslint:disable-line:unified-signatures + // tslint:disable-next-line:unified-signatures + setState(f: (prevState: Readonly, props: P) => Pick, callback?: () => any): void; + // tslint:disable-next-line:unified-signatures + setState(state: Pick, callback?: () => any): void; forceUpdate(callBack?: () => any): void; render(): ReactNode; @@ -3517,15 +3519,18 @@ declare namespace React { declare global { namespace JSX { - interface Element extends React.ReactElement { } // tslint:disable-line:no-empty-interface + // tslint:disable-next-line:no-empty-interface + interface Element extends React.ReactElement { } interface ElementClass extends React.Component { render(): React.ReactNode; } interface ElementAttributesProperty { props: {}; } interface ElementChildrenAttribute { children: {}; } - interface IntrinsicAttributes extends React.Attributes { } // tslint:disable-line:no-empty-interface - interface IntrinsicClassAttributes extends React.ClassAttributes { } // tslint:disable-line:no-empty-interface + // tslint:disable-next-line:no-empty-interface + interface IntrinsicAttributes extends React.Attributes { } + // tslint:disable-next-line:no-empty-interface + interface IntrinsicClassAttributes extends React.ClassAttributes { } interface IntrinsicElements { // HTML From ad0e1920d28a38643a97231881b3359d93cf0efc Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 4 Dec 2017 10:44:00 -0800 Subject: [PATCH 27/32] Re-added exports and "chai" module to chai types (#21924) * Re-added exports and "chai" module to chai types Fixes issues with downstream typings and projects that relied on the chai module. * Re-disabled packaging tslint rules --- types/chai/index.d.ts | 26 +++++++++++++------------- types/chai/tslint.json | 5 ++++- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/types/chai/index.d.ts b/types/chai/index.d.ts index 984e4103d1..8c19f1f54a 100644 --- a/types/chai/index.d.ts +++ b/types/chai/index.d.ts @@ -26,20 +26,20 @@ declare namespace Chai { version: string; } - interface ExpectStatic extends AssertionStatic { + export interface ExpectStatic extends AssertionStatic { fail(actual?: any, expected?: any, message?: string, operator?: Operator): void; } - interface AssertStatic extends Assert { + export interface AssertStatic extends Assert { } - interface AssertionStatic { + export interface AssertionStatic { (target: any, message?: string): Assertion; } - type Operator = string; // "==" | "===" | ">" | ">=" | "<" | "<=" | "!=" | "!=="; + export type Operator = string; // "==" | "===" | ">" | ">=" | "<" | "<=" | "!=" | "!=="; - type OperatorComparable = boolean | null | number | string | undefined | Date; + export type OperatorComparable = boolean | null | number | string | undefined | Date; interface ShouldAssertion { equal(value1: any, value2: any, message?: string): void; @@ -256,7 +256,7 @@ declare namespace Chai { (object: Object, property: string, message?: string): Assertion; } - interface Assert { + export interface Assert { /** * @param expression Expression to test for truthiness. * @param message Message to display on error. @@ -1587,7 +1587,7 @@ declare namespace Chai { doesNotHaveAllDeepKeys(object: T, keys: Array | { [key: string]: any }, message?: string): void; } - interface Config { + export interface Config { /** * Default: false */ @@ -1604,7 +1604,7 @@ declare namespace Chai { truncateThreshold: number; } - class AssertionError { + export class AssertionError { constructor(message: string, _props?: any, ssf?: Function); name: string; message: string; @@ -1615,10 +1615,10 @@ declare namespace Chai { declare const chai: Chai.ChaiStatic; -export = chai; +declare module "chai" { + export = chai; +} -declare global { - interface Object { - should: Chai.Assertion; - } +interface Object { + should: Chai.Assertion; } diff --git a/types/chai/tslint.json b/types/chai/tslint.json index 1a0ebe45c6..f99183c97d 100644 --- a/types/chai/tslint.json +++ b/types/chai/tslint.json @@ -4,8 +4,11 @@ "ban-types": false, "callable-types": false, "new-parens": false, + "no-declare-current-package": false, "no-empty-interface": false, "no-redundant-jsdoc-2": false, - "no-unnecessary-generics": false + "no-single-declare-module": false, + "no-unnecessary-generics": false, + "strict-export-declare-modifiers": false } } From 13a6e92a7fdd432276059ab301304bd73dfb6ab6 Mon Sep 17 00:00:00 2001 From: John Gozde Date: Mon, 4 Dec 2017 11:49:38 -0700 Subject: [PATCH 28/32] Revert 'type' changes --- types/react/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index a2ea9bdc6c..4c0aa8c0a3 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -88,7 +88,7 @@ declare namespace React { } interface ReactElement

{ - type: string | symbol | number | ComponentClass

| SFC

; + type: string | ComponentClass

| SFC

; props: P; key: Key | null; } @@ -222,7 +222,7 @@ declare namespace React { props?: ClassAttributes & P, ...children: ReactNode[]): CElement; function createElement

( - type: SFC

| ComponentClass

| string | symbol | number, + type: SFC

| ComponentClass

| string, props?: Attributes & P, ...children: ReactNode[]): ReactElement

; From a385b18cd63d91f395f54c5c301f74241a884b11 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Fri, 1 Dec 2017 13:02:40 -0800 Subject: [PATCH 29/32] Export nodejs native tls.checkServerIdentity function --- types/node/index.d.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 789e91997f..1d79e782d2 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -15,6 +15,7 @@ // Alvis HT Tang // Oliver Joseph Ash // Sebastian Silbermann +// Hannes Magnusson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /************************************************ @@ -4881,7 +4882,7 @@ declare module "tls" { servername?: string; path?: string; ALPNProtocols?: Array; - checkServerIdentity?: (servername: string, cert: string | Buffer | Array) => any; + checkServerIdentity?: typeof checkServerIdentity; secureProtocol?: string; secureContext?: Object; session?: Buffer; @@ -4984,6 +4985,14 @@ declare module "tls" { context: any; } + /* + * Verifies the certificate `cert` is issued to host `host`. + * @host The hostname to verify the certificate against + * @cert PeerCertificate representing the peer's certificate + * + * Returns Error object, populating it with the reason, host and cert on failure. On success, returns undefined. + */ + export function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; export function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; export function connect(options: ConnectionOptions, secureConnectionListener?: () => void): TLSSocket; export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; From 89a722bd8f1d70bfcffab63e923a7b5b80c8dd89 Mon Sep 17 00:00:00 2001 From: FaithForHumans Date: Mon, 4 Dec 2017 13:56:48 -0600 Subject: [PATCH 30/32] Getting rid of named component exports. Restoring UncontrolledProps in Alert, ButtonDropdown, Dropdown, NavDropdown, and Tooltip. --- types/reactstrap/index.d.ts | 150 +++++++++--------- types/reactstrap/lib/Alert.d.ts | 7 +- types/reactstrap/lib/Badge.d.ts | 2 +- types/reactstrap/lib/Breadcrumb.d.ts | 2 +- types/reactstrap/lib/BreadcrumbItem.d.ts | 2 +- types/reactstrap/lib/Button.d.ts | 2 +- types/reactstrap/lib/ButtonDropdown.d.ts | 16 +- types/reactstrap/lib/ButtonGroup.d.ts | 2 +- types/reactstrap/lib/ButtonToolbar.d.ts | 2 +- types/reactstrap/lib/Card.d.ts | 2 +- types/reactstrap/lib/CardBlock.d.ts | 2 +- types/reactstrap/lib/CardBody.d.ts | 2 +- types/reactstrap/lib/CardColumns.d.ts | 2 +- types/reactstrap/lib/CardDeck.d.ts | 2 +- types/reactstrap/lib/CardFooter.d.ts | 2 +- types/reactstrap/lib/CardGroup.d.ts | 2 +- types/reactstrap/lib/CardHeader.d.ts | 2 +- types/reactstrap/lib/CardImg.d.ts | 2 +- types/reactstrap/lib/CardImgOverlay.d.ts | 2 +- types/reactstrap/lib/CardLink.d.ts | 2 +- types/reactstrap/lib/CardSubtitle.d.ts | 2 +- types/reactstrap/lib/CardText.d.ts | 2 +- types/reactstrap/lib/CardTitle.d.ts | 2 +- types/reactstrap/lib/Col.d.ts | 2 +- types/reactstrap/lib/Collapse.d.ts | 2 +- types/reactstrap/lib/Container.d.ts | 2 +- types/reactstrap/lib/Dropdown.d.ts | 12 +- types/reactstrap/lib/DropdownItem.d.ts | 2 +- types/reactstrap/lib/DropdownMenu.d.ts | 2 +- types/reactstrap/lib/DropdownToggle.d.ts | 2 +- types/reactstrap/lib/Fade.d.ts | 2 +- types/reactstrap/lib/Form.d.ts | 2 +- types/reactstrap/lib/FormFeedback.d.ts | 2 +- types/reactstrap/lib/FormGroup.d.ts | 2 +- types/reactstrap/lib/FormText.d.ts | 2 +- types/reactstrap/lib/Input.d.ts | 6 +- types/reactstrap/lib/InputGroup.d.ts | 2 +- types/reactstrap/lib/InputGroupAddon.d.ts | 2 +- types/reactstrap/lib/InputGroupButton.d.ts | 2 +- types/reactstrap/lib/Jumbotron.d.ts | 2 +- types/reactstrap/lib/Label.d.ts | 2 +- types/reactstrap/lib/ListGroup.d.ts | 2 +- types/reactstrap/lib/ListGroupItem.d.ts | 2 +- .../reactstrap/lib/ListGroupItemHeading.d.ts | 2 +- types/reactstrap/lib/ListGroupItemText.d.ts | 2 +- types/reactstrap/lib/Media.d.ts | 2 +- types/reactstrap/lib/Modal.d.ts | 2 +- types/reactstrap/lib/ModalBody.d.ts | 2 +- types/reactstrap/lib/ModalFooter.d.ts | 2 +- types/reactstrap/lib/ModalHeader.d.ts | 2 +- types/reactstrap/lib/Nav.d.ts | 2 +- types/reactstrap/lib/NavDropdown.d.ts | 16 +- types/reactstrap/lib/NavItem.d.ts | 2 +- types/reactstrap/lib/NavLink.d.ts | 2 +- types/reactstrap/lib/Navbar.d.ts | 2 +- types/reactstrap/lib/NavbarBrand.d.ts | 2 +- types/reactstrap/lib/NavbarToggler.d.ts | 2 +- types/reactstrap/lib/Pagination.d.ts | 2 +- types/reactstrap/lib/PaginationItem.d.ts | 2 +- types/reactstrap/lib/PaginationLink.d.ts | 2 +- types/reactstrap/lib/Popover.d.ts | 2 +- types/reactstrap/lib/PopoverBody.d.ts | 2 +- types/reactstrap/lib/PopoverHeader.d.ts | 2 +- types/reactstrap/lib/Progress.d.ts | 2 +- types/reactstrap/lib/Row.d.ts | 2 +- types/reactstrap/lib/TabContent.d.ts | 2 +- types/reactstrap/lib/TabPane.d.ts | 2 +- types/reactstrap/lib/Table.d.ts | 2 +- types/reactstrap/lib/Tag.d.ts | 2 +- types/reactstrap/lib/TetherContent.d.ts | 2 +- types/reactstrap/lib/Tooltip.d.ts | 7 +- 71 files changed, 182 insertions(+), 160 deletions(-) diff --git a/types/reactstrap/index.d.ts b/types/reactstrap/index.d.ts index ae06cdd7cf..fb0242be63 100644 --- a/types/reactstrap/index.d.ts +++ b/types/reactstrap/index.d.ts @@ -12,78 +12,78 @@ export interface CSSModule { [className: string]: string; } -export { Alert, AlertProps } from './lib/Alert'; -export { Badge, BadgeProps } from './lib/Badge'; -export { Breadcrumb, BreadcrumbProps } from './lib/Breadcrumb'; -export { BreadcrumbItem, BreadcrumbItemProps } from './lib/BreadcrumbItem'; -export { Button, ButtonProps } from './lib/Button'; -export { ButtonDropdown, ButtonDropdownProps } from './lib/ButtonDropdown'; -export { ButtonGroup, ButtonGroupProps } from './lib/ButtonGroup'; -export { ButtonToolbar, ButtonToolbarProps } from './lib/ButtonToolbar'; -export { Card, CardProps } from './lib/Card'; -export { CardBody, CardBodyProps } from './lib/CardBody'; -export { CardBlock, CardBlockProps } from './lib/CardBlock'; -export { CardColumns, CardColumnsProps } from './lib/CardColumns'; -export { CardDeck, CardDeckProps } from './lib/CardDeck'; -export { CardFooter, CardFooterProps } from './lib/CardFooter'; -export { CardGroup, CardGroupProps } from './lib/CardGroup'; -export { CardHeader, CardHeaderProps } from './lib/CardHeader'; -export { CardImg, CardImgProps } from './lib/CardImg'; -export { CardImgOverlay, CardImgOverlayProps } from './lib/CardImgOverlay'; -export { CardLink, CardLinkProps } from './lib/CardLink'; -export { CardSubtitle, CardSubtitleProps } from './lib/CardSubtitle'; -export { CardText, CardTextProps } from './lib/CardText'; -export { CardTitle, CardTitleProps } from './lib/CardTitle'; -export { Col, ColProps } from './lib/Col'; -export { Collapse, CollapseProps } from './lib/Collapse'; -export { Container, ContainerProps } from './lib/Container'; -export { Dropdown, DropdownProps } from './lib/Dropdown'; -export { DropdownItem, DropdownItemProps } from './lib/DropdownItem'; -export { DropdownMenu, DropdownMenuProps } from './lib/DropdownMenu'; -export { DropdownToggle, DropdownToggleProps } from './lib/DropdownToggle'; -export { Fade, FadeProps } from './lib/Fade'; -export { Form, FormProps } from './lib/Form'; -export { FormFeedback, FormFeedbackProps } from './lib/FormFeedback'; -export { FormGroup, FormGroupProps } from './lib/FormGroup'; -export { FormText, FormTextProps } from './lib/FormText'; -export { Input, InputProps } from './lib/Input'; -export { InputGroup, InputGroupProps } from './lib/InputGroup'; -export { InputGroupAddon, InputGroupAddonProps } from './lib/InputGroupAddon'; -export { InputGroupButton, InputGroupButtonProps } from './lib/InputGroupButton'; -export { Jumbotron, JumbotronProps } from './lib/Jumbotron'; -export { Label, LabelProps } from './lib/Label'; -export { ListGroup, ListGroupProps } from './lib/ListGroup'; -export { ListGroupItem, ListGroupItemProps } from './lib/ListGroupItem'; -export { ListGroupItemHeading, ListGroupItemHeadingProps } from './lib/ListGroupItemHeading'; -export { ListGroupItemText, ListGroupItemTextProps } from './lib/ListGroupItemText'; -export { Media, MediaProps } from './lib/Media'; -export { Modal, ModalProps } from './lib/Modal'; -export { ModalBody, ModalBodyProps } from './lib/ModalBody'; -export { ModalFooter, ModalFooterProps } from './lib/ModalFooter'; -export { ModalHeader, ModalHeaderProps } from './lib/ModalHeader'; -export { Nav, NavProps } from './lib/Nav'; -export { Navbar, NavbarProps } from './lib/Navbar'; -export { NavbarBrand, NavbarBrandProps } from './lib/NavbarBrand'; -export { NavbarToggler, NavbarTogglerProps } from './lib/NavbarToggler'; -export { NavDropdown, NavDropdownProps } from './lib/NavDropdown'; -export { NavItem, NavItemProps } from './lib/NavItem'; -export { NavLink, NavLinkProps } from './lib/NavLink'; -export { Pagination, PaginationProps } from './lib/Pagination'; -export { PaginationItem, PaginationItemProps } from './lib/PaginationItem'; -export { PaginationLink, PaginationLinkProps } from './lib/PaginationLink'; -export { Popover, PopoverProps } from './lib/Popover'; -export { PopoverBody, PopoverBodyProps } from './lib/PopoverBody'; -export { PopoverHeader, PopoverHeaderProps } from './lib/PopoverHeader'; -export { Progress, ProgressProps } from './lib/Progress'; -export { Row, RowProps } from './lib/Row'; -export { TabContent, TabContentProps } from './lib/TabContent'; -export { Table, TableProps } from './lib/Table'; -export { TabPane, TabPaneProps } from './lib/TabPane'; -export { Tag, TagProps } from './lib/Tag'; -export { TetherContent, TetherContentProps } from './lib/TetherContent'; -export { Tooltip, TooltipProps } from './lib/Tooltip'; -export { UncontrolledAlert, UncontrolledAlertProps } from './lib/Uncontrolled'; -export { UncontrolledButtonDropdown, UncontrolledButtonDropdownProps } from './lib/Uncontrolled'; -export { UncontrolledDropdown, UncontrolledDropdownProps } from './lib/Uncontrolled'; -export { UncontrolledNavDropdown, UncontrolledNavDropdownProps } from './lib/Uncontrolled'; -export { UncontrolledTooltip, UncontrolledTooltipProps } from './lib/Uncontrolled'; +export { default as Alert, AlertProps } from './lib/Alert'; +export { default as Badge, BadgeProps } from './lib/Badge'; +export { default as Breadcrumb, BreadcrumbProps } from './lib/Breadcrumb'; +export { default as BreadcrumbItem, BreadcrumbItemProps } from './lib/BreadcrumbItem'; +export { default as Button, ButtonProps } from './lib/Button'; +export { default as ButtonDropdown, ButtonDropdownProps } from './lib/ButtonDropdown'; +export { default as ButtonGroup, ButtonGroupProps } from './lib/ButtonGroup'; +export { default as ButtonToolbar, ButtonToolbarProps } from './lib/ButtonToolbar'; +export { default as Card, CardProps } from './lib/Card'; +export { default as CardBody, CardBodyProps } from './lib/CardBody'; +export { default as CardBlock, CardBlockProps } from './lib/CardBlock'; +export { default as CardColumns, CardColumnsProps } from './lib/CardColumns'; +export { default as CardDeck, CardDeckProps } from './lib/CardDeck'; +export { default as CardFooter, CardFooterProps } from './lib/CardFooter'; +export { default as CardGroup, CardGroupProps } from './lib/CardGroup'; +export { default as CardHeader, CardHeaderProps } from './lib/CardHeader'; +export { default as CardImg, CardImgProps } from './lib/CardImg'; +export { default as CardImgOverlay, CardImgOverlayProps } from './lib/CardImgOverlay'; +export { default as CardLink, CardLinkProps } from './lib/CardLink'; +export { default as CardSubtitle, CardSubtitleProps } from './lib/CardSubtitle'; +export { default as CardText, CardTextProps } from './lib/CardText'; +export { default as CardTitle, CardTitleProps } from './lib/CardTitle'; +export { default as Col, ColProps } from './lib/Col'; +export { default as Collapse, CollapseProps } from './lib/Collapse'; +export { default as Container, ContainerProps } from './lib/Container'; +export { default as Dropdown, DropdownProps } from './lib/Dropdown'; +export { default as DropdownItem, DropdownItemProps } from './lib/DropdownItem'; +export { default as DropdownMenu, DropdownMenuProps } from './lib/DropdownMenu'; +export { default as DropdownToggle, DropdownToggleProps } from './lib/DropdownToggle'; +export { default as Fade, FadeProps } from './lib/Fade'; +export { default as Form, FormProps } from './lib/Form'; +export { default as FormFeedback, FormFeedbackProps } from './lib/FormFeedback'; +export { default as FormGroup, FormGroupProps } from './lib/FormGroup'; +export { default as FormText, FormTextProps } from './lib/FormText'; +export { default as Input, InputProps } from './lib/Input'; +export { default as InputGroup, InputGroupProps } from './lib/InputGroup'; +export { default as InputGroupAddon, InputGroupAddonProps } from './lib/InputGroupAddon'; +export { default as InputGroupButton, InputGroupButtonProps } from './lib/InputGroupButton'; +export { default as Jumbotron, JumbotronProps } from './lib/Jumbotron'; +export { default as Label, LabelProps } from './lib/Label'; +export { default as ListGroup, ListGroupProps } from './lib/ListGroup'; +export { default as ListGroupItem, ListGroupItemProps } from './lib/ListGroupItem'; +export { default as ListGroupItemHeading, ListGroupItemHeadingProps } from './lib/ListGroupItemHeading'; +export { default as ListGroupItemText, ListGroupItemTextProps } from './lib/ListGroupItemText'; +export { default as Media, MediaProps } from './lib/Media'; +export { default as Modal, ModalProps } from './lib/Modal'; +export { default as ModalBody, ModalBodyProps } from './lib/ModalBody'; +export { default as ModalFooter, ModalFooterProps } from './lib/ModalFooter'; +export { default as ModalHeader, ModalHeaderProps } from './lib/ModalHeader'; +export { default as Nav, NavProps } from './lib/Nav'; +export { default as Navbar, NavbarProps } from './lib/Navbar'; +export { default as NavbarBrand, NavbarBrandProps } from './lib/NavbarBrand'; +export { default as NavbarToggler, NavbarTogglerProps } from './lib/NavbarToggler'; +export { default as NavDropdown, NavDropdownProps } from './lib/NavDropdown'; +export { default as NavItem, NavItemProps } from './lib/NavItem'; +export { default as NavLink, NavLinkProps } from './lib/NavLink'; +export { default as Pagination, PaginationProps } from './lib/Pagination'; +export { default as PaginationItem, PaginationItemProps } from './lib/PaginationItem'; +export { default as PaginationLink, PaginationLinkProps } from './lib/PaginationLink'; +export { default as Popover, PopoverProps } from './lib/Popover'; +export { default as PopoverBody, PopoverBodyProps } from './lib/PopoverBody'; +export { default as PopoverHeader, PopoverHeaderProps } from './lib/PopoverHeader'; +export { default as Progress, ProgressProps } from './lib/Progress'; +export { default as Row, RowProps } from './lib/Row'; +export { default as TabContent, TabContentProps } from './lib/TabContent'; +export { default as Table, TableProps } from './lib/Table'; +export { default as TabPane, TabPaneProps } from './lib/TabPane'; +export { default as Tag, TagProps } from './lib/Tag'; +export { default as TetherContent, TetherContentProps } from './lib/TetherContent'; +export { default as Tooltip, TooltipProps } from './lib/Tooltip'; +export { UncontrolledAlert, UncontrolledAlertProps } from './lib/Uncontrolled'; +export { UncontrolledButtonDropdown, UncontrolledButtonDropdownProps } from './lib/Uncontrolled'; +export { UncontrolledDropdown, UncontrolledDropdownProps } from './lib/Uncontrolled'; +export { UncontrolledNavDropdown, UncontrolledNavDropdownProps } from './lib/Uncontrolled'; +export { UncontrolledTooltip, UncontrolledTooltipProps } from './lib/Uncontrolled'; diff --git a/types/reactstrap/lib/Alert.d.ts b/types/reactstrap/lib/Alert.d.ts index 6ce7c0fe0e..c52ff2c35b 100644 --- a/types/reactstrap/lib/Alert.d.ts +++ b/types/reactstrap/lib/Alert.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -export interface UncontrolledAlertProps { +export interface UncontrolledProps { className?: string; cssModule?: CSSModule; color?: string; @@ -9,11 +9,14 @@ export interface UncontrolledAlertProps { transitionEnterTimeout?: number; transitionLeaveTimeout?: number; } +export interface UncontrolledAlertProps extends UncontrolledProps { + /* intentionally blank */ +} export interface AlertProps extends UncontrolledAlertProps { isOpen?: boolean; toggle?: () => void; } -export const Alert: React.StatelessComponent; +declare const Alert: React.StatelessComponent; export default Alert; diff --git a/types/reactstrap/lib/Badge.d.ts b/types/reactstrap/lib/Badge.d.ts index 328e3abf36..b58faeed8c 100644 --- a/types/reactstrap/lib/Badge.d.ts +++ b/types/reactstrap/lib/Badge.d.ts @@ -8,5 +8,5 @@ export interface BadgeProps { cssModule?: CSSModule; } -export const Badge: React.StatelessComponent; +declare const Badge: React.StatelessComponent; export default Badge; diff --git a/types/reactstrap/lib/Breadcrumb.d.ts b/types/reactstrap/lib/Breadcrumb.d.ts index 62ccf477a9..4b5e2b85da 100644 --- a/types/reactstrap/lib/Breadcrumb.d.ts +++ b/types/reactstrap/lib/Breadcrumb.d.ts @@ -6,5 +6,5 @@ export interface BreadcrumbProps { cssModule?: CSSModule; } -export const Breadcrumb: React.StatelessComponent; +declare const Breadcrumb: React.StatelessComponent; export default Breadcrumb; diff --git a/types/reactstrap/lib/BreadcrumbItem.d.ts b/types/reactstrap/lib/BreadcrumbItem.d.ts index 81d18f0f76..4cb8d77c75 100644 --- a/types/reactstrap/lib/BreadcrumbItem.d.ts +++ b/types/reactstrap/lib/BreadcrumbItem.d.ts @@ -10,5 +10,5 @@ export interface BreadcrumbItemProps { [others: string]: any; } -export const BreadcrumbItem: React.StatelessComponent; +declare const BreadcrumbItem: React.StatelessComponent; export default BreadcrumbItem; diff --git a/types/reactstrap/lib/Button.d.ts b/types/reactstrap/lib/Button.d.ts index f4a8b4e4cd..50f69b1fb1 100644 --- a/types/reactstrap/lib/Button.d.ts +++ b/types/reactstrap/lib/Button.d.ts @@ -17,5 +17,5 @@ export interface ButtonProps extends React.HTMLProps { cssModule?: CSSModule; } -export const Button: React.StatelessComponent; +declare const Button: React.StatelessComponent; export default Button; diff --git a/types/reactstrap/lib/ButtonDropdown.d.ts b/types/reactstrap/lib/ButtonDropdown.d.ts index 284818f88f..fd09d6da8f 100644 --- a/types/reactstrap/lib/ButtonDropdown.d.ts +++ b/types/reactstrap/lib/ButtonDropdown.d.ts @@ -1,9 +1,15 @@ import { UncontrolledDropdownProps, DropdownProps } from './Dropdown'; -// tslint:disable-next-line -export interface UncontrolledButtonDropdownProps extends UncontrolledDropdownProps { } -// tslint:disable-next-line -export interface ButtonDropdownProps extends DropdownProps { } +export interface UncontrolledProps extends UncontrolledDropdownProps { + /* intentionally blank */ +} +export interface UncontrolledButtonDropdownProps extends UncontrolledProps { + /* intentionally blank */ +} -export const ButtonDropdown: React.StatelessComponent; +export interface ButtonDropdownProps extends DropdownProps { + /* intentionally blank */ +} + +declare const ButtonDropdown: React.StatelessComponent; export default ButtonDropdown; diff --git a/types/reactstrap/lib/ButtonGroup.d.ts b/types/reactstrap/lib/ButtonGroup.d.ts index cf51a29326..29bbaac38b 100644 --- a/types/reactstrap/lib/ButtonGroup.d.ts +++ b/types/reactstrap/lib/ButtonGroup.d.ts @@ -10,5 +10,5 @@ export interface ButtonGroupProps { vertical?: boolean; } -export const ButtonGroup: React.StatelessComponent; +declare const ButtonGroup: React.StatelessComponent; export default ButtonGroup; diff --git a/types/reactstrap/lib/ButtonToolbar.d.ts b/types/reactstrap/lib/ButtonToolbar.d.ts index e57b84337a..1c782c5745 100644 --- a/types/reactstrap/lib/ButtonToolbar.d.ts +++ b/types/reactstrap/lib/ButtonToolbar.d.ts @@ -8,5 +8,5 @@ export interface ButtonToolbarProps { role?: string; } -export const ButtonToolbar: React.StatelessComponent; +declare const ButtonToolbar: React.StatelessComponent; export default ButtonToolbar; diff --git a/types/reactstrap/lib/Card.d.ts b/types/reactstrap/lib/Card.d.ts index 8398d3b631..97aafdc3e3 100644 --- a/types/reactstrap/lib/Card.d.ts +++ b/types/reactstrap/lib/Card.d.ts @@ -11,5 +11,5 @@ export interface CardProps { style?: React.CSSProperties; } -export const Card: React.StatelessComponent; +declare const Card: React.StatelessComponent; export default Card; diff --git a/types/reactstrap/lib/CardBlock.d.ts b/types/reactstrap/lib/CardBlock.d.ts index a4eae1cf6e..9830e15e6a 100644 --- a/types/reactstrap/lib/CardBlock.d.ts +++ b/types/reactstrap/lib/CardBlock.d.ts @@ -6,5 +6,5 @@ export interface CardBlockProps { cssModule?: CSSModule; } -export const CardBlock: React.StatelessComponent; +declare const CardBlock: React.StatelessComponent; export default CardBlock; diff --git a/types/reactstrap/lib/CardBody.d.ts b/types/reactstrap/lib/CardBody.d.ts index 9ff4ba1f7e..433a6a6ac0 100644 --- a/types/reactstrap/lib/CardBody.d.ts +++ b/types/reactstrap/lib/CardBody.d.ts @@ -6,5 +6,5 @@ export interface CardBodyProps { cssModule?: CSSModule; } -export const CardBody: React.StatelessComponent; +declare const CardBody: React.StatelessComponent; export default CardBody; diff --git a/types/reactstrap/lib/CardColumns.d.ts b/types/reactstrap/lib/CardColumns.d.ts index 4853240671..92eb2019ec 100644 --- a/types/reactstrap/lib/CardColumns.d.ts +++ b/types/reactstrap/lib/CardColumns.d.ts @@ -6,5 +6,5 @@ export interface CardColumnsProps { cssModule?: CSSModule; } -export const CardColumns: React.StatelessComponent; +declare const CardColumns: React.StatelessComponent; export default CardColumns; diff --git a/types/reactstrap/lib/CardDeck.d.ts b/types/reactstrap/lib/CardDeck.d.ts index 963d617383..c14324df37 100644 --- a/types/reactstrap/lib/CardDeck.d.ts +++ b/types/reactstrap/lib/CardDeck.d.ts @@ -6,5 +6,5 @@ export interface CardDeckProps { cssModule?: CSSModule; } -export const CardDeck: React.StatelessComponent; +declare const CardDeck: React.StatelessComponent; export default CardDeck; diff --git a/types/reactstrap/lib/CardFooter.d.ts b/types/reactstrap/lib/CardFooter.d.ts index 415406a14c..6dba776a38 100644 --- a/types/reactstrap/lib/CardFooter.d.ts +++ b/types/reactstrap/lib/CardFooter.d.ts @@ -6,5 +6,5 @@ export interface CardFooterProps { cssModule?: CSSModule; } -export const CardFooter: React.StatelessComponent; +declare const CardFooter: React.StatelessComponent; export default CardFooter; diff --git a/types/reactstrap/lib/CardGroup.d.ts b/types/reactstrap/lib/CardGroup.d.ts index be69f617e7..695747eef4 100644 --- a/types/reactstrap/lib/CardGroup.d.ts +++ b/types/reactstrap/lib/CardGroup.d.ts @@ -6,5 +6,5 @@ export interface CardGroupProps { cssModule?: CSSModule; } -export const CardGroup: React.StatelessComponent; +declare const CardGroup: React.StatelessComponent; export default CardGroup; diff --git a/types/reactstrap/lib/CardHeader.d.ts b/types/reactstrap/lib/CardHeader.d.ts index e9a468e2e4..306ff445e3 100644 --- a/types/reactstrap/lib/CardHeader.d.ts +++ b/types/reactstrap/lib/CardHeader.d.ts @@ -6,5 +6,5 @@ export interface CardHeaderProps { cssModule?: CSSModule; } -export const CardHeader: React.StatelessComponent; +declare const CardHeader: React.StatelessComponent; export default CardHeader; diff --git a/types/reactstrap/lib/CardImg.d.ts b/types/reactstrap/lib/CardImg.d.ts index 76bd9a18f2..e65cba66e2 100644 --- a/types/reactstrap/lib/CardImg.d.ts +++ b/types/reactstrap/lib/CardImg.d.ts @@ -12,5 +12,5 @@ export interface CardImgProps { alt?: string; } -export const CardImg: React.StatelessComponent; +declare const CardImg: React.StatelessComponent; export default CardImg; diff --git a/types/reactstrap/lib/CardImgOverlay.d.ts b/types/reactstrap/lib/CardImgOverlay.d.ts index 0511d38e8b..d31e96d76f 100644 --- a/types/reactstrap/lib/CardImgOverlay.d.ts +++ b/types/reactstrap/lib/CardImgOverlay.d.ts @@ -6,5 +6,5 @@ export interface CardImgOverlayProps { cssModule?: CSSModule; } -export const CardImgOverlay: React.StatelessComponent; +declare const CardImgOverlay: React.StatelessComponent; export default CardImgOverlay; diff --git a/types/reactstrap/lib/CardLink.d.ts b/types/reactstrap/lib/CardLink.d.ts index 68ef38fa62..22c9d614b3 100644 --- a/types/reactstrap/lib/CardLink.d.ts +++ b/types/reactstrap/lib/CardLink.d.ts @@ -8,5 +8,5 @@ export interface CardLinkProps { href?: string; } -export const CardLink: React.StatelessComponent; +declare const CardLink: React.StatelessComponent; export default CardLink; diff --git a/types/reactstrap/lib/CardSubtitle.d.ts b/types/reactstrap/lib/CardSubtitle.d.ts index 5c2cbe574f..915c69c93f 100644 --- a/types/reactstrap/lib/CardSubtitle.d.ts +++ b/types/reactstrap/lib/CardSubtitle.d.ts @@ -6,5 +6,5 @@ export interface CardSubtitleProps { cssModule?: CSSModule; } -export const CardSubtitle: React.StatelessComponent; +declare const CardSubtitle: React.StatelessComponent; export default CardSubtitle; diff --git a/types/reactstrap/lib/CardText.d.ts b/types/reactstrap/lib/CardText.d.ts index 1b411717f5..3782e962be 100644 --- a/types/reactstrap/lib/CardText.d.ts +++ b/types/reactstrap/lib/CardText.d.ts @@ -6,5 +6,5 @@ export interface CardTextProps { cssModule?: CSSModule; } -export const CardText: React.StatelessComponent; +declare const CardText: React.StatelessComponent; export default CardText; diff --git a/types/reactstrap/lib/CardTitle.d.ts b/types/reactstrap/lib/CardTitle.d.ts index 483a47adb7..f551d860ab 100644 --- a/types/reactstrap/lib/CardTitle.d.ts +++ b/types/reactstrap/lib/CardTitle.d.ts @@ -6,5 +6,5 @@ export interface CardTitleProps { cssModule?: CSSModule; } -export const CardTitle: React.StatelessComponent; +declare const CardTitle: React.StatelessComponent; export default CardTitle; diff --git a/types/reactstrap/lib/Col.d.ts b/types/reactstrap/lib/Col.d.ts index c1bc6a0cd9..b0aa8f98c1 100644 --- a/types/reactstrap/lib/Col.d.ts +++ b/types/reactstrap/lib/Col.d.ts @@ -20,5 +20,5 @@ export interface ColProps extends React.HTMLProps { widths?: string[]; } -export const Col: React.StatelessComponent; +declare const Col: React.StatelessComponent; export default Col; diff --git a/types/reactstrap/lib/Collapse.d.ts b/types/reactstrap/lib/Collapse.d.ts index d926fd677d..d2c6bc0c70 100644 --- a/types/reactstrap/lib/Collapse.d.ts +++ b/types/reactstrap/lib/Collapse.d.ts @@ -14,5 +14,5 @@ export interface CollapseProps extends React.HTMLProps { onClosed?: () => void; } -export const Collapse: React.StatelessComponent; +declare const Collapse: React.StatelessComponent; export default Collapse; diff --git a/types/reactstrap/lib/Container.d.ts b/types/reactstrap/lib/Container.d.ts index 63906b7bf3..4721cf68c1 100644 --- a/types/reactstrap/lib/Container.d.ts +++ b/types/reactstrap/lib/Container.d.ts @@ -7,5 +7,5 @@ export interface ContainerProps { cssModule?: CSSModule; } -export const Container: React.StatelessComponent; +declare const Container: React.StatelessComponent; export default Container; diff --git a/types/reactstrap/lib/Dropdown.d.ts b/types/reactstrap/lib/Dropdown.d.ts index 93a0ee1ce5..38bfe65b63 100644 --- a/types/reactstrap/lib/Dropdown.d.ts +++ b/types/reactstrap/lib/Dropdown.d.ts @@ -2,14 +2,17 @@ import { CSSModule } from '../index'; -export interface UncontrolledDropdownProps { +export interface UncontrolledProps { isOpen?: boolean; toggle?: () => void; className?: string; cssModule?: CSSModule; } +export interface UncontrolledDropdownProps extends UncontrolledProps { + /* intentionally blank */ +} -export interface DropdownProps extends UncontrolledDropdownProps { +export interface Props extends UncontrolledProps { disabled?: boolean; dropup?: boolean; group?: boolean; @@ -17,6 +20,9 @@ export interface DropdownProps extends UncontrolledDropdownProps { tag?: React.ReactType; tether?: boolean | Tether.ITetherOptions; } +export interface DropdownProps extends Props { + /* intentionally blank */ +} -export const Dropdown: React.StatelessComponent; +declare const Dropdown: React.StatelessComponent; export default Dropdown; diff --git a/types/reactstrap/lib/DropdownItem.d.ts b/types/reactstrap/lib/DropdownItem.d.ts index 194d89bf0b..963f1e3865 100644 --- a/types/reactstrap/lib/DropdownItem.d.ts +++ b/types/reactstrap/lib/DropdownItem.d.ts @@ -12,5 +12,5 @@ export interface DropdownItemProps { toggle?: boolean; } -export const DropdownItem: React.StatelessComponent; +declare const DropdownItem: React.StatelessComponent; export default DropdownItem; diff --git a/types/reactstrap/lib/DropdownMenu.d.ts b/types/reactstrap/lib/DropdownMenu.d.ts index 1bbf642a09..04ca074b41 100644 --- a/types/reactstrap/lib/DropdownMenu.d.ts +++ b/types/reactstrap/lib/DropdownMenu.d.ts @@ -7,5 +7,5 @@ export interface DropdownMenuProps { cssModule?: CSSModule; } -export const DropdownMenu: React.StatelessComponent; +declare const DropdownMenu: React.StatelessComponent; export default DropdownMenu; diff --git a/types/reactstrap/lib/DropdownToggle.d.ts b/types/reactstrap/lib/DropdownToggle.d.ts index 8f395b998d..51028815d4 100644 --- a/types/reactstrap/lib/DropdownToggle.d.ts +++ b/types/reactstrap/lib/DropdownToggle.d.ts @@ -15,5 +15,5 @@ export interface DropdownToggleProps { size?: string; } -export const DropdownToggle: React.StatelessComponent; +declare const DropdownToggle: React.StatelessComponent; export default DropdownToggle; diff --git a/types/reactstrap/lib/Fade.d.ts b/types/reactstrap/lib/Fade.d.ts index ab77d7fb61..6f86b33846 100644 --- a/types/reactstrap/lib/Fade.d.ts +++ b/types/reactstrap/lib/Fade.d.ts @@ -16,5 +16,5 @@ export interface FadeProps { onEnter?: () => void; } -export const Fade: React.StatelessComponent; +declare const Fade: React.StatelessComponent; export default Fade; diff --git a/types/reactstrap/lib/Form.d.ts b/types/reactstrap/lib/Form.d.ts index 507b617a12..997f4c4e5c 100644 --- a/types/reactstrap/lib/Form.d.ts +++ b/types/reactstrap/lib/Form.d.ts @@ -8,5 +8,5 @@ export interface FormProps extends React.HTMLProps { cssModule?: CSSModule; } -export const Form: React.StatelessComponent; +declare const Form: React.StatelessComponent; export default Form; diff --git a/types/reactstrap/lib/FormFeedback.d.ts b/types/reactstrap/lib/FormFeedback.d.ts index e9479bc53d..20e9b27745 100644 --- a/types/reactstrap/lib/FormFeedback.d.ts +++ b/types/reactstrap/lib/FormFeedback.d.ts @@ -6,5 +6,5 @@ export interface FormFeedbackProps { cssModule?: CSSModule; } -export const FormFeedback: React.StatelessComponent; +declare const FormFeedback: React.StatelessComponent; export default FormFeedback; diff --git a/types/reactstrap/lib/FormGroup.d.ts b/types/reactstrap/lib/FormGroup.d.ts index c3e4d384db..5827f2c17b 100644 --- a/types/reactstrap/lib/FormGroup.d.ts +++ b/types/reactstrap/lib/FormGroup.d.ts @@ -10,5 +10,5 @@ export interface FormGroupProps extends React.HTMLProps { cssModule?: CSSModule; } -export const FormGroup: React.StatelessComponent; +declare const FormGroup: React.StatelessComponent; export default FormGroup; diff --git a/types/reactstrap/lib/FormText.d.ts b/types/reactstrap/lib/FormText.d.ts index ca4e1858fe..a749d6fc30 100644 --- a/types/reactstrap/lib/FormText.d.ts +++ b/types/reactstrap/lib/FormText.d.ts @@ -8,5 +8,5 @@ export interface FormTextProps { cssModule?: CSSModule; } -export const FormText: React.StatelessComponent; +declare const FormText: React.StatelessComponent; export default FormText; diff --git a/types/reactstrap/lib/Input.d.ts b/types/reactstrap/lib/Input.d.ts index cc7377ca1f..f5c5ac1d02 100644 --- a/types/reactstrap/lib/Input.d.ts +++ b/types/reactstrap/lib/Input.d.ts @@ -40,13 +40,11 @@ export interface InputProps extends Intermediate { valid?: boolean; tag?: React.ReactType; innerRef?: string | ((instance: HTMLInputElement) => any); - static?: boolean; + plaintext?: boolean; addon?: boolean; className?: string; cssModule?: CSSModule; - // We don't have the property 'static' here because 'static' is a reserved keyword in TypeScript - // Maybe reactstrap will support an 'isStatic' alias in the future } -export const Input: React.StatelessComponent; +declare const Input: React.StatelessComponent; export default Input; diff --git a/types/reactstrap/lib/InputGroup.d.ts b/types/reactstrap/lib/InputGroup.d.ts index 9a6ac719bb..22f3ba027c 100644 --- a/types/reactstrap/lib/InputGroup.d.ts +++ b/types/reactstrap/lib/InputGroup.d.ts @@ -7,5 +7,5 @@ export interface InputGroupProps { cssModule?: CSSModule; } -export const InputGroup: React.StatelessComponent; +declare const InputGroup: React.StatelessComponent; export default InputGroup; diff --git a/types/reactstrap/lib/InputGroupAddon.d.ts b/types/reactstrap/lib/InputGroupAddon.d.ts index 63ac88c455..31f5af505d 100644 --- a/types/reactstrap/lib/InputGroupAddon.d.ts +++ b/types/reactstrap/lib/InputGroupAddon.d.ts @@ -6,5 +6,5 @@ export interface InputGroupAddonProps { cssModule?: CSSModule; } -export const InputGroupAddon: React.StatelessComponent; +declare const InputGroupAddon: React.StatelessComponent; export default InputGroupAddon; diff --git a/types/reactstrap/lib/InputGroupButton.d.ts b/types/reactstrap/lib/InputGroupButton.d.ts index f51c61b3d1..0d77701932 100644 --- a/types/reactstrap/lib/InputGroupButton.d.ts +++ b/types/reactstrap/lib/InputGroupButton.d.ts @@ -9,5 +9,5 @@ export interface InputGroupButtonProps { color?: string; } -export const InputGroupButton: React.StatelessComponent; +declare const InputGroupButton: React.StatelessComponent; export default InputGroupButton; diff --git a/types/reactstrap/lib/Jumbotron.d.ts b/types/reactstrap/lib/Jumbotron.d.ts index 885bbe5f8f..6cb94c04c1 100644 --- a/types/reactstrap/lib/Jumbotron.d.ts +++ b/types/reactstrap/lib/Jumbotron.d.ts @@ -7,5 +7,5 @@ export interface JumbotronProps { cssModule?: CSSModule; } -export const Jumbotron: React.StatelessComponent; +declare const Jumbotron: React.StatelessComponent; export default Jumbotron; diff --git a/types/reactstrap/lib/Label.d.ts b/types/reactstrap/lib/Label.d.ts index 26728059e0..ae73e100f4 100644 --- a/types/reactstrap/lib/Label.d.ts +++ b/types/reactstrap/lib/Label.d.ts @@ -22,5 +22,5 @@ export interface LabelProps extends Intermediate { xl?: ColumnProps; } -export const Label: React.StatelessComponent; +declare const Label: React.StatelessComponent; export default Label; diff --git a/types/reactstrap/lib/ListGroup.d.ts b/types/reactstrap/lib/ListGroup.d.ts index aec7fa4045..a2a088935b 100644 --- a/types/reactstrap/lib/ListGroup.d.ts +++ b/types/reactstrap/lib/ListGroup.d.ts @@ -7,5 +7,5 @@ export interface ListGroupProps { cssModule?: CSSModule; } -export const ListGroup: React.StatelessComponent; +declare const ListGroup: React.StatelessComponent; export default ListGroup; diff --git a/types/reactstrap/lib/ListGroupItem.d.ts b/types/reactstrap/lib/ListGroupItem.d.ts index 5b610f87e2..d2cb1a9e67 100644 --- a/types/reactstrap/lib/ListGroupItem.d.ts +++ b/types/reactstrap/lib/ListGroupItem.d.ts @@ -13,5 +13,5 @@ export interface ListGroupItemProps { onClick?: React.MouseEventHandler; } -export const ListGroupItem: React.StatelessComponent; +declare const ListGroupItem: React.StatelessComponent; export default ListGroupItem; diff --git a/types/reactstrap/lib/ListGroupItemHeading.d.ts b/types/reactstrap/lib/ListGroupItemHeading.d.ts index 3e8d83a0dc..0f5bdfb457 100644 --- a/types/reactstrap/lib/ListGroupItemHeading.d.ts +++ b/types/reactstrap/lib/ListGroupItemHeading.d.ts @@ -6,5 +6,5 @@ export interface ListGroupItemHeadingProps { cssModule?: CSSModule; } -export const ListGroupItemHeading: React.StatelessComponent; +declare const ListGroupItemHeading: React.StatelessComponent; export default ListGroupItemHeading; diff --git a/types/reactstrap/lib/ListGroupItemText.d.ts b/types/reactstrap/lib/ListGroupItemText.d.ts index ad83a45831..7010eb1289 100644 --- a/types/reactstrap/lib/ListGroupItemText.d.ts +++ b/types/reactstrap/lib/ListGroupItemText.d.ts @@ -6,5 +6,5 @@ export interface ListGroupItemTextProps { cssModule?: CSSModule; } -export const ListGroupItemText: React.StatelessComponent; +declare const ListGroupItemText: React.StatelessComponent; export default ListGroupItemText; diff --git a/types/reactstrap/lib/Media.d.ts b/types/reactstrap/lib/Media.d.ts index 17b65f25f0..daf4fadcc8 100644 --- a/types/reactstrap/lib/Media.d.ts +++ b/types/reactstrap/lib/Media.d.ts @@ -17,5 +17,5 @@ export interface MediaProps { alt?: string; } -export const Media: React.StatelessComponent; +declare const Media: React.StatelessComponent; export default Media; diff --git a/types/reactstrap/lib/Modal.d.ts b/types/reactstrap/lib/Modal.d.ts index 77122f64b4..5fc1ffc734 100644 --- a/types/reactstrap/lib/Modal.d.ts +++ b/types/reactstrap/lib/Modal.d.ts @@ -19,5 +19,5 @@ export interface ModalProps { fade?: boolean; } -export const Modal: React.StatelessComponent; +declare const Modal: React.StatelessComponent; export default Modal; diff --git a/types/reactstrap/lib/ModalBody.d.ts b/types/reactstrap/lib/ModalBody.d.ts index a2693cbf28..1467b5883a 100644 --- a/types/reactstrap/lib/ModalBody.d.ts +++ b/types/reactstrap/lib/ModalBody.d.ts @@ -6,5 +6,5 @@ export interface ModalBodyProps { cssModule?: CSSModule; } -export const ModalBody: React.StatelessComponent; +declare const ModalBody: React.StatelessComponent; export default ModalBody; diff --git a/types/reactstrap/lib/ModalFooter.d.ts b/types/reactstrap/lib/ModalFooter.d.ts index 0241dcde84..ae511eb7cc 100644 --- a/types/reactstrap/lib/ModalFooter.d.ts +++ b/types/reactstrap/lib/ModalFooter.d.ts @@ -6,5 +6,5 @@ export interface ModalFooterProps { cssModule?: CSSModule; } -export const ModalFooter: React.StatelessComponent; +declare const ModalFooter: React.StatelessComponent; export default ModalFooter; diff --git a/types/reactstrap/lib/ModalHeader.d.ts b/types/reactstrap/lib/ModalHeader.d.ts index a235d73183..47632f59e3 100644 --- a/types/reactstrap/lib/ModalHeader.d.ts +++ b/types/reactstrap/lib/ModalHeader.d.ts @@ -8,5 +8,5 @@ export interface ModalHeaderProps { toggle?: () => void; } -export const ModalHeader: React.StatelessComponent; +declare const ModalHeader: React.StatelessComponent; export default ModalHeader; diff --git a/types/reactstrap/lib/Nav.d.ts b/types/reactstrap/lib/Nav.d.ts index 23bf1e58c5..c29c9a6460 100644 --- a/types/reactstrap/lib/Nav.d.ts +++ b/types/reactstrap/lib/Nav.d.ts @@ -13,5 +13,5 @@ export interface NavProps extends React.HTMLProps { vertical?: boolean; } -export const Nav: React.StatelessComponent; +declare const Nav: React.StatelessComponent; export default Nav; diff --git a/types/reactstrap/lib/NavDropdown.d.ts b/types/reactstrap/lib/NavDropdown.d.ts index 22e408489b..e40e60601c 100644 --- a/types/reactstrap/lib/NavDropdown.d.ts +++ b/types/reactstrap/lib/NavDropdown.d.ts @@ -1,9 +1,15 @@ import { UncontrolledDropdownProps, DropdownProps } from './Dropdown'; -// tslint:disable-next-line -export interface UncontrolledNavDropdownProps extends UncontrolledDropdownProps { } -// tslint:disable-next-line -export interface NavDropdownProps extends DropdownProps { } +export interface UncontrolledProps extends UncontrolledDropdownProps { + /* intentionally blank */ +} +export interface UncontrolledNavDropdownProps extends UncontrolledProps { + /* intentionally blank */ +} -export const NavDropdown: React.StatelessComponent; +export interface NavDropdownProps extends DropdownProps { + /* intentionally blank */ +} + +declare const NavDropdown: React.StatelessComponent; export default NavDropdown; diff --git a/types/reactstrap/lib/NavItem.d.ts b/types/reactstrap/lib/NavItem.d.ts index cb32a4fad1..0769347298 100644 --- a/types/reactstrap/lib/NavItem.d.ts +++ b/types/reactstrap/lib/NavItem.d.ts @@ -6,5 +6,5 @@ export interface NavItemProps { cssModule?: CSSModule; } -export const NavItem: React.StatelessComponent; +declare const NavItem: React.StatelessComponent; export default NavItem; diff --git a/types/reactstrap/lib/NavLink.d.ts b/types/reactstrap/lib/NavLink.d.ts index 7fa907c453..53640c65e1 100644 --- a/types/reactstrap/lib/NavLink.d.ts +++ b/types/reactstrap/lib/NavLink.d.ts @@ -11,5 +11,5 @@ export interface NavLinkProps extends React.HTMLProps { href?: string; } -export const NavLink: React.StatelessComponent; +declare const NavLink: React.StatelessComponent; export default NavLink; diff --git a/types/reactstrap/lib/Navbar.d.ts b/types/reactstrap/lib/Navbar.d.ts index fd52feeae8..ed3f28a02c 100644 --- a/types/reactstrap/lib/Navbar.d.ts +++ b/types/reactstrap/lib/Navbar.d.ts @@ -16,5 +16,5 @@ export interface NavbarProps { expand?: boolean | string; } -export const Navbar: React.StatelessComponent; +declare const Navbar: React.StatelessComponent; export default Navbar; diff --git a/types/reactstrap/lib/NavbarBrand.d.ts b/types/reactstrap/lib/NavbarBrand.d.ts index 8e3328ab81..83ac8367b5 100644 --- a/types/reactstrap/lib/NavbarBrand.d.ts +++ b/types/reactstrap/lib/NavbarBrand.d.ts @@ -6,5 +6,5 @@ export interface NavbarBrandProps extends React.HTMLProps { cssModule?: CSSModule; } -export const NavbarBrand: React.StatelessComponent; +declare const NavbarBrand: React.StatelessComponent; export default NavbarBrand; diff --git a/types/reactstrap/lib/NavbarToggler.d.ts b/types/reactstrap/lib/NavbarToggler.d.ts index 1855e2c41c..1eea9880a5 100644 --- a/types/reactstrap/lib/NavbarToggler.d.ts +++ b/types/reactstrap/lib/NavbarToggler.d.ts @@ -9,5 +9,5 @@ export interface NavbarTogglerProps extends React.HTMLProps { left?: boolean; } -export const NavbarToggler: React.StatelessComponent; +declare const NavbarToggler: React.StatelessComponent; export default NavbarToggler; diff --git a/types/reactstrap/lib/Pagination.d.ts b/types/reactstrap/lib/Pagination.d.ts index dd1a0c9d51..7657d90206 100644 --- a/types/reactstrap/lib/Pagination.d.ts +++ b/types/reactstrap/lib/Pagination.d.ts @@ -6,5 +6,5 @@ export interface PaginationProps { size?: string; } -export const Pagination: React.StatelessComponent; +declare const Pagination: React.StatelessComponent; export default Pagination; diff --git a/types/reactstrap/lib/PaginationItem.d.ts b/types/reactstrap/lib/PaginationItem.d.ts index 1e8efa8712..c2eadfab97 100644 --- a/types/reactstrap/lib/PaginationItem.d.ts +++ b/types/reactstrap/lib/PaginationItem.d.ts @@ -8,5 +8,5 @@ export interface PaginationItemProps { tag?: React.ReactType; } -export const PaginationItem: React.StatelessComponent; +declare const PaginationItem: React.StatelessComponent; export default PaginationItem; diff --git a/types/reactstrap/lib/PaginationLink.d.ts b/types/reactstrap/lib/PaginationLink.d.ts index c57bee37ac..52fbc6353a 100644 --- a/types/reactstrap/lib/PaginationLink.d.ts +++ b/types/reactstrap/lib/PaginationLink.d.ts @@ -9,5 +9,5 @@ export interface PaginationLinkProps extends React.HTMLProps tag?: React.ReactType; } -export const PaginationLink: React.StatelessComponent; +declare const PaginationLink: React.StatelessComponent; export default PaginationLink; diff --git a/types/reactstrap/lib/Popover.d.ts b/types/reactstrap/lib/Popover.d.ts index e9e757572e..dcded7ab68 100644 --- a/types/reactstrap/lib/Popover.d.ts +++ b/types/reactstrap/lib/Popover.d.ts @@ -30,5 +30,5 @@ export interface PopoverProps { toggle?: () => void; } -export const Popover: React.StatelessComponent; +declare const Popover: React.StatelessComponent; export default Popover; diff --git a/types/reactstrap/lib/PopoverBody.d.ts b/types/reactstrap/lib/PopoverBody.d.ts index de2d61f5e2..93512cacb1 100644 --- a/types/reactstrap/lib/PopoverBody.d.ts +++ b/types/reactstrap/lib/PopoverBody.d.ts @@ -6,5 +6,5 @@ export interface PopoverBodyProps { cssModule?: CSSModule; } -export const PopoverBody: React.StatelessComponent; +declare const PopoverBody: React.StatelessComponent; export default PopoverBody; diff --git a/types/reactstrap/lib/PopoverHeader.d.ts b/types/reactstrap/lib/PopoverHeader.d.ts index 7f38988391..2ad69c636c 100644 --- a/types/reactstrap/lib/PopoverHeader.d.ts +++ b/types/reactstrap/lib/PopoverHeader.d.ts @@ -6,5 +6,5 @@ export interface PopoverHeaderProps { cssModule?: CSSModule; } -export const PopoverHeader: React.StatelessComponent; +declare const PopoverHeader: React.StatelessComponent; export default PopoverHeader; diff --git a/types/reactstrap/lib/Progress.d.ts b/types/reactstrap/lib/Progress.d.ts index 9ab522746c..89e9df4be9 100644 --- a/types/reactstrap/lib/Progress.d.ts +++ b/types/reactstrap/lib/Progress.d.ts @@ -14,5 +14,5 @@ export interface ProgressProps { barClassName?: string; } -export const Progress: React.StatelessComponent; +declare const Progress: React.StatelessComponent; export default Progress; diff --git a/types/reactstrap/lib/Row.d.ts b/types/reactstrap/lib/Row.d.ts index 30d202e919..e5553ff81f 100644 --- a/types/reactstrap/lib/Row.d.ts +++ b/types/reactstrap/lib/Row.d.ts @@ -7,5 +7,5 @@ export interface RowProps extends React.HTMLProps< HTMLElement> { noGutters?: boolean; } -export const Row: React.StatelessComponent; +declare const Row: React.StatelessComponent; export default Row; diff --git a/types/reactstrap/lib/TabContent.d.ts b/types/reactstrap/lib/TabContent.d.ts index 1aced21b02..2581ea7a93 100644 --- a/types/reactstrap/lib/TabContent.d.ts +++ b/types/reactstrap/lib/TabContent.d.ts @@ -7,5 +7,5 @@ export interface TabContentProps { cssModule?: CSSModule; } -export const TabContent: React.StatelessComponent; +declare const TabContent: React.StatelessComponent; export default TabContent; diff --git a/types/reactstrap/lib/TabPane.d.ts b/types/reactstrap/lib/TabPane.d.ts index 1d588e7304..a39398d59b 100644 --- a/types/reactstrap/lib/TabPane.d.ts +++ b/types/reactstrap/lib/TabPane.d.ts @@ -7,5 +7,5 @@ export interface TabPaneProps { tabId?: number | string; } -export const TabPane: React.StatelessComponent; +declare const TabPane: React.StatelessComponent; export default TabPane; diff --git a/types/reactstrap/lib/Table.d.ts b/types/reactstrap/lib/Table.d.ts index b49c6a5920..c2d31d71e2 100644 --- a/types/reactstrap/lib/Table.d.ts +++ b/types/reactstrap/lib/Table.d.ts @@ -14,5 +14,5 @@ export interface TableProps { responsiveTag?: React.ReactType; } -export const Table: React.StatelessComponent; +declare const Table: React.StatelessComponent; export default Table; diff --git a/types/reactstrap/lib/Tag.d.ts b/types/reactstrap/lib/Tag.d.ts index 0f2ed5bd07..153ff61177 100644 --- a/types/reactstrap/lib/Tag.d.ts +++ b/types/reactstrap/lib/Tag.d.ts @@ -8,5 +8,5 @@ export interface TagProps { cssModule?: CSSModule; } -export const Tag: React.StatelessComponent; +declare const Tag: React.StatelessComponent; export default Tag; diff --git a/types/reactstrap/lib/TetherContent.d.ts b/types/reactstrap/lib/TetherContent.d.ts index 7dd32ae381..54f0190090 100644 --- a/types/reactstrap/lib/TetherContent.d.ts +++ b/types/reactstrap/lib/TetherContent.d.ts @@ -14,5 +14,5 @@ export interface TetherContentProps { style?: React.CSSProperties; } -export const TetherContent: React.StatelessComponent; +declare const TetherContent: React.StatelessComponent; export default TetherContent; diff --git a/types/reactstrap/lib/Tooltip.d.ts b/types/reactstrap/lib/Tooltip.d.ts index 21a99707e8..a6183668bf 100644 --- a/types/reactstrap/lib/Tooltip.d.ts +++ b/types/reactstrap/lib/Tooltip.d.ts @@ -20,7 +20,7 @@ type Placement | 'left middle' | 'left bottom'; -export interface UncontrolledTooltipProps { +export interface UncontrolledProps { placement?: Placement; target: string; disabled?: boolean; @@ -31,11 +31,14 @@ export interface UncontrolledTooltipProps { autohide?: boolean; delay?: number | { show: number, hide: number }; } +export interface UncontrolledTooltipProps extends UncontrolledProps { + /* intentionally blank */ +} export interface TooltipProps extends UncontrolledTooltipProps { toggle?: () => void; isOpen?: boolean; } -export const Tooltip: React.StatelessComponent; +declare const Tooltip: React.StatelessComponent; export default Tooltip; From 335df032c70764c34be382c89e830d42b908ff20 Mon Sep 17 00:00:00 2001 From: Kyle Roach Date: Mon, 4 Dec 2017 17:05:43 -0400 Subject: [PATCH 31/32] Remove react-native-elements --- notNeededPackages.json | 6 + types/react-native-elements/README.md | 26 - types/react-native-elements/index.d.ts | 2265 ----------------- .../react-native-elements-tests.tsx | 975 ------- types/react-native-elements/tsconfig.json | 25 - types/react-native-elements/tslint.json | 1 - 6 files changed, 6 insertions(+), 3292 deletions(-) delete mode 100644 types/react-native-elements/README.md delete mode 100644 types/react-native-elements/index.d.ts delete mode 100644 types/react-native-elements/react-native-elements-tests.tsx delete mode 100644 types/react-native-elements/tsconfig.json delete mode 100644 types/react-native-elements/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 0e5f946e07..2414ebea00 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -570,6 +570,12 @@ "sourceRepoURL": "https://github.com/gpbl/react-day-picker", "asOfVersion": "5.3.0" }, + { + "libraryName": "react-native-elements", + "typingsPackageName": "react-native-elements", + "sourceRepoURL": "https://github.com/react-native-training/react-native-elements", + "asOfVersion": "0.18" + }, { "libraryName": "realm", "typingsPackageName": "realm", diff --git a/types/react-native-elements/README.md b/types/react-native-elements/README.md deleted file mode 100644 index 9e3975ecdf..0000000000 --- a/types/react-native-elements/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# [React Native Elements](https://github.com/react-native-training/react-native-elements) - -### Component Checklist - -- [x] Buttons -- [x] Badge -- [x] Social Icons / Social Icon Buttons -- [x] Icons -- [x] Side Menu -- [x] Form Elements -- [x] SearchBar -- [x] ButtonGroup -- [x] CheckBoxes -- [x] List Element -- [x] Tab Bar Component -- [x] HTML style headings -- [x] Card component -- [x] Pricing Component -- [x] Grid Component -- [x] Slider Component -- [x] Tile Component -- [x] Avatar Component -- [x] Rating Component -- [x] SwipeDeck Component -- [x] Header Component -- [x] Divider diff --git a/types/react-native-elements/index.d.ts b/types/react-native-elements/index.d.ts deleted file mode 100644 index 821e9b65e7..0000000000 --- a/types/react-native-elements/index.d.ts +++ /dev/null @@ -1,2265 +0,0 @@ -// Type definitions for react-native-elements 0.16 -// Project: https://github.com/react-native-training/react-native-elements#readme -// Definitions by: Kyle Roach -// Ifiok Jr. -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 - -import * as React from 'react'; -import { - ViewStyle, - TextStyle, - Image, - ImageStyle, - ImageURISource, - TouchableWithoutFeedbackProps, - TouchableHighlightProperties, - TouchableOpacityProperties, - ViewProperties, - TextInputProperties, - TextInput, - StatusBarProperties, - KeyboardType, - KeyboardTypeIOS, - StyleProp, - GestureResponderEvent, - Animated, - TransformsStyle -} from 'react-native'; -import TabNavigator from 'react-native-tab-navigator'; - -/** - * Supports auto complete for most used types as well as any other string type. - */ -export type IconType = - | 'material' - | 'material-community' - | 'simple-line-icon' - | 'zocial' - | 'font-awesome' - | 'octicon' - | 'ionicon' - | 'foundation' - | 'evilicon' - | 'entypo' - | string; - -export interface IconObject { - name?: string; - color?: string; - size?: number; - type?: IconType; - style?: StyleProp; -} - -export interface AvatarIcon extends IconObject { - iconStyle?: StyleProp; -} - -export interface TextProps { - /** - * font size 40 - */ - h1?: boolean; - - /** - * font size 34 - */ - h2?: boolean; - - /** - * font size 28 - */ - h3?: boolean; - - /** - * font size 22 - */ - h4?: boolean; - - /** - * font family name - */ - fontFamily?: string; - - /** - * Additional styling for Text - */ - style?: StyleProp; -} - -/** - * HTML Style Headings - * - * @see https://react-native-training.github.io/react-native-elements/API/HTML_style_headings/ - */ -export class Text extends React.Component {} - -export interface AvatarProps { - /** - * Component for enclosing element (eg: TouchableHighlight, View, etc) - * - * @default TouchableOpacity - */ - component?: React.ComponentClass; - - /** - * Width for the Avatar - * - * @default 34 - */ - width?: number; - - /** - * Height for the Avatar - * - * @default 34 - */ - height?: number; - - /** - * Callback function when pressing component - */ - onPress?(): void; - - /** - * Callback function when long pressing component - */ - onLongPress?(): void; - - /** - * Styling for outer container - */ - containerStyle?: StyleProp; - - /** - * Image source - */ - source?: ImageURISource; - - /** - * Style for avatar image - */ - avatarStyle?: ImageStyle; - - /** - * Determines the shape of avatar - * - * @default false - */ - rounded?: boolean; - - /** - * Renders title in the avatar - */ - title?: string; - - /** - * Style for the title - */ - titleStyle?: StyleProp; - - /** - * Style for the view outside image or icon - */ - overlayContainerStyle?: StyleProp; - - /** - * Opacity when pressed - * - * @default 0.2 - */ - activeOpacity?: number; - - /** - * Icon for the avatar - */ - icon?: AvatarIcon; - - /** - * extra styling for icon component - */ - iconStyle?: StyleProp; - - /** - * Small sized icon - */ - small?: boolean; - - /** - * Medium sized icon - */ - medium?: boolean; - - /** - * Large sized icon - */ - large?: boolean; - - /** - * Extra-large sized icon - */ - xlarge?: boolean; -} - -/** - * Avatar Component - * - * @see https://react-native-training.github.io/react-native-elements/API/avatar/ - */ -export class Avatar extends React.Component {} - -export interface ButtonIcon extends IconObject { - buttonStyle?: StyleProp; -} - -export interface ButtonProps extends TouchableWithoutFeedbackProps { - /** - * Specify other component such as TouchableOpacity or other - * - * @default TouchableHighlight (iOS), TouchableNativeFeedback (android) - */ - component?: React.ComponentClass; - - /** - * Additional styling for button component - * - * @default null - */ - buttonStyle?: StyleProp; - - /** - * Button title - */ - title: string; - - /** - * Makes button large - * - * @default false - */ - large?: boolean; - - /** - * Specify different font family - * - * @default System font (iOS), Sans Serif (android) - */ - fontFamily?: string; - - /** - * Specify font weight for title - * - * @default null - */ - fontWeight?: string; - - /** - * Icon configuration for icon on right side of title - */ - iconRight?: ButtonIcon; - - /** - * onPress method - */ - onPress(): void; - - /** - * onLongPress method - */ - onLongPress?(): void; - - /** - * Icon configuration - */ - icon?: ButtonIcon; - - /** - * Specify other icon component instead of default. The component will have all values from the icon prop - * - * @default MaterialIcon - * @see https://github.com/oblador/react-native-vector-icons#icon-component - */ - iconComponent?: JSX.Element; - - /** - * Background color of button - * - * @default #397af8 - */ - backgroundColor?: string; - - /** - * Adds border radius to button - * (Note: if you set this, don't forget to also set borderRadius to containerViewStyle prop, otherwise unexpected behaviour might occur) - * - * @default 0 - */ - borderRadius?: number; - - /** - * Font color - * - * @default #fff - */ - color?: string; - - /** - * Text styling - * - * @default null - */ - textStyle?: StyleProp; - - /** - * Font size - * - * @default 18 - */ - fontSize?: number; - - /** - * Underlay color for button press - * - * @default transparent - */ - underlayColor?: string; - - /** - * Flag to add raised button styling - * - * @default false - */ - raised?: boolean; - - /** - * Indicates button is disabled - * - * @default false - */ - disabled?: boolean; - - /** - * Disabled button styling - * - * @default null - */ - disabledStyle?: StyleProp; - - /** - * Styling for Component container - * - * @default null - */ - containerViewStyle?: StyleProp; - - /** - * Styling for loading spinner - * - * @default null - */ - activityIndicatorStyle?: StyleProp; - - /** - * Display a loading spinner - * - * @default false - */ - loading?: boolean; - - /** - * Display the spinner to the right - * - * @default false - */ - loadingRight?: boolean; -} - -/** - * Button component - * - * @see https://react-native-training.github.io/react-native-elements/API/buttons/ - */ -export class Button extends React.Component {} - -export interface BadgeProps { - /** - * Text value to be displayed by badge - * - * @default null - */ - value?: string | number; - - /** - * Style for the outer badge component - */ - containerStyle?: StyleProp; - - /** - * Style for the outer-most badge component - */ - wrapperStyle?: StyleProp; - - /** - * Style for the text in the badge - */ - textStyle?: StyleProp; - - /** - * Override the default badge contents, mutually exclusive with 'value' property - */ - children?: JSX.Element; - - /** - * Custom component to replace the badge outer component - * - * @default View (if onPress then TouchableOpacity) - */ - component?: React.ComponentClass; - - /** - * Function called when pressed on the badge - */ - onPress?(): void; -} - -/** - * Badge component - * - * @see https://react-native-training.github.io/react-native-elements/API/badge/ - */ -export class Badge extends React.Component {} - -export interface CardProps { - /** - * Flex direction (row or column) - * - * @default 'column' - */ - flexDirection?: 'column' | 'row'; - - /** - * Outer container style - */ - containerStyle?: StyleProp; - - /** - * Inner container style - */ - wrapperStyle?: StyleProp; - - /** - * Card title - */ - title?: string; - - /** - * Additional title styling (if title provided) - */ - titleStyle?: StyleProp; - - /** - * Title rendered over the image - * (only works if image prop is present) - */ - featuredTitle?: string; - - /** - * Styling for featured title - */ - featuredTitleStyle?: StyleProp; - - /** - * Subtitle rendered over the image - * (only works if image prop is present) - */ - featuredSubtitle?: string; - - /** - * Styling for featured subtitle - */ - featuredSubtitleStyle?: StyleProp; - - /** - * Additional divider styling - * (if title provided) - */ - dividerStyle?: StyleProp; - - /** - * Specify different font family - * - * @default System font bold (iOS), Sans Serif Bold (android) - */ - fontFamily?: string; - - /** - * Specify image styling if image is provided - */ - imageStyle?: ImageStyle; - - /** - * Specify styling for view surrounding image - */ - imageWrapperStyle?: StyleProp; - - /** - * Add an image as the heading with the image prop - */ - image?: ImageURISource; -} - -/** - * Card component - * - * @see https://react-native-training.github.io/react-native-elements/API/card/ - */ -export class Card extends React.Component {} - -/** - * Set the buttons within a Group. - */ -export interface ElementObject { - element: JSX.Element | React.ReactType; -} - -/** - * Set the border styles for a component. - */ -export interface InnerBorderStyleProperty { - color?: string; - width?: number; -} - -export interface ButtonGroupProps { - /** - * Current selected index of array of buttons - */ - selectedIndex: number; - - /** - * Method to update Button Group Index - */ - onPress(selectedIndex: number): void; - - /** - * Array of buttons for component, if returning a component, must be an object with { element: componentName } - */ - buttons: string[] | ElementObject[]; - - /** - * Choose other button component such as TouchableOpacity - * - * @default TouchableHighlight - */ - component?: React.ComponentClass; - - /** - * Specify styling for main button container - */ - containerStyle?: StyleProp; - - /** - * inherited styling specify styling for button - */ - buttonStyle?: StyleProp; - - /** - * Specify color for selected state of button - * - * @default 'white' - */ - selectedBackgroundColor?: string; - - /** - * Specify specific styling for text - */ - textStyle?: StyleProp; - - /** - * Specify specific styling for text in the selected state - */ - selectedTextStyle?: StyleProp; - - /** - * inherited styling object { width, color } update the styling of the interior border of the list of buttons - */ - innerBorderStyle?: InnerBorderStyleProperty; - - /** - * Specify underlayColor for TouchableHighlight - * - * @default 'white' - */ - underlayColor?: string; - - /** - * Disables the currently selected button if true - * - * @default false - */ - disableSelected?: boolean; - - /** - * Determines what the opacity of the wrapped view should be when touch is active. - */ - activeOpacity?: number; - - /** - * Border radius for the container - */ - containerBorderRadius?: number; - - /** - * Styling for the final border edge - */ - lastBorderStyle?: StyleProp; - - /** - * - * Called immediately after the underlay is hidden - */ - onHideUnderlay?(): void; - - /** - * Called immediately after the underlay is shown - */ - onShowUnderlay?(): void; - - /** - * Animate the touchable to a new opacity. - */ - setOpacityTo?(value: number): void; -} - -export class ButtonGroup extends React.Component {} - -export interface CheckBoxProps { - /** - * Icon family, can be one of the following - * (required only if specifying an icon that is not from font-awesome) - */ - iconType?: IconType; - - /** - * Specify React Native component for main button - */ - component?: React.ComponentClass; - - /** - * Flag for checking the icon - * - * @default false - */ - checked: boolean; - - /** - * Moves icon to right of text. - * - * @default false - */ - iconRight?: boolean; - - /** - * Aligns checkbox to right - * - * @default false - */ - right?: boolean; - - /** - * Aligns checkbox to center - * - * @default false - */ - center?: boolean; - - /** - * Title of checkbox - */ - title?: string | JSX.Element; - - /** - * Style of main container - */ - containerStyle?: StyleProp; - - /** - * style of text - */ - textStyle?: StyleProp; - - /** - * onLongPress function for checkbox - */ - onLongPress?(): void; - - /** - * onLongPress function for checkbox - */ - onLongIconPress?(): void; - - /** - * onPress function for container - */ - onPress?(): void; - - /** - * onPress function for checkbox - */ - onIconPress?(): void; - - /** - * Default checked icon (Font Awesome Icon) - * - * @default 'check-square-o' - */ - checkedIcon?: string; - - /** - * Default checked icon (Font Awesome Icon) - * - * @default 'square-o' - */ - uncheckedIcon?: string; - - /** - * Default checked color - * - * @default 'green' - */ - checkedColor?: string; - - /** - * Default unchecked color - * @default '#bfbfbf' - */ - uncheckedColor?: string; - - /** - * Specify a custom checked message - */ - checkedTitle?: string; - - /** - * Specify different font family - * @default 'System font bold (iOS)' - * @default 'Sans Serif Bold (android)' - */ - fontFamily?: string; -} -export class CheckBox extends React.Component {} - -export interface DividerProps { - /** - * Style the divider - * - * @default {height: 1, backgroundColor: #e1e8ee} - */ - style?: StyleProp; -} - -export class Divider extends React.Component {} - -export interface FormValidationMessageProps extends ViewProperties { - /** - * Style of the container - */ - containerStyle?: StyleProp; - - /** - * Style of the text within the label message - */ - labelStyle?: StyleProp; - - /** - * Font family for the message - */ - fontFamily?: string; -} -export class FormValidationMessage extends React.Component< - FormValidationMessageProps, - any -> {} - -export interface FormInputProps extends TextInputProperties { - /** - * TextInput container styling - */ - containerStyle?: StyleProp; - - /** - * TextInput styling - */ - inputStyle?: StyleProp; - - /** - * @deprecated - * Get ref of TextInput - */ - textInputRef?(ref: TextInput): void; - - /** - * @deprecated - * Get ref of TextInput container - */ - containerRef?(ref: any): void; - - /** - * Shake the TextInput if not a falsy value and different from the previous value - */ - shake?: any; -} - -export class FormInput extends React.Component { - /** - * Holds reference to the stored input. - */ - input: TextInput; - - /** - * Shake the TextInput - * - * eg `this.formInputRef.shake()` - */ - shake(): void; - - /** - * Call focus on the TextInput - */ - focus(): void; - - /** - * Call blur on the TextInput - */ - blur(): void; - - /** - * Call clear on the TextInput - */ - clearText(): void; -} - -export interface FormLabelProps extends ViewProperties { - /** - * Additional label container style - */ - containerStyle?: StyleProp; - - /** - * Additional label styling - */ - labelStyle?: StyleProp; - - /** - * Specify different font family - * - * @default System font bold (iOS), Sans Serif Bold (android) - */ - fontFamily?: string; -} - -export class FormLabel extends React.Component {} - -export interface GridProps extends ViewProperties { - /** - * Outer grid styling - */ - containerStyle?: StyleProp; - - /** - * Opacity on pressing - * - */ - activeOpacity?: number; - - /** - * onPress method - */ - onPress?(): void; - - children: React.ReactNode; -} - -/** - * @deprecated - * Warning: Grid has been deprecated and will be removed in a future version of React Native Elements - * - * @see https://react-native-training.github.io/react-native-elements/API/grid - */ -export class Grid extends React.Component {} - -export interface SubGridProps extends ViewProperties { - /** - * Size for column or row - */ - size?: number; - - /** - * Opacity on pressing - * - * @default 1 - */ - activeOpacity?: number; - - /** - * Styling for the outer column or row - */ - containerStyle?: StyleProp; - - /** - * onPress method - */ - onPress?(): void; -} - -/** - * @deprecated - * Warning: Row has been deprecated and will be removed in a future version of React Native Elements - * @see https://react-native-training.github.io/react-native-elements/API/grid/#row - */ -export class Row extends React.Component {} - -/** - * @deprecated - * Warning: Col has been deprecated and will be removed in a future version of React Native Elements - * - * @see https://react-native-training.github.io/react-native-elements/API/grid/#column - * - */ -export class Col extends React.Component {} - -export interface HeaderIcon extends IconObject { - icon?: string; -} - -/** - * Defines the types that can be used in a header sub component - */ -export type HeaderSubComponent = JSX.Element | TextProps | HeaderIcon; - -export interface HeaderProps extends ViewProperties { - /** - * Accepts all props for StatusBar - */ - statusBarProps?: StatusBarProperties; - - /** - * Configuration object for default component (icon: string, ...props for React Native Elements Icon) or a valid React Element define your left component here - */ - leftComponent?: HeaderSubComponent; - - /** - * Configuration object for default component (text: string, ...props for React Native Text component) valid React Element define your center component here - */ - centerComponent?: HeaderSubComponent; - - /** - * Configuration object for default component (icon: string, ...props for React Native Elements Icon component) or a valid React Element define your right component here - */ - rightComponent?: HeaderSubComponent; - - /** - * Sets backgroundColor of the parent component - */ - backgroundColor?: string; - - /** - * Styling for outer container - */ - outerContainerStyles?: StyleProp; - - /** - * Styling for inner container - */ - innerContainerStyles?: StyleProp; -} - -/** - * Header component - * @see https://react-native-training.github.io/react-native-elements/API/header/ - */ -export class Header extends React.Component {} - -export interface IconProps { - /** - * Name of icon - */ - name: string; - - /** - * Type (defaults to material, options are material-community, zocial, font-awesome, octicon, ionicon, foundation, evilicon, simple-line-icon, or entypo) - * @default 'material' - */ - type?: IconType; - - /** - * Size of icon - * @default 26 - */ - size?: number; - - /** - * Color of icon - * - * @default 'black' - */ - color?: string; - - /** - * Additional styling to icon - */ - iconStyle?: StyleProp; - - /** - * View if no onPress method is defined, TouchableHighlight if onPress method is defined React Native component update React Native Component - */ - component?: React.ComponentClass; - - /** - * onPress method for button - */ - onPress?(): void; - - /** - * onLongPress method for button - */ - onLongPress?(): void; - - /** - * UnderlayColor for press event - */ - underlayColor?: string; - - /** - * Reverses color scheme - * - * @default false - */ - reverse?: boolean; - - /** - * Adds box shadow to button - * - * @default false - */ - raised?: boolean; - - /** - * Add styling to container holding icon - */ - containerStyle?: StyleProp; - - /** - * Specify reverse icon color - * - * @default 'white' - */ - reverseColor?: string; -} - -/** - * Icon component - * @see https://react-native-training.github.io/react-native-elements/API/icons/ - */ -export class Icon extends React.Component {} - -export interface ListProps extends ViewProperties { - /** - * Style the list container - * @default '{marginTop: 20, borderTopWidth: 1, borderBottomWidth: 1, borderBottomColor: #cbd2d9}' - */ - containerStyle?: StyleProp; -} - -/** - * List component - * @see https://react-native-training.github.io/react-native-elements/API/lists/ - */ -export class List extends React.Component {} - -export interface ListItemProps { - /** - * Left avatar. This is the React Native Image source prop. Avatar can be used in parallel to leftIcon if needed. - */ - avatar?: string | ImageURISource; - - /** - * Avatar styling. This is the React Native Image style prop - */ - avatarStyle?: ImageStyle; - - /** - * Avatar outer container styling - */ - avatarContainerStyle?: StyleProp; - - /** - * Avatar overlay container styling - */ - avatarOverlayContainerStyle?: StyleProp; - - /** - * Set chevron color - * - * @default '#bdc6cf' - */ - chevronColor?: string; - - /** - * View or TouchableHighlight if onPress method is added as prop - * Replace element with custom element - */ - component?: React.ComponentClass; - - /** - * Additional main container styling - */ - containerStyle?: StyleProp; - - /** - * Additional wrapper styling - */ - wrapperStyle?: StyleProp; - - /** - * Define underlay color for TouchableHighlight - * - * @default 'white' - */ - underlayColor?: string; - - /** - * Specify different font family - * - * @default 'HelevticaNeue' (iOS) - * @default 'Sans Serif' (android) - */ - fontFamily?: string; - - /** - * Set if you do not want a chevron - * - * @default false - */ - hideChevron?: boolean; - - /** - * onPress method for link - */ - onPress?(): void; - - /** - * onLongPress method for link - */ - onLongPress?(): void; - - /** - * Make left avatar round - * - * @default false - */ - roundAvatar?: boolean; - - /** - * Main title for list item, can be text or custom view - */ - title?: string; - - /** - * Number of lines for title - * - * @default 1 - */ - titleNumberOfLines?: number; - - /** - * Additional title styling - */ - titleStyle?: StyleProp; - - /** - * Provide styling for title container - */ - titleContainerStyle?: StyleProp; - - /** - * Subtitle text or custom view - */ - subtitle?: string | JSX.Element; - - /** - * Number of lines for Subtitle - * - * @default 1 - */ - subtitleNumberOfLines?: number; - - /** - * Provide styling for subtitle container - */ - subtitleContainerStyle?: StyleProp; - - /** - * Additional subtitle styling - */ - subtitleStyle?: StyleProp; - - /** - * Provide a rightTitle to have a title show up on the right side of the button - */ - rightTitle?: string; - - /** - * Number of lines for Right Title - * - * @default 1 - */ - rightTitleNumberOfLines?: number; - - /** - * Style the outer container of the rightTitle text - * - * @default "{flex: 1, alignItems: 'flex-end', justifyContent: 'center'}"" - */ - rightTitleContainerStyle?: StyleProp; - - /** - * Style the text of the rightTitle text - * - * @default "{marginRight: 5, color: '#bdc6cf'}" - */ - rightTitleStyle?: StyleProp; - - /** - * Add a label with your own styling by providing a label={} prop to ListItem - */ - label?: JSX.Element; - - /** - * Icon configuration for left icon, either a name from the icon library (like material) or a React Native element like Image. - * leftIcon can be used in parallel to avatar if needed. - * {name, color, style, type} - * (type defaults to material icons) OR React Native element - */ - leftIcon?: IconObject | JSX.Element; - - /** - * Attaches an onPress on left Icon - */ - leftIconOnPress?(): void; - - /** - * Attaches an onLongPress on left Icon - */ - leftIconOnLongPress?(): void; - - /** - * Underlay color for left Icon - * - * @default 'white' - */ - leftIconUnderlayColor?: string; - - /** - * {name: 'chevron-right'} object {name, color, style, type} (type defaults to material icons) OR - * React Native element icon configuration for right icon, either a name from the icon library (like material) or a React Native element like Image. - * Shows up unless hideChevron is set - */ - rightIcon?: IconObject | JSX.Element; - - /** - * Attaches an onPress on right Icon - */ - onPressRightIcon?(): void; - - /** - * Add a switch to the right side of your component - * - * @default false - */ - switchButton?: boolean; - - /** - * Add a callback function when the switch is toggled - */ - onSwitch?(value: boolean): void; - - /** - * If true the user won't be able to toggle the switch. Default value is false. - * @default false - */ - switchDisabled?: boolean; - - /** - * Background color when the switch is turned on. - */ - switchOnTintColor?: string; - - /** - * Color of the foreground switch grip. - */ - switchThumbTintColor?: string; - - /** - * Border color on iOS and background color on Android when the switch is turned off. - */ - switchTintColor?: string; - - /** - * The value of the switch. If true the switch will be turned on. Default value is false. - * - * @default false - */ - switched?: boolean; - - /** - * Whether to have the right title area be an input text component. - * - * @default false - */ - textInput?: boolean; - - /** - * Can tell TextInput to automatically capitalize certain characters. - */ - textInputAutoCapitalize?: boolean; - - /** - * Can tell TextInput to automatically capitalize certain characters. - */ - textInputAutoCorrect?: boolean; - - /** - * If true, focuses the input on componentDidMount. The default value is false. - */ - textInputAutoFocus?: boolean; - - /** - * If false, text is not editable. The default value is true. - */ - textInputEditable?: boolean; - - /** - * Can be one of the following: - * 'default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search' - */ - textInputKeyboardType?: KeyboardType | KeyboardTypeIOS; - - /** - * Limits the maximum number of characters that can be entered. - */ - textInputMaxLength?: number; - - /** - * If true, the text input can be multiple lines. The default value is false. - */ - textInputMultiline?: boolean; - - /** - * Callback that is called when the text input's text changes. Changed text is passed as an argument to the callback handler. - */ - textInputOnChangeText?(text: string): void; - - /** - * Callback that is called when the text input is focused. - */ - textInputOnFocus?(): void; - - /** - * Manually set value of the input - */ - textInputValue?: string; - - /** - * If true, obscures the text entered so that sensitive text like passwords stay secure. - */ - textInputSecure?: boolean; - - /** - * Style for the input text - */ - textInputStyle?: StyleProp; - - /** - * Style for the container surrounding the input text - */ - textInputContainerStyle?: StyleProp; - - /** - * Placeholder for the text input - */ - textInputPlaceholder?: string; - - /** - * Callback that is called when the text input is blurred. - */ - textInputOnBlur?(): void; - - /** - * If true, all text will automatically be selected on focus. - */ - textInputSelectTextOnFocus?: boolean; - - /** - * Determines how the return key should look. For more info see the React Native docs - */ - textInputReturnKeyType?: string; - - /** - * Add a badge to the ListItem by using this prop - * - */ - badge?: BadgeProps | ElementObject; -} - -/** - * ListItem component - * @see https://react-native-training.github.io/react-native-elements/API/lists/ - */ -export class ListItem extends React.Component {} - -export interface ButtonInformation { - title: string; - icon: string; - buttonStyle?: StyleProp; -} - -export interface PricingCardProps { - /** - * Title - */ - title?: string; - - /** - * Price - */ - price: string; - - /** - * Color scheme for button & title - */ - color: string; - - /** - * Pricing information - */ - info?: string[]; - - /** - * {title, icon, buttonStyle} - * Button information - */ - button: ButtonInformation; - - /** - * Function to be run when button is pressed - */ - onButtonPress?(): void; - - /** - * Outer component styling - */ - containerStyle?: StyleProp; - - /** - * Inner wrapper component styling - */ - wrapperStyle?: StyleProp; - - /** - * Specify title font family - * - * System font (font weight 800) (iOS) - * Sans Serif Black (android) - */ - titleFont?: string; - - /** - * Specify pricing font family - * - * System font (font weight 700) (iOS) - * Sans Serif Bold (android) - */ - pricingFont?: string; - - /** - * Specify pricing information font family - * - * System font bold (iOS) - * Sans Serif Bold (android) - */ - infoFont?: string; - - /** - * Specify button font family - * - * System font (iOS) - * Sans Serif (android) - */ - buttonFont?: string; -} - -/** - * PricingCard component - * @see https://react-native-training.github.io/react-native-elements/API/pricing/ - */ -export class PricingCard extends React.Component {} - -export interface RatingProps { - /** - * Callback method when the user finishes rating. Gives you the final rating value as a whole number - */ - onFinishRating(rating: number): void; - - /** - * Choose one of the built-in types: star, rocket, bell, heart or use type custom to render a custom image - */ - type?: 'star' | 'rocket' | 'bell' | 'heart' | 'custom'; - - /** - * Pass in a custom image source; use this along with type='custom' prop above - */ - ratingImage?: ImageURISource | string | number; - - /** - * Pass in a custom fill-color for the rating icon; use this along with type='custom' prop above - * - * @default '#f1c40f' - */ - ratingColor?: string; - - /** - * Pass in a custom background-fill-color for the rating icon; use this along with type='custom' prop above - * - * @default 'white' - */ - ratingBackgroundColor?: string; - - /** - * Number of rating images to display - * - * @default 5 - */ - ratingCount?: number; - - /** - * The size of each rating image - * - * @default 50 - */ - imageSize?: number; - - /** - * Displays the Built-in Rating UI to show the rating value in real-time - */ - showRating?: boolean; - - /** - * Whether the rating can be modiefied by the user - * - * @default false - */ - readonly?: boolean; - - /** - * The initial rating to render - * - * @default ratingCount/2 - */ - startingValue?: number; - - /** - * The number of decimal places for the rating value; must be between 0 and 20 - * - * @default undefined - */ - fractions?: number; - - /** - * Exposes style prop to add additonal styling to the container view - */ - style?: StyleProp; -} - -/** - * Rating component - * @see https://react-native-training.github.io/react-native-elements/API/rating/ - */ -export class Rating extends React.Component {} - -export interface SearchBarProps extends TextInputProperties { - /** - * TextInput container styling - */ - containerStyle?: StyleProp; - - /** - * TextInput styling - */ - inputStyle?: StyleProp; - - /** - * @deprecated - * Get ref of TextInput - */ - textInputRef?(ref: TextInput): void; - - /** - * @deprecated - * Get ref of TextInput container - */ - containerRef?(ref: any): void; - - /** - * Specify color, styling, or another Material Icon Name - */ - icon?: IconObject; - - /** - * Remove icon from textinput - * - * @default false - */ - noIcon?: boolean; - - /** - * @default false change theme to light theme - */ - lightTheme?: boolean; - - /** - * Change TextInput styling to rounded corners - * - * @default false - */ - round?: boolean; - - /** - * Specify other than the default transparent underline color - * - * @default 'transparent' - */ - underlineColorAndroid?: string; - - /** - * Specify color, styling of the loading ActivityIndicator effect - * - * @default "{ color: '#86939e' }" - */ - loadingIcon?: IconObject; - - /** - * Show the loading ActivityIndicator effect - * - * @default false - */ - showLoadingIcon?: boolean; - - /** - * Set the placeholder text - * - * @default '' - */ - placeholder?: string; - - /** - * Set the color of the placeholder text - * - * @default '#86939e' - */ - placeholderTextColor?: string; - - /** - * Method to fire when text is changed - */ - onChangeText?(text: string): void; - - /** - * Specify color, styling, or another Material Icon Name - * (Note: pressing on this icon clears text inside the searchbar) - * - * @default "{ color: '#86939e', name: 'search' }" - */ - clearIcon?: IconObject; -} - -/** - * SearchBar component - * @see https://react-native-training.github.io/react-native-elements/API/searchbar/ - */ -export class SearchBar extends React.Component { - /** - * Holds reference to the stored input. - */ - input: TextInput; - - /** - * Call focus on the TextInput - */ - focus(): void; - - /** - * Call blur on the TextInput - */ - blur(): void; - - /** - * Call clear on the TextInput - */ - clearText(): void; -} - -export interface SideMenuProps { - /** - * Menu component - */ - menu: JSX.Element; - - /** - * Props driven control over menu open state - * - * @default false - */ - isOpen?: boolean; - - /** - * Content view left margin if menu is opened - * - * @default ⅔ of device screen width - */ - openMenuOffset?: number; - - /** - * Content view left margin if menu is hidden - */ - hiddenMenuOffset?: number; - - /** - * Edge distance on content view to open side menu - * - * @default 60 - */ - edgeHitWidth?: number; - - /** - * X axis tolerance - */ - toleranceX?: number; - - /** - * Y axis tolerance - */ - toleranceY?: number; - - /** - * Disable whether the menu can be opened with gestures or not - * - * @default false - */ - disableGestures?: boolean; - - /** - * Function that accepts event as an argument and specify if side-menu should react on the touch or not. - * Check https://facebook.github.io/react-native/docs/gesture-responder-system.html for more details - */ - onStartShouldSetResponderCapture?(event: GestureResponderEvent): boolean; - - /** - * Callback on menu open/close. Is passed isOpen as an argument. - */ - onChange?(isOpen: boolean): void; - - /** - * Callback on menu move. Is passed left as an argument - */ - onMove?(left: number): void; - - /** - * Either 'left' or 'right'. - * - * @default 'left' - */ - menuPosition?: string; - - /** - * Function that accept 2 arguments (prop, value) and return an object: - * - animation you should use at the place you specify parameter to animate - * - newOffset you should use to specify the final value of prop - */ - animationFunction?( - animation: Animated.Value, - newOffset: number - ): Animated.CompositeAnimation; - - /** - * Function that accept 1 argument (value) and return an object - * - leftOffset you should use at the place you need current value of animated parameter (left offset of content view) - */ - animationStyle?(leftOffset: number): StyleProp; - - /** - * When true, content view will bounce back to openMenuOffset when dragged further - * - * @default true - */ - bounceBackOnOverdraw?: boolean; -} - -/** - * @deprecated - * Warning: SideMenu has been deprecated and will be removed in a future version of React Native Elements. For a complete navigation solution that includes SideMenu(Drawer) as well as many other - * features, be sure to check out react-navigation (https://reactnavigation.org) and it's DrawerNavigator. - * - * SideMenu component - * @see https://react-native-training.github.io/react-native-elements/API/side_menu/ - */ -export class SideMenu extends React.Component {} - -export interface SliderProps { - /** - * Initial value of the slider - * - * @default 0 - */ - value?: number; - - /** - * If true the user won't be able to move the slider - * - * @default false - */ - disabled?: boolean; - - /** - * Initial minimum value of the slider - * - * @default 0 - */ - minimumValue?: number; - - /** - * Initial maximum value of the slider - * - * @default 1 - */ - maximumValue?: number; - - /** - * Step value of the slider. The value should be between 0 and maximumValue - minimumValue) - * - * @default 0 - */ - step?: number; - - /** - * The color used for the track to the left of the button - * - * @default '#3f3f3f' - */ - minimumTrackTintColor?: string; - - /** - * The color used for the track to the right of the button - * - * @default '#b3b3b3' - */ - maximumTrackTintColor?: string; - - /** - * The color used for the thumb - * - * @default '#343434' - */ - thumbTintColor?: string; - - /** - * The size of the touch area that allows moving the thumb. The touch area has the same center as the visible thumb. - * This allows to have a visually small thumb while still allowing the user to move it easily. - * - * @default "{width: 40, height: 40}" - */ - thumbTouchSize?: { - width?: number; - height?: number; - }; - - /** - * Callback continuously called while the user is dragging the slider - */ - onValueChange?(value: number): void; - - /** - * Callback called when the user starts changing the value (e.g. when the slider is pressed) - */ - onSlidingStart?(value: number): void; - - /** - * Callback called when the user finishes changing the value (e.g. when the slider is released) - */ - onSlidingComplete?(value: number): void; - - /** - * The style applied to the slider container - */ - style?: StyleProp; - - /** - * The style applied to the track - */ - trackStyle?: StyleProp; - - /** - * The style applied to the thumb - */ - thumbStyle?: StyleProp; - - /** - * Set this to true to visually see the thumb touch rect in green. - * - * @default false - */ - debugTouchArea?: boolean; - - /** - * Set to true if you want to use the default 'spring' animation - * - * @default false - */ - animateTransitions?: boolean; - - /** - * Set to 'spring' or 'timing' to use one of those two types of animations with the default animation properties. - * - * @default 'timing' - */ - animationType?: 'spring' | 'timing'; - - /** - * Used to configure the animation parameters. These are the same parameters in the Animated library. - * - * @default undefined - */ - animationConfig?: - | Animated.TimingAnimationConfig - | Animated.SpringAnimationConfig; -} - -/** - * Slider component - * @see https://react-native-training.github.io/react-native-elements/API/slider/ - */ -export class Slider extends React.Component {} - -export type SocialMediaType = - | 'facebook' - | 'twitter' - | 'google-plus-official' - | 'pinterest' - | 'linkedin' - | 'youtube' - | 'vimeo' - | 'tumblr' - | 'instagram' - | 'quora' - | 'foursquare' - | 'wordpress' - | 'stumbleupon' - | 'github' - | 'github-alt' - | 'twitch' - | 'medium' - | 'soundcloud' - | 'gitlab' - | 'angellist' - | 'codepen'; - -export interface SocialIconProps { - /** - * Title if made into a button - */ - title?: string; - - /** - * Social media type - */ - type: SocialMediaType; - - /** - * Adds a drop shadow, set to false to remove - * - * @default true - */ - raised?: boolean; - - /** - * Creates button - * - * @default false - */ - button?: boolean; - - /** - * onPress method - */ - onPress?(): void; - - /** - * @default none function onLongPress method - */ - onLongPress?(): void; - - /** - * Reverses icon color scheme, setting background to white and icon to primary color - * - * @default false - */ - light?: boolean; - - /** - * Extra styling for icon component - */ - iconStyle?: StyleProp; - - /** - * Button styling - */ - style?: StyleProp; - - /** - * Icon color - */ - iconColor?: string; - - /** - * Icon size - * - * @default 24 - */ - iconSize?: number; - - /** - * Component Type of button - * - * @default TouchableHighlight - */ - component?: React.ComponentClass; - - /** - * Specify different font family - * - * @default System font bold (iOS), Sans Serif Black (android) - */ - fontFamily?: string; - - /** - * Specify font weight of title if set as a button with a title - * - * @default bold (ios), black(android) - */ - fontWeight?: string; - - /** - * Specify text styling - */ - fontStyle?: StyleProp; - - /** - * Disable button - * - * @default false - */ - disabled?: boolean; - - /** - * Shows loading indicator - * - * @default false - */ - loading?: boolean; -} - -/** - * SocialIcon component - * @see https://react-native-training.github.io/react-native-elements/API/social_icons/ - */ -export class SocialIcon extends React.Component {} - -export interface SwipeDeckProps { - /** - * An array of data object which contains each card details. - */ - data: ReadonlyArray; - - /** - * A function that takes a card as a prop and renders it with custom UI - */ - renderCard(card: D): JSX.Element; - - /** - * A function that renders custom UI when no more cards are present - */ - renderNoMoreCards?(): JSX.Element; - - /** - * function function A callback function that takes a card as a prop and take the approriate action when the user swipes the card right - */ - onSwipeRight?(card: D): void; - - /** - * function function A callback function that takes a card as a prop and take the approriate action when the user swipes the card left - */ - onSwipeLeft?(card: D): void; -} - -/** - * SwipeDeck component - * @see https://react-native-training.github.io/react-native-elements/API/swipedeck/ - */ -export class SwipeDeck extends React.Component< - SwipeDeckProps, - any -> {} - -/** - * @deprecated - * Warning: Tabs has been deprecated and will be removed in a future version of React Native Elements. - * For a complete navigation solution that includes Tabs as well as many other features, be sure to check out react-navigation (https://reactnavigation.org) and it's TabRouter. - */ -export class Tabs extends TabNavigator {} - -/** - * @deprecated - * Warning: Tab has been deprecated and will be removed in a future version of React Native Elements. - * For a complete navigation solution that includes Tabs as well as many other features, be sure to check out react-navigation (https://reactnavigation.org) and it's TabRouter. - */ -export class Tab extends TabNavigator.Item {} - -export interface TileProps { - /** - * Icon Component Props - */ - icon?: IconObject; - - /** - * Styling for the outer icon container - */ - iconContainerStyle?: StyleProp; - - /** - * Text inside the tile - */ - title?: string; - - /** - * Styling for the title - */ - titleStyle?: StyleProp; - - /** - * Text inside the tile when tile is featured - */ - caption?: string; - - /** - * Styling for the caption - */ - captionStyle?: StyleProp; - - /** - * Changes the look of the tile - */ - featured?: boolean; - - /** - * @default none object (style) Styling for the outer tile container - */ - containerStyle?: StyleProp; - - /** - * Source for the image - */ - imageSrc: ImageURISource | string | number; - - /** - * Styling for the image - */ - imageContainerStyle?: StyleProp; - - /** - * @default none function (event) Function to call when tile is pressed - */ - onPress?(): void; - - /** - * Number passed to control opacity on press - * - * @default 0.2 - */ - activeOpacity?: number; - - /** - * Styling for bottom container when not featured tile - */ - contentContainerStyle?: StyleProp; - - /** - * Width for the tile - * - * @default Device Width - */ - width?: number; - - /** - * Height for the tile - * - * @default Device Width * 0.8 - */ - height?: number; -} - -/** - * Tile component - * @see https://react-native-training.github.io/react-native-elements/API/tile/ - */ -export class Tile extends React.Component {} - -/** - * Colors - */ - -export interface Colors { - readonly primary: string; - readonly primary1: string; - readonly primary2: string; - readonly secondary: string; - readonly secondary2: string; - readonly secondary3: string; - readonly grey0: string; - readonly grey1: string; - readonly grey2: string; - readonly grey3: string; - readonly grey4: string; - readonly grey5: string; - readonly dkGreyBg: string; - readonly greyOutline: string; - readonly searchBg: string; - readonly disabled: string; - readonly white: string; - readonly error: string; - readonly [key: string]: string; -} - -export const colors: Colors; - -/* Utility Functions */ - -/** - * TODO make the Icon Type an export of the react-native-vector-icons type definitions. - */ -export function getIconType(type: IconType): any; - -/** - * Method to normalize size of fonts across devices - */ -export function normalize(size: number): number; diff --git a/types/react-native-elements/react-native-elements-tests.tsx b/types/react-native-elements/react-native-elements-tests.tsx deleted file mode 100644 index 29155829b2..0000000000 --- a/types/react-native-elements/react-native-elements-tests.tsx +++ /dev/null @@ -1,975 +0,0 @@ -import * as React from 'react'; -import { - ListView, - View, - StyleSheet, - TouchableNativeFeedback, - Image, - TextInput, - Animated, - Dimensions -} from 'react-native'; -import { - Button, - Text, - Badge, - Avatar, - Card, - ButtonGroup, - CheckBox, - Divider, - FormInput, - FormValidationMessage, - FormLabel, - Header, - Icon, - List, - ListItem, - PricingCard, - Rating, - SearchBar, - SideMenu, - Slider, - SocialIcon, - SwipeDeck, - Tabs, - Tab, - Tile, - colors, - getIconType, - normalize -} from 'react-native-elements'; - -const { width, height } = Dimensions.get('window'); - -class TextTest extends React.Component { - render() { - return ( - - Heading 1 - Heading 2 - Heading 3 - Heading 4 - - ); - } -} - -class AvatarTest extends React.Component { - render() { - return ( - - - Avatars - console.log('Works!')} - activeOpacity={0.7} - /> - console.log('Works!')} - activeOpacity={0.7} - /> - console.log('Works!')} - activeOpacity={0.7} - /> - console.log('Works!')} - activeOpacity={0.7} - /> - - - - Avatar with initials - console.log('Works!')} - activeOpacity={0.7} - /> - console.log('Works!')} - activeOpacity={0.7} - /> - console.log('Works!')} - activeOpacity={0.7} - /> - console.log('Works!')} - activeOpacity={0.7} - /> - - - - Avatar with icons - console.log('Works!')} - activeOpacity={0.7} - containerStyle={{ - flex: 2, - marginLeft: 20, - marginTop: 115 - }} - /> - console.log('Works!')} - activeOpacity={0.7} - containerStyle={{ flex: 3, marginTop: 100 }} - /> - console.log('Works!')} - activeOpacity={0.7} - containerStyle={{ flex: 4, marginTop: 75 }} - /> - console.log('Works!')} - activeOpacity={0.7} - containerStyle={{ flex: 5, marginRight: 60 }} - /> - - - ); - } -} - -const AvatarStyles = StyleSheet.create({ - title: { - fontSize: 30, - marginBottom: 10 - } -}); - -class BadgeTest extends React.Component { - render() { - return ( - - - - - User 1 - - - console.log('pressed')} value="5" /> - - - - ); - } -} - -class ButtonTest extends React.Component { - handleButtonPress() { - console.log('I got pressed'); - } - - render() { - return ( - -