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

nishant-design-system

v0.1.26

Published

Sense UI components library

Downloads

41

Readme

Alt text

Genesis Design System

Intro

Genesis design system consists of a set of tools and protocols that unify design and development across surfaces (platforms) to deliver consistent user experiences. The system utilizes workflow automation to streamline the design and development process. It's comprised of a number of React web components that each play a unique role within the product development cycle.

The integration of these components are intended to grow and scale overtime to increasingly decrease workflow friction and optimize the product development lifecycle.

Usage

Follow the below mentioned guide for installation and usage instructions

Installation

To install @spaced-out/ui-design-system in your project, you will need to run the following command using yarn:

yarn add @spaced-out/ui-design-system

Component Usage

Usage of the component (after the library installed as a dependency in project) will be:

Using Components

import React from 'react';

// There are multiple ways of importing a component

import {Button} from '@spaced-out/ui-design-system/lib/components/Button';

/** We also export all components | hooks | styles | utils | types from a common
 * index file located at @spaced-out/ui-design-system/lib.
 *
 * For multiple imports this can be used
 */

import {
  Button,
  BodyMedium,
  TEXT_COLORS,
  Toast,
  Dropdown,
} from '@spaced-out/ui-design-system/lib';

const App = () => (
  <div className={css.container}>
    <Button>Hello world</Button>
    <BodyMedium color={TEXT_COLORS.neutral}>Some text</BodyMedium>
  </div>
);

export default App;

Setting Up Component Aliases

You can also set up aliases in your build tool to further simplify imports if you want. eg. This webpack config set up an alias for @spaced-out/ui-design-system/lib to ui-design-system

const {MODE, DEVELOPMENT, RESOLVE_MODULES_DIRS} = require('./constants');

exports.default = {
  mode: MODE,

  devtool: DEVELOPMENT ? 'eval-cheap-module-source-map' : 'source-map',

  resolve: {
    symlinks: false,
    modules: RESOLVE_MODULES_DIRS,
    alias: {
      common: 'src/styles/common.css',
      designSystem2021: 'src/styles/design-system-2021.css',
      sentry: '@sentry/browser',
      'react-router': '@spaced-out/react-router',
      sculpt: '@spaced-out/sculpt',
      'ui-design-system': '@spaced-out/ui-design-system/lib',
    },
  },
};

For more information about each component, check out Storybook.

Setting Up Fonts

By default Genesis uses 'Centra No 2' font. To add this font in your project you need to load this font. The recommended way to do it is by adding the following in your global css.

@font-face {
  font-family: 'Centra No 2';
  src: url('https://s3.us-west-2.amazonaws.com/assets.sensehq.com/type/CentraNo2-Book.woff2')
      format('woff2'), url('https://s3.us-west-2.amazonaws.com/assets.sensehq.com/type/CentraNo2-Book.woff')
      format('woff');
  font-weight: 300 400;
  font-style: normal;
  font-display: auto;
}

@font-face {
  font-family: 'Centra No 2';
  src: url('https://s3.us-west-2.amazonaws.com/assets.sensehq.com/type/CentraNo2-BookItalic.woff2')
      format('woff2'), url('https://s3.us-west-2.amazonaws.com/assets.sensehq.com/type/CentraNo2-BookItalic.woff')
      format('woff');
  font-weight: 300 400;
  font-style: italic;
  font-display: auto;
}

@font-face {
  font-family: 'Centra No 2';
  src: url('https://s3.us-west-2.amazonaws.com/assets.sensehq.com/type/CentraNo2-Medium.woff2')
      format('woff2'), url('https://s3.us-west-2.amazonaws.com/assets.sensehq.com/type/CentraNo2-Medium.woff')
      format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: auto;
}

Using Genesis Design Tokens

Design tokens are exported as .css and .js. You can consume them easily by

CSS Tokens

CSS use:

@value (size2) from '@spaced-out/ui-design-system/lib/styles/variables/_size.css';

/* We also export all style variable(design tokens) and common classes from a common index
file located at @spaced-out/ui-design-system/lib/styles/index.css */

/* For @value from Multiple css files use this */

@value (
  colorFillPrimary,
  colorTextSecondary,
  colorTextDisabled,
  spaceXXSmall,
  spaceNone,
  spaceSmall,
  spaceXSmall,
  size34,
  sizeFluid,
  size40
  ) from '@spaced-out/ui-design-system/lib/styles/index.css';

.example-container {
  height: size2;
  composes: motionEaseInEaseOut from '@spaced-out/ui-design-system/lib/styles/index.css';
}
JS Tokens

JS use:

import {size2} from '@spaced-out/ui-design-system/lib/styles/variables/_size.js';

/* We also export all style variable(design tokens) from a common index
file located at @spaced-out/ui-design-system/lib */

/* For multiple design token impoets use this */

import {
  sizeFluid,
  size2,
  spaceNone,
  colorTextNeutral,
  borderRadiusSmall,
} from '@spaced-out/ui-design-system/lib';

Setting Up Design Token Aliases

You can also set up aliases in your build tool to further simplify imports if you want. eg. This webpack config set up an alias for @spaced-out/ui-design-system/lib/styles/index.css to uiDesignSystem

const {MODE, DEVELOPMENT, RESOLVE_MODULES_DIRS} = require('./constants');

exports.default = {
  mode: MODE,

  devtool: DEVELOPMENT ? 'eval-cheap-module-source-map' : 'source-map',

  resolve: {
    symlinks: false,
    modules: RESOLVE_MODULES_DIRS,
    alias: {
      common: 'src/styles/common.css',
      designSystem2021: 'src/styles/design-system-2021.css',
      uiDesignSystem: '@spaced-out/ui-design-system/lib/styles/index.css',
      sentry: '@sentry/browser',
      'react-router': '@spaced-out/react-router',
      sculpt: '@spaced-out/sculpt',
      'ui-design-system': '@spaced-out/ui-design-system/lib',
    },
  },
};

Documentation

Contributions

Check out our Contribution Guide to setup and contribute to Genesis.

Changelog

Check out our Changelog here

Contributors