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

@virsas/vue-components

v0.1.49

Published

Virsas Vue3 and/or Quasar2 component library

Downloads

10

Readme

@virsas/vue-components

Virsas Vue3 / Quasar2 component and utility library

Installation

Install

cd vue3_project
npm install @virsas/vue-components
npm run dev

Use plugin (edit main.js file)

import { createApp } from "vue";

import App from "./App.vue";
import virsas from "@virsas/vue-components";

import "./main.css";

const app = createApp(App);

app.use(virsas);
app.mount("#app");

Usage (edit any .vue file)

<script setup>
const assetsURL = import.meta.env.VITE_ASSETS_URL;
</script>

<template>
  <q-layout view="hHh LpR fff">
    <q-page-container>
      <q-page>
        <div class="row justify-center q-py-xl">
          <div class="col-xs-10 col-sm-6 col-md-3 col-3">
            <VLogo
              :darkable="true"
              :assets-url="assetsURL + '/logo'"
              logo-name="main"
            />
          </div>
        </div>
        <div class="row justify-center">
          <div class="col-xs-10 col-sm-8 col-md-4 col-4">
            <div class="text-center">
              <router-view />
            </div>
          </div>
        </div>
      </q-page>
    </q-page-container>
  </q-layout>
</template>

Usage of utilities

import { defineStore } from "pinia";
import axios from "axios";

import { apiHeaders, notify } from "@virsas/vue-components";

const api = import.meta.env.VITE_API_URL;

export const useStore = defineStore("item", {
  state: () => ({
    items: [],
  }),
  actions: {
    async list() {
      try {
        const res = await axios.get(`${api}/items`, apiHeaders());
        this.items = res.data;
        return true;
      } catch (e) {
        notify({ message: `error.${e.response.data.error}` });
        return false;
      }
    },
  },
});

Utilities List

Content

  • setMetadata

Date

  • stringToDate
  • stringToDatetime
  • stringToTime
  • stringToTimestamp
  • currentYear

Header

  • apiHeaders

Notification

  • notify

Pagination

  • pagedArray

Time

  • sleep

Validation

  • isValidEmail
  • isValidTelephone
  • isValidLength
  • isValidConfirmation
  • isGoodPassword

Components List

Elements

  • VElementBreadcrumb
  • VElementButton
  • VElementIteem
  • VElementLogo
  • VElementTable

Form

  • VForm
  • VFormDate
  • VFormInput
  • VFormSelect
  • VFormCheckbox

Page

  • VPageHeader
  • VPageLegal
  • VPageLoading
  • VPagePopup

Individual components

VElementLogo

Description

This component can be used to show a clickable or non clickable logo with configurable assets url, website to point to and image source for dark and light theme.

Props

| Prop Name | Required | Default Value | Example value | | ------------- | -------- | ------------- | -------------------------- | | assetsURL | ✓ | | https://assets.example.org | | logoName | ✓ | | logo | | logoExtencion | ✕ | png | jpg | | websiteURL | ✕ | | https://www.example.com | | websiteLocale | ✕ | | en-US | | darkable | ✕ | false | true | | width | ✕ | 100% | 50px | | class | ✕ | | q-mt-xl |