├── .babelrc ├── .bitmap ├── .browserslistrc ├── .circleci └── config.yml ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierrc.json ├── LICENSE ├── README.md ├── _config.yml ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── components │ ├── CircleLoader.vue │ ├── DefaultLoader.vue │ ├── DualRingLoader.vue │ ├── EllipsisLoader.vue │ ├── FacebookLoader.vue │ ├── GridLoader.vue │ ├── HeartLoader.vue │ ├── HourglassLoader.vue │ ├── LineLoader.vue │ ├── OrbitalsLoader.vue │ ├── RingLoader.vue │ ├── RippleLoader.vue │ ├── RollerLoader.vue │ ├── SpinnerLoader.vue │ └── index.js ├── helpers │ ├── calcPropertyValue.js │ └── validateDuration.js ├── index.js ├── install.js └── main.js └── vue.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@vue/app" 5 | ] 6 | ] 7 | } -------------------------------------------------------------------------------- /.bitmap: -------------------------------------------------------------------------------- 1 | /* THIS IS A BIT-AUTO-GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */ 2 | 3 | { 4 | "joshk.vue-spinners-css/circle-loader@1.1.5": { 5 | "files": [ 6 | { 7 | "name": "CircleLoader.vue", 8 | "relativePath": "src/components/CircleLoader.vue", 9 | "test": false 10 | } 11 | ], 12 | "mainFile": "src/components/CircleLoader.vue", 13 | "origin": "AUTHORED", 14 | "exported": true 15 | }, 16 | "joshk.vue-spinners-css/default-loader@1.1.5": { 17 | "files": [ 18 | { 19 | "relativePath": "src/components/DefaultLoader.vue", 20 | "test": false, 21 | "name": "DefaultLoader.vue" 22 | } 23 | ], 24 | "mainFile": "src/components/DefaultLoader.vue", 25 | "origin": "AUTHORED", 26 | "exported": true 27 | }, 28 | "joshk.vue-spinners-css/dual-ring-loader@1.1.5": { 29 | "files": [ 30 | { 31 | "relativePath": "src/components/DualRingLoader.vue", 32 | "test": false, 33 | "name": "DualRingLoader.vue" 34 | } 35 | ], 36 | "mainFile": "src/components/DualRingLoader.vue", 37 | "origin": "AUTHORED", 38 | "exported": true 39 | }, 40 | "joshk.vue-spinners-css/ellipsis-loader@1.1.5": { 41 | "files": [ 42 | { 43 | "relativePath": "src/components/EllipsisLoader.vue", 44 | "test": false, 45 | "name": "EllipsisLoader.vue" 46 | } 47 | ], 48 | "mainFile": "src/components/EllipsisLoader.vue", 49 | "origin": "AUTHORED", 50 | "exported": true 51 | }, 52 | "joshk.vue-spinners-css/facebook-loader@1.1.5": { 53 | "files": [ 54 | { 55 | "relativePath": "src/components/FacebookLoader.vue", 56 | "test": false, 57 | "name": "FacebookLoader.vue" 58 | } 59 | ], 60 | "mainFile": "src/components/FacebookLoader.vue", 61 | "origin": "AUTHORED", 62 | "exported": true 63 | }, 64 | "joshk.vue-spinners-css/grid-loader@1.1.5": { 65 | "files": [ 66 | { 67 | "relativePath": "src/components/GridLoader.vue", 68 | "test": false, 69 | "name": "GridLoader.vue" 70 | } 71 | ], 72 | "mainFile": "src/components/GridLoader.vue", 73 | "origin": "AUTHORED", 74 | "exported": true 75 | }, 76 | "joshk.vue-spinners-css/heart-loader@1.1.5": { 77 | "files": [ 78 | { 79 | "relativePath": "src/components/HeartLoader.vue", 80 | "test": false, 81 | "name": "HeartLoader.vue" 82 | } 83 | ], 84 | "mainFile": "src/components/HeartLoader.vue", 85 | "origin": "AUTHORED", 86 | "exported": true 87 | }, 88 | "joshk.vue-spinners-css/helpers/calc-property-value@1.1.5": { 89 | "files": [ 90 | { 91 | "relativePath": "src/helpers/calcPropertyValue.js", 92 | "test": false, 93 | "name": "calcPropertyValue.js" 94 | } 95 | ], 96 | "mainFile": "src/helpers/calcPropertyValue.js", 97 | "origin": "AUTHORED", 98 | "exported": true 99 | }, 100 | "joshk.vue-spinners-css/helpers/validate-duration@1.1.5": { 101 | "files": [ 102 | { 103 | "relativePath": "src/helpers/validateDuration.js", 104 | "test": false, 105 | "name": "validateDuration.js" 106 | } 107 | ], 108 | "mainFile": "src/helpers/validateDuration.js", 109 | "origin": "AUTHORED", 110 | "exported": true 111 | }, 112 | "joshk.vue-spinners-css/hourglass-loader@1.1.5": { 113 | "files": [ 114 | { 115 | "relativePath": "src/components/HourglassLoader.vue", 116 | "test": false, 117 | "name": "HourglassLoader.vue" 118 | } 119 | ], 120 | "mainFile": "src/components/HourglassLoader.vue", 121 | "origin": "AUTHORED", 122 | "exported": true 123 | }, 124 | "joshk.vue-spinners-css/line-loader@1.1.5": { 125 | "files": [ 126 | { 127 | "relativePath": "src/components/LineLoader.vue", 128 | "test": false, 129 | "name": "LineLoader.vue" 130 | } 131 | ], 132 | "mainFile": "src/components/LineLoader.vue", 133 | "origin": "AUTHORED", 134 | "exported": true 135 | }, 136 | "joshk.vue-spinners-css/orbitals-loader@1.1.5": { 137 | "files": [ 138 | { 139 | "relativePath": "src/components/OrbitalsLoader.vue", 140 | "test": false, 141 | "name": "OrbitalsLoader.vue" 142 | } 143 | ], 144 | "mainFile": "src/components/OrbitalsLoader.vue", 145 | "origin": "AUTHORED", 146 | "exported": true 147 | }, 148 | "joshk.vue-spinners-css/ring-loader@1.1.5": { 149 | "files": [ 150 | { 151 | "relativePath": "src/components/RingLoader.vue", 152 | "test": false, 153 | "name": "RingLoader.vue" 154 | } 155 | ], 156 | "mainFile": "src/components/RingLoader.vue", 157 | "origin": "AUTHORED", 158 | "exported": true 159 | }, 160 | "joshk.vue-spinners-css/ripple-loader@1.1.5": { 161 | "files": [ 162 | { 163 | "relativePath": "src/components/RippleLoader.vue", 164 | "test": false, 165 | "name": "RippleLoader.vue" 166 | } 167 | ], 168 | "mainFile": "src/components/RippleLoader.vue", 169 | "origin": "AUTHORED", 170 | "exported": true 171 | }, 172 | "joshk.vue-spinners-css/roller-loader@1.1.5": { 173 | "files": [ 174 | { 175 | "relativePath": "src/components/RollerLoader.vue", 176 | "test": false, 177 | "name": "RollerLoader.vue" 178 | } 179 | ], 180 | "mainFile": "src/components/RollerLoader.vue", 181 | "origin": "AUTHORED", 182 | "exported": true 183 | }, 184 | "joshk.vue-spinners-css/spinner-loader@1.1.5": { 185 | "files": [ 186 | { 187 | "relativePath": "src/components/SpinnerLoader.vue", 188 | "test": false, 189 | "name": "SpinnerLoader.vue" 190 | } 191 | ], 192 | "mainFile": "src/components/SpinnerLoader.vue", 193 | "origin": "AUTHORED", 194 | "exported": true 195 | }, 196 | "version": "14.7.6" 197 | } -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Javascript Node CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-javascript/ for more details 4 | # 5 | version: 2 6 | jobs: 7 | build:lib: 8 | docker: 9 | # specify the version you desire here 10 | - image: circleci/node:8.12.0 11 | 12 | # Specify service dependencies here if necessary 13 | # CircleCI maintains a library of pre-built images 14 | # documented at https://circleci.com/docs/2.0/circleci-images/ 15 | # - image: circleci/mongo:3.4.4 16 | 17 | working_directory: ~/repo 18 | 19 | steps: 20 | - checkout 21 | 22 | # Download and cache dependencies 23 | - restore_cache: 24 | keys: 25 | - v1-dependencies-{{ checksum "package.json" }} 26 | # fallback to using the latest cache if no exact match is found 27 | - v1-dependencies- 28 | 29 | - run: npm config set '@bit:registry' https://node.bit.dev && npm install 30 | 31 | - save_cache: 32 | paths: 33 | - node_modules 34 | key: v1-dependencies-{{ checksum "package.json" }} 35 | 36 | # run build:lib! 37 | - run: npm run build:lib 38 | build:bit: 39 | docker: 40 | # specify the version you desire here 41 | - image: circleci/node:8.12.0 42 | 43 | # Specify service dependencies here if necessary 44 | # CircleCI maintains a library of pre-built images 45 | # documented at https://circleci.com/docs/2.0/circleci-images/ 46 | # - image: circleci/mongo:3.4.4 47 | 48 | working_directory: ~/repo 49 | 50 | steps: 51 | - checkout 52 | 53 | # Download and cache dependencies 54 | - restore_cache: 55 | keys: 56 | - v1-dependencies-{{ checksum "package.json" }} 57 | # fallback to using the latest cache if no exact match is found 58 | - v1-dependencies- 59 | 60 | - run: npm config set '@bit:registry' https://node.bit.dev 61 | - run: npm install && sudo npm i bit-bin -g 62 | - run: bit config set analytics_reporting false && bit config set error_reporting false && bit config set user.token ${BIT_TOKEN} 63 | - run: bit import 64 | 65 | - save_cache: 66 | paths: 67 | - node_modules 68 | key: v1-dependencies-{{ checksum "package.json" }} 69 | 70 | # run build:lib! 71 | - run: npm run build:bit 72 | 73 | workflows: 74 | version: 2 75 | build:lib_and_build:bit: 76 | jobs: 77 | - build:lib 78 | - build:bit -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | 'eslint:recommended' 9 | ], 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 13 | }, 14 | parserOptions: { 15 | parser: 'babel-eslint' 16 | } 17 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "tabWidth": 4, 4 | "semi": false, 5 | "singleQuote": true, 6 | "printWidth": 120 7 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Josh Kuttler 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. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Spinners CSS Loaders ([React](https://github.com/JoshK2/react-spinners-css), [Angular](https://github.com/JoshK2/ng-spinners)) 2 | [![CircleCI](https://circleci.com/gh/JoshK2/vue-spinners-css.svg?style=svg)](https://circleci.com/gh/JoshK2/vue-spinners-css) 3 | [![bit components](https://img.shields.io/badge/dynamic/json.svg?color=6e3991&label=bit%20components&query=payload.totalComponents&url=https%3A%2F%2Fapi.bit.dev%2Fscope%2Fjoshk%2Fvue-spinners-css)](https://bit.dev/joshk/vue-spinners-css) 4 | [![npm version](https://badge.fury.io/js/vue-spinners-css.svg?u)](https://www.npmjs.com/package/vue-spinners-css) 5 | [![GitHub stars](https://img.shields.io/github/stars/joshk2/vue-spinners-css)](https://github.com/JoshK2/vue-spinners-css/stargazers) 6 | [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) 7 | [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/JoshK2/vue-spinners-css/master/LICENSE) 8 | [![Twitter Follow](https://img.shields.io/twitter/follow/joshkuttler)](https://twitter.com/JoshKuttler) 9 | 10 |

