├── .eslintignore ├── .npmignore ├── __mocks__ └── fileMock.js ├── .travis.yml ├── src ├── index.js ├── constant.js ├── util.js ├── style.css ├── __tests__ │ ├── react-image-lightbox.spec.js │ └── __snapshots__ │ │ └── react-image-lightbox.spec.js.snap └── lightbox-react.js ├── test-config ├── shim.js └── test-setup.js ├── examples └── cats │ ├── images │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 1_thumb.jpg │ ├── 2_thumb.jpg │ ├── 3_thumb.jpg │ └── 4_thumb.jpg │ ├── index.html │ ├── components │ └── video.js │ ├── stylesheets │ ├── app.css │ └── vendor │ │ ├── github-light.css │ │ └── stylesheet.css │ └── index.js ├── .eslintrc.json ├── svg ├── left_arrow.svg ├── right_arrow.svg ├── x.svg ├── zoom_out.svg └── zoom_in.svg ├── .gitignore ├── .babelrc ├── LICENSE ├── index.d.ts ├── package.json ├── webpack.config.js └── README.md /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build 3 | dist 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | bower.json 2 | src/examples 3 | svg 4 | -------------------------------------------------------------------------------- /__mocks__/fileMock.js: -------------------------------------------------------------------------------- 1 | module.exports = 'test-file-stub'; 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 'node' 4 | script: 5 | - npm test 6 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import Lightbox from './lightbox-react'; 2 | 3 | export default Lightbox; 4 | -------------------------------------------------------------------------------- /test-config/shim.js: -------------------------------------------------------------------------------- 1 | global.requestAnimationFrame = callback => { 2 | setTimeout(callback, 0); 3 | }; 4 | -------------------------------------------------------------------------------- /examples/cats/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treyhuffine/lightbox-react/HEAD/examples/cats/images/1.jpg -------------------------------------------------------------------------------- /examples/cats/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treyhuffine/lightbox-react/HEAD/examples/cats/images/2.jpg -------------------------------------------------------------------------------- /examples/cats/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treyhuffine/lightbox-react/HEAD/examples/cats/images/3.jpg -------------------------------------------------------------------------------- /examples/cats/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treyhuffine/lightbox-react/HEAD/examples/cats/images/4.jpg -------------------------------------------------------------------------------- /examples/cats/images/1_thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treyhuffine/lightbox-react/HEAD/examples/cats/images/1_thumb.jpg -------------------------------------------------------------------------------- /examples/cats/images/2_thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treyhuffine/lightbox-react/HEAD/examples/cats/images/2_thumb.jpg -------------------------------------------------------------------------------- /examples/cats/images/3_thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treyhuffine/lightbox-react/HEAD/examples/cats/images/3_thumb.jpg -------------------------------------------------------------------------------- /examples/cats/images/4_thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treyhuffine/lightbox-react/HEAD/examples/cats/images/4_thumb.jpg -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["airbnb", "prettier", "prettier/react"], 3 | "env": { 4 | "jest": true 5 | }, 6 | "rules": { 7 | "react/jsx-filename-extension": 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /svg/left_arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /svg/right_arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test-config/test-setup.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-extraneous-dependencies */ 2 | import { configure } from 'enzyme'; 3 | import Adapter from 'enzyme-adapter-react-16'; 4 | 5 | configure({ adapter: new Adapter() }); 6 | -------------------------------------------------------------------------------- /svg/x.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /svg/zoom_out.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | npm-debug.log 4 | 5 | # Editor and other tmp files 6 | *.swp 7 | *.un~ 8 | *.iml 9 | *.ipr 10 | *.iws 11 | *.sublime-* 12 | .idea/ 13 | *.DS_Store 14 | 15 | # Build directories (Will be preserved by npm) 16 | dist 17 | build 18 | /style.css 19 | /style.css.map 20 | -------------------------------------------------------------------------------- /examples/cats/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React Image Lightbox by treyhuffine 6 | 7 | 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /svg/zoom_in.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "env", 5 | { 6 | "targets": { 7 | "browsers": ["last 2 versions", "ie >= 9"] 8 | } 9 | } 10 | ], 11 | "react" 12 | ], 13 | "plugins": [ 14 | "transform-object-rest-spread", 15 | "babel-plugin-transform-exponentiation-operator", 16 | "react-hot-loader/babel" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /examples/cats/components/video.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Video = () => ( 4 |