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-sides-forked

v1.1.12

Published

select sides component for vue

Downloads

115

Readme

A component for Vue.js to select double-sided data. The customer can select one or more items and ship them from side to side. Values can be displayed grouped or ungrouped.

Live DEMO

Installation

First install it using:

npm install --save vue-select-sides

or

yarn add vue-select-sides

Then you can either use it as a component:

import vueSelectSides from "vue-select-sides";

export default {
  components: {
    vueSelectSides
  }
};

Global component:

import vueSelectSides from "vue-select-sides";
Vue.use(VueSelectSides);
Vue.component("vue-select-sides", VueSelectSides);

Or if you wish to include it in a script tag, just include the vueSelectSides.umd.min.js file located in the dist folder as so:

<script src="dist/vueSelectSides.umd.min.js"></script>

Usage

The component has support for two types: mirror and grouped.

Import a theme

// modern
@import "/node_modules/vue-select-sides/styles/themes/soft.scss";
// or dark
@import "/node_modules/vue-select-sides/styles/themes/dark.scss";
// or light
@import "/node_modules/vue-select-sides/styles/themes/light.scss";

Grouped

Warning: v-model must be of type Object

<vue-select-sides
  type="grouped"
  v-model="selected"
  :list="list"
></vue-select-sides>
import vueSelectSides from "vue-select-sides";

export default {
  components: {
    vueSelectSides
  },
  data() {
    return {
      selected: {},
      list: [
        {
          value: "sul",
          label: "Sul",
          disabled: false,
          children: [
            {
              value: "santa-catarina",
              label: "Santa Catarina",
              disabled: false
            },
            {
              ...
            }
          ]
        },
        {
          value: "sudeste",
          label: "Sudeste",
          disabled: false,
          children: [
            {
              value: "minas-gerais",
              label: "Minas Gerais",
              disabled: false
            },
            {
              ...
            }
          ]
        }
      ]
    };
  }
};

Mirror

Warning: v-model must be of type Array

<vue-select-sides
  type="mirror"
  v-model="selected"
  :list="list"
></vue-select-sides>
import vueSelectSides from "vue-select-sides";

export default {
  components: {
    vueSelectSides
  },
  data() {
    return {
      selected: [],
      list: [
        {
          value: "afghanistan",
          label: "Afghanistan",
          disabled: true
        },
        {
          value: "brazil",
          label: "Brazil"
        },
        {
          value: "fiji",
          label: "Fiji",
          disabled: true
        },
        {
          value: "ghana",
          label: "Ghana"
        },
        {
          ...
        }
    ];
  }
};

Language/locales

List of locales available for the plugin:

  • en_US - [English] - Default
  • pt_BR - [Portuguese] - Contributed by @juliorosseti
  • es_ES - [Spanish] - Contributed by @etrepat
  • fr_FR - [French] - Contributed by @MajuTo
  • tr_TR - [Turkey] - Contributed by @Abdulsametileri
  • pl_PL - [Polish] - Contributed by @jzapal

Use global locale

import vueSelectSides from "vue-select-sides";

Vue.use(vueSelectSides, {
  locale: "pt_BR"
});

Vue.component("vue-select-sides", vueSelectSides);

Props

These are all the props you can pass to the component:

| name | type | example | notes | | ----------------------------- | ------------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | v-model | Array or Object | ["xyz"] or {xyz: ["abc", "def"]} | Use Object if type is grouped else uses Array | | type | String | grouped or mirror | | | list | Array | [{ value: "xyz", label: "Label xyz 01", disabled: true/false }] | You can add the children key to type grouped | | search | Boolean | true or false | To show/hide search input. Default is visible (true) | | total | Boolean | true or false | To show/hide total selected in footer. Default is visible (true) | | toggle-all | Boolean | true or false | To show/hide toggle in footer. Default is visible (true) | | sort-selected-up | Boolean | true or false | Show first the pre-selected. Default does not visible (false). Available only grouped type | | order-by | String | asc or desc | Show first the pre-selected. Default is natural order | | ~~lang~~ (deprecated in v1.1) | ~~String~~ | ~~en_US, pt_BR, es_ES or fr_FR~~ | ~~Language default. Default is en_US~~Use Use global locale | | placeholder-search-left | String | "Yay! Search items..." | Placeholder on the left search field. Default is "" | | placeholder-search-right | String | "Or search children items..." | Placeholder on the right search field. Default is "" |

Bugs and feature requests

If your problem or idea is not addressed yet, please open a new issue.

Sponsor / Creator

Contribution / Development

Install dependencies

yarn install

Devserver

yarn run serve

Bundling

yarn run build

Donate

You can help with a donation on Paypal

License

Vue select sides is open-sourced software licensed under the the MIT license.