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

pip-webui2-behaviors-temp

v1.0.0-beta.3

Published

![](https://img.shields.io/badge/license-MIT-blue.svg)

Readme

Attachable behaviors

Pip.WebUI.Behaviors module contains behaviors that can be attached to existing controls or pages

Focusable

Allows to navigate over focusable controls using arrow keys

Using

To make the div orange by pressing arrow buttons

<div pipFocused focusedColor="orange">
    <div class="pip-focusable">Focusable</>
    <div class="pip-focusable">Focusable</>
    <div class="pip-focusable">Focusable</>
    <div class="pip-focusable">Focusable</>
    <div class="pip-focusable">Focusable</>
</div>

More generalized example on the image

Selectable

Allows to navigate over non-focuseable elements using arrow keys

Using

<pip-selected (onSelect)="selectedIndex = $event.index" [index]="selectedIndex">
    <div pipSelectable>Selectable</>
    <div pipSelectable>Selectable</>
    <div pipSelectable>Selectable</>
    <div pipSelectable>Selectable</>
    <div pipSelectable>Selectable</>
</pip-selected>

Example of selected component with using angular-material mat-nav-list on the image

Draggable

Implements drag & drop functionality

Using

Simple example of draggable component to swap containers.

Template:

<div class="drag-scroll-test">
	<div *ngFor="let obj of content; let i = index"
		[scrollContainer]="'.drag-scroll-test'"
		pipDrop="true"
		pipDrag="true"
		(dropSuccess)="onDropSuccess($event, i)">
		<div>
			<p >{{ obj.name }}</p>
		</div>
	</div>
</div>

Handler:

onDropSuccess(event, index) {
    const otherObj = this.content[index];
    const otherIndex = this.content.indexOf(event.data);
    if (otherIndex === index || otherIndex === -1) return;

    this.content.splice(otherIndex, 1);
    if (index > otherIndex) this.content.splice(index, 0, event.data);
    else this.content.splice(index + 1, 0, event.data);
}

Styles:

[pipDrag] div {
    padding: 8px;
    box-sizing: border-box;
    transition: all .35s ease;
    height: 85px;
}

[pipDrag].pip-dragging {
    opacity: 0.95;
}

[pipDrag].pip-dragging div {
    height: 85px ;
}

[pipDrop] {
	position: relative;
}

[pipDrop] {
    transition: padding .35s ease;
}

[pipDrop].pip-drag-enter:not(.virtual) {
    padding-bottom: 85px !important;
}

Result on the image

Infinite Scroll

Allows to upload data in chunks while user is scrolling

Using

Template:

<div class="app-infinite-scroll pip-scroll" style="margin-left: 0px;">
    <div class="item-container" pipInfiniteScroll (onInfiniteScroll)="generateItems(10)" 
        scrollContainer="'.app-infinite-scroll'"
        scrollDistance="0.1">
        <div class="item" *ngFor="let item of items" >
            {{ item.name }}
        </div>
    </div>
</div>

Handler:

generateItems(count) {
    for (let i = 0; i < count; i++) {
      let item = {
        id: this._itemCount,
        name: 'Item ' + this._itemCount
      };
      this._itemCount++;

      this.items.push(item);
    }
};

Installation

To install this module using npm:

npm install pip-webui2-behaviors --save

License

This module is released under MIT license and totally free for commercial and non-commercial use.