Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert to typescript, use rollup to build, remove nwb
- Loading branch information
Showing
97 changed files
with
23,324 additions
and
5,416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// just for tests + parcel demo | ||
{ | ||
"presets": [ | ||
"@babel/preset-typescript", | ||
"@babel/preset-react", | ||
"@babel/preset-env" | ||
], | ||
"plugins": ["@babel/plugin-proposal-class-properties"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
/coverage | ||
/demo/dist | ||
/es | ||
/lib | ||
/node_modules | ||
/umd | ||
coverage | ||
demo/dist | ||
es | ||
lib | ||
node_modules | ||
umd | ||
npm-debug.log* | ||
yarn-error.log* | ||
TODO | ||
.cache | ||
dist | ||
stats.json | ||
.idea | ||
.DS_STORE | ||
.vscode | ||
.rpt2_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
import React, { Component } from "react" | ||
import Card from "./Card" | ||
import anime from "animejs" | ||
import React, { Component } from "react"; | ||
import Card from "./Card"; | ||
import anime from "animejs"; | ||
|
||
class UserGrid extends Component { | ||
hideElements = (el, startId) => { | ||
if (startId !== "focusedUser") return | ||
const elements = [].slice.apply(el.querySelectorAll("*[data-fade-in]")) | ||
elements.forEach(el => (el.style.opacity = "0")) | ||
el.style.zIndex = 2 | ||
} | ||
if (startId !== "focusedUser") return; | ||
const elements = [].slice.apply(el.querySelectorAll("*[data-fade-in]")); | ||
elements.forEach(el => (el.style.opacity = "0")); | ||
el.style.zIndex = 2; | ||
}; | ||
animateIn = (el, startId) => { | ||
if (startId !== "focusedUser") return | ||
if (startId !== "focusedUser") return; | ||
anime({ | ||
targets: el.querySelectorAll("*[data-fade-in]"), | ||
translateY: [-30, 0], | ||
opacity: [0, 1], | ||
duration: 250, | ||
easing: "easeOutSine", | ||
delay: (d, i) => i * 75 | ||
}) | ||
el.style.zIndex = 1 | ||
} | ||
}); | ||
el.style.zIndex = 1; | ||
}; | ||
render() { | ||
return ( | ||
<ul className="cardGrid"> | ||
{this.props.data.map((d, i) => { | ||
const parentFlipId = `card-${i}` | ||
if (i === this.props.focusedIndex) return null | ||
const parentFlipId = `card-${i}`; | ||
if (i === this.props.focusedIndex) return null; | ||
return ( | ||
<Card | ||
parentFlipId={parentFlipId} | ||
d={d} | ||
i={i} | ||
setFocusedIndex={this.props.setFocusedIndex} | ||
/> | ||
) | ||
); | ||
})} | ||
</ul> | ||
) | ||
); | ||
} | ||
} | ||
|
||
export default UserGrid | ||
export default UserGrid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.