diff --git a/types/reactstrap/v7/index.d.ts b/types/reactstrap/v7/index.d.ts new file mode 100644 index 0000000000..adadd7886a --- /dev/null +++ b/types/reactstrap/v7/index.d.ts @@ -0,0 +1,267 @@ +// Type definitions for reactstrap 7.1 +// Project: https://github.com/reactstrap/reactstrap#readme +// Definitions by: Ali Hammad Baig +// Marco Falkenberg +// Danilo Barros +// FaithForHumans +// Tim Chen +// Pat Gaffney +// Prabodh Tiwari +// Georg Steinmetz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +export interface CSSModule { + [className: string]: string; +} + +import { default as Alert_ } from './lib/Alert'; +export class Alert extends Alert_ {} +export { AlertProps } from './lib/Alert'; +import { default as Badge_ } from './lib/Badge'; +export class Badge extends Badge_ {} +export { BadgeProps } from './lib/Badge'; +import { default as Breadcrumb_ } from './lib/Breadcrumb'; +export class Breadcrumb extends Breadcrumb_ {} +export { BreadcrumbProps } from './lib/Breadcrumb'; +import { default as BreadcrumbItem_ } from './lib/BreadcrumbItem'; +export class BreadcrumbItem extends BreadcrumbItem_ {} +export { BreadcrumbItemProps } from './lib/BreadcrumbItem'; +import { default as Button_ } from './lib/Button'; +export class Button extends Button_ {} +export { ButtonProps } from './lib/Button'; +import { default as ButtonDropdown_ } from './lib/ButtonDropdown'; +export class ButtonDropdown extends ButtonDropdown_ {} +export { ButtonDropdownProps } from './lib/ButtonDropdown'; +import { default as ButtonGroup_ } from './lib/ButtonGroup'; +export class ButtonGroup extends ButtonGroup_ {} +export { ButtonGroupProps } from './lib/ButtonGroup'; +import { default as ButtonToolbar_ } from './lib/ButtonToolbar'; +export class ButtonToolbar extends ButtonToolbar_ {} +export { ButtonToolbarProps } from './lib/ButtonToolbar'; +import { default as Card_ } from './lib/Card'; +export class Card extends Card_ {} +export { CardProps } from './lib/Card'; +import { default as CardBody_ } from './lib/CardBody'; +export class CardBody extends CardBody_ {} +export { CardBodyProps } from './lib/CardBody'; +import { default as CardColumns_ } from './lib/CardColumns'; +export class CardColumns extends CardColumns_ {} +export { CardColumnsProps } from './lib/CardColumns'; +import { default as CardDeck_ } from './lib/CardDeck'; +export class CardDeck extends CardDeck_ {} +export { CardDeckProps } from './lib/CardDeck'; +import { default as CardFooter_ } from './lib/CardFooter'; +export class CardFooter extends CardFooter_ {} +export { CardFooterProps } from './lib/CardFooter'; +import { default as CardGroup_ } from './lib/CardGroup'; +export class CardGroup extends CardGroup_ {} +export { CardGroupProps } from './lib/CardGroup'; +import { default as CardHeader_ } from './lib/CardHeader'; +export class CardHeader extends CardHeader_ {} +export { CardHeaderProps } from './lib/CardHeader'; +import { default as CardImg_ } from './lib/CardImg'; +export class CardImg extends CardImg_ {} +export { CardImgProps } from './lib/CardImg'; +import { default as CardImgOverlay_ } from './lib/CardImgOverlay'; +export class CardImgOverlay extends CardImgOverlay_ {} +export { CardImgOverlayProps } from './lib/CardImgOverlay'; +import { default as CardLink_ } from './lib/CardLink'; +export class CardLink extends CardLink_ {} +export { CardLinkProps } from './lib/CardLink'; +import { default as CardSubtitle_ } from './lib/CardSubtitle'; +export class CardSubtitle extends CardSubtitle_ {} +export { CardSubtitleProps } from './lib/CardSubtitle'; +import { default as CardText_ } from './lib/CardText'; +export class CardText extends CardText_ {} +export { CardTextProps } from './lib/CardText'; +import { default as CardTitle_ } from './lib/CardTitle'; +export class CardTitle extends CardTitle_ {} +export { CardTitleProps } from './lib/CardTitle'; +import { default as Carousel_ } from './lib/Carousel'; +export class Carousel extends Carousel_ {} +export { CarouselProps } from './lib/Carousel'; +import { default as CarouselItem_ } from './lib/CarouselItem'; +export class CarouselItem extends CarouselItem_ {} +export { CarouselItemProps } from './lib/CarouselItem'; +import { default as CarouselControl_ } from './lib/CarouselControl'; +export class CarouselControl extends CarouselControl_ {} +export { CarouselControlProps } from './lib/CarouselControl'; +import { default as CarouselIndicators_ } from './lib/CarouselIndicators'; +export class CarouselIndicators extends CarouselIndicators_ {} +export { CarouselIndicatorsProps } from './lib/CarouselIndicators'; +import { default as CarouselCaption_ } from './lib/CarouselCaption'; +export class CarouselCaption extends CarouselCaption_ {} +export { CarouselCaptionProps } from './lib/CarouselCaption'; +import { default as Col_ } from './lib/Col'; +export class Col extends Col_ {} +export { ColProps } from './lib/Col'; +import { default as Collapse_ } from './lib/Collapse'; +export class Collapse extends Collapse_ {} +export { CollapseProps } from './lib/Collapse'; +import { default as Container_ } from './lib/Container'; +export class Container extends Container_ {} +export { ContainerProps } from './lib/Container'; +import { default as CustomInput_ } from './lib/CustomInput'; +export class CustomInput extends CustomInput_ {} +export { CustomInputProps } from './lib/CustomInput'; +import { default as Dropdown_ } from './lib/Dropdown'; +export class Dropdown extends Dropdown_ {} +export { DropdownProps } from './lib/Dropdown'; +import { default as DropdownItem_ } from './lib/DropdownItem'; +export class DropdownItem extends DropdownItem_ {} +export { DropdownItemProps } from './lib/DropdownItem'; +import { default as DropdownMenu_ } from './lib/DropdownMenu'; +export class DropdownMenu extends DropdownMenu_ {} +export { DropdownMenuProps } from './lib/DropdownMenu'; +import { default as DropdownToggle_ } from './lib/DropdownToggle'; +export class DropdownToggle extends DropdownToggle_ {} +export { DropdownToggleProps } from './lib/DropdownToggle'; +import { default as Fade_ } from './lib/Fade'; +export class Fade extends Fade_ {} +export { FadeProps } from './lib/Fade'; +import { default as Form_ } from './lib/Form'; +export class Form extends Form_ {} +export { FormProps } from './lib/Form'; +import { default as FormFeedback_ } from './lib/FormFeedback'; +export class FormFeedback extends FormFeedback_ {} +export { FormFeedbackProps } from './lib/FormFeedback'; +import { default as FormGroup_ } from './lib/FormGroup'; +export class FormGroup extends FormGroup_ {} +export { FormGroupProps } from './lib/FormGroup'; +import { default as FormText_ } from './lib/FormText'; +export class FormText extends FormText_ {} +export { FormTextProps } from './lib/FormText'; +import { default as Input_ } from './lib/Input'; +export class Input extends Input_ {} +export { InputProps } from './lib/Input'; +import { default as InputGroup_ } from './lib/InputGroup'; +export class InputGroup extends InputGroup_ {} +export { InputGroupProps } from './lib/InputGroup'; +import { default as InputGroupAddon_ } from './lib/InputGroupAddon'; +export class InputGroupAddon extends InputGroupAddon_ {} +export { InputGroupAddonProps } from './lib/InputGroupAddon'; +import { default as InputGroupButtonDropdown_ } from './lib/InputGroupButtonDropdown'; +export class InputGroupButtonDropdown extends InputGroupButtonDropdown_ {} +export { InputGroupButtonDropdownProps } from './lib/InputGroupButtonDropdown'; +import { default as InputGroupText_ } from './lib/InputGroupText'; +export class InputGroupText extends InputGroupText_ {} +export { InputGroupTextProps } from './lib/InputGroupText'; +import { default as Jumbotron_ } from './lib/Jumbotron'; +export class Jumbotron extends Jumbotron_ {} +export { JumbotronProps } from './lib/Jumbotron'; +import { default as Label_ } from './lib/Label'; +export class Label extends Label_ {} +export { LabelProps } from './lib/Label'; +import { default as ListGroup_ } from './lib/ListGroup'; +export class ListGroup extends ListGroup_ {} +export { ListGroupProps } from './lib/ListGroup'; +import { default as ListGroupItem_ } from './lib/ListGroupItem'; +export class ListGroupItem extends ListGroupItem_ {} +export { ListGroupItemProps } from './lib/ListGroupItem'; +import { default as ListGroupItemHeading_ } from './lib/ListGroupItemHeading'; +export class ListGroupItemHeading extends ListGroupItemHeading_ {} +export { ListGroupItemHeadingProps } from './lib/ListGroupItemHeading'; +import { default as ListGroupItemText_ } from './lib/ListGroupItemText'; +export class ListGroupItemText extends ListGroupItemText_ {} +export { ListGroupItemTextProps } from './lib/ListGroupItemText'; +import { default as Media_ } from './lib/Media'; +export class Media extends Media_ {} +export { MediaProps } from './lib/Media'; +import { default as Modal_ } from './lib/Modal'; +export class Modal extends Modal_ {} +export { ModalProps } from './lib/Modal'; +import { default as ModalBody_ } from './lib/ModalBody'; +export class ModalBody extends ModalBody_ {} +export { ModalBodyProps } from './lib/ModalBody'; +import { default as ModalFooter_ } from './lib/ModalFooter'; +export class ModalFooter extends ModalFooter_ {} +export { ModalFooterProps } from './lib/ModalFooter'; +import { default as ModalHeader_ } from './lib/ModalHeader'; +export class ModalHeader extends ModalHeader_ {} +export { ModalHeaderProps } from './lib/ModalHeader'; +import { default as Nav_ } from './lib/Nav'; +export class Nav extends Nav_ {} +export { NavProps } from './lib/Nav'; +import { default as Navbar_ } from './lib/Navbar'; +export class Navbar extends Navbar_ {} +export { NavbarProps } from './lib/Navbar'; +import { default as NavbarBrand_ } from './lib/NavbarBrand'; +export class NavbarBrand extends NavbarBrand_ {} +export { NavbarBrandProps } from './lib/NavbarBrand'; +import { default as NavbarToggler_ } from './lib/NavbarToggler'; +export class NavbarToggler extends NavbarToggler_ {} +export { NavbarTogglerProps } from './lib/NavbarToggler'; +import { default as NavItem_ } from './lib/NavItem'; +export class NavItem extends NavItem_ {} +export { NavItemProps } from './lib/NavItem'; +import { default as NavLink_ } from './lib/NavLink'; +export class NavLink extends NavLink_ {} +export { NavLinkProps } from './lib/NavLink'; +import { default as Pagination_ } from './lib/Pagination'; +export class Pagination extends Pagination_ {} +export { PaginationProps } from './lib/Pagination'; +import { default as PaginationItem_ } from './lib/PaginationItem'; +export class PaginationItem extends PaginationItem_ {} +export { PaginationItemProps } from './lib/PaginationItem'; +import { default as PaginationLink_ } from './lib/PaginationLink'; +export class PaginationLink extends PaginationLink_ {} +export { PaginationLinkProps } from './lib/PaginationLink'; +import { default as Popover_ } from './lib/Popover'; +export class Popover extends Popover_ {} +export { PopoverProps } from './lib/Popover'; +import { default as PopoverBody_ } from './lib/PopoverBody'; +export class PopoverBody extends PopoverBody_ {} +export { PopoverBodyProps } from './lib/PopoverBody'; +import { default as PopoverHeader_ } from './lib/PopoverHeader'; +export class PopoverHeader extends PopoverHeader_ {} +export { PopoverHeaderProps } from './lib/PopoverHeader'; +import { default as Progress_ } from './lib/Progress'; +export class Progress extends Progress_ {} +export { ProgressProps } from './lib/Progress'; +import { default as Row_ } from './lib/Row'; +export class Row extends Row_ {} +export { RowProps } from './lib/Row'; +import { default as Spinner_ } from './lib/Spinner'; +export class Spinner extends Spinner_ {} +export { SpinnerProps } from './lib/Spinner'; +import { default as TabContent_ } from './lib/TabContent'; +export class TabContent extends TabContent_ {} +export { TabContentProps } from './lib/TabContent'; +import { default as Table_ } from './lib/Table'; +export class Table extends Table_ {} +export { TableProps } from './lib/Table'; +import { default as TabPane_ } from './lib/TabPane'; +export class TabPane extends TabPane_ {} +export { TabPaneProps } from './lib/TabPane'; +import { default as Tag_ } from './lib/Tag'; +export class Tag extends Tag_ {} +export { TagProps } from './lib/Tag'; +import { default as Tooltip_ } from './lib/Tooltip'; +export class Tooltip extends Tooltip_ {} +export { TooltipProps } from './lib/Tooltip'; +import { + UncontrolledAlert as UncontrolledAlert_, + UncontrolledButtonDropdown as UncontrolledButtonDropdown_, + UncontrolledDropdown as UncontrolledDropdown_, + UncontrolledTooltip as UncontrolledTooltip_, + UncontrolledCollapse as UncontrolledCollapse_, + UncontrolledCarousel as UncontrolledCarousel_, + UncontrolledPopover as UncontrolledPopover_ +} from './lib/Uncontrolled'; +export class UncontrolledAlert extends UncontrolledAlert_ {} +export class UncontrolledButtonDropdown extends UncontrolledButtonDropdown_ {} +export class UncontrolledDropdown extends UncontrolledDropdown_ {} +export class UncontrolledTooltip extends UncontrolledTooltip_ {} +export class UncontrolledCollapse extends UncontrolledCollapse_ {} +export class UncontrolledCarousel extends UncontrolledCarousel_ {} +export class UncontrolledPopover extends UncontrolledPopover_ {} +export { + UncontrolledButtonDropdownProps, + UncontrolledAlertProps, + UncontrolledDropdownProps, + UncontrolledTooltipProps, + UncontrolledCollapseProps, + UncontrolledCarouselProps, + UncontrolledPopoverProps +} from './lib/Uncontrolled'; diff --git a/types/reactstrap/v7/lib/Alert.d.ts b/types/reactstrap/v7/lib/Alert.d.ts new file mode 100644 index 0000000000..5aa58f862a --- /dev/null +++ b/types/reactstrap/v7/lib/Alert.d.ts @@ -0,0 +1,20 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; +import { FadeProps } from './Fade'; + +export type UncontrolledProps = React.HTMLAttributes & { + className?: string; + cssModule?: CSSModule; + color?: string; + tag?: React.ReactType; + transition?: FadeProps; +} & T; +export type UncontrolledAlertProps = UncontrolledProps; + +export type AlertProps = UncontrolledAlertProps & { + isOpen?: boolean; + toggle?: () => void; +}; + +declare class Alert extends React.Component> {} +export default Alert; diff --git a/types/reactstrap/v7/lib/Badge.d.ts b/types/reactstrap/v7/lib/Badge.d.ts new file mode 100644 index 0000000000..651521ac67 --- /dev/null +++ b/types/reactstrap/v7/lib/Badge.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type BadgeProps = React.HTMLAttributes & { + color?: string; + pill?: boolean; + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class Badge extends React.Component> {} +export default Badge; diff --git a/types/reactstrap/v7/lib/Breadcrumb.d.ts b/types/reactstrap/v7/lib/Breadcrumb.d.ts new file mode 100644 index 0000000000..9fd2385041 --- /dev/null +++ b/types/reactstrap/v7/lib/Breadcrumb.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type BreadcrumbProps = React.HTMLAttributes & { + tag?: string; + className?: string; + listTag?: string; + listClassName?: string; + cssModule?: CSSModule; +} & T; + +declare class Breadcrumb extends React.Component> {} +export default Breadcrumb; diff --git a/types/reactstrap/v7/lib/BreadcrumbItem.d.ts b/types/reactstrap/v7/lib/BreadcrumbItem.d.ts new file mode 100644 index 0000000000..a3ce8156bf --- /dev/null +++ b/types/reactstrap/v7/lib/BreadcrumbItem.d.ts @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type BreadcrumbItemProps = React.HTMLAttributes & { + tag?: React.ReactType; + active?: boolean; + className?: string; + cssModule?: CSSModule; + // if a is passed as a string + // this could be href + [others: string]: any; +} & T; + +declare class BreadcrumbItem extends React.Component> {} +export default BreadcrumbItem; diff --git a/types/reactstrap/v7/lib/Button.d.ts b/types/reactstrap/v7/lib/Button.d.ts new file mode 100644 index 0000000000..f19ecf4e32 --- /dev/null +++ b/types/reactstrap/v7/lib/Button.d.ts @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ButtonProps = React.ButtonHTMLAttributes & { + outline?: boolean; + active?: boolean; + block?: boolean; + color?: string; + disabled?: boolean; + tag?: React.ReactType; + innerRef?: React.Ref; + + onClick?: React.MouseEventHandler; + size?: any; + id?: string; + style?: React.CSSProperties; + + cssModule?: CSSModule; +} & T; + +declare class Button extends React.Component> {} +export default Button; diff --git a/types/reactstrap/v7/lib/ButtonDropdown.d.ts b/types/reactstrap/v7/lib/ButtonDropdown.d.ts new file mode 100644 index 0000000000..92f16ce5ce --- /dev/null +++ b/types/reactstrap/v7/lib/ButtonDropdown.d.ts @@ -0,0 +1,10 @@ +import * as React from 'react'; +import { UncontrolledDropdownProps, DropdownProps } from './Dropdown'; + +export type UncontrolledProps = UncontrolledDropdownProps; +export type UncontrolledButtonDropdownProps = UncontrolledProps; + +export type ButtonDropdownProps = DropdownProps; + +declare class ButtonDropdown extends React.Component> {} +export default ButtonDropdown; diff --git a/types/reactstrap/v7/lib/ButtonGroup.d.ts b/types/reactstrap/v7/lib/ButtonGroup.d.ts new file mode 100644 index 0000000000..736f894165 --- /dev/null +++ b/types/reactstrap/v7/lib/ButtonGroup.d.ts @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ButtonGroupProps = React.HTMLAttributes & { + tag?: React.ReactType; + 'aria-label'?: string; + className?: string; + cssModule?: CSSModule; + role?: string; + size?: string; + vertical?: boolean; +} & T; + +declare class ButtonGroup extends React.Component> {} +export default ButtonGroup; diff --git a/types/reactstrap/v7/lib/ButtonToolbar.d.ts b/types/reactstrap/v7/lib/ButtonToolbar.d.ts new file mode 100644 index 0000000000..b19fff3274 --- /dev/null +++ b/types/reactstrap/v7/lib/ButtonToolbar.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ButtonToolbarProps = React.HTMLAttributes & { + tag?: React.ReactType; + 'aria-label'?: string; + className?: string; + cssModule?: CSSModule; + role?: string; +} & T; + +declare class ButtonToolbar extends React.Component> {} +export default ButtonToolbar; diff --git a/types/reactstrap/v7/lib/Card.d.ts b/types/reactstrap/v7/lib/Card.d.ts new file mode 100644 index 0000000000..772cad5a89 --- /dev/null +++ b/types/reactstrap/v7/lib/Card.d.ts @@ -0,0 +1,17 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardProps = React.HTMLAttributes & { + tag?: React.ReactType; + inverse?: boolean; + color?: string; + block?: boolean; + body?: boolean; + outline?: boolean; + className?: string; + cssModule?: CSSModule; + style?: React.CSSProperties; +} & T; + +declare class Card extends React.Component> {} +export default Card; diff --git a/types/reactstrap/v7/lib/CardBody.d.ts b/types/reactstrap/v7/lib/CardBody.d.ts new file mode 100644 index 0000000000..d8bcac515b --- /dev/null +++ b/types/reactstrap/v7/lib/CardBody.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardBodyProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardBody extends React.Component> {} +export default CardBody; diff --git a/types/reactstrap/v7/lib/CardColumns.d.ts b/types/reactstrap/v7/lib/CardColumns.d.ts new file mode 100644 index 0000000000..ccce622907 --- /dev/null +++ b/types/reactstrap/v7/lib/CardColumns.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardColumnsProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardColumns extends React.Component> {} +export default CardColumns; diff --git a/types/reactstrap/v7/lib/CardDeck.d.ts b/types/reactstrap/v7/lib/CardDeck.d.ts new file mode 100644 index 0000000000..88f1166339 --- /dev/null +++ b/types/reactstrap/v7/lib/CardDeck.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardDeckProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardDeck extends React.Component> {} +export default CardDeck; diff --git a/types/reactstrap/v7/lib/CardFooter.d.ts b/types/reactstrap/v7/lib/CardFooter.d.ts new file mode 100644 index 0000000000..c65ba5f8cf --- /dev/null +++ b/types/reactstrap/v7/lib/CardFooter.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardFooterProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardFooter extends React.Component> {} +export default CardFooter; diff --git a/types/reactstrap/v7/lib/CardGroup.d.ts b/types/reactstrap/v7/lib/CardGroup.d.ts new file mode 100644 index 0000000000..be33a187d5 --- /dev/null +++ b/types/reactstrap/v7/lib/CardGroup.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardGroupProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardGroup extends React.Component> {} +export default CardGroup; diff --git a/types/reactstrap/v7/lib/CardHeader.d.ts b/types/reactstrap/v7/lib/CardHeader.d.ts new file mode 100644 index 0000000000..ac46ca37ba --- /dev/null +++ b/types/reactstrap/v7/lib/CardHeader.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardHeaderProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardHeader extends React.Component> {} +export default CardHeader; diff --git a/types/reactstrap/v7/lib/CardImg.d.ts b/types/reactstrap/v7/lib/CardImg.d.ts new file mode 100644 index 0000000000..6c77d88257 --- /dev/null +++ b/types/reactstrap/v7/lib/CardImg.d.ts @@ -0,0 +1,17 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardImgProps = React.HTMLAttributes & { + tag?: React.ReactType; + top?: boolean; + bottom?: boolean; + className?: string; + cssModule?: CSSModule; + src?: string; + width?: string; + height?: string; + alt?: string; +} & T; + +declare class CardImg extends React.Component> {} +export default CardImg; diff --git a/types/reactstrap/v7/lib/CardImgOverlay.d.ts b/types/reactstrap/v7/lib/CardImgOverlay.d.ts new file mode 100644 index 0000000000..f4da865ae7 --- /dev/null +++ b/types/reactstrap/v7/lib/CardImgOverlay.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardImgOverlayProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardImgOverlay extends React.Component> {} +export default CardImgOverlay; diff --git a/types/reactstrap/v7/lib/CardLink.d.ts b/types/reactstrap/v7/lib/CardLink.d.ts new file mode 100644 index 0000000000..359cb6e32a --- /dev/null +++ b/types/reactstrap/v7/lib/CardLink.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardLinkProps = React.HTMLAttributes & { + tag?: React.ReactType; + innerRef?: React.Ref; + className?: string; + cssModule?: CSSModule; + href?: string; +} & T; + +declare class CardLink extends React.Component> {} +export default CardLink; diff --git a/types/reactstrap/v7/lib/CardSubtitle.d.ts b/types/reactstrap/v7/lib/CardSubtitle.d.ts new file mode 100644 index 0000000000..8e379ceaa1 --- /dev/null +++ b/types/reactstrap/v7/lib/CardSubtitle.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardSubtitleProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardSubtitle extends React.Component> {} +export default CardSubtitle; diff --git a/types/reactstrap/v7/lib/CardText.d.ts b/types/reactstrap/v7/lib/CardText.d.ts new file mode 100644 index 0000000000..fd3fb8eba9 --- /dev/null +++ b/types/reactstrap/v7/lib/CardText.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardTextProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardText extends React.Component> {} +export default CardText; diff --git a/types/reactstrap/v7/lib/CardTitle.d.ts b/types/reactstrap/v7/lib/CardTitle.d.ts new file mode 100644 index 0000000000..0d6bad3c89 --- /dev/null +++ b/types/reactstrap/v7/lib/CardTitle.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CardTitleProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CardTitle extends React.Component> {} +export default CardTitle; diff --git a/types/reactstrap/v7/lib/Carousel.d.ts b/types/reactstrap/v7/lib/Carousel.d.ts new file mode 100644 index 0000000000..69899eff34 --- /dev/null +++ b/types/reactstrap/v7/lib/Carousel.d.ts @@ -0,0 +1,39 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CarouselProps = React.HTMLProps & { + activeIndex?: number; + next: () => void; + previous: () => void; + keyboard?: boolean; + pause?: 'hover' | false; + ride?: 'carousel'; + interval?: number | string | boolean; + mouseEnter?: () => void; + mouseExit?: () => void; + slide?: boolean; + cssModule?: CSSModule +} & T; + +export type UncontrolledProps = React.HTMLProps & { + items: any[]; + activeIndex?: number; + next?: () => void; + previous?: () => void; + keyboard?: boolean; + pause?: "hover" | false; + ride?: "carousel"; + interval?: number | string | boolean; + mouseEnter?: () => void; + mouseExit?: () => void; + slide?: boolean; + cssModule?: CSSModule; + controls?: boolean; + indicators?: boolean; + autoPlay?: boolean; +} & T; + +export type UncontrolledCarouselProps = UncontrolledProps; + +declare class Carousel extends React.Component> {} +export default Carousel; diff --git a/types/reactstrap/v7/lib/CarouselCaption.d.ts b/types/reactstrap/v7/lib/CarouselCaption.d.ts new file mode 100644 index 0000000000..047505f318 --- /dev/null +++ b/types/reactstrap/v7/lib/CarouselCaption.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CarouselCaptionProps = React.HTMLProps & { + captionHeader?: string; + captionText: string; + cssModule?: CSSModule; +} & T; + +declare class CarouselCaption extends React.Component> {} +export default CarouselCaption; diff --git a/types/reactstrap/v7/lib/CarouselControl.d.ts b/types/reactstrap/v7/lib/CarouselControl.d.ts new file mode 100644 index 0000000000..fb309f4cb1 --- /dev/null +++ b/types/reactstrap/v7/lib/CarouselControl.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CarouselControlProps = React.HTMLProps & { + direction: 'prev' | 'next'; + onClickHandler: () => void; + cssModule?: CSSModule; + directionText: string; +} & T; + +declare class CarouselControl extends React.Component> {} +export default CarouselControl; diff --git a/types/reactstrap/v7/lib/CarouselIndicators.d.ts b/types/reactstrap/v7/lib/CarouselIndicators.d.ts new file mode 100644 index 0000000000..761ab8d1cf --- /dev/null +++ b/types/reactstrap/v7/lib/CarouselIndicators.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CarouselIndicatorsProps = React.HTMLProps & { + items: object[]; + activeIndex: number; + cssModule?: CSSModule; + onClickHandler: (idx: number) => void; +} & T; + +declare class CarouselIndicators extends React.Component> {} +export default CarouselIndicators; diff --git a/types/reactstrap/v7/lib/CarouselItem.d.ts b/types/reactstrap/v7/lib/CarouselItem.d.ts new file mode 100644 index 0000000000..8eb6bb325d --- /dev/null +++ b/types/reactstrap/v7/lib/CarouselItem.d.ts @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export interface Transition { + onEnter?: () => void; + onEntering?: () => void; + onEntered?: () => void; + onExit?: () => void; + onExiting?: () => void; + onExited?: () => void; +} + +export type CarouselItemProps = React.HTMLProps & Transition & { + tag?: React.ReactType; + in?: boolean; + cssModule?: CSSModule; + slide?: boolean; +} & T; + +declare class CarouselItem extends React.Component> {} +export default CarouselItem; diff --git a/types/reactstrap/v7/lib/Col.d.ts b/types/reactstrap/v7/lib/Col.d.ts new file mode 100644 index 0000000000..c52e32ec62 --- /dev/null +++ b/types/reactstrap/v7/lib/Col.d.ts @@ -0,0 +1,28 @@ +import * as React from 'react'; + +export type ColumnProps + = string + | boolean + | number + | { + size?: boolean | number | string + push?: string | number + pull?: string | number + offset?: string | number + order?: string | number + }; + +export type ColProps = React.HTMLProps & { + tag?: React.ReactType; + xs?: ColumnProps; + sm?: ColumnProps; + md?: ColumnProps; + lg?: ColumnProps; + xl?: ColumnProps; + + // custom widths + widths?: string[]; +} & T; + +declare class Col extends React.Component> {} +export default Col; diff --git a/types/reactstrap/v7/lib/Collapse.d.ts b/types/reactstrap/v7/lib/Collapse.d.ts new file mode 100644 index 0000000000..12247962aa --- /dev/null +++ b/types/reactstrap/v7/lib/Collapse.d.ts @@ -0,0 +1,35 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CollapseProps = React.HTMLProps & { + isOpen?: boolean; + classNames?: string; + cssModule?: CSSModule; + tag?: React.ReactType; + navbar?: boolean; + delay?: { + show: number + hide: number + }; + onOpened?: () => void; + onClosed?: () => void; + onEntering?: () => void; + onEntered?: () => void; + onExit?: () => void; + onExiting?: () => void; + onExited?: () => void; +} & T; + +export type UncontrolledProps = React.HTMLProps & { + isOpen?: boolean; + className?: string; + cssModule?: CSSModule; + tag?: React.ReactType; + navbar?: boolean; + toggle?: () => void; +} & T; + +export type UncontrolledCollapseProps = UncontrolledProps; + +declare class Collapse extends React.Component> {} +export default Collapse; diff --git a/types/reactstrap/v7/lib/Container.d.ts b/types/reactstrap/v7/lib/Container.d.ts new file mode 100644 index 0000000000..a39db466bb --- /dev/null +++ b/types/reactstrap/v7/lib/Container.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ContainerProps = React.HTMLAttributes & { + tag?: React.ReactType; + fluid?: boolean; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class Container extends React.Component> {} +export default Container; diff --git a/types/reactstrap/v7/lib/CustomInput.d.ts b/types/reactstrap/v7/lib/CustomInput.d.ts new file mode 100644 index 0000000000..5d0af9f5c8 --- /dev/null +++ b/types/reactstrap/v7/lib/CustomInput.d.ts @@ -0,0 +1,23 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type CustomInputType = + | 'select' + | 'file' + | 'radio' + | 'checkbox' + | 'switch'; + +export type CustomInputProps = React.InputHTMLAttributes & { + type: CustomInputType; + label?: React.ReactNode; + inline?: boolean; + bsSize?: 'lg' | 'sm'; + valid?: boolean; + invalid?: boolean; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class CustomInput extends React.Component> {} +export default CustomInput; diff --git a/types/reactstrap/v7/lib/Dropdown.d.ts b/types/reactstrap/v7/lib/Dropdown.d.ts new file mode 100644 index 0000000000..585a1e8693 --- /dev/null +++ b/types/reactstrap/v7/lib/Dropdown.d.ts @@ -0,0 +1,34 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type Direction = + | "up" + | "down" + | "left" + | "right"; + +export type UncontrolledProps = React.HTMLAttributes & { + isOpen?: boolean; + toggle?: () => void; + className?: string; + cssModule?: CSSModule; + nav?: boolean; + inNavbar?: boolean; + setActiveFromChild?: boolean; +} & T; + +export type UncontrolledDropdownProps = UncontrolledProps; + +export type Props = UncontrolledProps & { + disabled?: boolean; + direction?: Direction; + group?: boolean; + size?: string; + tag?: React.ReactType; + addonType?: boolean | 'prepend' | 'append'; +}; + +export type DropdownProps = Props; + +declare class Dropdown extends React.Component> {} +export default Dropdown; diff --git a/types/reactstrap/v7/lib/DropdownItem.d.ts b/types/reactstrap/v7/lib/DropdownItem.d.ts new file mode 100644 index 0000000000..d6b4344d59 --- /dev/null +++ b/types/reactstrap/v7/lib/DropdownItem.d.ts @@ -0,0 +1,18 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type DropdownItemProps = React.HTMLAttributes & { + disabled?: boolean; + divider?: boolean; + tag?: React.ReactType; + header?: boolean; + onClick?: (event: React.MouseEvent) => void; + className?: string; + cssModule?: CSSModule; + href?: string; + toggle?: boolean; + active?: boolean; +} & T; + +declare class DropdownItem extends React.Component> {} +export default DropdownItem; diff --git a/types/reactstrap/v7/lib/DropdownMenu.d.ts b/types/reactstrap/v7/lib/DropdownMenu.d.ts new file mode 100644 index 0000000000..fedb12f4c3 --- /dev/null +++ b/types/reactstrap/v7/lib/DropdownMenu.d.ts @@ -0,0 +1,16 @@ +import * as React from 'react'; +import * as Popper from 'popper.js'; +import { CSSModule } from '../index'; + +export type DropdownMenuProps = React.HTMLAttributes & { + tag?: React.ReactType; + right?: boolean; + className?: string; + cssModule?: CSSModule; + flip?: boolean; + modifiers?: Popper.Modifiers; + persist?: boolean; +} & T; + +declare class DropdownMenu extends React.Component> {} +export default DropdownMenu; diff --git a/types/reactstrap/v7/lib/DropdownToggle.d.ts b/types/reactstrap/v7/lib/DropdownToggle.d.ts new file mode 100644 index 0000000000..cdb665c6ce --- /dev/null +++ b/types/reactstrap/v7/lib/DropdownToggle.d.ts @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type DropdownToggleProps = React.HTMLAttributes & { + caret?: boolean; + className?: string; + cssModule?: CSSModule; + disabled?: boolean; + onClick?: React.MouseEventHandler; + outline?: boolean; + 'data-toggle'?: string; + 'aria-haspopup'?: boolean; + split?: boolean; + tag?: React.ReactType; + nav?: boolean; + color?: string; + size?: string; +} & T; + +declare class DropdownToggle extends React.Component> {} +export default DropdownToggle; diff --git a/types/reactstrap/v7/lib/Fade.d.ts b/types/reactstrap/v7/lib/Fade.d.ts new file mode 100644 index 0000000000..97fe421e7d --- /dev/null +++ b/types/reactstrap/v7/lib/Fade.d.ts @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type FadeProps = React.HTMLAttributes & { + in?: boolean; + baseClass?: string; + baseClassIn?: string; + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; + transitionAppearTimeout?: number; + transitionEnterTimeout?: number; + transitionLeaveTimeout?: number; + transitionAppear?: boolean; + transitionEnter?: boolean; + transitionLeave?: boolean; + onLeave?: () => void; + onEnter?: () => void; +} & T; + +declare class Fade extends React.Component> {} +export default Fade; diff --git a/types/reactstrap/v7/lib/Form.d.ts b/types/reactstrap/v7/lib/Form.d.ts new file mode 100644 index 0000000000..2b6668b631 --- /dev/null +++ b/types/reactstrap/v7/lib/Form.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type FormProps = React.HTMLProps & { + inline?: boolean; + tag?: React.ReactType; + innerRef?: React.Ref; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class Form extends React.Component> {} +export default Form; diff --git a/types/reactstrap/v7/lib/FormFeedback.d.ts b/types/reactstrap/v7/lib/FormFeedback.d.ts new file mode 100644 index 0000000000..e221c9809b --- /dev/null +++ b/types/reactstrap/v7/lib/FormFeedback.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type FormFeedbackProps = React.HTMLAttributes & { + tag?: string; + className?: string; + cssModule?: CSSModule; + valid?: boolean; +} & T; + +declare class FormFeedback extends React.Component> {} +export default FormFeedback; diff --git a/types/reactstrap/v7/lib/FormGroup.d.ts b/types/reactstrap/v7/lib/FormGroup.d.ts new file mode 100644 index 0000000000..f0369ff7d9 --- /dev/null +++ b/types/reactstrap/v7/lib/FormGroup.d.ts @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type FormGroupProps = React.HTMLProps & { + row?: boolean; + check?: boolean; + inline?: boolean; + disabled?: boolean; + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class FormGroup extends React.Component> {} +export default FormGroup; diff --git a/types/reactstrap/v7/lib/FormText.d.ts b/types/reactstrap/v7/lib/FormText.d.ts new file mode 100644 index 0000000000..f2fc6f30a6 --- /dev/null +++ b/types/reactstrap/v7/lib/FormText.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type FormTextProps = React.HTMLAttributes & { + inline?: boolean; + tag?: React.ReactType; + color?: string; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class FormText extends React.Component> {} +export default FormText; diff --git a/types/reactstrap/v7/lib/Input.d.ts b/types/reactstrap/v7/lib/Input.d.ts new file mode 100644 index 0000000000..87415b7e10 --- /dev/null +++ b/types/reactstrap/v7/lib/Input.d.ts @@ -0,0 +1,46 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type InputType = + | 'text' + | 'email' + | 'select' + | 'file' + | 'radio' + | 'checkbox' + | 'textarea' + | 'button' + | 'reset' + | 'submit' + | 'date' + | 'datetime-local' + | 'hidden' + | 'image' + | 'month' + | 'number' + | 'range' + | 'search' + | 'tel' + | 'url' + | 'week' + | 'password' + | 'datetime' + | 'time' + | 'color'; + +export type InputProps = React.InputHTMLAttributes & { + type?: InputType; + bsSize?: 'lg' | 'sm'; + state?: string; + valid?: boolean; + invalid?: boolean; + tag?: React.ReactType; + innerRef?: React.Ref; + plaintext?: boolean; + addon?: boolean; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class Input extends React.Component> {} +export default Input; diff --git a/types/reactstrap/v7/lib/InputGroup.d.ts b/types/reactstrap/v7/lib/InputGroup.d.ts new file mode 100644 index 0000000000..e95b6c5539 --- /dev/null +++ b/types/reactstrap/v7/lib/InputGroup.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type InputGroupProps = React.HTMLAttributes & { + tag?: React.ReactType; + size?: string; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class InputGroup extends React.Component> {} +export default InputGroup; diff --git a/types/reactstrap/v7/lib/InputGroupAddon.d.ts b/types/reactstrap/v7/lib/InputGroupAddon.d.ts new file mode 100644 index 0000000000..eec8a6727a --- /dev/null +++ b/types/reactstrap/v7/lib/InputGroupAddon.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type InputGroupAddonProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; + addonType: 'prepend' | 'append'; +} & T; + +declare class InputGroupAddon extends React.Component> {} +export default InputGroupAddon; diff --git a/types/reactstrap/v7/lib/InputGroupButtonDropdown.d.ts b/types/reactstrap/v7/lib/InputGroupButtonDropdown.d.ts new file mode 100644 index 0000000000..888364df14 --- /dev/null +++ b/types/reactstrap/v7/lib/InputGroupButtonDropdown.d.ts @@ -0,0 +1,9 @@ +import * as React from 'react'; +import { DropdownProps } from './Dropdown'; + +export type InputGroupButtonDropdownProps = DropdownProps & { + addonType: 'prepend' | 'append'; +} & T; + +declare class InputGroupButtonDropdown extends React.Component> {} +export default InputGroupButtonDropdown; diff --git a/types/reactstrap/v7/lib/InputGroupText.d.ts b/types/reactstrap/v7/lib/InputGroupText.d.ts new file mode 100644 index 0000000000..9e352ea9d8 --- /dev/null +++ b/types/reactstrap/v7/lib/InputGroupText.d.ts @@ -0,0 +1,10 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type InputGroupTextProps = React.HTMLAttributes & { + tag?: React.ReactType; + cssModule?: CSSModule; +} & T; + +declare class InputGroupText extends React.Component> {} +export default InputGroupText; diff --git a/types/reactstrap/v7/lib/Jumbotron.d.ts b/types/reactstrap/v7/lib/Jumbotron.d.ts new file mode 100644 index 0000000000..d271b63960 --- /dev/null +++ b/types/reactstrap/v7/lib/Jumbotron.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type JumbotronProps = React.HTMLAttributes & { + tag?: React.ReactType; + fluid?: boolean; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class Jumbotron extends React.Component> {} +export default Jumbotron; diff --git a/types/reactstrap/v7/lib/Label.d.ts b/types/reactstrap/v7/lib/Label.d.ts new file mode 100644 index 0000000000..89d9a96e48 --- /dev/null +++ b/types/reactstrap/v7/lib/Label.d.ts @@ -0,0 +1,27 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; +import { ColumnProps } from './Col'; + +type Intermediate = React.LabelHTMLAttributes & { + size?: any; +}; + +export type LabelProps = Intermediate & { + hidden?: boolean; + check?: boolean; + inline?: boolean; + disabled?: boolean; + size?: string; + for?: string; + tag?: string; + className?: string; + cssModule?: CSSModule; + xs?: ColumnProps; + sm?: ColumnProps; + md?: ColumnProps; + lg?: ColumnProps; + xl?: ColumnProps; +} & T; + +declare class Label extends React.Component> {} +export default Label; diff --git a/types/reactstrap/v7/lib/ListGroup.d.ts b/types/reactstrap/v7/lib/ListGroup.d.ts new file mode 100644 index 0000000000..1c2f6739e6 --- /dev/null +++ b/types/reactstrap/v7/lib/ListGroup.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ListGroupProps = React.HTMLAttributes & { + tag?: React.ReactType; + flush?: boolean; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class ListGroup extends React.Component> {} +export default ListGroup; diff --git a/types/reactstrap/v7/lib/ListGroupItem.d.ts b/types/reactstrap/v7/lib/ListGroupItem.d.ts new file mode 100644 index 0000000000..54ae820290 --- /dev/null +++ b/types/reactstrap/v7/lib/ListGroupItem.d.ts @@ -0,0 +1,18 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ListGroupItemProps = React.HTMLAttributes & { + tag?: React.ReactType; + active?: boolean; + disabled?: boolean; + color?: string; + action?: boolean; + className?: string; + cssModule?: CSSModule; + href?: string; + + onClick?: React.MouseEventHandler; +} & T; + +declare class ListGroupItem extends React.Component> {} +export default ListGroupItem; diff --git a/types/reactstrap/v7/lib/ListGroupItemHeading.d.ts b/types/reactstrap/v7/lib/ListGroupItemHeading.d.ts new file mode 100644 index 0000000000..6748aaa04c --- /dev/null +++ b/types/reactstrap/v7/lib/ListGroupItemHeading.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ListGroupItemHeadingProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class ListGroupItemHeading extends React.Component> {} +export default ListGroupItemHeading; diff --git a/types/reactstrap/v7/lib/ListGroupItemText.d.ts b/types/reactstrap/v7/lib/ListGroupItemText.d.ts new file mode 100644 index 0000000000..667f2cad70 --- /dev/null +++ b/types/reactstrap/v7/lib/ListGroupItemText.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ListGroupItemTextProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class ListGroupItemText extends React.Component> {} +export default ListGroupItemText; diff --git a/types/reactstrap/v7/lib/Media.d.ts b/types/reactstrap/v7/lib/Media.d.ts new file mode 100644 index 0000000000..971df9c22a --- /dev/null +++ b/types/reactstrap/v7/lib/Media.d.ts @@ -0,0 +1,23 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type MediaProps = React.HTMLAttributes & { + body?: boolean; + bottom?: boolean; + className?: string; + cssModule?: CSSModule; + heading?: boolean; + left?: boolean; + list?: boolean; + middle?: boolean; + object?: boolean; + right?: boolean; + tag?: React.ReactType; + top?: boolean; + src?: string; + href?: string; + alt?: string; +} & T; + +declare class Media extends React.Component> {} +export default Media; diff --git a/types/reactstrap/v7/lib/Modal.d.ts b/types/reactstrap/v7/lib/Modal.d.ts new file mode 100644 index 0000000000..f2761bbc91 --- /dev/null +++ b/types/reactstrap/v7/lib/Modal.d.ts @@ -0,0 +1,33 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; +import { FadeProps } from './Fade'; + +export type ModalProps = React.HTMLAttributes & { + isOpen?: boolean; + autoFocus?: boolean; + size?: string; + toggle?: () => void; + keyboard?: boolean; + backdrop?: boolean | 'static'; + onEnter?: () => void; + onExit?: () => void; + onOpened?: () => void; + onClosed?: () => void; + className?: string; + cssModule?: CSSModule; + wrapClassName?: string; + modalClassName?: string; + backdropClassName?: string; + contentClassName?: string; + zIndex?: number | string; + fade?: boolean; + backdropTransition?: FadeProps; + modalTransition?: FadeProps; + centered?: boolean; + external?: React.ReactNode; + labelledBy?: string; + role?: string; +} & T; + +declare class Modal extends React.Component> {} +export default Modal; diff --git a/types/reactstrap/v7/lib/ModalBody.d.ts b/types/reactstrap/v7/lib/ModalBody.d.ts new file mode 100644 index 0000000000..a7c38a1914 --- /dev/null +++ b/types/reactstrap/v7/lib/ModalBody.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ModalBodyProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class ModalBody extends React.Component> {} +export default ModalBody; diff --git a/types/reactstrap/v7/lib/ModalFooter.d.ts b/types/reactstrap/v7/lib/ModalFooter.d.ts new file mode 100644 index 0000000000..8ce9b23cf2 --- /dev/null +++ b/types/reactstrap/v7/lib/ModalFooter.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ModalFooterProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class ModalFooter extends React.Component> {} +export default ModalFooter; diff --git a/types/reactstrap/v7/lib/ModalHeader.d.ts b/types/reactstrap/v7/lib/ModalHeader.d.ts new file mode 100644 index 0000000000..4ef33e16ad --- /dev/null +++ b/types/reactstrap/v7/lib/ModalHeader.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ModalHeaderProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; + wrapTag?: React.ReactType; + toggle?: () => void; +} & T; + +declare class ModalHeader extends React.Component> {} +export default ModalHeader; diff --git a/types/reactstrap/v7/lib/Nav.d.ts b/types/reactstrap/v7/lib/Nav.d.ts new file mode 100644 index 0000000000..bc5fbdb6b9 --- /dev/null +++ b/types/reactstrap/v7/lib/Nav.d.ts @@ -0,0 +1,19 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type NavProps = React.HTMLProps & { + tabs?: boolean; + pills?: boolean; + vertical?: boolean | string; + horizontal?: string; + justified?: boolean; + fill?: boolean; + navbar?: boolean; + card?: boolean; + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class Nav extends React.Component> {} +export default Nav; diff --git a/types/reactstrap/v7/lib/NavItem.d.ts b/types/reactstrap/v7/lib/NavItem.d.ts new file mode 100644 index 0000000000..ff2ad879c3 --- /dev/null +++ b/types/reactstrap/v7/lib/NavItem.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type NavItemProps = React.HTMLAttributes & { + tag?: React.ReactType; + active?: boolean; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class NavItem extends React.Component> {} +export default NavItem; diff --git a/types/reactstrap/v7/lib/NavLink.d.ts b/types/reactstrap/v7/lib/NavLink.d.ts new file mode 100644 index 0000000000..4e88666c22 --- /dev/null +++ b/types/reactstrap/v7/lib/NavLink.d.ts @@ -0,0 +1,16 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type NavLinkProps = React.HTMLProps & { + tag?: React.ReactType; + innerRef?: React.Ref; + disabled?: boolean; + active?: boolean; + className?: string; + cssModule?: CSSModule; + onClick?: React.MouseEventHandler; + href?: string; +} & T; + +declare class NavLink extends React.Component> {} +export default NavLink; diff --git a/types/reactstrap/v7/lib/Navbar.d.ts b/types/reactstrap/v7/lib/Navbar.d.ts new file mode 100644 index 0000000000..a0f721835a --- /dev/null +++ b/types/reactstrap/v7/lib/Navbar.d.ts @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type NavbarProps = React.HTMLAttributes & { + light?: boolean; + dark?: boolean; + inverse?: boolean; + full?: boolean; + fixed?: string; + sticky?: string; + color?: string; + role?: string; + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; + toggleable?: boolean | string; + expand?: boolean | string; +} & T; + +declare class Navbar extends React.Component> {} +export default Navbar; diff --git a/types/reactstrap/v7/lib/NavbarBrand.d.ts b/types/reactstrap/v7/lib/NavbarBrand.d.ts new file mode 100644 index 0000000000..eea7ba15e4 --- /dev/null +++ b/types/reactstrap/v7/lib/NavbarBrand.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type NavbarBrandProps = React.HTMLProps & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class NavbarBrand extends React.Component> {} +export default NavbarBrand; diff --git a/types/reactstrap/v7/lib/NavbarToggler.d.ts b/types/reactstrap/v7/lib/NavbarToggler.d.ts new file mode 100644 index 0000000000..f4e1e212e5 --- /dev/null +++ b/types/reactstrap/v7/lib/NavbarToggler.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type NavbarTogglerProps = React.HTMLProps & { + tag?: React.ReactType; + type?: string; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class NavbarToggler extends React.Component> {} +export default NavbarToggler; diff --git a/types/reactstrap/v7/lib/Pagination.d.ts b/types/reactstrap/v7/lib/Pagination.d.ts new file mode 100644 index 0000000000..d31895d31d --- /dev/null +++ b/types/reactstrap/v7/lib/Pagination.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type PaginationProps = React.HTMLAttributes & { + className?: string; + cssModule?: CSSModule; + size?: string; +} & T; + +declare class Pagination extends React.Component> {} +export default Pagination; diff --git a/types/reactstrap/v7/lib/PaginationItem.d.ts b/types/reactstrap/v7/lib/PaginationItem.d.ts new file mode 100644 index 0000000000..b2567f5402 --- /dev/null +++ b/types/reactstrap/v7/lib/PaginationItem.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type PaginationItemProps = React.HTMLAttributes & { + className?: string; + cssModule?: CSSModule; + active?: boolean; + disabled?: boolean; + tag?: React.ReactType; +} & T; + +declare class PaginationItem extends React.Component> {} +export default PaginationItem; diff --git a/types/reactstrap/v7/lib/PaginationLink.d.ts b/types/reactstrap/v7/lib/PaginationLink.d.ts new file mode 100644 index 0000000000..5e1db2d2b7 --- /dev/null +++ b/types/reactstrap/v7/lib/PaginationLink.d.ts @@ -0,0 +1,14 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type PaginationLinkProps = React.HTMLProps & { + 'aria-label'?: string; + className?: string; + cssModule?: CSSModule; + next?: boolean; + previous?: boolean; + tag?: React.ReactType; +} & T; + +declare class PaginationLink extends React.Component> {} +export default PaginationLink; diff --git a/types/reactstrap/v7/lib/Popover.d.ts b/types/reactstrap/v7/lib/Popover.d.ts new file mode 100644 index 0000000000..8677fe69fa --- /dev/null +++ b/types/reactstrap/v7/lib/Popover.d.ts @@ -0,0 +1,27 @@ +import * as React from 'react'; +import * as Popper from 'popper.js'; +import { CSSModule } from '../index'; + +export type PopoverProps = React.HTMLAttributes & { + isOpen?: boolean; + toggle?: () => void; + target: string | HTMLElement; + container?: string | HTMLElement; + boundariesElement?: Popper.Boundary | Element; + className?: string; + placement?: Popper.Placement; + innerClassName?: string; + disabled?: boolean; + hideArrow?: boolean; + placementPrefix?: string; + delay?: number | {show: number, hide: number}; + modifiers?: Popper.Modifiers; + cssModule?: CSSModule; +} & T; + +export type UncontrolledPopoverProps = PopoverProps & { + defaultOpen?: boolean; +}; + +declare class Popover extends React.Component> {} +export default Popover; diff --git a/types/reactstrap/v7/lib/PopoverBody.d.ts b/types/reactstrap/v7/lib/PopoverBody.d.ts new file mode 100644 index 0000000000..ef274a0558 --- /dev/null +++ b/types/reactstrap/v7/lib/PopoverBody.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type PopoverBodyProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class PopoverBody extends React.Component> {} +export default PopoverBody; diff --git a/types/reactstrap/v7/lib/PopoverHeader.d.ts b/types/reactstrap/v7/lib/PopoverHeader.d.ts new file mode 100644 index 0000000000..2ee7d5665e --- /dev/null +++ b/types/reactstrap/v7/lib/PopoverHeader.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type PopoverHeaderProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class PopoverHeader extends React.Component> {} +export default PopoverHeader; diff --git a/types/reactstrap/v7/lib/Progress.d.ts b/types/reactstrap/v7/lib/Progress.d.ts new file mode 100644 index 0000000000..3a6b8178fa --- /dev/null +++ b/types/reactstrap/v7/lib/Progress.d.ts @@ -0,0 +1,19 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type ProgressProps = React.HTMLAttributes & { + bar?: boolean; + multi?: boolean; + tag?: string; + value?: string | number; + max?: string | number; + animated?: boolean; + striped?: boolean; + color?: string; + className?: string; + cssModule?: CSSModule; + barClassName?: string; +} & T; + +declare class Progress extends React.Component> {} +export default Progress; diff --git a/types/reactstrap/v7/lib/Row.d.ts b/types/reactstrap/v7/lib/Row.d.ts new file mode 100644 index 0000000000..c8887e3e12 --- /dev/null +++ b/types/reactstrap/v7/lib/Row.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type RowProps = React.HTMLProps & { + className?: string; + cssModule?: CSSModule; + tag?: React.ReactType; + noGutters?: boolean; +} & T; + +declare class Row extends React.Component> {} +export default Row; diff --git a/types/reactstrap/v7/lib/Spinner.d.ts b/types/reactstrap/v7/lib/Spinner.d.ts new file mode 100644 index 0000000000..3f60d0d77d --- /dev/null +++ b/types/reactstrap/v7/lib/Spinner.d.ts @@ -0,0 +1,14 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type SpinnerProps = React.HTMLProps & { + tag?: React.ReactType; + type?: string; + size?: any; + color?: string; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class Spinner extends React.Component> {} +export default Spinner; diff --git a/types/reactstrap/v7/lib/TabContent.d.ts b/types/reactstrap/v7/lib/TabContent.d.ts new file mode 100644 index 0000000000..6597484f9e --- /dev/null +++ b/types/reactstrap/v7/lib/TabContent.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type TabContentProps = React.HTMLAttributes & { + tag?: React.ReactType; + activeTab?: number | string; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class TabContent extends React.Component> {} +export default TabContent; diff --git a/types/reactstrap/v7/lib/TabPane.d.ts b/types/reactstrap/v7/lib/TabPane.d.ts new file mode 100644 index 0000000000..7f4624e23a --- /dev/null +++ b/types/reactstrap/v7/lib/TabPane.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type TabPaneProps = React.HTMLAttributes & { + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; + tabId?: number | string; +} & T; + +declare class TabPane extends React.Component> {} +export default TabPane; diff --git a/types/reactstrap/v7/lib/Table.d.ts b/types/reactstrap/v7/lib/Table.d.ts new file mode 100644 index 0000000000..8e59b6a13e --- /dev/null +++ b/types/reactstrap/v7/lib/Table.d.ts @@ -0,0 +1,20 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type TableProps = React.HTMLAttributes & { + className?: string; + cssModule?: CSSModule; + size?: string; + bordered?: boolean; + borderless?: boolean; + striped?: boolean; + inverse?: boolean; + hover?: boolean; + reflow?: boolean; + responsive?: boolean; + tag?: React.ReactType; + responsiveTag?: React.ReactType; +} & T; + +declare class Table extends React.Component> {} +export default Table; diff --git a/types/reactstrap/v7/lib/Tag.d.ts b/types/reactstrap/v7/lib/Tag.d.ts new file mode 100644 index 0000000000..dbec4c3516 --- /dev/null +++ b/types/reactstrap/v7/lib/Tag.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export type TagProps = React.HTMLAttributes & { + color?: string; + pill?: boolean; + tag?: React.ReactType; + className?: string; + cssModule?: CSSModule; +} & T; + +declare class Tag extends React.Component> {} +export default Tag; diff --git a/types/reactstrap/v7/lib/Tooltip.d.ts b/types/reactstrap/v7/lib/Tooltip.d.ts new file mode 100644 index 0000000000..5ec05fa72f --- /dev/null +++ b/types/reactstrap/v7/lib/Tooltip.d.ts @@ -0,0 +1,24 @@ +import * as React from 'react'; +import * as Popper from 'popper.js'; +import { CSSModule } from '../index'; + +export type UncontrolledProps = React.HTMLAttributes & { + target: string | HTMLElement; + container?: string | HTMLElement; + delay?: number | {show: number, hide: number}; + className?: string; + innerClassName?: string; + autohide?: boolean; + placement?: Popper.Placement; + modifiers?: Popper.Modifiers; + cssModule?: CSSModule; +} & T; +export type UncontrolledTooltipProps = UncontrolledProps; + +export type TooltipProps = UncontrolledTooltipProps & { + toggle?: () => void; + isOpen?: boolean; +}; + +declare class Tooltip extends React.Component> {} +export default Tooltip; diff --git a/types/reactstrap/v7/lib/Uncontrolled.d.ts b/types/reactstrap/v7/lib/Uncontrolled.d.ts new file mode 100644 index 0000000000..f20db2f896 --- /dev/null +++ b/types/reactstrap/v7/lib/Uncontrolled.d.ts @@ -0,0 +1,25 @@ +import * as React from 'react'; + +import { UncontrolledAlertProps } from './Alert'; +import { UncontrolledButtonDropdownProps } from './ButtonDropdown'; +import { UncontrolledDropdownProps } from './Dropdown'; +import { UncontrolledTooltipProps } from './Tooltip'; +import { UncontrolledCollapseProps } from './Collapse'; +import { UncontrolledCarouselProps } from './Carousel'; +import { UncontrolledPopoverProps } from './Popover'; + +export class UncontrolledAlert extends React.Component> {} +export class UncontrolledButtonDropdown extends React.Component> {} +export class UncontrolledDropdown extends React.Component> {} +export class UncontrolledTooltip extends React.Component> {} +export class UncontrolledCollapse extends React.Component> {} +export class UncontrolledCarousel extends React.Component> {} +export class UncontrolledPopover extends React.Component> {} + +export { UncontrolledAlertProps } from './Alert'; +export { UncontrolledButtonDropdownProps } from './ButtonDropdown'; +export { UncontrolledDropdownProps } from './Dropdown'; +export { UncontrolledTooltipProps } from './Tooltip'; +export { UncontrolledCollapseProps } from './Collapse'; +export { UncontrolledCarouselProps } from './Carousel'; +export { UncontrolledPopoverProps } from './Popover'; diff --git a/types/reactstrap/v7/reactstrap-tests.tsx b/types/reactstrap/v7/reactstrap-tests.tsx new file mode 100644 index 0000000000..67c24bce28 --- /dev/null +++ b/types/reactstrap/v7/reactstrap-tests.tsx @@ -0,0 +1,4359 @@ +import * as React from 'react'; +import { + Alert, + UncontrolledAlert, + Badge, + Breadcrumb, + BreadcrumbItem, + Button, + ButtonDropdown, + ButtonGroup, + ButtonToolbar, + Dropdown, + DropdownItem, + DropdownMenu, + DropdownToggle, + Card, + CardBody, + CardColumns, + CardDeck, + CardFooter, + CardGroup, + CardHeader, + CardImg, + CardImgOverlay, + CardLink, + CardSubtitle, + CardText, + CardTitle, + Carousel, + CarouselCaption, + CarouselControl, + CarouselItem, + CarouselIndicators, + Row, + Col, + Container, + Collapse, + CustomInput, + Fade, + Form, + FormFeedback, + FormGroup, + FormText, + Input, + InputGroup, + InputGroupAddon, + InputGroupButtonDropdown, + InputGroupText, + Pagination, + Label, + ListGroup, + ListGroupItem, + ListGroupItemHeading, + ListGroupItemText, + ModalFooter, + Modal, + ModalBody, + ModalHeader, + Jumbotron, + Media, + Nav, + Navbar, + NavbarBrand, + NavbarToggler, + NavItem, + NavLink, + PaginationItem, + PaginationLink, + Popover, + PopoverBody, + PopoverHeader, + Progress, + TabPane, + UncontrolledButtonDropdown, + UncontrolledDropdown, + UncontrolledTooltip, + UncontrolledCollapse, + UncontrolledCarousel, + TabContent, + Table, + Tag, + Tooltip, + Spinner, + UncontrolledPopover, +} from 'reactstrap'; + +// --------------- Alert +const Examplea = (props: any) => { + return ( +
+ + Well done! You successfully read this important alert message. + + + Heads up! This alert needs your attention, but it's not super important. + + + Warning! Better check yourself, you're not looking too good. + + + Oh snap! Change a few things up and try submitting again. + +
+ ); +}; + +class AlertExample extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.state = { + visible: true + }; + } + + onDismiss = () => { + this.setState({ visible: false }); + } + + render() { + return ( + + I am an alert and I can be dismissed! + + ); + } +} + +function AlertExample1() { + return ( + + I am an alert and I can be dismissed! + + ); +} + +// --------------- Badge +class Example2 extends React.Component { + render() { + return ( +
+

