npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

svg-progress-circle

v1.1.4

Published

Ember addon: Adds a component to show a SVG progress circle

Downloads

87

Readme

SVG-progress-circle

An addon for ember-cli that adds a component to show a sizable circle made with a SVG. This component is part of the rewrite of the frontend-app for my job at easyPEP.

Screenshot

Screenshot

DEMO

See the demo

Installation

  • ember install ember-cli-sass
  • ember install svg-progress-circle

Usage

// blockless:
{{progress-circle size="40" strokeWidth="3" percentage=model.somePercentage}}



// as a block
{{#progress-circle size="40" strokeWidth="3" percentage=model.somePercentage}}
  {{!-- inner content --}}
{{/svg-progress-circle}}



// with inner text
{{#progress-circle
  size="200"
  strokeWidth="10"
  percentage=percentage
}}

  {{#progress-circle/text
    font-size="2rem"
    font-family="inherit"
  }}
    {{percentage}}
  {{/progress-circle/text}}

{{/progress-circle}}




// with inner image
{{#progress-circle
  size="200"
  strokeWidth="10"
  percentage=percentage
    as |strokeWidth|
}}

  {{progress-circle/image
    imageUrl="assets/bill.jpg"
    strokeWidth=strokeWidth
    imageGap="2"
  }}

{{/progress-circle}}

Options

progress-circle

  • size default 90 -> the SVG viewport
  • strokeWidth default 10 -> the width of the border
  • percentage default 0 -> a value between 1 and 100

progress-circle/text

  • font-size default initial
  • font-family dfeault arial

progress-circle/image

  • imageUrl -> a standard URL to the image
  • strokeWidth -> an integer number to control the width of the image border
  • imageGap default 0 -> an integer number to control the gap between the circle and the image

CSS

The addon provides the following classes to style the file-picker:

  • .progress-circle
    • .progress-circle__svg
      • .progress-circle__circle
      • .progress-circle__indicator(--empty|--filled|--invalid)

or you can import the default styles:

@import "svg-progress-circle";

** NOTE: After wrecking the gh-pages and messing with the repository, I had to rollback everything and properly learn how to handle this github stuff. I hope all is now properly documented, pushed and published. But also there have been Features as well. Read below.

Changelog

1.1.4

  • [UPDATE] Updated ember-cli-sass to 7.2.0

1.1.3

  • [FEATURE] Added a an SVG image component.
  • [FEATURE] Added a an SVG text component.
  • [ENHANCEMENT] Proper responsiveness provided. (Use sizes like "3em" or percentages)

0.0.9

  • [BUGFIX] Added the missing viewBox attribute
  • [ENHANCEMENT] Added tests

0.0.8

  • [ENHANCEMENT] Added a demo

0.0.7

  • [BUGFIX] Fixed check for 0 percentage

0.0.6

  • [FEATURE] Added animation for the progress indicator
  • [ENHANCEMENT] Optimized the check for valid values
  • [FEATURE] Added more state class names for the indicator (empty, filled, invalid)

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • npm test – Runs ember try:each to test your addon against multiple Ember versions