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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@gymast/calendar-horarios

v1.1.3

Published

Fixed schedule calendar component for gym management

Downloads

398

Readme

@gymast/calendar-horarios

Calendario React diseñado para la configuración y visualización de parrillas de horarios de clases grupales fijas en gimnasios.

🚀 Características

  • Visualización clara de bloques de horarios recurrentes.
  • Vistas diaria, semanal y mensual.
  • Soporte para asignación de profesores y cupos.
  • Interfaz intuitiva para gestión de horarios.

📦 Instalación

npm install @gymast/calendar-horarios @gymast/calendar-shared

💻 Uso Básico

import Calendario from '@gymast/calendar-horarios';
import { TimeBlock } from '@gymast/calendar-horarios/types';

function App() {
  const timeBlocks: TimeBlock[] = [
    // ... tus datos de horarios
  ];

  return (
    <Calendario
      timeBlocks={timeBlocks}
      onEventClick={(clase) => console.log('Click en clase', clase)}
    />
  );
}

📝 API

Props

| Prop | Tipo | Requerido | Descripción | |------|------|-----------|-------------| | timeBlocks | TimeBlock[] | ❌ No | Array de bloques de horario. | | onCreateClass | (classData: TimeBlock) => void | ❌ No | Callback para creación de clases (legacy). | | onRefresh | () => void | ❌ No | Callback para refrescar datos. | | onEventClick | (classData: TimeBlock) => void | ❌ No | Al hacer clic en una clase. | | onEmptySpaceClick | (date: Date, time: string) => void | ❌ No | Al hacer clic en un espacio vacío. | | onEventDrop | (event: TimeBlock, newDate: Date, newTime: string) => void | ❌ No | Al mover una clase de horario. |

Estructura de Datos (TimeBlock)

interface TimeBlock {
    codigo: string;
    codclase: number;
    nombreclase: string;
    color: string;
    horainicio: string; // ISO Date string
    horafin: string; // ISO Date string
    dias: string; // Ejemplo: "[lun]", "[mar,jue]"
    cupos: number;
    permitereposiciones: number; // 1 o 0
    codtiporeposiciones: number;
    nombretiporeposicion: string;
    maxreposiciones: number;
    horaantes: string;
    horadespues: string;
    codprofesor: string;
    nombreprofesor: string;
}

🎨 Estilos

Este paquete utiliza Tailwind CSS. Para asegurar que los estilos se apliquen correctamente, añade la ruta a tu tailwind.config.js:

module.exports = {
  content: [
    // ...
    "./node_modules/@gymast/calendar-horarios/dist/**/*.{js,mjs,cjs}",
    "./node_modules/@gymast/calendar-shared/dist/**/*.{js,mjs,cjs}",
  ],
  // ...
}