{"_id":"@bakdakonusuruz/react-credit-cards","_rev":"1-22246466f77875ab51dffc0f8ca68068","name":"@bakdakonusuruz/react-credit-cards","dist-tags":{"latest":"0.8.4"},"versions":{"0.8.4":{"name":"@bakdakonusuruz/react-credit-cards","version":"0.8.4","description":"Beautiful credit cards for your payment forms","author":{"name":"AMARO Fashion","email":"tech@amaro.com"},"contributors":[{"name":"Cassio Cardoso","email":"cassio.cardoso@amaro.com"},{"name":"Gil Barbara","email":"gil.barbara@amaro.com"},{"name":"Burak Bayraktaroglu","email":"burakbayraktaroglu@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/amarofashion/react-credit-cards.git"},"bugs":{"url":"https://github.com/amarofashion/react-credit-cards/issues"},"homepage":"https://github.com/amarofashion/react-credit-cards#readme","license":"MIT","main":"lib/index.js","module":"es/index.js","keywords":["react","react-component","credit card","payment"],"peerDependencies":{"react":"^15.0.0 || ^16.0.0 || ^17.0.0","prop-types":"^15.7.2"},"dependencies":{"payment":"^2.3.0"},"devDependencies":{"@babel/cli":"^7.10.1","@babel/core":"^7.10.2","@babel/plugin-proposal-class-properties":"^7.10.1","@babel/plugin-proposal-decorators":"^7.10.1","@babel/plugin-proposal-do-expressions":"^7.10.1","@babel/plugin-proposal-export-default-from":"^7.10.1","@babel/plugin-proposal-export-namespace-from":"^7.10.1","@babel/plugin-proposal-function-sent":"^7.10.1","@babel/plugin-proposal-json-strings":"^7.10.1","@babel/plugin-proposal-logical-assignment-operators":"^7.10.1","@babel/plugin-proposal-nullish-coalescing-operator":"^7.10.1","@babel/plugin-proposal-numeric-separator":"^7.10.1","@babel/plugin-proposal-optional-chaining":"^7.10.1","@babel/plugin-proposal-pipeline-operator":"^7.10.1","@babel/plugin-proposal-throw-expressions":"^7.10.1","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-meta":"^7.10.1","@babel/plugin-transform-flow-strip-types":"^7.10.1","@babel/plugin-transform-object-assign":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/preset-flow":"^7.10.1","@babel/preset-react":"^7.10.1","@size-limit/preset-small-lib":"^4.5.0","autoprefixer":"^9.8.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.1.0","babel-jest":"^26.0.1","babel-plugin-array-includes":"^2.0.3","cross-env":"^7.0.2","date-fns":"^2.14.0","del-cli":"^3.0.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.2","eslint":"^6.8.0","eslint-config-airbnb":"^18.1.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^4.7.0","eslint-plugin-import":"^2.20.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-react":"^7.20.0","flow-bin":"^0.126.1","husky":"^4.2.5","jest":"^26.0.1","jsdom":"^16.2.2","node-sass":"^4.14.1","postcss":"^7.0.32","postcss-cli":"^7.1.1","prop-types":"^15.7.2","react":"^16.13.1","react-dom":"^16.13.1","repo-tools":"^0.2.0","size-limit":"^4.5.0","stylelint":"^13.6.0","stylelint-config-standard":"^20.0.0","stylelint-declaration-strict-value":"^1.5.0","stylelint-order":"^4.1.0","stylelint-scss":"^3.17.2","watch-run":"^1.2.5"},"scripts":{"build":"npm run clean && npm run build:commonjs && npm run build:es && npm run build:styles","build:commonjs":"cross-env BABEL_ENV=commonjs babel src -d lib","build:es":"cross-env NODE_ENV=production babel src -d es","build:styles":" node tools/build-styles","watch":"npm run build && watch-run -p 'src/**/*.js' npm run build:es","clean":"del-cli es/* && del-cli lib/*","test":"jest","test:coverage":"jest --bail --coverage","test:watch":"jest --watch","size":"npm run build && size-limit"},"browserslist":["> 0.2%","not dead"],"gitHead":"43ebc239c6d56b0f924816aca12f492201c38acd","_id":"@bakdakonusuruz/react-credit-cards@0.8.4","_nodeVersion":"14.15.0","_npmVersion":"7.21.0","dist":{"integrity":"sha512-/kc9xKZINDBFak3W43cuNWKxUCzR3zxpUuxUTe587Tko82rzG2MbdHMIP+DQpKt23ah29+uQSnN+7npbcnw/Lg==","shasum":"870f1a21633c639cea619a8bc29e34ef03c34532","tarball":"https://registry.npmjs.org/@bakdakonusuruz/react-credit-cards/-/react-credit-cards-0.8.4.tgz","fileCount":7,"unpackedSize":133038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhM11CCRA9TVsSAnZWagAAbfgP/R2q4Tc96SSoLSYjDwkb\nDVhaZAcppb4tSoEA/LFWVjLBzu6r4gEP0GKJXo8eIjj4YERTRsOIIAvT5dqQ\nT3Y3FrMId3k7kk+MaBZ54QsLrndU7IONTjzo5rhurKI2UB+cR+e2wlk7uEBp\nl9835j0rf0rFIJEjMqK6Qv4fr3qqanyHf5BQyYJQLz1FcOrJsxefZDe5hgnZ\nGxtJNAJGgGPX6+ubFxTMKjrqHPhYhWRG7f/Yqytb1Dgcl0ilbG0ubbA/w06Q\nk5dHKkjc/k0rmQOR3jI5U+wETod8ewcbxjWlxUpbBu2a4DwNCtMNAezDqsn1\n5W/UA3EbjNLOD1n+BS/kl5eEFxk7YO7N2VViuT8kgPfu/TKFpEvuReZ+096X\n0a65gVaNlb683U38IZAHRgLB2j38MFthIj07lDAYF3TBjyfzqdftmHBdzDOc\nqpbWunkFELKbo2iR91HynQdcU9pJtDE58KsZ1xj33pqkb4QUDdfOemXeZGlG\n9QiWsoRUUuO2aqo1ByVapdsXINoI0WyhXLIkUPTIVl4PSNfo673SJdBaQ0G0\noKBR2RVtdwdMZOKOuzRDIA8vKTn0WIXpiJbHaOTv3C++Sxb1u9RdlkliXFry\nBQeNm0utGFhJtfkXFMVlWugzuu8B2Mft2jHxhPfg2kt0LBBmbaHas+ySu2TI\ndIfo\r\n=hQ3u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkiqDxkegZJKKwpU6g1KBRrUNCM+U1iisBjm0dxLbYNAIhAMFotFoevOluk6TH3pZzR72Ei82+7+MXjWxbYcvdnQRw"}]},"_npmUser":{"name":"bakdakonusuruz","email":"burakbayraktaroglu@gmail.com"},"directories":{},"maintainers":[{"name":"bakdakonusuruz","email":"burakbayraktaroglu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-credit-cards_0.8.4_1630756162606_0.6065683711256498"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-04T11:49:22.548Z","0.8.4":"2021-09-04T11:49:22.866Z","modified":"2022-04-04T17:32:03.490Z"},"maintainers":[{"name":"bakdakonusuruz","email":"burakbayraktaroglu@gmail.com"}],"description":"Beautiful credit cards for your payment forms","homepage":"https://github.com/amarofashion/react-credit-cards#readme","keywords":["react","react-component","credit card","payment"],"repository":{"type":"git","url":"git+https://github.com/amarofashion/react-credit-cards.git"},"contributors":[{"name":"Cassio Cardoso","email":"cassio.cardoso@amaro.com"},{"name":"Gil Barbara","email":"gil.barbara@amaro.com"},{"name":"Burak Bayraktaroglu","email":"burakbayraktaroglu@gmail.com"}],"author":{"name":"AMARO Fashion","email":"tech@amaro.com"},"bugs":{"url":"https://github.com/amarofashion/react-credit-cards/issues"},"license":"MIT","readme":"```\r\nForked and updated from amaroteam/react-credit-cards\r\n```\r\n\r\n# React Credit Cards\r\n\r\n[![NPM](https://badge.fury.io/js/react-credit-cards.svg)](https://www.npmjs.com/package/react-credit-cards) [![Travis](https://travis-ci.org/amarofashion/react-credit-cards.svg?branch=master)](https://travis-ci.org/amarofashion/react-credit-cards) [![Maintainability](https://api.codeclimate.com/v1/badges/bb0aa1a6b782c3845f6a/maintainability)](https://codeclimate.com/github/amarofashion/react-credit-cards/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/bb0aa1a6b782c3845f6a/test_coverage)](https://codeclimate.com/github/amarofashion/react-credit-cards/test_coverage)\r\n\r\nA slick credit card component for React.\r\n\r\n![demo](https://raw.githubusercontent.com/amarofashion/react-credit-cards/master/docs/media/rccs.gif)\r\n\r\n[Demo](https://amarofashion.github.io/react-credit-cards/)\r\n\r\n### Install\r\n\r\n```\r\nnpm install --save react-credit-cards\r\n```\r\n\r\n### Usage\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport Cards from 'react-credit-cards';\r\n\r\nexport default class PaymentForm extends React.Component {\r\n  state = {\r\n    cvc: '',\r\n    expiry: '',\r\n    focus: '',\r\n    name: '',\r\n    number: '',\r\n  };\r\n\r\n  handleInputFocus = (e) => {\r\n    this.setState({ focus: e.target.name });\r\n  }\r\n  \r\n  handleInputChange = (e) => {\r\n    const { name, value } = e.target;\r\n    \r\n    this.setState({ [name]: value });\r\n  }\r\n  \r\n  render() {\r\n    return (\r\n      <div id=\"PaymentForm\">\r\n        <Cards\r\n          cvc={this.state.cvc}\r\n          expiry={this.state.expiry}\r\n          focused={this.state.focus}\r\n          name={this.state.name}\r\n          number={this.state.number}\r\n        />\r\n        <form>\r\n        \t<input\r\n            type=\"tel\"\r\n            name=\"number\"\r\n            placeholder=\"Card Number\"\r\n            onChange={this.handleInputChange}\r\n            onFocus={this.handleInputFocus}\r\n          />\r\n          ...\r\n        </form>\r\n      </div>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\nDon't forget to import the `react-credit-cards/lib/styles.scss` if you are using SASS in your project.  \r\nOr you can import the CSS:  \r\n`import 'react-credit-cards/es/styles-compiled.css';`\r\n\r\n### Features\r\n\r\n- We support all credit card issuers available in [Payment](https://github.com/jessepollak/payment) plus Hipercard (a brazilian credit card).\r\n\r\n## Props\r\n\r\n- `name` {string}: Name on card. \\*\r\n- `number` {string|number}: Card number. \\*\r\n- `expiry` {string|number}: Card expiry date. `10/20` or `012017` \\*\r\n- `cvc` {string|number}: Card CVC/CVV. \\*\r\n- `focused` {string}: Focused card field. `name|number|expiry|cvc`\r\n- `locale` {object}: Localization text (e.g. `{ valid: 'valid thru' }`).\r\n- `placeholders` {object}: Placeholder text (e.g. `{ name: 'YOUR NAME HERE' }`).\r\n- `preview` {bool}: To use the card to show scrambled data (e.g. `**** 4567`).\r\n- `issuer` {string}: Set the issuer for the `preview` mode (e.g. `visa|mastercard|...`)\r\n- `acceptedCards` {array}: If you want to limit the accepted cards. (e.g. `['visa', 'mastercard']`\r\n- `callback` {func}: A callback function that will be called when the card number has changed with 2 paramaters: `type ({ issuer: 'visa', maxLength: 19 }), isValid ({boolean})`\r\n\r\n\\* _Required fields_\r\n\r\n## SCSS options\r\n\r\n**Credit Card sizing**\r\n\r\n- `$rccs-card-ratio`: Card ratio. Defaults to `1.5858`\r\n- `$rccs-size`: Card width. Defaults to `290px`\r\n\r\n**Credit Card fonts**\r\n\r\n- `$rccs-name-font-size`: Defaults to `17px`\r\n- `$rccs-name-font-family`: Defaults to `Consolas, Courier, monospace`\r\n- `$rccs-number-font-size`: Defaults to `17px`\r\n- `$rccs-number-font-family`: Defaults to `Consolas, Courier, monospace`\r\n- `$rccs-valid-font-size`: Defaults to `10px`\r\n- `$rccs-expiry-font-size`: Defaults to `16px`\r\n- `$rccs-expiry-font-family`: Defaults to `Consolas, Courier, monospace`\r\n- `$rccs-cvc-font-size`: Defaults to `14px`\r\n- `$rccs-cvc-font-family`: Defaults to `Consolas, Courier, monospace`\r\n- `$rccs-cvc-color`: Defaults to `#222`\r\n\r\n**Credit Card styling**\r\n\r\n- `$rccs-shadow`: Defaults to `0 0 20px rgba(#000, 0.2)`\r\n- `$rccs-light-text-color`: Card text color for dark cards. Defaults to `#fff`\r\n- `$rccs-dark-text-color`: Card text color for light cards. Defaults to `#555`\r\n- `$rccs-stripe-bg-color`: Stripe background color in the back. Defaults to `#2a1d16`\r\n- `$rccs-signature-background`: Signature background in the back. Defaults to `repeating-linear-gradient(0.1deg, #fff 20%, #fff 40%, #fea 40%, #fea 44%, #fff 44%)`\r\n- `$rccs-default-background`: Default card background. Defaults to `linear-gradient(25deg, #939393, #717171)`\r\n- `$rccs-unknown-background`: Unknown card background. Defaults to `linear-gradient(25deg, #999, #999)`\r\n- `$rccs-background-transition`: Card background transition. Defaults to `all 0.5s ease-out`\r\n- `$rccs-animate-background`: Card background animation. Defaults to `true`\r\n\r\n**Credit Card brands**\r\n\r\n- `$rccs-amex-background`: Defaults to `linear-gradient(25deg, #308c67, #a3f2cf)`\r\n- `$rccs-dankort-background`: Defaults to `linear-gradient(25deg, #ccc, #999)`\r\n- `$rccs-dinersclub-background`: Defaults to `linear-gradient(25deg, #fff, #eee)`\r\n- `$rccs-discover-background`: Defaults to `linear-gradient(25deg, #fff, #eee)`\r\n- `$rccs-mastercard-background`: Defaults to `linear-gradient(25deg, #e8e9e5, #fbfbfb)`\r\n- `$rccs-visa-background`: Defaults to `linear-gradient(25deg, #0f509e, #1399cd)`\r\n- `$rccs-elo-background`: Defaults to `linear-gradient(25deg, #211c18, #aaa7a2)`\r\n- `$rccs-hipercard-background`: Defaults to `linear-gradient(25deg, #8b181b, #de1f27)`\r\n\r\n## Development\r\n\r\nHere's how you can get started developing locally:\r\n\r\n    $ git clone https://github.com/amarofashion/react-credit-cards.git\r\n    $ cd react-credit-cards\r\n    $ npm install\r\n    $ npm start\r\n\r\nNow, if you go to `http://localhost:3000` in your browser, you should see the demo page.\r\n\r\n## Contributing\r\n\r\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process of contributing to the project.\r\n\r\n## Useful links\r\n\r\n[EBANK's test numbers](https://www.ebanx.com/business/en/developers/integrations/testing/credit-card-test-numbers)  \r\n[Adyen's test numbers](https://gist.github.com/j3j5/8b3e48ccad746b90a54a)  \r\n[Worldpay's test card numbers](https://support.worldpay.com/support/kb/bg/testandgolive/tgl5103.html)  \r\n[Brazilian cards patterns](https://github.com/erikhenrique/bin-cc/blob/master/README.md)\r\n\r\n## LICENSE\r\n\r\nThis project is licensed under the [MIT License](LICENSE.md).\r\n\r\n###### Made with ❤️ at [AMARO](https://amaro.com).\r\n","readmeFilename":"README.md"}