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

ember-paper-link

v1.1.0

Published

The default blueprint for ember-cli addons.

Downloads

65

Readme

ember-paper-link

This is an ember-paper addon that extends ember's built in link-to helper and adds paper-button styling and functionality.

The paper-link component makes it easy to have buttons that display an 'active' state based on the current route. Exactly the same as link-to.

There is also a paper-link-item component that creates a list item with the same link-to functionality. Intended for use in nav lists.

| Version compatibility | ember-paper-link version | |-------------------------------------------------|------------------------------| | Ember 3.11.0+ or ember-paper 1.0.0-beta.27+ | ^1.0.0 | | Ember < 3.11.0 or ember-paper < 1.0.0-beta.27 | 0.0.6 |

Usage

Example usage:

{{paper-link 'My route' 'my-route'}}
{{#paper-list}}
  {{#paper-link-item 'my-route'}}
    <p>Go to My route</p>
  {{/paper-link-item}}
{{/paper-list}}

Alternative to this addon

paper-button and paper-item both accept an href attribute for link functionality. For internal links the ember-href-to addon is recommended:

{{#paper-button href=(href-to "index")}}
  Home
{{/paper-button}}

ember-href-to has the benefit of being 12x faster than link-to which is used internally by ember-paper-link.

The downside of ember-href-to is that it does not handle displaying an 'active' state based on the current route.

More discussion here

Demo

https://subtletree.github.io/ember-paper-link/

Compatibility

  • Ember.js v3.12 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

ember install ember-paper-link

Don't forget to import your styles in your app.scss after importing ember paper styles:

@import "ember-paper";
@import "ember-paper-link";

API

{{paper-link}}

Has the same api as link-to with the paper-button attributes added.

Make sure to add any link-to parameters before paper-button ones e.g:

{{paper-link 'My route' 'my-route' model raised=true}}

{{#paper-link-item as |controls|}}

Has the same api as paper-item with the link-to attributes added.

Make sure to add any link-to parameters before paper-item ones e.g:

{{#paper-link-item 'my-route' model class="md-2-line" as |controls|}}
  <img src={{item.img}} alt={{item.name}} class="md-avatar">
  <div class="md-list-item-text">
    <h3>{{item.name}}</h3>
    <p>{{item.email}}</p>
  </div>
{{/paper-link-item}}

Running

  • npm run lint:hbs
  • 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"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

License

This project is licensed under the MIT License.