Code Monkey home page Code Monkey logo

vue-spinners's Introduction

Vue Spinners

npm travis codecov Known Vulnerabilities Known Vulnerabilities

A Vue.js port of react-spinners.

πŸ“¦ Installation

npm install --save @saeris/vue-spinners
# or
yarn add @saeris/vue-spinners

πŸ”§ Usage

There are a number of ways you can use this library! Here are a few examples:

Vue Plugin

import Vue from 'vue'
import { VueSpinners } from '@saeris/vue-spinners'

Vue.use(VueSpinners)

// Each spinner can now be used in your templates anywhere in the app!

Local Component Registration

import { BarLoader } from '@saeris/vue-spinners'

export default {
  components: {
    BarLoader
  },
  // ...
}

JSX Component

import { BarLoader } from '@saeris/vue-spinners'

export default {
  data: () => ({
    loading: true
  }),
  render() {
    return (
      <div class='loader'>
        <ClipLoader
          class="custom-class"
          loading={this.loading}
          color={'#bada55'}
          size={150}
          sizeUnit={"px"}
        />
      </div>
    )
  }
}

Unpkg Import

<!--Load libraries in your page's header-->
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/@saeris/vue-spinners"></script>

<!--Use a component somewhere in your app-->
<div id="app">
  <bar-loader class="custom-class" :color="#bada55" :loading="loading" :size="150" :sizeUnit="px"></bar-loader>
</div>

<script>
  new Vue({ el: '#app', data: { loading: true } })
</script>

πŸ“‹ Available Loaders, PropTypes, and Default Values

Common default props for all loaders:

loading: true
color: '#000000'

For size, height, and width props, there are sizeUnit, heightUnit, and widthUnit prop that accepts px, %, or em. The default for the unit prop is px.

Loader size:int height:int width:int radius:int margin:str
BarLoader 4 100
BeatLoader 15 2px
BounceLoader 60
CircleLoader 50
ClimbingBoxLoader 15
ClipLoader 35
DotLoader 60 2px
FadeLoader 15 5 2 2px
GridLoader 15
HashLoader 50 2px
MoonLoader 60 2px
PacmanLoader 25 2px
PropagateLoader 15
PulseLoader 15 2px
RingLoader 60 2px
RiseLoader 15 2px
RotateLoader 15 2px
ScaleLoader 35 4 2 2px
SkewLoader 20
SquareLoader 50
SyncLoader 15 2px

πŸ–οΈ Demo

You can either visit the live demo site, clone this repo and run the demo locally using yarn start and opening your browser to http://localhost:8080, or you can just play with it inside of CodeSandbox here.

⚠️ Support Notice

This code is released as-is. It was originally built for use with Vue 2.x and as-such it is now very out of date. I do not plan to make continued updates to this package, so if you find it useful then I would highly recommend that you create a fork or copy-and-paste code to suit your own needs. The version of emotion that is uses is now very out of date and will cause problems when used in a modern codebase alongside another version of emotion. I am also unable to provide support or answer questions due to my lack of knowledge of Vuejs.

πŸ“£ Acknowledgements

This library is a Vue port of react-spinners by David Hu, who's library is based on Halogen.

πŸ₯‚ License

Released under the MIT license.

vue-spinners's People

Contributors

greenkeeper[bot] avatar saeris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vue-spinners's Issues

An in-range update of @vue/cli-plugin-eslint is breaking the build 🚨

The devDependency @vue/cli-plugin-eslint was updated from 3.0.5 to 3.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@vue/cli-plugin-eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Installation gets stuck

Hi. I have run yarn add @saeris/vue-spinners on my osx, but then installation gets stuck.