Heading New

+

Heading New

+

Heading New

+

Heading New

+
Heading New
+
Heading New
+
+ ); + } +} + +export class Example3 extends React.Component { + render() { + return ( +
+ default + primary + success + info + warning + danger +
+ ); + } +} + +class Example4 extends React.Component { + render() { + return ( +
+ default{' '} + primary{' '} + success{' '} + info{' '} + warning{' '} + danger +
+ ); + } +} + +// ------------- Breadcrumbs +const Example5 = (props: any) => { + return ( +
+ + Home + + + Home + Library + + + Home + Library + Data + +
+ ); +}; + +const Example6 = (props: any) => { + return ( +
+ + Home + Library + Data + Bootstrap + +
+ ); +}; + +// ------------- Buttons +class Example7 extends React.Component { + render() { + return ( +
+ {' '} + {' '} + {' '} + {' '} + {' '} + {' '} + +
+ ); + } +} + +class Example8 extends React.Component { + render() { + return ( +
+ {' '} + {' '} + {' '} + {' '} + {' '} + +
+ ); + } +} + +const Example9 = ( +
+ {' '} + +
+); + +const Example10 = ( +
+ {' '} + +
+); + +const Example11 = ( +
+ + +
+); + +const Example12 = ( +
+ {' '} + +
+); + +const Example13 = ( +
+ {' '} + +
+); + +interface CustomButtonProps extends ButtonProps { + customProp: string; +} +// NOTE: not adding the <{}> causes the generic parameter to be a spread type of CustomButtonProps, +// for some reason this causes children to be inferred as being 'ReactNode & {}' which makes the spread +// invalid. TS3.2 bug? +const CustomButton: React.SFC = props => {...props}/>; + +class Example14 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.state = { cSelected: [] }; + + this.onRadioBtnClick = this.onRadioBtnClick.bind(this); + this.onCheckboxBtnClick = this.onCheckboxBtnClick.bind(this); + } + + onRadioBtnClick(rSelected: number) { + this.setState({ rSelected }); + } + + onCheckboxBtnClick(selected: number) { + const index = this.state.cSelected.indexOf(selected); + if (index < 0) { + this.state.cSelected.push(selected); + } else { + this.state.cSelected.splice(index, 1); + } + this.setState({ cSelected: [...this.state.cSelected] }); + } + + render() { + return ( +
+
Radio Buttons
+ + + + + +

