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

@nearst/ui

v0.10.79

Published

UI framework for NearSt dashboard applications.

Downloads

668

Readme

NearSt UI kit 🎨

A universal UI framework for NearSt dashboard applications.

💻 NearSt UI Library on Storybook

Getting started

To view this as a Storybook on your local machine, run yarn start. This enables you to explore the existing components and see your code changes render (or not!) immediately. 😀

Development 🔨

All files in src/index.js will be part of the NPM package.

Complete components need to be imported into the src/index.js (via their own component level index.js) and exported for bundling.

Any changes you make to the relevant *.stories.js file will be visible through the Storybook running on your localhost. For more information on developing with Storybook, view the docs here

It is possible to group related components in an expandable interface in order to help with Storybook organization. To do so, use the / as a separator:

// Checkbox.stories.js

export default {
  title: 'Design System/Atoms/Checkbox'
}

More documentation here

Guidelines 📝

Some general things to consider when creating new components:

  • To create a new component, make a new folder in the "components" folder. Try to name the component as simply and semantically as possible.
  • Make sure you have an index.js in your component folder - this will be the point of entry for exporing the component(s) into the final npm module.
  • Use SCSS
  • Keep our CSS/SCSS modular and organised by usingBEM
  • For anything that should be applied or accessible to all components, place it in the global.scss

Deploy Storybook to GitHub Pages 📖

CircleCI will automatically deploy Storybook to GitHub Pages when you merge your changes into master.

To do this manually run yarn deploy-storybook

You can find the deployed site here: https://near-live.github.io/NearData

📚Storybook deployerdocs

Run npm publish to publish to npm.

💡 Make sure your UI Lib has an updated package.json version number which has been merged into Master alongside running this command.

Publish the UI Library to NPM

Publish with Beta Tags

If you want to test your branch code with a front-end property, publish the UI Library with a beta tag and make sure the version follows this format: "version": "0.10.10-beta.0"

To publish a beta version of the UI Library run npm publish --tag beta

Publish Final Version

When you are happy with your code and the PR has been approved.

  • Check you have updated your UI Lib package json with an increased version number ( following this format: "version": "0.10.10" ) and that this is part of your merge into Master.
  • Run npm publish to publish your branch to NPM.

Importing Components

Make sure you have installed @nearst/ui from our mono repo modules.

yarn add @nearst/ui

You can then start using the NearSt UI module in your app by importing the individual components as demonstrated below.

import { Block, Drawer } from '@nearst/ui'

const app = () => (
    <Block title={'A title for this block of info'}>
        <Drawer title='Test app'>
            <DrawerLink to='/' title='Dashboard' />
        </Drawer>
    </Block>
)

You will also need to import the UI Library CSS by adding the following to your top level file - usually the index.js or App.js

import '@nearst/ui/dist/ui.css';

Using Colours

You can access the colours from the UI library in your CSS files by using the following syntax

.kanban-text {
    color: var(--dark-blue);
}

You just need to check the variable names in story book and add "--" beforhand. var(--color-name). Simples!

Component Docs

Please see the Notes section of each component in Storybook for further information on implementation.