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

botech-library

v1.0.82

Published

Librería de componentes React compartida entre los sistemas web de **BO-TECH** (PASS, Seguimiento y otros). Publicada en npm y consumida como dependencia estándar en cada proyecto.

Downloads

895

Readme

botech-library

Librería de componentes React compartida entre los sistemas web de BO-TECH (PASS, Seguimiento y otros). Publicada en npm y consumida como dependencia estándar en cada proyecto.


Instalación

npm install botech-library

Peer dependencies requeridas

npm install react react-dom axios sweetalert2

Componentes disponibles

Auth

LoginPage

Página de inicio de sesión con soporte para email/contraseña y Google SSO.

import { LoginPage } from 'botech-library';

<LoginPage
  systemName="PASS"
  leftPanelTitle={<>Simplicidad y<br />Seguridad Absoluta</>}
  googleClientId={import.meta.env.VITE_GOOGLE_CLIENT_ID}
  onLogin={async (email, password) => { /* lógica de login */ }}
  onGoogleCredential={async (credential) => { /* lógica con JWT de Google */ }}
  onForgotPassword={async (email) => ({ ok: true })}
  onNavigateToRegister={() => navigate('/register-product-key')}
/>

Props:

| Prop | Tipo | Descripción | |---|---|---| | systemName | string | Nombre del sistema mostrado en el panel izquierdo | | leftPanelTitle | ReactNode | Título decorativo del panel izquierdo | | quote | string? | Cita inspiracional (opcional) | | quoteAuthor | string? | Autor de la cita (opcional) | | googleClientId | string | Client ID de Google OAuth 2.0 | | onLogin | (email, password) => Promise<void> | Handler de login con credenciales | | onGoogleCredential | (credential) => Promise<void> | Handler con el JWT de Google | | onForgotPassword | (email) => Promise<{ok, message?, error?}> | Handler de recuperación de contraseña | | onNavigateToRegister | () => void | Navegación al registro |

El botón de Google usa un patrón de polling con setInterval para esperar que el SDK de Google Identity Services (cargado vía GTM) esté disponible antes de inicializarlo.


RegisterProductKeyPage

Página de registro en dos pasos: validación de product key y creación de cuenta.

import { RegisterProductKeyPage } from 'botech-library';

<RegisterProductKeyPage
  googleClientId={import.meta.env.VITE_GOOGLE_CLIENT_ID}
  onValidateKey={async (key) => ({ ok: true })}
  onRegisterWithForm={async (email, password, fullName, phone, key) => ({ ok: true })}
  onGoogleSignIn={async (credential) => ({ ok: true, localId: '...', idToken: '...' })}
  onSuccess={() => navigate('/private/dashboard')}
  onNavigateToLogin={() => navigate('/login')}
/>

Header

Barra de navegación superior con logo del sistema, nombre de la página actual e información contextual.

import { Header } from 'botech-library';

<Header
  title="Dashboard"
  description="Panel principal del sistema"
  logoUrl="/assets/logo-colegio.png"
  logoAlt="Logo PASS"
  systemName="PASS"
  systemSubtitle="Control de Asistencia"
  onMenuToggle={() => setSidebarOpen(true)}
  showPageInfo={true}
/>

Props:

| Prop | Tipo | Descripción | |---|---|---| | title | string | Título de la página actual | | description | string | Descripción de la página actual | | logoUrl | string? | URL del logo del colegio | | logoAlt | string? | Texto alternativo del logo | | systemName | string | Nombre del sistema | | systemSubtitle | string | Subtítulo del sistema | | onMenuToggle | () => void | Abre/cierra el sidebar | | showPageInfo | boolean | Muestra el bloque de info de página (solo en sm:+) |


Sidebar

Navegación lateral con soporte para elementos simples, carpetas con submenús, menú inferior y overlay de cierre.

import { Sidebar } from 'botech-library';

