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-select-light

v2.0.5

Published

The simple DDAU component built for Ember

Downloads

905

Readme

Ember-Select-Light

CI PRs Welcome License: MIT npm package Ember Observer

Ember-Select-Light is an Ember Addon focused on simplicity. Just powerful enough to offer expected baseline functionality while being easy to implement, style, and make accessible.

This addon is Octane ready and follows ember-component-pattern's for how to best write a Select Element.

Getting Started

ember install ember-select-light

Example Usage

<SelectLight
  @value="turtle"
  @options={{array "turtle" "tortoise"}}
  @onChange={{action "handleChange"}} />

With an array of objects...

<SelectLight
  @options={{array
    (hash value="shortfin" label="Shortfin Shark")
    (hash value="mako" label="Mako Shark")
  }} />

value and label will be the default object keys used unless @valueKey="... and/or @displayKey="... are used respectively, like so...

<SelectLight
  @options={{array
    (hash myValue="shortfin" myLabel="Shortfin Shark")
    (hash myValue="mako" myLabel="Mako Shark")
  }}
  @valueKey="myValue"
  @displayKey="myLabel" />

As a Yield

<SelectLight>
  <option value="clown">Clown Fish</option>
  <option value="cat">Cat Fish</option>
</SelectLight>

Other arguments

Other arguments are spread onto the <select ...attributes as you'd expect, allowing you to use common attributes such as disabled, tabindex and of course class.

<SelectLight class="my-select" disabled="true" />

Styled

As shown above we can pass in other arguments like class=" which allows us to style our Select dropdowns. Below is an example with the Select dropdown styled using Tailwind CSS.

Following the Tailwind Custom Select guides this component can be easily styled


Upgrading

See the upgrading guide for how to upgrade from previous versions.


Running

Linting

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

Contributing

We love pull requests from everyone. By participating in this project, you agree to abide by the code of conduct and is subject to the project license.

Clone this repo, make your changes with test coverage, push up a fork and submit a pull request.

Soon after some primary contributors will review your code and submit feedback and hopefully click the fancy green approve button. Any test and linting failures should be caught during the pull request continuous integration environment and human eyes here after.

Running Tests

  • npm run test (Runs ember try:each to test your addon against multiple Ember versions)
  • or ember test