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

@zeedhi/zd-avatar-vue

v1.6.3

Published

Implementation of Avatar component using Zeedhi library

Downloads

35

Readme

ZdAvatar

Componente de Avatar construído com o Zeedhi Next

Instalação

O ZdAvatar é composto pelos pacotes @zeedhi/zd-avatar-common e @zeedhi/zd-avatar-vue. Utilize o comando abaixo para instalar ambos automaticamente:

npm install @zeedhi/zd-avatar

Ou instale os pacotes separadamente:

npm install @zeedhi/zd-avatar-vue @zeedhi/zd-avatar-common

Registro do Componente

Para registrá-lo, adicione o seguinte código ao inicializar a aplicação (por exemplo no arquivo zeedhi.ts)

import Vue from 'vue';
import { ZdAvatar } from '@zeedhi/zd-avatar'; 
// import { ZdAvatar } from '@zeedhi/zd-avatar-vue'; caso tenha instalado os pacotes separadamente

Vue.component('ZdAvatar', ZdAvatar);

Uso Básico

Para utilizá-lo em um Metadata, basta definir a propriedade component como "ZdAvatar". Para definir o conteúdo do Avatar, defina a propriedade avatarSlot com um array de componentes:

{
  "name": "card",
  "component": "ZdCard",
  "cssClass": "zd-display-flex zd-justify-space-around zd-align-center",
  "children": [
    {
      "name": "avatar-1",
      "component": "ZdAvatar",
      "color": "orange",
      "size": 36,
      "avatarSlot": [
        {
          "name": "icon-slot",
          "component": "ZdIcon",
          "color": "white",
          "iconName": "mdi-pencil"
        }
      ]
    },
    {
      "name": "avatar-2",
      "component": "ZdAvatar",
      "color": "primary",
      "avatarSlot": [
        {
          "name": "text-slot",
          "component": "ZdText",
          "cssClass": "white--text",
          "text": "ZD"
        }
      ]
    },
    {
      "name": "avatar-3",
      "component": "ZdAvatar",
      "size": 62,
      "avatarSlot": [
        {
          "name": "img-slot",
          "component": "ZdImage",
          "height": "100px",
          "src": "https://picsum.photos/id/1005/200/200.jpg"
        }
      ]
    }
  ]
}

Propriedades

| Nome | Tipo | Padrão | Descrição | |------------|-------------------------------|------------|---------------------------------------------------------------------------------------------------------------------| | avatarSlot | IComponentRender[] | [] | Componentes que serão renderizados dentro do Avatar | | color | string | "primary" | Aplica a cor especificada ao componente. Pode ser a cor por extenso no padrão do material design ou em hexadecimal | | rounded | boolean | string | false | Aplica uma borda arredondada no Avatar | | size | number | string | 48 | Largura e altura do Avatar | | tile | boolean | false | Remove o border-radius do componente | | height | number | string | undefined | undefined | Altura do componente | | maxHeight | number | string | undefined | undefined | Altura máxima do componente | | maxWidth | number | string | undefined | undefined | Largura máxima do componente | | minHeight | number | string | undefined | undefined | Altura mínima do componente | | minWidth | number | string | undefined | undefined | Largura mínima do componente | | width | number | string | undefined | undefined | Largura do componente |

Eventos

O Avatar aceita apenas um evento, que é o de click:

{
  "name": "click-avatar",
  "component": "ZdAvatar",
  "events": {
    "click": "{{Controller.clickEvent}}"
  }
}