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

v-address-fields

v1.0.0

Published

A Vue.js plugin providing components to collect address information extending the Vuetify UI library.

Downloads

3

Readme

VAddressFields

Build Status Coverage Status NPM Downloads at NPM GitHub Commitizen friendly We use Semantic Release

VAddressFields is a Vue.js plugin that provides components for collecting postal address information. It extends the Vuetify UI library which implements the Material design standard.

Check out a working demo on CodePen.

NOTE: This is a very simple component that was created primarily as part of a short course on how to build packageable components to extend Vuetify with TypeScript. While it should perform exactly as advertised, many developers may find it is just easier to provide a list of US states directly to a Vuetify VAutocomplete component.

Installation

From the root of a Vue project already using Vuetify:

npm i -S v-address-fields

Or if using yarn

yarn add v-address-fields

If you want the component to be registered and available globally, from your main Vue configuration file (frequently src/main.js), add the following before instantiating Vue for the first time:

import Vue from 'vue'
import VAddressFields from 'v-address-fields'

Vue.use(VAddressFields)

Or if you just want to use the v-state-select component within another component:

<script>
  import { VStateSelect } from 'v-address-fields'
  export default {
    components: {
      VStateSelect
    },
    /* ... the rest of your code ... */
  }
</script>

Basic Usage

<template>
  <v-state-select v-model="state"></v-state-select>
</template>

<script>
  // the import statement and components section is unnecessary
  // if the component was registered globally (see above)
  import { VStateSelect } from 'v-address-fields'
  export default {
    components: {
      VStateSelect
    },
    data: () => ({
      state: null
    })
    /* ... the rest of your code ... */
  }
</script>

Description

VStateSelect extends Vuetify's VAutocomplete component. All of the properties available on VAutocomplete are also available on VStateSelect except items. The items property is overridden by the list of US states built into this component. There are five properties unique to VStateSelect that allow you to modify the list of states:

| Name | Type | Default | Required? | Description | |:--------------------:|:----------:|:-------:|:---------:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------| | contiguousOnly | boolean | false | no | Only include the "lower 48" contiguous US States | | exclude | string[] | [] | no | List of states or territories to exclude. Can be an array of state abbreviations, e.g. ['AK', 'HI'], state names, e.g. ['Alaska', 'Hawaii'], or a mix of both | | includeTerritories | boolean | false | no | Include US protectorates and territories, e.g. Puerto Rico, Guam, etc. | | storedValue | string | abbr | no | The value to be stored in the output variable for this input. Available options: abbr, name, capital | | text | string | name | no | The text value that will be shown in the dropdown. Available values: abbr, name, capital |

Questions, Comments, Bug Reports, etc.

Comments, questions, pull requests, and bug reports are very welcome. Please submit an issue via the Issues tab above.

Have fun!