vue-paycard
Advanced tools
Comparing version
{ | ||
"name": "vue-paycard", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"private": false, | ||
@@ -95,3 +95,4 @@ "description": "Credit card component made with Vue.js", | ||
"coverageDirectory": "./coverage/", | ||
"collectCoverage": true | ||
"collectCoverage": true, | ||
"coveragePathIgnorePatterns": ["/node_modules/", "/tests/", "/src/assets/"] | ||
}, | ||
@@ -98,0 +99,0 @@ "gitHooks": { |
@@ -11,3 +11,3 @@ <div align="center"> | ||
[](https://github.com/guastallaigor/vue-paycard/actions) | ||
[](https://codecov.io/gh/guastallaigor/vue-paycard) | ||
[](https://coveralls.io/github/guastallaigor/vue-paycard?branch=master) | ||
[](http://standardjs.com/) | ||
@@ -41,3 +41,3 @@ [](https://www.npmjs.com/package/vue-paycard) | ||
> **Note**: The form inside is just an example, **you** will need to create yours or copy it from `src/stories/index.stories.js` | ||
> **Note**: The form inside is just an example, **you** will need to create yours or copy it from `tests/unit/form.vue` | ||
@@ -85,3 +85,3 @@ ## How to install | ||
You can import as a Nuxt.js plugin | ||
You can create a Nuxt.js plugin `vue-paycard.js` | ||
@@ -130,3 +130,3 @@ ```js | ||
| value-fields* | Object | null | A **required** object that let you set the credit card holders name, number, month, year and cvv. Note that is **required** that all the attributes name must be exactly as the example above (see [Basic usage](#usage)). The `cardNumber` attribute value **must** be stored as it's shown: **#### #### #### ####**. The `cardYear` attribute value **must** be stored as **YYYY** | | ||
| input-fields | Object | { cardNumber: 'v-card-number', cardName: 'v-card-name', cardMonth: 'v-card-month', cardYear: 'v-card-year', cardCvv: 'v-card-cvv' } | An object that contains all your input fields id from your form. Each input field must have a valid and unique id to bind focus/blur listeners that this component provides. Note that is **required** that all the attributes name must be exactly as the ones in "Default" | | ||
| input-fields | Object | { cardNumber: 'v-card-number', cardName: 'v-card-name', cardMonth: 'v-card-month', cardYear: 'v-card-year', cardCvv: 'v-card-cvv' } | An object that contains all your input fields id from your form. Each input field must have a valid and unique id to bind focus/blur listeners that this component provides. Note that is **required** that all the attributes name must be exactly as the ones in "Default". You need to also add a **data-card-field** attribute for each of those inputs | | ||
| labels | Object | { cardName: 'Full Name', cardHolder: 'Card Holder', cardMonth: 'MM', cardYear: 'YY', cardExpires: 'Expires', cardCvv: 'CVV' } | Set custom labels for the card if needed. English by default. Note that is **required** that all the attributes name must be exactly as the ones in "Default" | | ||
@@ -153,3 +153,3 @@ | is-card-number-masked | Boolean | true | Hides the numbers provided and changes to "*". Only shows the last four digits | | ||
For visual testing, this project contains storybook which you can run by doing the next command | ||
For visual testing, this project contains storybook which you can run by running the command | ||
@@ -164,3 +164,3 @@ ```sh | ||
To run the tests, you can use the next command | ||
To run the tests, you can use the command | ||
@@ -167,0 +167,0 @@ ```sh |
Sorry, the diff of this file is not supported yet
900662
0.06%