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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pets-ui-lib

v4.0.1

Published

Librería de componentes UI React para aplicación de microservicios Pets

Readme

Pets UI Library

Librería de componentes UI React personalizada para aplicación de microservicios Pets.

Características

  • Botones con múltiples variantes y estados
  • Campos de entrada con validación
  • Componentes de búsqueda avanzados
  • Sistema de diseño con colores y fuentes personalizadas
  • Totalmente responsive y accesible
  • Construido con React y CSS Variables
  • Fácil de personalizar y extender

Instalación

npm install pets-ui-lib
# o
yarn add pets-ui-lib

Uso Básico

import React from 'react';
import { Button, Input, SearchInput } from 'pets-ui-lib';
// Importar los estilos
import 'pets-ui-lib/dist/styles/pets-ui-lib.css';

function App() {
  return (
    <div>
      <Button variant="primary">Click me</Button>
      <Input placeholder="Ingrese su nombre" />
      <SearchInput placeholder="Buscar..." />
    </div>
  );
}

Componentes

Button

Botón con múltiples variantes, tamaños y estados.

<Button 
  variant="primary" 
  size="md" 
  disabled={false}
  loading={false}
  icon={<Plus />}
  iconPosition="left"
  fullWidth={false}
  rounded={false}
  onClick={handleClick}
>
  Botón
</Button>

Variantes:

  • primary - Botón primario
  • secondary - Botón secundario
  • accent - Botón de acento
  • success - Botón de éxito
  • warning - Botón de advertencia
  • error - Botón de error
  • info - Botón de información
  • outline-primary - Botón contorno primario
  • outline-secondary - Botón contorno secundario
  • ghost - Botón fantasma
  • link - Botón estilo enlace

Tamaños:

  • sm - Pequeño
  • md - Mediano (default)
  • lg - Grande

Input

Campo de entrada con validación y múltiples variantes.

<Input
  type="text"
  placeholder="Ingrese texto"
  value={value}
  onChange={handleChange}
  size="md"
  variant="default"
  error={false}
  errorMessage="Campo requerido"
  success={false}
  successMessage="Campo válido"
  icon={<User />}
  iconPosition="left"
  fullWidth={false}
  disabled={false}
/>

Variantes:

  • default - Estilo por defecto
  • filled - Fondo relleno
  • underlined - Estilo subrayado

Tamaños:

  • sm - Pequeño
  • md - Mediano (default)
  • lg - Grande

SearchInput

Campo de búsqueda con debounce y botón de limpiar.

<SearchInput
  placeholder="Buscar..."
  value={searchValue}
  onChange={handleSearch}
  onClear={handleClear}
  size="md"
  variant="default"
  fullWidth={false}
  disabled={false}
  showClearButton={true}
  debounceMs={300}
/>

Personalización

La librería utiliza variables CSS que puedes sobreescribir:

:root {
  /* Colores primarios */
  --color-primary: #8b5cf6;
  --color-secondary: #06b6d4;
  --color-accent: #f59e0b;
  
  /* Fuentes */
  --font-family-primary: 'Poppins', sans-serif;
  --font-family-secondary: 'Roboto', sans-serif;
  --font-family-accent: 'Montserrat', sans-serif;
  
  /* Espaciado */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  
  /* Bordes */
  --border-radius-md: 0.375rem;
  --border-radius-lg: 0.5rem;
  --border-radius-xl: 0.75rem;
}

Desarrollo

Prerrequisitos

  • Node.js 18+
  • React 18+ o 19+

Instalación Local

git clone <repository-url>
cd pets-ui-lib
npm install

Scripts

# Desarrollo con watch
npm run dev

# Build para producción
npm run build

# Ejecutar tests
npm test

# Tests con watch
npm run test:watch

# Coverage de tests
npm run test:coverage

# Iniciar demo local
npm run demo

Estructura del Proyecto

pets-ui-lib/
├── src/
│   ├── components/          # Componentes UI
│   │   ├── Button/
│   │   ├── Input/
│   │   └── SearchInput/
│   ├── styles/              # Estilos globales
│   │   ├── variables.css
│   │   └── base.css
│   ├── demo/                # Demo interactivo
│   └── index.js             # Export principal
├── tests/                   # Tests unitarios
├── dist/                    # Build de producción
├── rollup.config.js         # Configuración de Rollup
└── package.json

Dependencias

Peer Dependencies

  • react: ^18.0.0 || ^19.0.0
  • react-dom: ^18.0.0 || ^19.0.0

Dev Dependencies

  • @rollup/plugin-babel
  • @rollup/plugin-commonjs
  • @rollup/plugin-node-resolve
  • @rollup/plugin-terser
  • @testing-library/jest-dom
  • @testing-library/react
  • @testing-library/user-event
  • @vitejs/plugin-react
  • jest
  • rollup
  • rollup-plugin-css-bundle
  • rollup-plugin-peer-deps-external
  • rollup-plugin-postcss
  • vite

Licencia

MIT License - ver archivo LICENSE para detalles.

Contribución

  1. Fork el proyecto
  2. Crear una rama (git checkout -b feature/nueva-funcionalidad)
  3. Commit los cambios (git commit -am 'Agregar nueva funcionalidad')
  4. Push a la rama (git push origin feature/nueva-funcionalidad)
  5. Crear un Pull Request

Soporte

Para reportar issues o solicitar características, por favor crear un issue en el repositorio del proyecto.