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

navigableitem-ts

v0.0.88

Published

component that receives parameters to wrap dynamic buttons with options and routes

Readme

Proyecto Navigableitem-ts React Typescript Frontend

Este documento describe la librería Headband, un componente de React desarrollado con TypeScript, diseñado para proporcionar una interfaz de usuario consistente para la navegación entre sistemas y la gestión de perfiles de usuario. El componente muestra dos iconos principales: uno para el perfil de usuario y otro para la navegación entre diferentes sistemas.

Imagen del Componente

Imagen del componente NavigableItem

Empezando

Para utilizar o desarrollar este proyecto, sigue los siguientes pasos:

Instala las dependencias de la libreria:

npm install navigableitem-ts
# o
yarn install navigableitem-ts
# o
pnpm install navigableitem-ts

Props del Componente

Props de NavigableItem

| Propiedad | Tipo | Descripción | |---|---|---| | user_system_role | user_system_role[] | Arreglo de objetos que describen los sistemas, roles y tipos de usuario asociados al usuario actual. | | profileInfo | profileInfo | Información del perfil del usuario: nombre, email, rol, avatar y sitios asociados. | | setSessionUp | React.Dispatch<React.SetStateAction<string \| null>> | Función para actualizar el estado de la sesión del usuario. | | currentSystemId | string | ID del sistema actualmente seleccionado, usado para filtrar los tipos de usuario disponibles. | | showExitButton | boolean | Indica si se muestra el botón de salida. Por defecto es true. | | iconColor | string | (theme: any) => string | (Opcional) Permite cambiar el color del icono de navegación entre sistemas. | | token | string | Token de autenticación del usuario, utilizado para validar y realizar acciones seguras en el componente. | | FontFamily | string | (Opcional) Permite especificar la familia tipográfica a utilizar en el componente. | | baseUrl | string | (Opcional) Base URL para realizar las peticiones desde el componente. | | callBackOnLogout | () => void | (Opcional) Función de callback que se ejecuta cuando el usuario cierra la sesión. | | afterCallBackOnProfile | () => void | (Opcional) Función de callback que se ejecuta después de realizar un cambio en el perfil. | | beforeCallBackOnProfile | () => void | (Opcional) Función de callback que se ejecuta antes de realizar un cambio en el perfil. |

Como se debe importar el componente

  <NavigableItem
    user_system_role={user_system_role}
    profileInfo={profileInfo}
    setSessionUp={setSessionUp}
    currentSystemId={currentSystemId}
    token={token}
  />

Ejemplo de user_system_role

[
  {
    role: {
      id: "1",
      group_name: "Administrador",
    },
    system: {
      id: "sys1",
      name: "SOIV",
      color: "#268c74",
      url_callback: "https://google.com",
    },
    status: {
      id: "active",
      name: "Activo",
    },
    user_type: {
      id: "ut1",
      user_type: "Operativo",
    },
    motive: [],
    consultation_time_minutes: null,
    permissions: [],
    id: "usr1",
  },
]

Ejemplo de profileInfo

{
  name: "Valentina",
  email: "[email protected]",
  role: "Administrador",
  avatarUrl: "https://avatar.com/valentina.png",
  site: [
    { id: "site1", name: "Sede Central" }
  ],
  current_user: {
    role_id: "1",
    role_name: "Administrador",
    site_id: "site1",
    site_name: "Sede Central",
    system_id: "sys1",
    system_name: "SOIV",
    user_type_id: "ut1",
    user_type_name: "Operativo"
  },
  user_type_name: "Operativo",
  rol_name: "Administrador",
  user_id: '6feca67a-48d6-4d05-9277-283a9e78422e'
}

Estructura del Proyecto

navigableitem-ts/
├── src/
│   ├── components/
│   │   ├── DataSystems.ts              # Componente para organizar los sistemas en base al Id
│   │   ├── NavigableComponent.tsx      # Componente de navegación entre sistemas
|   |   ├── squaresIcon.tsx             # Componente de icono para la navegación entre sistemas
│   │   └── UserProfileComponent.tsx    # Componente de perfil de usuario
│   │   └── apiMethods.tsx              # Componente para centralizar las peticiones
│   ├── types/
│   │   └── index.tsx                   # Componente raiz
│   ├── assets/
│   │   ├── iconImage.svg               # Icono principal
│   │   └── venIcon.svg                 # Icono adicional
│   │   └── exit_icon.svg               # Icono para boton de salir
├── public/
│   └── ...                             # Archivos públicos
├── package.json                        # Configuración de npm
├── tsconfig.json                       # Configuración de TypeScript
├── README.md                           # Documentación del proyecto
├── LICENSE                             # Licencia MIT
└── vite.config.ts                      # Configuración de Vite

Scripts Disponibles

  • npm run build: Compila la aplicación para producción.
  • npm publish --access public: Subes tu ultima version a la libreria

Licencia

Este proyecto está bajo la Licencia MIT. Consulta el archivo LICENSE para más detalles.

Notas

  • El componente con sus parametros asignados hace cambio de usuario y cambio de sistema por si solo, de igual forma al ejecutarse un evento el estado sessionUp devuelve una respuesta.

Autor

Desarrollado por Luis Colmenares.