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

nuxt-vuetify-nested-containment

v1.6.4

Published

This module provides multiple vuetify extended components like a List with nested logic

Downloads

5

Readme

Nuxt vuetify nested containment

npm version npm downloads License Nuxt

This module provides multiple vuetify extended components like a List with nested logic

Features

  • ⛰  Vue3, Nuxt3, Vuetify3
  • 🚠  100% Typescript
  • 🌲  As lightweight as possible

Components

VNestedList

Preview

With this component you can use a infinitly nested list. Optimized for mobile with one visible level and 'go back' functionality. It supports all vuetify List props by forward all props in "props:" to v-list-item by v-bind="item.props". See https://vuetifyjs.com/en/api/v-list-item/ for all possible props. Define custom click event on each item with onClick attribute in data json (Will be overwritten with arrow if item has childrens)

Props
data

With this json you can structure the nested list

type Array<Record<string, any>>

required true

See the type (25)

import IconArrowLeft from '~icons/mdi/arrow-left'
<v-nested-list
  /* VList props https://vuetifyjs.com/en/api/v-list/#props */
  :list-props="{
    color: 'primary',
  }"
  /* The below for structure */
  :data="item.nestedListData"
  /* VListItem props https://vuetifyjs.com/en/api/v-list-item/#props */
  :back-item-props="{
    title: $t('back'),
    baseColor: 'any-theme-color',
    prependIcon: 'custom:chevron-left'
  }"
  /* Emmitted event if any last child is clicked - usefull for closing menu as example */
  @on-click-last-child="closeMenu()"
/>
const data = [
{
    activeQueryParam: 'q', // You can use this to let the component set active true when the vue route query is equal to props.value
    props: {
      title: 'Level 0 - Item1',
      prependIcon: 'mdi-account',
    },
    onClick: () => { console.log("onClick item with no childs") },
    children: []
  },
  {
    props: {
      title: 'Level 0 - Item2',
      prependIcon: 'mdi-map',
    },
    onClick: () => { console.log("onClick item with childs") },
    children: [
      {
        
        props: {
          title: 'Level 1 - Item1',
          prependIcon: 'mdi-map',
        },
      },
      {
        props: {
          title: 'Level 1 - Item2'
        },
        
      }
    ]
  },
  {
    props: {
      title: 'Level 0 - Item3',
        },
   
    children: [
      {
        props: {
          title: 'Level 1 - Item1',
        },
        
        children: [
          {
            props: {
              title: 'Level 2 - Item1'
        },
            
          }
        ]
      },
      {
        props: {
          title: 'Level 1 - Item2',
        },
        
        children: []
      }
    ]
  },
  {
    props: {
      title: 'Level 0 - Item4',
        },
   
    children: [
      {
        props: {
          title: 'Level 1 - Item1',
        },
        
        children: [
          {
            props: {
              title: 'Level 2 - Item1'
        }
            
          },
          {
            props: {
              title: 'Level 2 - Item2'
        },
           
          }
        ]
      },
      {
        props: {
          title: 'Level 1 - Item2',
        },
        
        children: [
        {
          props: {
            title: 'Level 2 - Item1',
        },
            
            children: [
          {
            props: {
              title: 'Level 3 - Item1'
        },
           
          },
          {
            props: {
              title: 'Level 3 - Item2'
        },
           
           
          }
        ]
          }
        ]
      }
    ]
  }
]
back-title

With this string you can overwrite the default back title

type string

default: Back

back-icon

With this you can overwrite the default back icon. You can either fill it with a icon string like mdi-* (Remember to load material design icons css for that). Or you fill it with a JS Object. See https://vuetifyjs.com/en/components/icons/#semantic-svg-icons for more

type string | Object

default: mdi-arrow-left

transition-component-name

With this string you can overwrite the default transition component. See possible vuetify component names here https://vuetifyjs.com/en/styles/transitions/

Important note If your app is using vuetify-loader to auto-import components be sure to explicit import the v-...-transition component from vuetify. import { VFadeTransition } from 'vuetify/components'

type string

default: v-fade-transition

transition-component-props

With this json you can overwrite the default transition props. See possible props here https://vuetifyjs.com/en/api/v-fade-transition/

type Object

default: { group: true, hideOnLeave: true }

list-props

This object is fowarded to the v-list component via v-bind="props". For all props you can see https://vuetifyjs.com/en/api/v-list/#props

type Object

default: undefined

Quick Setup

  1. Add nuxt-vuetify-nested-containment dependency to your project
# Using pnpm
pnpm add -D nuxt-vuetify-nested-containment

# Using yarn
yarn add --dev nuxt-vuetify-nested-containment

# Using npm
npm install --save-dev nuxt-vuetify-nested-containment
  1. Add nuxt-vuetify-nested-containment to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'nuxt-vuetify-nested-containment'
  ]
})

That's it! You can now use My Module in your Nuxt app ✨

Development

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release