├── .gitignore ├── LICENSE ├── README.md ├── dist ├── css │ └── app.2a0d66a1.css ├── favicon.ico ├── index.html └── js │ ├── app.bade70de.js │ ├── app.bade70de.js.map │ ├── chunk-vendors.b1b83085.js │ └── chunk-vendors.b1b83085.js.map ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── components │ ├── Demo.vue │ ├── Tests.vue │ └── testsList.js └── main.js ├── vue-r-mask ├── README.md ├── caretPos.js ├── index.js └── package.json └── vue.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | # local env files 5 | .env.local 6 | .env.*.local 7 | 8 | # Log files 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.sw* 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 raidan00 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-r-mask 2 | ### mask directive for vue.js 3 | 4 | * Template similar to javascript regular expression. /\d{2}/ 5 | * Directive useful for your own input or textarea. 6 | * Arbitrary number of digits in template /\d{1,10}/ 7 | 8 | ### [Live Demo](https://raidan00.github.io/vue-r-mask/dist/index.html) 9 | ### [Live Demo Source](https://github.com/raidan00/vue-r-mask/blob/master/src/components/Demo.vue) 10 | ## Install in your project 11 | ``` 12 | npm install vue-r-mask 13 | ``` 14 | ## Run this demo repository 15 | ``` bash 16 | git clone https://github.com/raidan00/vue-r-mask.git 17 | cd vue-r-mask 18 | npm install 19 | npm run dev 20 | ``` 21 | -------------------------------------------------------------------------------- /dist/css/app.2a0d66a1.css: -------------------------------------------------------------------------------- 1 | input[data-v-4af81fda],textarea[data-v-4af81fda]{display:block;margin:auto;margin-bottom:20px;margin-top:5px;font-size:17px}.text[data-v-4af81fda]{font-weight:700;margin-bottom:5px}button[data-v-4af81fda]{display:block;margin:auto;margin-top:5px;font-size:15px}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:10px} -------------------------------------------------------------------------------- /dist/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raidan00/vue-r-mask/3899935c1bacdf844305b40a6ab583e63c59f7cb/dist/favicon.ico -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 |