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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sendbird-uikit

v2.7.2

Published

React based UI kit for sendbird

Downloads

16,220

Readme

sendbird-uikit

Platform React Language TypeScript

Beta version of Sendbird UIKit 3.0 has been released. Try to make your own application with this amazing version which contains new modular components and UI components of elementary level.

React based UI kit based on sendbird javascript SDK

Getting Started

With Sendbird UI Kit React, we export these components: (See src/index.jsx)

  • SendBirdProvider - The context provider for SDK component

  • withSendBird - HOC to access SendBirdProvider context

  • useSendbirdStateContext - Hook to access SendBirdProvider context

  • sendBirdSelectors - A bunch of useful selectors that can be used along with withSendbird or useSendbirdStateContext

  • Channel - A UI Component where conversations happen

  • ChannelList - A ChannelList UI component

  • ChannelSettings - A component to handle the settings of a given channel

  • MessageSearch - To search for a message from a Channel

  • OpenChannel - A UI Component where open channel conversations happen

  • OpenChannelSettings - A component to handle the settings of a given channel

  • App - is a full fledged app(group channel) component made by combining the above components so that you dont have to combine all the above components by hand. Also it can be used as an example for composing components to build a chat UI

Note 1: Dont forget to import the stylesheet from the repo too Note 2: Name of some components are different from the directories they are in(example -> Channel component is from Conversation component). Please keep that in mind

Prerequisites

You need to install:

  • nodejs 14 LTS https://nodejs.org/en/download/
  • npm 7 or above
npm 14 deprecated warnings for fsevents& [email protected] will be fixed when storybook is updated to webpack 5
https://github.com/storybookjs/storybook/issues/12425#issuecomment-723043137

We tried development on Mac OS / Linux systems. You might encounter problems in running npm run build in Windows machines

Development

We use storybook for development and rollup for building the npm distribution(bundled JS file) Make sure you have nodejs and npm installed and run

Make a copy of env.example and save it as .env
Set your appId STORYBOOK_APP_ID
npm install
npm run storybook

npm run generate-component generates a UI component skeleton in src/ui

  • By default, storybook opens in http://localhost:6006/
  • Smart Components such as ChannelList, Channel, ChannelSetting, App can be found under OTHERS
  • Dumb components such as inputs, buttons etc can be found under OTHERS/UI Components in storybook sidebar
  • Overridden storybook configs can be found in: ./storybook

Build

We use rollupJS for building the production bundle script that you want to use inside your applications.

We have both esm and commonjs output

npm run build

The bundled JS code can be found in ./release The CSS is in ./release/dist/index.css

Running the tests

We have implemented tests for dumb ui components only. Technologies used: Jest, Enzyme and react-dom/test-utils

npm run test

Lint

npm run lint
  • .eslintrc.json lints ts files and .eslintrc.js lints js files

Typescript

  • We are trying to progressively move our source code to typescript - which means older JS code and newly written TS code will coxist while we migrate older JS code to TS
  • .eslintrc.json lints ts files and .eslintrc.js lints js files
  • Type definition file can be src/index.d.ts which will be copied to /release directory

Creating/exporting new components

  1. Define your component inside './src'
  2. Add the following line to './src/index.js' export NewComponent from './src/location/of/NewComponent';
  3. Add the following line to './rollup.config.js' input NewComponent: 'src/location/of/NewComponent',