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

Initial commit #1

Merged
merged 2 commits into from
Apr 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/bower_components/
/node_modules/
/.pulp-cache/
/output/
/.psci*
/src/.webpack.js
7 changes: 7 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# purescript-react-addons-css-transition-group

CSS Transition Groups for purescript-react
A PureScript interface to `ReactCSSTransitionGroup` for use with [`purescript-react`](https://github.com/purescript-contrib/purescript-react).

Please see [React's Animation documentation](https://facebook.github.io/react/docs/animation.html) for details concerning proper usage. This API is byte-for-byte compatible.
25 changes: 25 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "purescript-react-addons-css-transition-group",
"version": "0.1.0",
"main": "",
"keywords": [
"purescript",
"react",
"add-ons",
"addons",
"ReactCSSTransitionGroup",
"ReactTransitions"
],
"repository": {
"type": "git",
"url": "https://github.com/purescript-contrib/purescript-react-addons-css-transition-group"
},
"license": "MIT",
"ignore": [
"*",
"!src/**/*"
],
"dependencies": {
"purescript-react": "^0.7.1"
}
}
61 changes: 61 additions & 0 deletions docs/React/Addons/Animation/Props.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## Module React.Addons.Animation.Props

See the [Animation section](https://facebook.github.io/react/docs/animation.html) of the React documentation for details concerning usage/API.
This API is byte-for-byte compatible.
Note: You must `npm install react-addons-css-transition-group` to use this module.

#### `transitionName`

``` purescript
transitionName :: String -> Props
```

#### `TransitionNames`

``` purescript
type TransitionNames = { enter :: String, enterActive :: String, leave :: String, leaveActive :: String, appearActive :: String }
```

#### `transitionName'`

``` purescript
transitionName' :: TransitionNames -> Props
```

#### `transitionAppear`

``` purescript
transitionAppear :: Boolean -> Props
```

#### `transitionEnter`

``` purescript
transitionEnter :: Boolean -> Props
```

#### `transitionLeave`

``` purescript
transitionLeave :: Boolean -> Props
```

#### `transitionEnterTimeout`

``` purescript
transitionEnterTimeout :: Int -> Props
```

#### `transitionLeaveTimeout`

``` purescript
transitionLeaveTimeout :: Int -> Props
```

#### `component`

``` purescript
component :: String -> Props
```


13 changes: 13 additions & 0 deletions docs/React/Addons/Animation/Transition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Module React.Addons.Animation.Transition

See the [Animation section](https://facebook.github.io/react/docs/animation.html) of the React documentation for details concerning usage/API.
This API is byte-for-byte compatible.
Note: You must `npm install react-addons-css-transition-group` to use this module.

#### `reactCSSTransitionGroup`

``` purescript
reactCSSTransitionGroup :: Array Props -> Array ReactElement -> ReactElement
```


40 changes: 40 additions & 0 deletions src/React/Addons/Animation/Props.purs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-- | See the [Animation section](https://facebook.github.io/react/docs/animation.html) of the React documentation for details concerning usage/API.
-- | This API is byte-for-byte compatible.

-- | Note: You must `npm install react-addons-css-transition-group` to use this module.

module React.Addons.Animation.Props where

import React.DOM.Props

transitionName :: String -> Props
transitionName = unsafeMkProps "transitionName"

type TransitionNames =
{ enter :: String
, enterActive :: String
, leave :: String
, leaveActive :: String
, appearActive :: String
}

transitionName' :: TransitionNames -> Props
transitionName' = unsafeUnfoldProps "transitionName"

transitionAppear :: Boolean -> Props
transitionAppear = unsafeMkProps "transitionAppear"

transitionEnter :: Boolean -> Props
transitionEnter = unsafeMkProps "transitionEnter"

transitionLeave :: Boolean -> Props
transitionLeave = unsafeMkProps "transitionLeave"

transitionEnterTimeout :: Int -> Props
transitionEnterTimeout = unsafeMkProps "transitionEnterTimeout"

transitionLeaveTimeout :: Int -> Props
transitionLeaveTimeout = unsafeMkProps "transitionLeaveTimeout"

component :: String -> Props
component = unsafeMkProps "component"
16 changes: 16 additions & 0 deletions src/React/Addons/Animation/Transition.purs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- | See the [Animation section](https://facebook.github.io/react/docs/animation.html) of the React documentation for details concerning usage/API.
-- | This API is byte-for-byte compatible.

-- | Note: You must `npm install react-addons-css-transition-group` to use this module.

module React.Addons.Animation.Transition (reactCSSTransitionGroup) where

import Prelude ((<<<))

import React (ReactClass(), ReactElement(), createElementDynamic)
import React.DOM.Props (Props(), unsafeFromPropsArray)

reactCSSTransitionGroup :: Array Props -> Array ReactElement -> ReactElement
reactCSSTransitionGroup = createElementDynamic reactCSSTransitionGroupClass <<< unsafeFromPropsArray

foreign import reactCSSTransitionGroupClass :: forall props. ReactClass props
8 changes: 8 additions & 0 deletions src/React/Addons/Animation/TransitionFFI.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* global exports */
"use strict";

// module React.Addons.Animation.Transition

var ReactCSSTransitionGroup = require('react-addons-css-transition-group');

exports.reactCSSTransitionGroupClass = ReactCSSTransitionGroup;