Selected: {this.state.rSelected}

+ +
Checkbox Buttons
+ + + + + +

Selected: {JSON.stringify(this.state.cSelected)}

+
+ ); + } +} + +// ------------- Button Dropdown +class Example15 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( + + + Button Dropdown + + + Header + Action + Another Action + + ) => { + // something happens here + }}>Another Action + + + ); + } +} + +const Example16 = ( + true}> + + Text + + + Header + Action + Another Action + + Another Action + + +); + +const Example17 = (props: any) => ( + true}> + + + + Header + Action + Another Action + + Another Action + + +); + +const Example18 = ( +
+ true}> + + Large Button + + + Another Action + Another Action + + + + true}> + + Small Button + + + Another Action + Another Action + + +
+); + +const Example19 = ( + true} direction="up"> + + Dropup + + + Another Action + Another Action + + +); + +// --------------- ButtonGroup +class Example20 extends React.Component { + render() { + return ( + + {' '} + {' '} + + + ); + } +} + +class Example21 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + ); + } +} + +const Example22 = (props: any) => ( +
+ + + + + + + + + + + + + + + + + +
+); + +const Example23 = (props: any) => ( + + + + true}> + + Dropdown + + + Dropdown Link + Dropdown Link + + + +); + +const Example24 = (props: any) => ( + + + + true}> + + Dropdown + + + Dropdown Link + Dropdown Link + + + +); + +// ------------------ Cards +const Example25 = (props: any) => { + return ( +
+ + + + Card title + Card subtitle + Some quick example text to build on the card title and make up the bulk of the card's content. + + + +
+ ); +}; + +const Example26 = (props: any) => { + return ( +
+ + + Card title + Card subtitle + + Card image cap + + Some quick example text to build on the card title and make up the bulk of the card's content. + Card Link + Another Link + + +
+ ); +}; + +const Example27 = (props: any) => { + return ( + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + ); +}; + +const Example28 = (props: any) => { + return ( +
+ + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + +
+ ); +}; + +const Example29 = (props: any) => { + return ( +
+ + Header + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + Footer + + + + Featured + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + Footer + +
+ ); +}; + +const Example30 = (props: any) => { + return ( +
+ + + + Card Title + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + Last updated 3 mins ago + + + + + + Card Title + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + Last updated 3 mins ago + + + + +
+ ); +}; + +const Example31 = (props: any) => { + return ( +
+ + + + Card Title + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + Last updated 3 mins ago + + + +
+ ); +}; + +const Example32 = (props: any) => { + return ( +
+ + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + +
+ ); +}; + +const Example33 = (props: any) => { + return ( +
+ + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + +
+ ); +}; + +const Example34 = (props: any) => { + return ( + + + + + Card title + Card subtitle + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + + + + + + Card title + Card subtitle + This card has supporting text below as a natural lead-in to additional content. + + + + + + + Card title + Card subtitle + + This is a wider card with supporting text below as a natural lead-in to additional content. This + card has even longer content than the first to show that equal height action. + + + + + + ); +}; + +const Example35 = (props: any) => { + return ( + + + + + Card title + Card subtitle + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + + + + + + Card title + Card subtitle + This card has supporting text below as a natural lead-in to additional content. + + + + + + + Card title + Card subtitle + + This is a wider card with supporting text below as a natural lead-in to additional content. This card has + even longer content than the first to show that equal height action. + + + + + + ); +}; + +const Example36 = (props: any) => { + return ( + + + + + Card title + Card subtitle + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + + + + + + + + Card title + Card subtitle + This card has supporting text below as a natural lead-in to additional content. + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + + Card title + Card subtitle + + This is a wider card with supporting text below as a natural lead-in to additional content. This card + has even longer content than the first to show that equal height action. + + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + ); +}; + +// ------------------ Collapse + +class Example37 extends React.Component { + state: any; + constructor(props: any) { + super(props); + this.toggle = this.toggle.bind(this); + this.state = { collapse: false }; + } + + toggle() { + this.setState({ collapse: !this.state.collapse }); + } + + render() { + return ( +
+ + + + + Anim pariatur cliche reprehenderit, + enim eiusmod high life accusamus terry richardson ad squid. Nihil + anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. + + + +
+ ); + } +} + +class Example38 extends React.Component { + state: any; + constructor(props: any) { + super(props); + this.onOpened = this.onOpened.bind(this); + this.onClosed = this.onClosed.bind(this); + this.toggle = this.toggle.bind(this); + this.state = { collapse: false, status: 'Closed' }; + } + + onOpened() { + this.setState({ ...this.state, status: 'Opened' }); + } + + onClosed() { + this.setState({ ...this.state, status: 'Closed' }); + } + + toggle() { + const status = !this.state.collapse ? 'Opening...' : 'Closing...'; + this.setState({ collapse: !this.state.collapse, status }); + } + + render() { + return ( +
+ +
Current state: {this.state.status}
+ + + + Anim pariatur cliche reprehenderit, + enim eiusmod high life accusamus terry richardson ad squid. Nihil + anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. + + + +
+ ); + } +} + +// ------- Dropdown + +class Example39 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( + + + Dropdown + + + Header + Action + Another Action + + Another Action + + + ); + } +} + +const Example40 = (props: any) => ( + false}> + + Dropdown + + + Header + Action + Another Action + + Another Action + + +); + +const Example41 = (props: any) => ( + Header +); + +const Example42 = (props: any) => ( +
+ + Action + Action + true}> + asdfasd + sadfas + + + true}> + sadfasd + sadf + + + true}> + asdf + sasdfsdf + + +
+); + +class Example43 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( + + + Custom Dropdown Content + + +
Custom dropdown item
+
Custom dropdown item
+
Custom dropdown item
+
Custom dropdown item
+
+
+ ); + } +} + +function Example44() { + return ( + + + Dropdown + + + Header + Action + Another Action + + Another Action + + + ); +} + +// ------------------ Form +class Example45 extends React.Component { + render() { + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is some placeholder block-level help text for the above input. + It's a bit lighter and easily wraps to a new line. + + + + Radio Buttons + + + + + + + + + + + + + + + + + + + + + + +
+ ); + } +} + +class Example46 extends React.Component { + render() { + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is some placeholder block-level help text for the above input. + It's a bit lighter and easily wraps to a new line. + + + + + Radio Buttons + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ); + } +} + +class Example47 extends React.Component { + render() { + return ( +
+ + {' '} + + + {' '} + + {' '} + + + {' '} + +
+ ); + } +} + +class Example48 extends React.Component { + render() { + return ( +
+ + + + Success! You did it! + Example help text that remains unchanged. + + + + + Whoops, check your formatting and try again. + Example help text that remains unchanged. + + + + + Oh noes! that name is already taken + Example help text that remains unchanged. + +
+ ); + } +} + +class Example49 extends React.Component { + render() { + return ( +
+ + + Some static value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is some placeholder block-level help text for the above input. + It's a bit lighter and easily wraps to a new line. + + + + + + + + +
+ ); + } +} + +class Example50 extends React.Component { + render() { + return ( +
+ + + + + + + + + + + + +
+ ); + } +} + +class Example51 extends React.Component { + render() { + return ( +
+ + + + + {' '} + + + + + {' '} + +
+ ); + } +} + +const Example52 = (props: any) => { + return ( +
+ + @ + + +
+ + + + + + +
+ + + @example.com + +
+ + + $ + $ + + + + $ + $ + + +
+ + $ + + .00 + +
+ ); +}; + +const Example53 = (props: any) => { + return ( +
+ + To the Left! + + +
+ + + To the Right! + +
+ + To the Left! + + To the Right! + +
+ ); +}; + +const Example54 = (props: any) => { + return ( +
+ + @lg + + +
+ + @normal + + +
+ + @sm + + +
+ ); +}; + +const Example55 = (props: any) => { + return ( +
+ + + + +
+ + + + +
+ + + + + +
+ ); +}; + +const Example56 = (props: any) => { + return ( +
+ + @lg + + +
+ + @normal + + +
+ + @sm + + +
+ ); +}; + +const Example57 = (props: any) => { + return ( +
+ + + + +
+ + + + +
+ + + + + +
+ ); +}; + +const Example58 = (props: any) => { + return ( +
+ + To the Left! + + +
+ + + To the Right! + +
+ + To the Left! + + To the Right! + +
+ ); +}; + +const Example59 = (props: any) => { + return ( +
+ +

Hello, world!

+

This is a simple hero unit, a simple Jumbotron-style component for calling extra attention to featured content or information.

+
+

It uses utility classes for typgraphy and spacing to space content out within the larger container.

+

+ +

+
+
+ ); +}; + +const Example60 = (props: any) => { + return ( +
+ + +

Fluid jumbotron

+

This is a modified jumbotron that occupies the entire horizontal space of its parent.

+
+
+
+ ); +}; + +class Example61 extends React.Component { + render() { + return ( + + + .col + + + .col + .col + .col + .col + + + .col-3 + .col-auto - variable width content + .col-3 + + + .col-6 + .col-6 + + + .col-6 .col-sm-4 + .col-6 .col-sm-4 + .col .col-sm-4 + + + .col .col-sm-6 .col-sm-push-2 .col-sm-pull-2 .col-sm-offset-2 + + + .col .col-sm-12 .col-md-6 .col-md-offset-3 + + + .col .col-sm .col-sm-offset-1 + .col .col-sm .col-sm-offset-1 + + + ); + } +} + +class Example62 extends React.Component { + render() { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + + ); + } +} + +class Example63 extends React.Component { + render() { + return ( + + Cras justo odio 14 + Dapibus ac facilisis in 2 + Morbi leo risus 1 + + ); + } +} + +class Example64 extends React.Component { + render() { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + + ); + } +} + +class Example65 extends React.Component { + render() { + return ( +
+

Anchors

+

Be sure to not use the standard .btn classes here.

+ + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + +

+

Buttons

+ + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + +
+ ); + } +} + +class Example66 extends React.Component { + render() { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + + ); + } +} + +class Example67 extends React.Component { + render() { + return ( + + + List group item heading + + Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. + + + + List group item heading + + Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. + + + + List group item heading + + Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. + + + + ); + } +} + +// ------------- Media +const Example68 = () => { + return ( + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus + odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. + Donec lacinia congue felis in faucibus. + + + ); +}; + +const Example69 = () => { + return ( + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus + odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. + Donec lacinia congue felis in faucibus. + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + ); +}; + +const Example70 = () => { + return ( +
+ + + + + + + Top aligned media + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + + Middle aligned media + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + + Bottom aligned media + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + +
+ ); +}; + +const Example71 = () => { + return ( + + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. + Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi + vulputate fringilla. Donec lacinia congue felis in faucibus. + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. + Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi + vulputate fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + ); +}; + +// --------------- Modal +class ModalExample72 extends React.Component { + state: any; + constructor(props: any) { + super(props); + this.state = { + modal: false + }; + + this.toggle = this.toggle.bind(this); + } + + toggle() { + this.setState({ + modal: !this.state.modal + }); + } + + render() { + return ( +
+ + + Modal title + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat + nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit + anim id est laborum. + + + {' '} + + + +
+ ); + } +} + +class ModalExample73 extends React.Component { + state: any; + constructor(props: any) { + super(props); + this.state = { + modal: false, + backdrop: true + }; + + this.toggle = this.toggle.bind(this); + this.changeBackdrop = this.changeBackdrop.bind(this); + } + + toggle() { + this.setState({ + modal: !this.state.modal + }); + } + + changeBackdrop(e: React.ChangeEvent) { + let value = e.target.value; + if (value !== 'static') { + value = JSON.parse(value); + } + this.setState({ backdrop: value }); + } + + render() { + return ( +
+
e.preventDefault()}> + + {' '} + + + + + + + {' '} + +
+ + Modal title + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. + + + {' '} + + + +
+ ); + } +} + +class ModalExample74 extends React.Component { + state: any; + constructor(props: any) { + super(props); + this.state = { + modal: false, + nestedModal: false, + }; + + this.toggle = this.toggle.bind(this); + this.toggleNested = this.toggleNested.bind(this); + } + + toggle() { + this.setState({ + modal: !this.state.modal + }); + } + + toggleNested() { + this.setState({ + nestedModal: !this.state.nestedModal + }); + } + + render() { + return ( +
+ + + Modal title + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. +
+ + + Nested Modal title + Stuff and things + + {' '} + + + +
+ + {' '} + + +
+
+ ); + } +} + +class Example75 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + isOpen: false + }; + } + toggle() { + this.setState({ + isOpen: !this.state.isOpen + }); + } + render() { + return ( +
+ + reactstrap + + + + + +
+ ); + } +} + +class Example76 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggleNavbar = this.toggleNavbar.bind(this); + this.state = { + collapsed: true + }; + } + + toggleNavbar() { + this.setState({ + collapsed: !this.state.collapsed + }); + } + render() { + return ( +
+ + reactstrap + + + + + +
+ ); + } +} + +class Example77 extends React.Component { + render() { + return ( +
+

List Based

+ +
+

Link Based

+ +
+ ); + } +} + +class Example78 extends React.Component { + render() { + return ( +
+

List Based

+ +
+

Link based

+ +
+ ); + } +} + +class Example79 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( +
+ +
+ ); + } +} + +class Example80 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( +
+ +
+ ); + } +} + +// ----------- Pagination +class Example81 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + + + ); + } +} + +class Example82 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + + + ); + } +} + +class Example83 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + + + ); + } +} + +class Example84 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + + + ); + } +} + +// ------------------------- Popover +class Example85 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + popoverOpen: false + }; + } + + toggle() { + this.setState({ + popoverOpen: !this.state.popoverOpen + }); + } + + render() { + return ( +
+ + {}}> + Popover Title + Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. + +
+ ); + } +} + +class PopoverItem extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + popoverOpen: false + }; + } + + toggle() { + this.setState({ + popoverOpen: !this.state.popoverOpen + }); + } + + render() { + return ( + + + + Popover Title + Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. + + + ); + } +} + +class PopoverExampleMulti extends React.Component}> { + state: {popovers: Array<{placement: string; text: string; }>}; + constructor(props: any) { + super(props); + + this.state = { + popovers: [ + { + placement: 'top', + text: 'Top' + }, + { + placement: 'bottom', + text: 'Bottom' + }, + { + placement: 'left', + text: 'Left' + }, + { + placement: 'right', + text: 'Right' + } + ] + }; + } + + render() { + return ( +
+ {this.state.popovers.map((popover, i) => { + return ; + })} +
+ ); + } +} + +// ------------------------- Progress + +const Example86 = (props: any) => { + return ( +
+
0%
+ +
25%
+ +
50%
+ +
75%
+ +
100%
+ +
Multiple bars
+ + + + + + + +
+ ); +}; + +const Example87 = (props: any) => { + return ( +
+ + + + + +
+ ); +}; + +const Example88 = (props: any) => { + return ( +
+ 25% + 1/2 + You're almost there! + You did it! + + Meh + Wow! + Cool + 20% + !! + +
+ ); +}; + +const Example89 = (props: any) => { + return ( +
+ + + + + + + + + + + +
+ ); +}; + +const Example90 = (props: any) => { + return ( +
+ + + + + + + + + + + +
+ ); +}; + +const Example91 = (props: any) => { + return ( +
+
Plain
+ + + + + + + +
With Labels
+ + Meh + Wow! + 25% + LOOK OUT!! + +
Stripes and Animations
+ + Stripes + Animated Stripes + Plain + +
+ ); +}; + +const Example92 = (props: any) => { + return ( +
+
1 of 5
+ +
50 of 135
+ +
75 of 111
+ +
463 of 500
+ + +
Various (40) of 55
+ + 5 + 15 + 10 + 10 + +
+ ); +}; + +// --------------- Table +class Example93 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example94 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example95 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example96 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example97 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example98 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example99 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Table headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell
+ ); + } +} + +class Example100 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Table headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell
+ ); + } +} + +class Example101 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + activeTab: '1' + }; + } + + toggle(tab: string) { + if (this.state.activeTab !== tab) { + this.setState({ + activeTab: tab + }); + } + } + render() { + return ( +
+ + + + + +

Tab 1 Contents

+ +
+
+ + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + +
+
+ ); + } +} + +class Example102 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + tooltipOpen: false + }; + } + + toggle() { + this.setState({ + tooltipOpen: !this.state.tooltipOpen + }); + } + + render() { + return ( +
+

Somewhere in here is a tooltip.

+ + Hello world! + +
+ ); + } +} + +class Example103 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + tooltipOpen: false + }; + } + + toggle() { + this.setState({ + tooltipOpen: !this.state.tooltipOpen + }); + } + + render() { + return ( +
+

Sometimes you need to allow users to select text within a tooltip.

+ + Try to select this text! + +
+ ); + } +} + +class TooltipItem extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + tooltipOpen: false + }; + } + + toggle() { + this.setState({ + tooltipOpen: !this.state.tooltipOpen + }); + } + + render() { + return ( + + + + Tooltip Content! + + + ); + } +} + +class TooltipExampleMulti extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.state = { + tooltips: [ + { + placement: 'top', + text: 'Top' + }, + { + placement: 'bottom', + text: 'Bottom' + }, + { + placement: 'left', + text: 'Left' + }, + { + placement: 'right', + text: 'Right' + } + ] + }; + } + + render() { + return ( +
+ {this.state.tooltips.map((tooltip: {placement: string; text: string; }, i: number) => { + return ; + })} +
+ ); + } +} + +function Example() { + return ( +
+

Somewhere in here is a tooltip.

+ + Hello world! + +
+ ); +} + +function Example104() { + const props = { + className: 'my-input', + style: { + borderColor: 'black', + } + }; + + return ( + + + + + + + + ); +} + +function Example105() { + return ( + + + + +
+ Item +
+
+
+ ); +} + +function Example106() { + return ( + + ); +} + +const CSSModuleExample = (props: any) => { + const cssModule = { + btn: 'hash' + }; + + return ( + + ); +}; + +class Example107 extends React.Component { + private input: HTMLInputElement | null; + + render() { + return { this.input = input; }} />; + } +} + +class Example108 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + isOpen: false + }; + } + toggle() { + this.setState({ + isOpen: !this.state.isOpen + }); + } + render() { + return ( +
+ + + reactstrap + + + + +
+ ); + } +} + +class Example109 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + isOpen: false + }; + } + toggle() { + this.setState({ + isOpen: !this.state.isOpen + }); + } + render() { + return ( +
+ + + reactstrap + + + + +
+ ); + } +} + +class Example110 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + isOpen: false + }; + } + toggle() { + this.setState({ + isOpen: !this.state.isOpen + }); + } + render() { + return ( +
+ + + reactstrap + + + + +
+ ); + } +} + +class Example111 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + isOpen: false + }; + } + toggle() { + this.setState({ + isOpen: !this.state.isOpen + }); + } + render() { + return ( +
+ + + reactstrap + + + + +
+ ); + } +} + +class Example112 extends React.Component { + state: any; + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + isOpen: false + }; + } + toggle() { + this.setState({ + isOpen: !this.state.isOpen + }); + } + render() { + return ( +
+ + + reactstrap + + + + +
+ ); + } +} + +const Example113 = (props: any) => { + return ( +
+ + + Anim pariatur cliche reprehenderit, + enim eiusmod high life accusamus terry richardson ad squid. Nihil + anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. + + +
+ ); + }; + +class Example114 extends React.Component { + state: any; + private element: HTMLElement; + + refFn(r: HTMLElement | null) { + if (r) { + this.element = r; + } + } + + render() { + return ( +
+

Somewhere in here is a tooltip.

+ + Hello world! + +
+ ); + } +} + +class Example115 extends React.Component { + // https://reactstrap.github.io/components/carousel/ + + private readonly items = [ + { + src: 'data:image/svg+xml...', + altText: 'Slide 1', + caption: 'Slide 1' + }, + { + src: 'data:image/svg+xml...', + altText: 'Slide 2', + caption: 'Slide 2' + }, + { + src: 'data:image/svg+xml...', + altText: 'Slide 3', + caption: 'Slide 3' + } + ]; + + private animating: boolean; + + state: any; + constructor(props: any) { + super(props); + this.state = { activeIndex: 0 }; + this.next = this.next.bind(this); + this.previous = this.previous.bind(this); + this.goToIndex = this.goToIndex.bind(this); + this.onExiting = this.onExiting.bind(this); + this.onExited = this.onExited.bind(this); + } + + onExiting() { + this.animating = true; + } + + onExited() { + this.animating = false; + } + + next() { + if (this.animating) return; + const nextIndex = this.state.activeIndex === this.items.length - 1 ? 0 : this.state.activeIndex + 1; + this.setState({ activeIndex: nextIndex }); + } + + previous() { + if (this.animating) return; + const nextIndex = this.state.activeIndex === 0 ? this.items.length - 1 : this.state.activeIndex - 1; + this.setState({ activeIndex: nextIndex }); + } + + goToIndex(newIndex: number) { + if (this.animating) return; + this.setState({ activeIndex: newIndex }); + } + + render() { + const { activeIndex } = this.state; + + const slides = this.items.map((item) => { + return ( + + {item.altText} + + + ); + }); + + return ( + + + {slides} + + + + ); + } + } + +const Example116 = (props: any) => { + return( +
+ + + + +
+ + + + + Button Dropdown + + + Header + Action + Another Action + + Another Action + + + +
+ + + + + + Header + Action + Another Action + + Another Action + + + + + +
+ ); +}; + +function Example117() { + const ref = (e: any) => {}; + + + + + + Lorem ipsum dolor sit amet consectetur adipisicing elit. Nesciunt magni, voluptas debitis + similique porro a molestias consequuntur earum odio officiis natus, amet hic, iste sed + dignissimos esse fuga! Minus, alias. + + + + + ); +} + +function Example124() { + // https://reactstrap.github.io/components/carousel/ + const items = [ + { + src: 'data:image/svg+xml...', + altText: 'Slide 1', + caption: 'Slide 1' + }, + { + src: 'data:image/svg+xml...', + altText: 'Slide 2', + caption: 'Slide 2' + }, + { + src: 'data:image/svg+xml...', + altText: 'Slide 3', + caption: 'Slide 3' + } + ]; + + return ( + + ); +} + +function Example125() { + return ( +
+ + + + + + +
+ ); +} + +function Example126() { + return ( +
+ + Popover Title + Lorem ipsum dolor sit amet + + + Popover Title + Lorem ipsum dolor sit amet + +
+ ); +} diff --git a/types/reactstrap/v7/tsconfig.json b/types/reactstrap/v7/tsconfig.json new file mode 100644 index 0000000000..eab2583792 --- /dev/null +++ b/types/reactstrap/v7/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "jsx": "react", + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "reactstrap-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/reactstrap/v7/tslint.json b/types/reactstrap/v7/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/reactstrap/v7/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }