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

hrnet-components-ohm

v0.0.14

Published

Cette librairie regroupe trois composants principaux, accessibles sur npm sous forme de package :

Downloads

19

Readme

HRNet Components Library

Cette librairie regroupe trois composants principaux, accessibles sur npm sous forme de package :

  1. DatePicker
    Permet de saisir une date, d’ouvrir un calendrier interactif et de transmettre la valeur sélectionnée via un champ caché.

    • Propriétés :
      • name?: string
      • value?: string (valeur initiale, format "JJ/MM/AAAA")
      • placeholder?: string
      • onChange?: (value: string) => void
    • Affiche un champ texte, un bouton pour ouvrir le calendrier, et insère automatiquement un champ <input type="hidden"> pour la soumission en formulaire.
  2. CustomSelect
    Un sélecteur personnalisable permettant de choisir une option et de la transmettre via un champ caché.

    • Propriétés :
      • options: T[]
      • defaultValue?: T
      • placeholder?: string
      • name?: string
      • onOptionChange?: (value: T) => void
    • Permet de sélectionner une valeur parmi des options et met à jour un champ <input type="hidden">.
  3. Modal
    Affiche une fenêtre modale avec un titre, un message et un bouton de fermeture.

    • Propriétés :
      • title: string
      • message: string
      • setIsOpenModal: React.Dispatch<React.SetStateAction<boolean>>

Gestion du projet global

Cette section explique comment ajouter un composant, compiler la CSS, construire la librairie et la publier sur npm.

1. Ajouter un composant

  • Créer un fichier sous src/lib pour votre nouveau composant.
  • L’exporter dans src/lib/index.tsx pour l’inclure dans la librairie.

2. Compiler la CSS

  • La compilation Tailwind génère components.css.
  • Pour régénérer ce fichier, exécutez :
    npm run build-css
    (Voir package.json pour la définition du script.)

3. Construire la librairie

  • Pour construire la librairie, exécutez :
    npm run build
    Cela compile votre code TypeScript et copie les fichiers nécessaires dans le dossier dist.

4. Publier sur npm

  • Ajuster le numéro de version dans package.json.
  • Pour publier sur npm, authentifiez-vous puis exécutez :
    npm publish
    Vous pouvez ainsi distribuer vos composants sous forme de package npm, prêt à être utilisé dans d’autres projets.