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

react-usit-ui

v0.0.68

Published

React components using Grafisk profil for UiO

Downloads

25

Readme

UI component library for UiO Profile

WORK IN PROGRESS - EXPECT API TO BREAK FROM ONE VERSION TO THE NEXT WITHOUT FURTHER NOTICE.

React components created by USIT (University Center for Information Technology) - University of Oslo.

The components implement the UiO Graphical Profile from https://bitbucket.usit.uio.no/projects/UX/repos/grafisk-profil/browse

Storybook for the current version: https://utv.uio.no/react-usit-ui

Getting started

Add the library to your project

yarn add react-usit-ui

Configure copying of assets

This library comes with some graphical assets (icons, logos etc). When the library is installed, these are put in node_modules/react-usit-ui/dist/assets. You may need to copy files from this folder to your application's static folder or equivalent.

To make assets load properly, set theme.props.publicPath to the public path of your static folder.

Theme

Application must be wrapped in a ThemeProvider component for other components to be rendered properly.

import { ThemeProvider } from 'react-jss';
import { createUiOTheme } from 'react-usit-ui';

const theme = createUiOTheme();

// ...
<ThemeProvider theme={theme}>
  <App />
</ThemeProvider>

Color Palette

The standard colors is defined in the color palette. Styles can be overridden in theme.palette.xxx. Standard colors are also exported from react-usit-ui/colors.

Theming

The component library supports theming. The function createUiOTheme provides a default theme and supports customization of color palette and typography.

Todo: Provide documentation on theme object and how it can be customized.

Development

Developing in isolation

We use Storybook to present and document components. To start Storybook locally run

yarn run storybook

Todo: Add link to published storybook for most recent version of UI library.

Developing together with an application

Recommended workflow:

  • Checkout this repository
  • Run yarn link in the repository folder
  • Go to your project folder (the project that has react-usit-ui as a dependency) and run yarn link react-usit-ui
  • Still in your project folder, run (cd node_modules/react-usit-ui && yarn watch) to start a build server. This will build the react-usit-ui library in development mode and watch for changes, so you don't have to rebuild manually whenever you change something.

Please note:

  • To install new packages in your project, you may have to unlink first to avoid an error message: yarn unlink react-usit-ui
  • To test your project with a production build of this library, run (cd node_modules/react-usit-ui && yarn prepare).