{"name":"react-accessible-accordion","version":"2.4.4-beta.1","description":"Accessible Accordion component for React","main":"dist/umd/index.js","jsnext:main":"dist/es/index.js","scripts":{"test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","test:coverage:watch":"jest --coverage --watch","coveralls":"cat ./coverage/lcov.info | coveralls","lint":"eslint .","build:css":"cp src/css/*.css dist","build:clean":"mkdir dist || true & rm -rf dist/*","build:rollup":"rollup -c","build:flow":"flow-copy-source src dist/es -i \"**/*.spec.js\"","build":"npm run build:clean && npm run build:css && npm run build:flow && npm run build:rollup","start":"npm run js:watch","start-demo":"webpack-dev-server --mode=development","pages":"rm -rf pages && webpack --mode=production --progress && cp demo/*.css pages && cp demo/*.ico pages","deploy":"npm run pages && ./bin/deploy.sh","prettier":"prettier **/*.js --write","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/springload/react-accessible-accordion.git"},"jest":{"setupFiles":["./src/setupTests.js"],"setupTestFrameworkScriptFile":"./src/setupTestFramework.js","testPathIgnorePatterns":["/node_modules/","/dist/"]},"keywords":["react","component","accordion","collapse","accessible","accessibility"],"authors":["Vincent Audebert <vincent@springload.co.nz>"],"contributors":[{"name":"Mitch Ryan","url":"https://github.com/ryami333"},{"name":"Samantha Sanders"},{"name":"Thibaud Colas"}],"license":"MIT","bugs":{"url":"https://github.com/springload/react-accessible-accordion/issues"},"homepage":"https://github.com/springload/react-accessible-accordion#readme","devDependencies":{"babel-cli":"^6.26.0","babel-eslint":"^8.2.2","babel-jest":"^23.0.1","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","babel-preset-react":"^6.24.1","babel-preset-stage-2":"^6.24.1","coveralls":"^3.0.0","css-loader":"^0.28.11","enzyme":"^3.3.0","enzyme-adapter-react-16":"^1.1.1","enzyme-to-json":"^3.3.4","eslint":"^4.19.1","eslint-config-airbnb":"^16.1.0","eslint-config-prettier":"^2.9.0","eslint-plugin-flowtype":"^2.47.1","eslint-plugin-flowtype-errors":"^3.5.1","eslint-plugin-import":"^2.7.0","eslint-plugin-jsx-a11y":"^6.0.3","eslint-plugin-react":"^7.4.0","flow-bin":"^0.73.0","flow-copy-source":"^1.3.0","html-webpack-plugin":"^3.2.0","jest":"^23.0.0","prettier":"^1.12.0","raf":"^3.4.0","react":"^16.4.0","react-dom":"^16.4.0","react-test-renderer":"^16.4.0","rollup":"^0.59.4","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^9.1.0","rollup-plugin-eslint":"^4.0.0","rollup-plugin-node-resolve":"^3.3.0","rollup-plugin-replace":"^2.0.0","style-loader":"^0.21.0","webpack":"^4.5.0","webpack-cli":"^2.0.14","webpack-dev-server":"^3.1.3"},"dependencies":{"classnames":"^2.2.5","consecutive":"^5.0.4","unstated":"^2.1.1"},"peerDependencies":{"react":"^15.4.0 || ^16.0.0","react-dom":"^15.4.0 || ^16.0.0"},"readme":"[react-accessible-accordion](https://springload.github.io/react-accessible-accordion/) [![npm](https://img.shields.io/npm/v/react-accessible-accordion.svg?style=flat-square)](https://www.npmjs.com/package/react-accessible-accordion) [![Build Status](https://travis-ci.org/springload/react-accessible-accordion.svg?branch=master)](https://travis-ci.org/springload/react-accessible-accordion) [![Coverage Status](https://coveralls.io/repos/github/springload/react-accessible-accordion/badge.svg)](https://coveralls.io/github/springload/react-accessible-accordion) [![Dependency Status](https://david-dm.org/springload/react-accessible-accordion.svg?style=flat-square)](https://david-dm.org/springload/react-accessible-accordion) [![devDependency Status](https://david-dm.org/springload/react-accessible-accordion/dev-status.svg?style=flat-square)](https://david-dm.org/springload/react-accessible-accordion#info=devDependencies)\n[![Accessibility status](https://img.shields.io/badge/a11y-tested-brightgreen.svg)](http://wave.webaim.org/report#/https://springload.github.io/react-accessible-accordion/)\n=========\n\n## Demo\n\n[Try a demo now](https://springload.github.io/react-accessible-accordion/).\n\n## Usage\n\nFirst, grab the package from npm:\n\n```sh\nnpm install --save react-accessible-accordion react react-dom\n```\n\nThen, import the editor and use it in your code. Here is a [basic example](https://springload.github.io/react-accessible-accordion/):\n\n```jsx\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport {\n    Accordion,\n    AccordionItem,\n    AccordionItemTitle,\n    AccordionItemBody,\n} from 'react-accessible-accordion';\n\n// Demo styles, see 'Styles' section below for some notes on use.\nimport 'react-accessible-accordion/dist/fancy-example.css';\n\nconst Example = () => (\n    <Accordion>\n        <AccordionItem>\n            <AccordionItemTitle>\n                <h3>Simple title</h3>\n            </AccordionItemTitle>\n            <AccordionItemBody>\n                <p>Body content</p>\n            </AccordionItemBody>\n        </AccordionItem>\n        <AccordionItem>\n            <AccordionItemTitle>\n                <h3>Complex title</h3>\n                <div>With a bit of description</div>\n            </AccordionItemTitle>\n            <AccordionItemBody>\n                <p>Body content</p>\n            </AccordionItemBody>\n        </AccordionItem>\n    </Accordion>\n);\n\nReactDOM.render(<Example />, document.querySelector('[data-mount]'));\n```\n\n### Styles\n\nWe strongly encourage you to write your own styles for your accordions, but we've published these two starter stylesheets to help you get up and running:\n```js\n// 'Minimal' theme - hide/show the AccordionBody component:\nimport 'react-accessible-accordion/dist/minimal-example.css';\n\n// 'Fancy' theme - boilerplate styles for all components, as seen on our demo:\nimport 'react-accessible-accordion/dist/fancy-example.css';\n```\n\nWe recommend that you copy them into your own app and modify them to suit your needs, particularly if you're using your own `className`s.\n\n## API\n\n### Accordion\n\n#### props:\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th>default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n      <tr>\n          <td>accordion</td>\n          <td>Boolean</td>\n          <td>true</td>\n          <td>Open only one item at a time or not</td>\n      </tr>\n      <tr>\n          <td>onChange</td>\n          <td>Function(keys)</td>\n          <td>noop</td>\n          <td>Triggered on change (open/close items)</td>\n      </tr>\n      <tr>\n          <td>className</td>\n          <td>String</td>\n          <td>accordion</td>\n          <td>CSS class(es) applied to the component</td>\n      </tr>\n    </tbody>\n</table>\n\n### AccordionItem\n\n#### props:\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th>default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n      <tr>\n          <td>expanded</td>\n          <td>Boolean</td>\n          <td>false</td>\n          <td>Expands this item on first render</td>\n      </tr>\n      <tr>\n          <td>className</td>\n          <td>String</td>\n          <td>accordion__item</td>\n          <td>CSS class(es) applied to the component</td>\n      </tr>\n      <tr>\n          <td>hideBodyClassName</td>\n          <td>String</td>\n          <td>null</td>\n          <td>Class name for hidden body state</td>\n      </tr>\n      <tr>\n          <td>uuid</td>\n          <td>String</td>\n          <td>null</td>\n          <td>Custom uuid to be passed to Accordion - onChange. Has to be unique.</td>\n      </tr>\n    </tbody>\n</table>\n\n### AccordionItemTitle\n\n#### props:\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th>default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n      <tr>\n          <td>className</td>\n          <td>String</td>\n          <td>accordion__title</td>\n          <td>CSS class(es) applied to the component</td>\n      </tr>\n      <tr>\n          <td>hideBodyClassName</td>\n          <td>String</td>\n          <td>null</td>\n          <td>Class name for hidden body state</td>\n      </tr>\n    </tbody>\n</table>\n\n### AccordionItemBody\n\n#### props:\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th>default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n      <tr>\n          <td>className</td>\n          <td>String</td>\n          <td>accordion__body</td>\n          <td>CSS class(es) applied to the component</td>\n      </tr>\n      <tr>\n          <td>hideBodyClassName</td>\n          <td>String</td>\n          <td>accordion__body--hidden</td>\n          <td>Class name for hidden body state</td>\n      </tr>\n    </tbody>\n</table>\n\n### resetNextUuid\n\n<table class=\"table table-bordered table-striped\">\n    <tbody>\n      <tr>\n          <td>Function(void)</td>\n      </tr>\n      <tr>\n          <td>Resets the internal counter for Accordion items' identifiers (including `id` attributes). For use in test suites and isomorphic frameworks.</td>\n      </tr>\n    </tbody>\n</table>\n\n## Accessibility\n\n### What this project is doing accessibility-wise?\n\nThis project manages two types of Accordions, with single or multiple items open.\n\n#### Single item\n\n> Use this with with props `accordion` set to `true` on `Accordion`.\n\nFor this type of Accordion, you will get the following `role` set up on your elements:\n\n* Accordion: `tablist`\n* AccordionItem: no specific role\n* AccordionItemTitle: `tab`\n* AccordionItemBody: `tabpanel`\n\n#### Multiple items\n\nFor this type of Accordion, you will get the following `role` set up on your elements:\n\n> Use this with with props `accordion` set to `false` on `Accordion`.\n\n* Accordion: no specific role\n* AccordionItem: no specific role\n* AccordionItemTitle: `button`\n* AccordionItemBody: no specific role\n\n## Development\n\n### Install\n\n> Clone the project on your computer, and install [Node](https://nodejs.org). This project also uses [nvm](https://github.com/springload/frontend-starter-kit/blob/master/docs/useful-tooling.md#nvm).\n\n```sh\nnvm install\n# Then, install all project dependencies.\nnpm install\n# Install the git hooks.\n./.githooks/deploy\n# Set up a `.env` file with the appropriate secrets.\ntouch .env\n```\n\n### Working on the project\n\n> Everything mentioned in the installation process should already be done.\n\n```sh\n# Make sure you use the right node version.\nnvm use\n# Start the the development tools in watch mode.\nnpm run start\n# Runs linting.\nnpm run lint\n# Runs tests.\nnpm run test\n# View other available commands with:\nnpm run\n```\n\n### Run the demo\n\n> Everything mentioned in the installation process should already be done.\n\n```sh\n# Make sure you use the right node version.\nnvm use\n# Start the server and the development tools.\nnpm run start-demo\n```\n\n### Publish\n\n```sh\nnpm version [TYPE]\ngit push origin master --tags\nnpm publish\n```\n\n# Browser support\n\n**Supported browser / device versions:**\n\n| Browser       | Device/OS | Version | Notes |\n| ------------- | --------- | ------- | ----- |\n| Mobile Safari | iOS       | latest  |       |\n| Chrome        | Android   | latest  |       |\n| IE            | Windows   | 11      |       |\n| MS Edge       | Windows   | latest  |       |\n| Chrome        | Desktop   | latest  |       |\n| Firefox       | Desktop   | latest  |       |\n| Safari        | OSX       | latest  |       |\n","readmeFilename":"README.md","gitHead":"f6dc706654e394743aa4d61d95036e8f22a33200","_id":"react-accessible-accordion@2.4.4-beta.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"ryami333","email":"mitch@mitch-ryan.com"},"dist":{"integrity":"sha512-vWW4tisln/acrnd5nt31+lWtZ3FaSuH+oJ/O2GQbPx8BXtyU9BVXw8sclYgmzopcfJhHSLfX+YXhRvrtAy5FGA==","shasum":"712fcac2c58509977ea417aec49f68d183143423","tarball":"http://registry-npm.ywwl.com/react-accessible-accordion/download/react-accessible-accordion-2.4.4-beta.1.tgz","fileCount":32,"unpackedSize":194912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVpHvCRA9TVsSAnZWagAAZ2YQAJFcn8O/8wam+QtqgY8g\nj/fz111M1+BqHcC0b4iXfXA8xlNoGnPFDKKRn3KWfw5QDuipFXl4bOzPtWCh\nkOKoNFW98kPHDWTliMYSz2Ke0VVScCUa07NaqnRwAOdYnQ8TKKLXvQA+4PG8\ngT9ZSg063rGiUslgl1BkKdYw+MCxLmw9cne+XEfc3NUs8CMl1sATQaS7DIq8\nXAD3wIEZr+B15Cs66Sjjj1MK2AloWkpDb2Tdjkq5xXaA6haG5jf+okUXHIsC\nKgS0ajgsbVP9absU897s+ZIgaaWQhU1sA5aMQIWKAUP3hMnRHENM8eVL/1DQ\nbNKr74VTtdcngTraF2e6napjYrrKYdCdbKXUt4KJOIJDmzYsJ467M0sAI8fD\nI13XT1kcObEKv+8ih8Xqi4X1reDbu3Kw/w/8zfD5jBOGTx5S6oKCwiRyxfML\ny51tY5W3itQYw8GkzCooa/rIZlg8eQOcy/e92do0laLwn+gdFWoVuYEHi5cJ\n5VkyeYSqijjeye0+5QkovDWGwuf3QjInIsAoDyX8uoalbz3hJfAvnvo4yYOb\ntO+sODMtESS3enNWMJK4wcyvR9yA+sOTHeDQXzVDeq7b/NKpihW6rkO2JmQh\njHTLLIKny0z2XIAhfbvPnM6EP4vK34QqARTEkIFmWTnJr6dpeIankNs1Dckb\nwcVJ\r\n=BdNM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHOg3YK+WtDTDmP8Fnyk8cErG7X70w4WjK2j/0LWVtmFAiADv3gZoOj3Z/3LsW+/1BNbrMiqhOkxnAAHy+eBW/uV3g=="}],"size":39554,"noattachment":false,"key":"/react-accessible-accordion/-/react-accessible-accordion-2.4.4-beta.1.tgz"},"maintainers":[{"name":"ryami333","email":"mitch.ryan@outlook.co.nz"},{"name":"samanthaksanders","email":"samantha.k.sanders@gmail.com"},{"name":"thibaudcolas","email":"thibaudcolas@gmail.com"},{"name":"vincentaudebert","email":"vincent.audebert@yahoo.fr"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-accessible-accordion_2.4.4-beta.1_1532400111383_0.30539352294829114"},"_hasShrinkwrap":false,"publish_time":1532400111862,"_cnpm_publish_time":1532400111862,"dist-tags":{"latest":"5.0.1","next":"2.4.4-beta.1"}}