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-cli-bm-select

v0.1.3

Published

bm-select is a customizable select component that supports keyboard navigation and WAI-ARIA

Downloads

3

Readme

ember-cli-bm-select

Build Status npm version

bm-select is an ember addon component that provides the functionality of a select box. It allows you to specify templates for both the options and the selected option. It supports keyboard navigation and WAI-ARIA guidelines.

Demo

http://blessanmathew.com/ember-cli-bm-select

Installation

npm install ember-cli-bm-select --save-dev

Usage

You know are given 4 components which needed to be used together for the addon to work

  • bm-select
  • bm-selected
  • bm-options
  • bm-option
{{#bm-select value=selectedCountry action="countrySelected"}}
  {{#bm-selected}}
    {{selectedCountry}}
  {{/bm-selected}}

  {{#bm-options}}
    {{#each item in countriesObj}}
      {{#bm-option data=item key="name"}}
        {{item.name}}
      {{/bm-option}}
    {{/each}}
  {{/bm-options}}
{{/bm-select}}
  1. bm-select It is the parent component. It can take 2 options - value and action.

    • value (required) The value of the selected option. Must be a primitive type like string or integer.
    • action (optional) The name of the action which will be triggered when the selection has changed.
  2. bm-selected This component should be a direct child of bm-select. It should be used as a block component where you specify how the selected value should be rendered once the selection is made. The template data use to render is taken from the controller used by bm-select.

  3. bm-options This component should be a direct child of bm-select.

  4. bm-option This component should be a direct child of 'bm-options'. This should be used as a block component where you specify how the option should be rendered. The template data comes from the parent context. This componenets take 4 options - value, data key and isDisabled. Either the value or data,key pair should be specified for the component.

    • value (optional) - The value of the option. Must be a primitive type like string or integer.
    • data (optional) - A object that contains the data for the option in which one proerty will hold the value for the option. Must be an object.
    • key (optional) - This is the key on the data object in which the value can be accessed. When data,key combination is given, the value will be taken like value = data.get(key); Must be a string.
    • isDisabled (optional) - If you set isDisabled to true, the option will be disabled.

###Keyboard Support You can interact with the component using the keyboard. Once the component has focus you can use the down arrow or enter button to open the options dropdown.

While the dropdown is open you can use the up and down arrow key to move focus between the different options.

While focus is on an option, you can press enter to select that option.

You can press the escape button to close the dropdown.

##Issues Or Contributions