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

smart-story-book

v0.0.22

Published

Adam Milo Smart Storybook - Angular component library with Material UI

Readme

Smart Storybook - Component Library

🚀 Quick Start - Using Components in Another Project

1. Configure Your Other Project

tsconfig.json:

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@components/*": ["../smart-story-book/src/app/components/*"],
      "@constants": ["../smart-story-book/src/app/constants"]
    }
  }
}

angular.json:

{
  "stylePreprocessorOptions": {
    "includePaths": ["../smart-story-book/src/styles"]
  }
}

2. Install Dependencies

npm install @angular/material @angular/cdk @angular/animations

3. Use Components

import { ButtonComponent } from '@components/forms/button';
import { ICON_MAP } from '@constants';

<app-button 
  dataCy="save-button"
  title="Save"
  [icon]="ICON_MAP.check"
  color="primary"
  (onClick)="onSave()">
</app-button>

Note: dataCy is required for all components for testing purposes.


📦 Available Components

  • Forms: button, checkbox, dropdown, otp-input, phone-input, radio, text-input, toggle
  • Feedback: loader, popup-modal, toast, progress-bar
  • Navigation: sidebar, menu, tab-group
  • Data Display: card, feature-card, page-header, chip-group
  • Layout: app-layout, auth-layout

🎨 Button Component

<app-button 
  dataCy="action-button"
  title="Click Me"
  [icon]="ICON_MAP.add"
  color="primary"
  size="medium"
  [disabled]="false"
  (onClick)="handleClick($event)">
</app-button>

Colors: primary, secondary-stroke, secondary-no-stroke, error
Sizes: small, medium, large, builder

Important: dataCy is required for all components.


📚 View Components

Run Storybook to see all components:

npm run storybook

🔧 Troubleshooting

Angular 19 Compatibility

This library is fully compatible with Angular 19 and follows best practices for standalone components.

Key Features:

  • ✅ All components use standalone imports
  • ✅ Individual directive imports instead of CommonModule (e.g., NgIf, NgFor, NgClass)
  • ✅ Standard MatIconModule import pattern
  • ✅ No deprecated Angular APIs

If you get "Unable to import directive NgClass" or similar errors:

This usually means your project is using an older Angular version or has a mismatch. Make sure:

# Your admin-frontend project should have Angular 19+
npm install @angular/core@^19.0.0 @angular/common@^19.0.0
npm install @angular/material@^19.0.0 @angular/cdk@^19.0.0

If you get "Unable to import component MatIcon" error:

  • Make sure you have @angular/material installed in your project:
    npm install @angular/material@^19.0.0
  • The components use standalone imports and should work out of the box

Dart Sass 3.0.0 Compatibility

All deprecated Sass functions have been updated to use the modern Sass module system:

  • map-keysmap.keys
  • map-getmap.get
  • transparentizecolor.adjust($color, $alpha: -N)
  • darkencolor.adjust($color, $lightness: -N%)

All SCSS files now use @use 'sass:map' and @use 'sass:color' modules.

Other Issues

  • Can't find stylesheet: Add stylePreprocessorOptions to angular.json
  • Can't find module: Add paths to tsconfig.json and restart TS server
  • Styles not working: Restart ng serve