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

@kleberpinel/vue-components

v0.0.20

Published

## Installation and Usage: 1. Just use `npm install --save @flockos/vue-components` 2. Now you can include the scripts by using following snippet: ``` import Components from '@flockos/vue-components';

Downloads

8

Readme

Flock Components for VueJS

Installation and Usage:

  1. Just use npm install --save @flockos/vue-components
  2. Now you can include the scripts by using following snippet:
import Components from '@flockos/vue-components';

// Global registration in your main.js/App.vue file
Object.entried(Components).forEach((name, component) => {
    Vue.component(name, component);
});

Demo

Check out the demo here: https://codesandbox.io/s/n9n7yy2lwp

List of components:

All components are registered with the Vue global and are available for use. You do not need to re-register them.

Event Bus

You can use the Flock Component's own event bus to pass data around.

Events:

focusChanged: Whenever the document is clicked, this event is fired. The only parameter is element which was clicked.

Usage:

import { eventBus } from '@flockos/vue-components';

eventBus.$on('focusChanged', (element) => {
    // Do a few things if focus changes.
});

More events will be supported as needed.

Flock Button

Usage:

<flock-button type="primary">Submit</flock-button>

Events:

click: Emits the click event when clicked.

Props:

styles: Custom styles for your button.

shape: Default is default. Options are default and flat. Flat means that there's no hover state.

size: Size of the button. Possible values: full, half & auto. Default is auto.

small: Reduce padding and makes a smaller styled button. Default is false.

loading: To show asynchronous operations, a loader circle shows up whenever this is set to true.

disabled: Disables the button and applies an opacity to it.

type: The style of the button. Possible values are primary, secondary & destructive. Default is primary.

invert: Replaces the color & background with each other.

Flock Radio

Usage:

<flock-radio>
    name="radio-demo"
    label="Is this the value!"
    v-model="radio"
    optionValue="Yes"
    :disabled="false"
>
</flock-radio>
<flock-radio>
    name="radio-demo"
    label="Or is this the value!"
    v-model="radio"
    optionValue="No"
    :disabled="false"
>
</flock-radio>

Flock Select

Usage:

<flock-select
    :width="150"
    :options="listOptions"
    v-model="selectedOption"
/>

Events:

change: Whenever the FlockSelect changes value, this event is fired with the new value as a parameter.

Props:

open: Initial state of the FlockSelect dropdown.

options: Array of options. Every option needs to be in the { label: 'Some Visible Text', value: String|Object|Number } format.

width: The width of the FlockSelect component, if it needs to be constant.

v-model: The value that will dynamically change just like normal models in Vue.js.

Flock Modal

Usage:

<FlockModal @close="showModal = false" v-if="showModal" title="Settings">
    List of devices!
</FlockModal>

Events:

close: Fired whenever the modal is closed. User has to handle the close themselves using a v-if.

Props:

closeOnBgClick: When set to true, the modal will automatically emit the close event whenever the background is clicked.

background: This sets the backdrop of th modal. Default is none.

title: The title of the Modal.

Flock Banner

Usage:

<FlockBanner>
    This is a banner.
</FlockBanner>

Props:

position: Position of the toast. Can be either top or bottom. Default is bottom.

styles: A styles object to customize background, color etc. of your banner. By default, the banner will occupy 100% of the total width of the page.

Flock Toast

Usage:

<FlockToast v-if="showToast" @toasthidden="doSomething">
    Let's make a toast!
</FlockToast>

Events:

toasthidden: Gets triggered when the toast is hidden, automatically or manually.

Props:

time: The time duration of the toast in milliseconds. Default duration is 5000ms.

position: Position of the toast. Can be either top or bottom. Default is bottom.

styles: A styles object to customize background and color of your toast.

Gotchas:

You need to control the visibility of the toast by supplying a v-if conditional. TODO: Make Toast better so that a user can directly use it like: eventBus.showToast(Some Text, 4000)