[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
warning " > @saeris/[email protected]" has unmet peer dependency "[email protected]".
warning " > @saeris/[email protected]" has unmet peer dependency "[email protected]".
[4/4] πŸ“ƒ  Building fresh packages...
[1/1] β ‚ @saeris/vue-spinners .  <- stuck here

':color="#bada55"' as the example break the build with unpkg.

I want to test spinners, but when I copy/paste code as example, using unpkg, vue can't compile due tu color (I trie it with ring-loader).
Here Vue report :

[Vue warn]: Error compiling template:
invalid expression: private fields are not currently supported in
    #bada55
  Raw expression: :color="#bada55"

1  |  <div id="app">
2  |      <ring-loader class="spinner" :color="#bada55" :loading="loading" :size="130"></ring-loader>
   |                                   ^^^^^^^^^^^^^^^^
3  |      <button v-on:click="showSpinLoader()">Load eavy stuff</button>
4  |      <div id="data" v-show="showData">

(found in <Root>)

sizeUnit="px" also doesn't work, but vue can compile.

An in-range update of snyk is breaking the build 🚨

The devDependency snyk was updated from 1.170.0 to 1.171.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

snyk is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v1.171.0

1.171.0 (2019-06-02)

Features

  • add branch and pkg name to monitor analytics (b91d2ae)
Commits

The new version differs by 6 commits.

  • 305ac09 Merge pull request #543 from snyk/feat/add_monitor_branch_pname_analytics
  • b91d2ae feat: add branch and pkg name to monitor analytics
  • 464b784 Merge pull request #544 from snyk/chore/delete-docker-promo
  • d82df40 chore: delete expired docker promo
  • 3d66ee6 Merge pull request #534 from snyk/chore/refactor-errors
  • 76b0565 chore: refactor snyk missing api token

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of vue-template-compiler is breaking the build 🚨

The devDependency vue-template-compiler was updated from 2.5.17 to 2.5.18.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

vue-template-compiler is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v2.5.18

Includes everything in 2.5.18-beta.0

Bug Fixes

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @vue/cli is breaking the build 🚨

The devDependency @vue/cli was updated from 3.7.0 to 3.8.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@vue/cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 32 commits.

  • d6ce9c2 v3.8.0
  • 6d1706e chore: pre release sync
  • 1ba4b9c docs: add description of babel plugin usage in TS plugin prompt (#4046)
  • 6996df3 feat(HtmlPwaPlugin): adds 'manifestCrossorigin' option (#3939)
  • 7b8a06f chore: remove gitHead field from package.json
  • 686759f chore: lockfile maintenance
  • bde9b3d fix: add apollo-client as dependencies, fix peer dep warning
  • cb6ca38 fix: add default inMemoryCacheOptions
  • 1b51835 test: replace http-server with serve to create a test server (#4056)
  • 7597c60 chore: update vue-template-compiler version
  • f9f6afa ci: update chromedriver version in appveyor to 2.45
  • 04148dd chore: update isbinaryfile to 4.x
  • 78bc1db chore(openBrowser): sync with upstream
  • 6f085d3 fix: fix dev mode compatibility with workers (#4034)
  • dbac817 feat: prompt editor (#3929)

There are 32 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Not working with Vue 3

The Package is working with Vue 3. It is showing the following error.
image

Is this package support Vue 3 or not? because the readme file does not mention the supported version.

Thank you,

How to cut output file size?

I just used one spinner locally, BarLoader, but it makes no different when I used VueSpinner globally. It is the highest javascript output when I ran npm run prod.

What should I do to make the output javascript file to be the smallest size as possible?

Fullscreen Overlay

Hey there, loving this component

Is there an "easy" way to get a fullscreen overlay? I am currently using a loader from elementUI which provides a fullscreen option (see code below). Is this something available? I could not find anything in the docs.

<div v-loading.fullscreen.lock="isLoading" element-loading-background="rgba(0, 0, 0, 0.1)">
 ...app code here
</div>

An in-range update of vue-loader is breaking the build 🚨

The devDependency vue-loader was updated from 15.6.3 to 15.6.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

vue-loader is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of vue is breaking the build 🚨

The dependency vue was updated from 2.5.17 to 2.5.18.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

vue is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v2.5.18

Includes everything in 2.5.18-beta.0

Bug Fixes

Commits

The new version differs by 164 commits ahead by 164, behind by 4.

  • dadc918 build: release 2.5.18
  • eb81ec2 build: build 2.5.18
  • dfaf9e2 fix(types): type support for advanced async components (#8438)
  • 8a2dbf5 fix(transition-group): fix activeInstance regression
  • 0ed0aad fix: fix keyName checking for space and delete in IE11 (#9150)
  • f077ed1 fix(ssr): fix ssr template publicPath generation
  • 93850f4 chore: fix sponsor link
  • 1b4a8a0 fix(compiler): fix codegen for v-for component inside template
  • 448ba65 fix(types): correct scopedSlot types (#9131)
  • 0d7fb73 chore: update sponsors/backers [ci skip]
  • e8031b4 build: release v2.5.18-beta.0
  • fe194dd build: build v2.5.18-beta.0
  • 3078352 fix(ssr): resolve server directives the same as on client (#9129)
  • aca17b4 ci: add regression test for popular libraries in Vue.js ecosystem (#8608)
  • e4b1b57 fix(ssr): adjust call stack size defer threshold

There are 164 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of webpack is breaking the build 🚨

The devDependency webpack was updated from 4.35.3 to 4.36.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v4.36.0

Features

  • SourceMapDevToolPlugin append option now supports the default placeholders in addition to [url]
  • Arrays in resolve and parser options (Rule and Loader API) support backreferences with "..." when overriding options.
Commits

The new version differs by 42 commits.

  • 95d21bb 4.36.0
  • aa1216c Merge pull request #9422 from webpack/feature/dot-dot-dot-merge
  • b3ec775 improve merging of resolve and parsing options
  • 53a5ae2 Merge pull request #9419 from vankop/remove-valid-jsdoc-rule
  • ab75240 Merge pull request #9413 from webpack/dependabot/npm_and_yarn/ajv-6.10.2
  • 0bdabf4 Merge pull request #9418 from webpack/dependabot/npm_and_yarn/eslint-plugin-jsdoc-15.5.2
  • f207cdc remove valid jsdoc rule in favour of eslint-plugin-jsdoc
  • 31333a6 chore(deps-dev): bump eslint-plugin-jsdoc from 15.3.9 to 15.5.2
  • 036adf0 Merge pull request #9417 from webpack/dependabot/npm_and_yarn/eslint-plugin-jest-22.8.0
  • 37d4480 Merge pull request #9411 from webpack/dependabot/npm_and_yarn/simple-git-1.121.0
  • ce2a183 chore(deps-dev): bump eslint-plugin-jest from 22.7.2 to 22.8.0
  • 0beeb7e Merge pull request #9391 from vankop/create-hash-typescript
  • bf1a24a #9391 resolve super call discussion
  • bd7d95b #9391 resolve discussions, AbstractMethodError
  • 4190638 chore(deps): bump ajv from 6.10.1 to 6.10.2

There are 42 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.