Commit Graph

86 Commits

Author SHA1 Message Date
Sean Kelley
ee05115ac7 Reactstrap: update types for innerRefs.
Refer to React's Ref<T> class instead. This way the types of the innerRef reflect
whatever the installed typings for React say a ref can be.
2018-05-21 14:10:14 -07:00
Sean Kelley
4563f43f69 Reactstrap: StatelessComponent -> Component where appropriate.
(See also #24846 for prior work.)

Update Reactstrap to declare components that aren't stateless functional components
as regular components. This allows consumers to use ref-related APIs, namely, the
`ref` prop and `forwardRef`.

Previously, Typescript would outright deny passing `ref`, and any attempts to use
`forwardRef` would cause very confusing type errors claiming that the component class
you were trying to refer to didn't exist (?!).

Note that many components actually are implemented as stateless components, and as such
their typings haven't been changed.

I found the list of components needing this update by checking out current master
of reactstrap (1d20d6d52c258428df39429e09c84b0ddcac76ee), then

```sh
cd src
rg 'extends (React.)?Component' -l | grep -v '__tests__'
```
2018-05-21 13:31:14 -07:00
Fábio Paiva
232d7ea3fa Reactstrap - Remove myself as contributor to stop receiving notifications #25563 (#25585) 2018-05-07 13:21:56 -07:00
devjedi
fe2dca7edd Added missing "order" attribute to ColumnProps (#25336)
reactstrap supports the order attribute in the props of the <Col> component.
This was still missing from the types.
See: https://reactstrap.github.io/components/layout/
2018-05-03 09:54:57 -07:00
Florent SCHILDKNECHT
6a7b69883e [reactstrap] Correct FormGroups props typings (#25208) 2018-04-24 16:13:13 -07:00
Pat Gaffney
60f80dd6e2 reactstrap: Add Missing Prop Types (#25104)
* reactstrap: Add hideArrow PropType to <Popover/>

* reactstrap: Remove dropup prop in favor of direction for <Dropdown/>

* reactstrap: Update the version to 5.0 in index.d.ts header
2018-04-24 16:12:30 -07:00
Sean Kelley
cdb3807edb reactstrap: Input from StatelessComponent to React.Component subclass (#24846)
* reactstrap: Input from StatelessComponent to ComponentClass

`Input` is a full React component (`ComponentClass`), not a stateless component. In particular, this change allows consumers to pass `ref` to it (not legal with `StatelessComponent`), which useful for e.g. calling `HTMLInputElement#focus()`.

* ComponentClasss -> extends React.Component
2018-04-12 09:59:44 -07:00
Armando Assunção
1f6b5b9e80 Reactstrap: updated props to Modal component (#24814) 2018-04-09 13:26:29 -07:00
Kræn Hansen
dfbdf8c6c6
Removed myself as a maintainer
I was not contributing as much as I hoped for
2018-03-06 01:32:08 +01:00
Armando Aguirre
08a41eeaed
Merge pull request #24042 from cynecx/reactstrap
[@types/reactstrap] Add missing valid prop to FormFeedback
2018-03-05 15:11:11 -08:00
Sami Mäki
ca578cd348 Update navbar props and examples.
Updated and checked components: Navbar, NavbarBrand, NavbarToggler.
2018-03-05 11:36:46 +02:00
Sami Mäki
e637f7eb20 Update navs props and examples.
Updated and checked components: Nav, NavItem, NavLink.
2018-03-05 11:36:46 +02:00
cynecx
9bab3c124d Add missing valid prop to FormFeedback 2018-03-02 22:35:11 +01:00
Ben Barber
86513e7b28 Added invalid to InputProps 2018-03-01 16:16:05 +00:00
Moe Elsharif
b2f965106c
Update Input.d.ts 2018-02-16 14:26:29 +01:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Daniel Rosenwasser
393eaf5b83
Merge pull request #23384 from FaithForHumans/reactstrap_extendsPatch
[Reactstrap] Adding extends HTMLAttributes to components.
2018-02-13 16:19:32 -08:00
Forbes Lindesay
8f8f6c4392 [react] Use HTMLDialogElement for the dialog node (#23053)
* [react] Use HTMLDialogElement for the dialog node

* Actually add the `open` property

* This update requires typescript 2.6

* Update dependents of react to also require typescript 2.6
2018-02-12 12:55:52 +00:00
Daniel Rosenwasser
e2096601c8
Merge pull request #23400 from timc13/patch-1
[reactstrap] add missing ModalProps
2018-02-10 10:36:03 -08:00
Ron Buckton
e8248b11bc
Merge pull request #23385 from FaithForHumans/reactstrap_addonsUpdate
[reactstrap] v5 beta update changes.
2018-02-08 20:16:36 -08:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Tim Chen
11b2623281 add myself to contributors 2018-02-03 18:47:26 -05:00
Tim Chen
c9e511143d add missing ModalProps 2018-02-03 18:43:06 -05:00
FaithForHumans
8644f396ba Adding prepend/append for input group addons.
Removing old cardblock, inputgroupbutton, and navdropdown components.
Adding new InputGroupbuttonDropdown
2018-02-02 18:51:51 -06:00
FaithForHumans
c4b1e53c5c Adding extends attributes to all components 2018-02-02 18:15:25 -06:00
Kræn Hansen
5011030133 Renaming Input's size property to bsSize (#23219)
See
cc2bd1386f
2018-01-26 09:00:34 -08:00
paverbool
d0ae43f17d "block" property of "Card" has been deprecated (#23032)
* "block" property of "Card" has been deprecated

* Add definition for v5 & remove from v4
2018-01-19 10:08:56 -08:00
Andy
219dd6df82
Fix 'prefer-readonly' lint failures (#22819) 2018-01-10 14:59:37 -08:00
Kurt Preston
cea02f1111 [reactstrap] Don't declare "popper.js" module, prevent TypeScript conflict error (#22680)
* [reactstrap] Define Popper.js only internally

* [reactstrap] Switching 'declare namespace' to 'export as namespace'
2018-01-05 11:25:20 -08:00
afholderman
d6eafb8ea0 Add option functions to props (#22681) 2018-01-04 14:30:43 -08:00
Kurt Preston
9c38485822 [reactstrap] Adding missing tag prop to Col definition (#22655) 2018-01-03 12:58:01 -08:00
Kurt Preston
52bc966699 [@types/reactstrap] Adding carousel components, removing Tether (#22512)
* Adding full Popper.js definition to Reactstrap

* Reactstrap: Updating Dropdown definitions, removing Tether

* Reactstrap: Adding Carousel components and test
2018-01-03 11:42:29 -08:00
Mine Starks
6f37e73632
Merge pull request #21876 from KurtPreston/reactstrap
Reactstrap: Updating Popover and Tooltip definitions
2017-12-14 08:24:26 -08:00
Kurt Preston
e739200692 Updating Popover and Tooltip definitions 2017-12-08 23:40:11 -06:00
Guillermo Eyherabide
b69e26107e
Update Fade.d.ts
adding in property
2017-12-06 18:10:07 -03:00
FaithForHumans
89a722bd8f Getting rid of named component exports.
Restoring UncontrolledProps in Alert, ButtonDropdown, Dropdown, NavDropdown, and Tooltip.
2017-12-04 14:51:18 -06:00
FaithForHumans
7339043a32 Forgotten comments... 2017-11-11 11:52:28 -06:00
FaithForHumans
3022724dfa Fixing line length issue 2017-11-11 11:46:44 -06:00
FaithForHumans
3369d2b9d2 Merge remote-tracking branch 'upstream/master' into reactstrap-exportProps
# Conflicts:
#	types/reactstrap/index.d.ts
#	types/reactstrap/lib/PopoverBody.d.ts
#	types/reactstrap/lib/PopoverHeader.d.ts
2017-11-10 19:57:19 -06:00
FaithForHumans
b0b139c633 Adding export defaults back. 2017-11-10 19:22:40 -06:00
FaithForHumans
64823637ec Merge branch 'reactstrap-exportProps' into upstream/master
# Conflicts:
#	types/reactstrap/index.d.ts
#	types/reactstrap/lib/Alert.d.ts
#	types/reactstrap/lib/Badge.d.ts
#	types/reactstrap/lib/Breadcrumb.d.ts
#	types/reactstrap/lib/BreadcrumbItem.d.ts
#	types/reactstrap/lib/Button.d.ts
#	types/reactstrap/lib/ButtonDropdown.d.ts
#	types/reactstrap/lib/ButtonGroup.d.ts
#	types/reactstrap/lib/ButtonToolbar.d.ts
#	types/reactstrap/lib/Card.d.ts
#	types/reactstrap/lib/CardBlock.d.ts
#	types/reactstrap/lib/CardBody.d.ts
#	types/reactstrap/lib/CardColumns.d.ts
#	types/reactstrap/lib/CardDeck.d.ts
#	types/reactstrap/lib/CardFooter.d.ts
#	types/reactstrap/lib/CardGroup.d.ts
#	types/reactstrap/lib/CardHeader.d.ts
#	types/reactstrap/lib/CardImg.d.ts
#	types/reactstrap/lib/CardImgOverlay.d.ts
#	types/reactstrap/lib/CardLink.d.ts
#	types/reactstrap/lib/CardSubtitle.d.ts
#	types/reactstrap/lib/CardText.d.ts
#	types/reactstrap/lib/CardTitle.d.ts
#	types/reactstrap/lib/Col.d.ts
#	types/reactstrap/lib/Collapse.d.ts
#	types/reactstrap/lib/Container.d.ts
#	types/reactstrap/lib/Dropdown.d.ts
#	types/reactstrap/lib/DropdownItem.d.ts
#	types/reactstrap/lib/DropdownMenu.d.ts
#	types/reactstrap/lib/DropdownToggle.d.ts
#	types/reactstrap/lib/Fade.d.ts
#	types/reactstrap/lib/Form.d.ts
#	types/reactstrap/lib/FormFeedback.d.ts
#	types/reactstrap/lib/FormGroup.d.ts
#	types/reactstrap/lib/FormText.d.ts
#	types/reactstrap/lib/Input.d.ts
#	types/reactstrap/lib/InputGroup.d.ts
#	types/reactstrap/lib/InputGroupAddon.d.ts
#	types/reactstrap/lib/InputGroupButton.d.ts
#	types/reactstrap/lib/Jumbotron.d.ts
#	types/reactstrap/lib/Label.d.ts
#	types/reactstrap/lib/ListGroup.d.ts
#	types/reactstrap/lib/ListGroupItem.d.ts
#	types/reactstrap/lib/ListGroupItemHeading.d.ts
#	types/reactstrap/lib/ListGroupItemText.d.ts
#	types/reactstrap/lib/Media.d.ts
#	types/reactstrap/lib/Modal.d.ts
#	types/reactstrap/lib/ModalBody.d.ts
#	types/reactstrap/lib/ModalFooter.d.ts
#	types/reactstrap/lib/ModalHeader.d.ts
#	types/reactstrap/lib/Nav.d.ts
#	types/reactstrap/lib/NavDropdown.d.ts
#	types/reactstrap/lib/NavItem.d.ts
#	types/reactstrap/lib/NavLink.d.ts
#	types/reactstrap/lib/Navbar.d.ts
#	types/reactstrap/lib/NavbarBrand.d.ts
#	types/reactstrap/lib/NavbarToggler.d.ts
#	types/reactstrap/lib/Pagination.d.ts
#	types/reactstrap/lib/PaginationItem.d.ts
#	types/reactstrap/lib/PaginationLink.d.ts
#	types/reactstrap/lib/Popover.d.ts
#	types/reactstrap/lib/PopoverContent.d.ts
#	types/reactstrap/lib/PopoverTitle.d.ts
#	types/reactstrap/lib/Progress.d.ts
#	types/reactstrap/lib/Row.d.ts
#	types/reactstrap/lib/TabContent.d.ts
#	types/reactstrap/lib/TabPane.d.ts
#	types/reactstrap/lib/Table.d.ts
#	types/reactstrap/lib/Tag.d.ts
#	types/reactstrap/lib/TetherContent.d.ts
#	types/reactstrap/lib/Tooltip.d.ts
2017-11-10 19:20:55 -06:00
Daniel Rosenwasser
a0a45051f2
Merge pull request #21178 from kjaenicke/reactstrap-popoverheader-popoverbody
[reactstrap] Renames PopoverContent to PopoverBody and PopoverTitle to PopoverHeader
2017-11-10 13:45:35 -08:00
Daniel Rosenwasser
63df9de07c
Merge pull request #20867 from LukasRada/patch-1
Update DropdownItem.d.ts
2017-11-07 11:00:40 -08:00
Keenan Jaenicke
6439a441c0 update export names and fix tests 2017-11-01 12:08:05 -04:00
Keenan Jaenicke
2f108ca76f renames PopoverContent to PopoverBody and PopoverTitle to PopoverHeader 2017-11-01 11:57:43 -04:00
b-szypelow
f7f81bced2 Reactstrap: Introduce typings for v5.0 (#20696)
* reactstrap: Create v4 subfolder

* reactstrap@5: change getRef to innerRef
2017-10-27 17:39:47 -07:00
U-SWRI16\svogel
9cc1b19ab0 Adding props export to all elements. 2017-10-27 19:38:55 -05:00
Lukáš Rada
5c52119b92 Update DropdownItem.d.ts
Missing toggle option in props
2017-10-23 11:58:24 +02:00
Fábio Paiva
fff6a33a3d Creating CardBody definitions (#20283) 2017-10-10 09:30:59 -07:00
afholderman
6380e29990 Fix Issue #20261 (#20268)
Change tag type.
2017-10-10 09:26:56 -07:00