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

vue-select-input-ui

v1.0.6

Published

A select input component made with Vue JS

Downloads

57

Readme

VueSelectInputUi

A vue component for select dates (range mode available) & time

vue-select-input-ui

Demo

Enjoy

Installation

Yarn

yarn add vue-select-input-ui

NPM

npm i --save vue-select-input-ui

Usage

ES6 Modules / CommonJS

import VueSelectInputUi from 'vue-select-input-ui';
import 'vue-select-input-ui/dist/vue-select-input-ui.css';

Vue.component('VueSelectInputUi', VueSelectInputUi);
  <VueSelectInputUi
    v-model="yourValue"
    :options="[
      { label: 'First option', value: 'first' },
      { label: 'Second option', value: 'second' },
      { label: 'Third option', value: 'third' }
    ]"
  />

UMD

<link
  rel="stylesheet"
  type="text/css"
  href="${YOUR_PATH}/vue-select-input-ui.css"
/>

<div id="app">
  <VueSelectInputUi v-model="yourValue"></VueSelectInputUi>
</div>

<script src="https://unpkg.com/vue" charset="utf-8"></script>
<script
  src="${YOUR_PATH}/vue-select-input-ui.umd.min.js"
  charset="utf-8"
></script>

<script type="text/javascript">
  Vue.component('vue-select-input-ui', window['vue-select-input-ui']);
  new Vue({
    el: '#app',
    data() {
      return {
        yourValue: false
      };
    }
  });
</script>

Props API

| Props | Type | Required | Default | |-----------------|---------------------|----------|------------------| | v-model | String | yes | - | | id | String | no | VueSelectInputUi | | name | String | no | VueSelectInputUi | | label | String | no | Select option | | hint (1) | String | no | - | | error (2) | Boolean | no | false | | color (3) | String (hex) | no | dodgerblue | | dark-color (4) | String (hex) | no | #424242 | | item-height (4) | Int | no | 30 | | list-height | Int | no | 210 | | size | String ['sm', 'lg'] | no | null | | disabled | Boolean | no | false | | required | Boolean | no | false | | dark | Boolean | no | false | | valid | Boolean | no | false | | validColor | String (hex) | no | false | | options (5) | String (hex) | no | false | | border-radius | Number | no | 8 |

(1) hint : Is a text that replaces the label/placeholder (Ex : Error designation)

(2) error : When is true --> Input border & label are red

(3) color: Replace color for the hint, the borders & picker color

(4) Height of items in option list

(5) Options should be an Array of object like that :

[
  { label: 'None' },
  { label: 'First option', value: 'first' },
  { label: 'Second option', value: 'second' },
  { label: 'Third option', value: 'third' }
]

Feature list

  • You can search the option on taping the label
  • Keyboard accessibilty
  • Valid state ui
  • Error state ui
  • Message error state ui

Events API

| Event | Return | |-------|---------------------------------------| | input | value (formatted with 'format' props) | | click | when you click on the component | | focus | when the component is focused | | blur | when the component is blur |

Keyboard Accessible

| Key | Action | |------------|-----------------| | Arrow Down | Next option | | Arrow Up | Previous option | | Escape | Close list | | Enter | Select option |

Upcoming features (Todo)

  • Position list (left, right, top, bottom)

Contribute

Setting up development server

Ensure you have Node and npm in your machine. Minimal config is:

  • node >= 6.0
  • npm >= 3.0

This project is built with [email protected].

Install the development dependencies by running:

npm install

or

npm ci # Recommanded if you have node > 10.x

Once your dependencies are installed, start the development server with:

npm run serve

This will start the development server available at http://localhost:8080.

Compiles and hot-reloads for development

npm run serve

Linter

npm run lint

Tests

Work in progress

License

This project is licensed under MIT License