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

extracted-chat-components

v1.6.0-62

Published

Chat components, that used in both React and SDK

Downloads

652

Readme

Common chat elements

Module description

This module includes shared React components and constant values like pure constants and enums. React components consist of:

How to use module

  1. Allow project sass loader to load styles from this module
path.resolve(__dirname, 'node_modules/extracted-chat-components')
  1. Use it in your project
export * from 'extracted-chat-components/enums';

import { PopUpNotification } from 'extracted-chat-components';

Deep dive into components

Module components

PopUpNotification component props:

  • isOpen - Boolean. Can be true or false and responsible for showing or hiding modal window
  • title - String. Often the main text on the modal window
  • acceptButton and rejectButton? - Object. These parameters take the next object:
{
  // Button text
  text: string, 
  // ButtonColor is an enum see "Mandatory enums" section
  color?: ButtonColor, 
  // ButtonSize is an enum see "Mandatory enums" section
  size?: ButtonSize, 
  // ButtonShape is an enum see "Mandatory enums" section
  shape?: ButtonShape, 
  // Handler that will invoke on button click
  handler: (object?: any) => void, 
}
  • description? - String. Provides additional description if needed.
  • isBigWidth? - Boolean. If true, the width will be equals to 500px else to 350px

IncomingChatRequestPsychic component props:

  • tens - String. First part of the time at the modal timer.
  • units - String. Second part of the time at the modal timer.
  • isShownIncomingRequest - Boolean. Can be true or false and responsible for showing or hiding modal window
  • handleAccept - Function. Process the click on 'Accept Button'
  • name - String. Customer name
  • dateOfBirth - String. Customer date of birth 'DOB: ...' format
  • horoSign - String. Customer zodiac sign
  • lastReading - String. Customer last reading

InteractChatButton component props:

  • isActive? - Boolean. Applies styles to active or inactive button
  • isBold? - Boolean. Applies font weight styles
  • text - String. Component text
  • onClick - Function. Handle click on button
  • color - ButtonColor. Applies color theme to component
  • size - ButtonSize. Applies size styles to component
  • shape - ButtonShape. Applies shape styles to component

Mandatory enums

ButtonColor

Colors that next scss mixin gets depend on ButtonColor

@mixin apply-colors($color, $background-color) {
    color: $color;
    background-color: $background-color;
}

Additionally, outline values (LIGHT_OUTLINE, WARNING_OUTLINE, WHITE_OUTLINE) add border to the button

enum ButtonColor {
    // @include apply-colors(#ffffff, $red);
    DANGER = 'danger',
    // @include apply-colors(#ffffff, $orange);
    WARNING = 'warning',
    // @include apply-colors($text, #ffffff);
    LIGHT_OUTLINE = 'lightOutline',
    // @include apply-colors($orange, #ffffff);
    WARNING_OUTLINE = 'warningOutline',
    // @include apply-colors($white, transparent);
    WHITE_OUTLINE = 'whiteOutline',
    // @include apply-colors(#a9a9b5, #eff1f5);
    DISABLE = 'disable',
}

ButtonSize

Values that next scss mixin gets depend on ButtonSize

@mixin apply-size($font-size, $line-height, $width, $height) {
    @include apply-font($font-size, $line-height);
    width: $width;
    height: $height;
}
enum ButtonSize {
    // @include apply-size($font-size: 20px, $line-height: 27px, $width: 307px, $height: 50px);
    E = 'extreme',
    // @include apply-size($font-size: 16px, $line-height: 22px, $width: 200px, $height: 50px);
    M = 'medium',
    // @include apply-size($font-size: 16px, $line-height: 22px, $width: 270px, $height: 50px);
    L = 'large',
    // @include apply-size($font-size: 14px, $line-height: 22px, $width: 174px, $height: 40px);
    S = 'small',
}

ButtonShape

This enum affects the value of the border-radius

enum ButtonShape {
    // If ButtonSize.S => border-radius: 40px otherwise border-radius: 50px
    ROUNDED = 'rounded',
    // border-radius: 12 px
    RECTANGULAR = 'rectangular',
}

Available Scripts

In the project directory, you can run:

npm run build

Builds application and put sources to the dist package