<Sidebar
  isOpen={sidebarOpen}
  onClose={() => setSidebarOpen(false)}
  onToggle={() => setSidebarOpen(!sidebarOpen)}
  dashboardPath="/private/dashboard"
  menuItems={menuItems}
  logoUrl="/assets/logo-colegio.png"
  logoAlt="Logo"
  systemName="PASS"
  activePath={location.pathname}
  onNavigate={(path) => navigate(path)}
  showBottomMenu={true}
  bottomMenuItems={bottomMenuItems}
  overlayClassName="fixed inset-0 backdrop-blur-xs z-40"
/>

Table

Tabla de datos genérica con soporte para columnas configurables, acciones por fila, paginación y modo responsive.

import { Table } from 'botech-library';

<Table
  columns={columns}
  data={rows}
  onEdit={(row) => handleEdit(row)}
  onDelete={(row) => handleDelete(row)}
/>

ProfileSwitcher

Componente para cambiar entre perfiles de usuario cuando el usuario tiene múltiples perfiles asignados.

import { ProfileSwitcher } from 'botech-library';

<ProfileSwitcher />

Modal

Modal genérico accesible con soporte para contenido personalizado.

import { Modal } from 'botech-library';

<Modal isOpen={open} onClose={() => setOpen(false)} title="Confirmar acción">
  <p>¿Estás seguro?</p>
</Modal>

NotFound

Página 404 estándar de BO-TECH.

import { NotFound } from 'botech-library';

<Route path="*" element={<NotFound />} />

StudentSummary y StudentExcel

Componentes para visualización resumida de estudiantes y exportación a Excel.


Selector

Selector con búsqueda integrada para formularios.


Desarrollo local

Prerrequisitos

  • Node.js >= 24
  • yalc instalado globalmente (npm i -g yalc)

Comandos

# Instalar dependencias
npm install

# Build de producción (ESM + CJS + tipos)
npm run build

# Storybook para desarrollo visual de componentes
npm run storybook

# Tests
npm test

# Tests en modo watch
npm run test:watch

# Publicar en yalc y enviar a proyectos locales enlazados
npm run yalc:push

Publicar versión en npm

# El script yalc:push hace patch de versión automáticamente
# Para publicar en npm:
npm run build
npm publish

Desarrollo con yalc (integración local)

Para probar cambios en la librería desde un proyecto consumidor (ej. PASS) sin publicar en npm:

# 1. En este repositorio: compilar y publicar en yalc
npm run yalc:push

# 2. En el proyecto consumidor (ej. pass/)
yalc add botech-library

# 3. Al terminar el desarrollo, restaurar la versión de npm
yalc remove botech-library
npm install

Los proyectos consumidores tienen un hook de pre-commit que bloquea commits con file:.yalc/ en package.json.


Estructura del proyecto

src/
├── components/
│   ├── Auth/               # LoginPage, RegisterProductKeyPage, AuthLayout, PasswordResetModal
│   ├── Button/             # Botón base reutilizable
│   ├── Header/             # Header con info de página
│   ├── Modal/              # Modal genérico
│   ├── NotFound/           # Página 404
│   ├── ProfileSwitcher/    # Selector de perfil de usuario
│   ├── Selector/           # Select con búsqueda
│   ├── Sidebar/            # Navegación lateral
│   ├── StudentExcel/       # Exportación de estudiantes a Excel
│   ├── StudentSummary/     # Resumen visual de estudiante
│   └── Table/              # Tabla de datos genérica
├── services/               # Servicios HTTP internos de la librería
├── types/                  # Tipos TypeScript exportados
├── utils/                  # Utilidades internas (generateTableColumns…)
└── index.ts                # Punto de entrada y exportaciones públicas

Build

El build genera tres salidas mediante Rollup:

| Formato | Archivo | Uso | |---|---|---| | ESM | dist/esm/index.js | Bundlers modernos (Vite) | | CJS | dist/cjs/index.js | Node.js / CommonJS | | Tipos | dist/types/index.d.ts | TypeScript |


Sistemas que consumen esta librería

| Sistema | URL de producción | |---|---| | PASS | botech.com.co/pass/ | | Seguimiento | botech.com.co/seguimiento/ |