11 | 12 |

13 | 14 | Amazing collection of Vue spinners components with pure css. 15 | The Vue spinners are based on loading.io and from all over the web. 16 | 17 | - 💅No extra CSS imports 18 | - ✂️Zero dependencies 19 | - 📦Spinners can be installing separately 20 | 21 | ## [Live Demo](https://bit.dev/joshk/vue-spinners-css) 22 | 23 | Browse components and explore their props with [Bit](https://bit.dev/joshk/vue-spinners-css). 24 | Install specific vue spinner component with npm, yarn, unpkg or bit without having to install the whole project. 25 | [Install components and live demo](https://bit.dev/joshk/vue-spinners-css) 26 | 27 | ## 🚀 List of Spinners - PropTypes and Default Props 28 | 29 | Each component accepts a `color` prop, and `loading` prop. 30 | The default `color` prop is `#7f58af`. 31 | The default `loading` prop is `true`. 32 | Component that accepts size prop have a default size in pixel. 33 | Component that accepts duration prop have a default duration in seconds. 34 | 35 | | Spinner | color: string | loading: boolean | size: number | duration: string | 36 | | ---------------- | ------------ | ----------------- | ------------ | ---------------- | 37 | | Circle Spinner | `#7f58af` | `true` | `64` | `2.4s` | 38 | | Default Spinner | `#7f58af` | `true` | `80` | `1.2s` | 39 | | DualRing Spinner | `#7f58af` | `true` | `80` | `1.2s` | 40 | | Ellipsis Spinner | `#7f58af` | `true` | | | 41 | | Facebook Spinner | `#7f58af` | `true` | `80` | `1.2s` | 42 | | Grid Spinner | `#7f58af` | `true` | `80` | `1.2s` | 43 | | Heart Spinner | `#7f58af` | `true` | `80` | `1.2s` | 44 | | Hourglass Spinner| `#7f58af` | `true` | `80` | `1.2s` | 45 | | Ring Spinner | `#7f58af` | `true` | `80` | `1.2s` | 46 | | Ripple Spinner | `#7f58af` | `true` | `80` | `1s` | 47 | | Roller Spinner | `#7f58af` | `true` | `80` | `1.2s` | 48 | | Spinner Spinner | `#7f58af` | `true` | `80` | `1.2s` | 49 | | Orbitals Spinner | `#7f58af` | `true` | `80` | `4s` | 50 | | Line Spinner | `#7f58af` | `true` | `80` | `1.2s` | 51 | 52 | ## 📦 Installation 53 | ### Using [npm](https://www.npmjs.com/package/vue-spinners-css) to install vue-spinners-css: 54 | 55 | ```bash 56 | $ npm i --save vue-spinners-css 57 | ``` 58 | 59 | ### Play and install vue spinners with Bit 60 | 61 | Install specific vue spinner component with bit, npm or yarn without having to install the whole project. 62 | Using [bit](https://bit.dev/joshk/vue-spinners-css) to play with live demo, and try the spinners before install. 63 | 64 | set npm regisetry config(one time action): 65 | ```bash 66 | npm config set '@bit:registry' https://node.bit.dev 67 | ``` 68 | and use your favorite package manager: 69 | ```bash 70 | npm i @bit/joshk.vue-spinners-css.facebook-loader 71 | yarn add @bit/joshk.vue-spinners-css.facebook-loader 72 | bit import joshk.vue-spinners-css/facebook-loader 73 | ``` 74 | 75 | ## 💻 Usage Examples 76 | 77 | you can use a random color from [jotils](https://bit.dev/joshk/jotils/get-random-color) 78 | 79 | ### Vue Global Registration 80 | ```javascript 81 | import Vue from 'vue' 82 | import * as VueSpinnersCss from "vue-spinners-css"; 83 | 84 | Vue.use(VueSpinnersCss) 85 | 86 | // Each spinner can now be used in your templates anywhere in the app! 87 | ``` 88 | 89 | ### Vue Local Registration 90 | ```html 91 | 95 | 96 | 112 | ``` 113 | 114 | ### Unpkg Import 115 | ```html 116 | 117 | 118 | 119 | 120 | 121 |
122 | 123 |
124 | 125 | 128 | ``` 129 | 130 | 131 | ## 👾 Development 132 | You can see the components locally by cloning this repo and doing the following steps: 133 | - Install dependencies from `package.json`, run: `npm install`. 134 | - Run the app in the development mode, run: `npm run serve`. 135 | 136 | ## ⌨️ Contributing 137 | - Pull requests and ⭐ stars are always welcome. 138 | - For bugs and feature requests, please create an issue. 139 | 140 | ## 👏🏻 Support my open-source 141 | If you like to support my open-source contributions please star and share this project. 💫 142 | 143 | ## 📄 License 144 | [MIT](https://github.com/JoshK2/vue-spinners-css/blob/master/LICENSE) 145 | 146 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-spinners-css", 3 | "version": "1.1.5", 4 | "private": false, 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/JoshK2/vue-spinners-css" 8 | }, 9 | "main": "dist/vue-spinners-css.common.js", 10 | "unpkg": "dist/vue-spinners-css.umd.min.js", 11 | "files": [ 12 | "dist/*.{js,css}", 13 | "README.md" 14 | ], 15 | "bugs": "https://github.com/JoshK2/vue-spinners-css/issues", 16 | "homepage": "https://bit.dev/joshk/vue-spinners-css", 17 | "keywords": [ 18 | "vue-spinners", 19 | "vue-spinner", 20 | "loadingio", 21 | "loading-animations", 22 | "loaders", 23 | "css-animations", 24 | "vuejs", 25 | "component", 26 | "vue-component", 27 | "vue", 28 | "spinner", 29 | "spinners", 30 | "loading", 31 | "loader", 32 | "progress", 33 | "activity" 34 | ], 35 | "author": "JoshK2", 36 | "license": "MIT", 37 | "scripts": { 38 | "serve": "vue-cli-service serve", 39 | "build": "vue-cli-service build", 40 | "build:lib": "rm -rf dist && vue-cli-service build --target lib --inline-vue --name vue-spinners-css ./src/index.js", 41 | "build:bit": "rm -rf dist && bit build", 42 | "lint": "vue-cli-service lint", 43 | "format": "prettier --write \"src/**/*.vue\" \"src/**/*.js\"", 44 | "deploy:npm": "npm publish", 45 | "deploy:bit": "bit export joshk.vue-spinners-css" 46 | }, 47 | "peerDependencies": { 48 | "core-js": "^2.6.5", 49 | "vue": "^2.6.10" 50 | }, 51 | "devDependencies": { 52 | "@vue/cli-plugin-babel": "^3.9.2", 53 | "@vue/cli-plugin-eslint": "^3.9.2", 54 | "@vue/cli-plugin-unit-jest": "^3.9.0", 55 | "@vue/cli-service": "^3.9.3", 56 | "@vue/test-utils": "1.0.0-beta.29", 57 | "babel-core": "7.0.0-bridge.0", 58 | "babel-eslint": "^10.0.2", 59 | "babel-jest": "^24.8.0", 60 | "eslint": "^6.0.1", 61 | "eslint-plugin-vue": "^5.2.3", 62 | "node-sass": "^4.12.0", 63 | "sass-loader": "^7.1.0", 64 | "vue-template-compiler": "^2.6.10", 65 | "vuepress": "^1.0.2" 66 | }, 67 | "bit": { 68 | "env": { 69 | "compiler": "bit.envs/compilers/vue@0.1.13" 70 | }, 71 | "componentsDefaultDirectory": "components/{name}", 72 | "packageManager": "npm" 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoshK2/vue-spinners-css/c8a46327e46b2f0eb13583ce27f875fe30610bfc/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | vue-spinners-css 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 187 | 188 | 224 | 225 | 262 | -------------------------------------------------------------------------------- /src/components/CircleLoader.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 41 | 42 | 68 | -------------------------------------------------------------------------------- /src/components/DefaultLoader.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 51 | 52 | 139 | -------------------------------------------------------------------------------- /src/components/DualRingLoader.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 42 | 43 | 73 | -------------------------------------------------------------------------------- /src/components/EllipsisLoader.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 32 | 33 | 90 | -------------------------------------------------------------------------------- /src/components/FacebookLoader.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 51 | 52 | 79 | -------------------------------------------------------------------------------- /src/components/GridLoader.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 49 | 50 | 106 | -------------------------------------------------------------------------------- /src/components/HeartLoader.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 44 | 45 | 102 | -------------------------------------------------------------------------------- /src/components/HourglassLoader.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 42 | 43 | 75 | -------------------------------------------------------------------------------- /src/components/LineLoader.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 42 | 43 | 89 | -------------------------------------------------------------------------------- /src/components/OrbitalsLoader.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 95 | 96 | 201 | -------------------------------------------------------------------------------- /src/components/RingLoader.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 57 | 58 | 90 | -------------------------------------------------------------------------------- /src/components/RippleLoader.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 49 | 50 | 81 | -------------------------------------------------------------------------------- /src/components/RollerLoader.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 81 | 82 | 108 | -------------------------------------------------------------------------------- /src/components/SpinnerLoader.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 63 | 64 | 127 | -------------------------------------------------------------------------------- /src/components/index.js: -------------------------------------------------------------------------------- 1 | import CircleLoader from './CircleLoader.vue' 2 | import DefaultLoader from './DefaultLoader.vue' 3 | import DualRingLoader from './DualRingLoader.vue' 4 | import EllipsisLoader from './EllipsisLoader.vue' 5 | import FacebookLoader from './FacebookLoader.vue' 6 | import GridLoader from './GridLoader.vue' 7 | import HeartLoader from './HeartLoader.vue' 8 | import HourglassLoader from './HourglassLoader.vue' 9 | import LineLoader from './LineLoader.vue' 10 | import RingLoader from './RingLoader.vue' 11 | import RippleLoader from './RippleLoader.vue' 12 | import RollerLoader from './RollerLoader.vue' 13 | import SpinnerLoader from './SpinnerLoader.vue' 14 | import OrbitalsLoader from './OrbitalsLoader.vue' 15 | 16 | export { 17 | CircleLoader, 18 | DefaultLoader, 19 | DualRingLoader, 20 | EllipsisLoader, 21 | FacebookLoader, 22 | GridLoader, 23 | HeartLoader, 24 | HourglassLoader, 25 | LineLoader, 26 | RingLoader, 27 | RippleLoader, 28 | RollerLoader, 29 | SpinnerLoader, 30 | OrbitalsLoader, 31 | } 32 | -------------------------------------------------------------------------------- /src/helpers/calcPropertyValue.js: -------------------------------------------------------------------------------- 1 | export default function(propName, originalValue, modificator) { 2 | const computedStyle = {} 3 | const timeQuantityOuter = originalValue.match(/^\d*\.?\d+/)[0] 4 | const timeUnit = originalValue.match(/s|(ms)$/)[0] 5 | const timeQuantityInner = Math.round(timeQuantityOuter * 1000 * modificator) / 1000 6 | 7 | computedStyle[propName] = timeQuantityInner + timeUnit 8 | return computedStyle 9 | } 10 | -------------------------------------------------------------------------------- /src/helpers/validateDuration.js: -------------------------------------------------------------------------------- 1 | export default function(duration) { 2 | const re = new RegExp(/^\d*\.?\d+(s|ms)$/) 3 | return re.test(duration) 4 | } 5 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | export * from './components' 2 | export * from './install' 3 | -------------------------------------------------------------------------------- /src/install.js: -------------------------------------------------------------------------------- 1 | import * as components from './components' 2 | 3 | const install = (Vue, options = {}) => { 4 | for (let key in components) { 5 | let _key = options.prefix ? options.prefix + key : key 6 | Vue.component(_key, components[key]) 7 | } 8 | } 9 | 10 | // auto install 11 | if (typeof window !== 'undefined' && window.Vue) { 12 | install(window.Vue) 13 | } 14 | 15 | export { install } 16 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | Vue.config.productionTip = false 5 | 6 | new Vue({ 7 | render: h => h(App), 8 | }).$mount('#app') 9 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | css: { extract: false } 3 | } --------------------------------------------------------------------------------