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

@melaeke/ui-ethiopian

v0.0.0

Published

[![@dhis2/ui on npm](https://badge.fury.io/js/%40dhis2%2Fui.svg)](https://www.npmjs.com/package/@dhis2/ui) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/

Downloads

63

Readme

DHIS2 UI

@dhis2/ui on npm semantic-release conventional commits

@dhis2/ui is a suite of frontend components for building DHIS 2 applications

To install @dhis2/ui run:

yarn install @dhis2/ui

All components can be imported directly from @dhis2/ui like so:

import { Button } from '@dhis2/ui'

We recommend that you use @dhis2/ui as the entrypoint for all imports of our frontend components (as in the example above). That way your imports won't break if any of the underlying packages change.

Documentation

@dhis2/ui is based on the specifications in our design-system: https://github.com/dhis2/design-system. See the documentation there for more information.

Bundled packages

| Package | Link | Status | | ------------------- | -------------------------------------- | ------ | | @dhis2/ui | collections/ui | Active | | @dhis2/ui-constants | constants | Active | | @dhis2/ui-forms | collections/forms | Active | | @dhis2/ui-icons | icons | Active |

@dhis2/ui-constants

This package provides access to shared constants, such as colors, spacers and elevation values. They are used across our frontend components and can be used directly in applications as well. Our constants can be imported like so:

import { colors } from '@dhis2/ui'

See our api docs for a full list of the available constants.

@dhis2/ui-icons

This package provides a collection of icons as react components. For tree shaking purposes the icon name, variant and size are all expressed in the component name. Our icons can be imported like so:

import { IconApps16 } from '@dhis2/ui'

For a list of all the available icons see the ui-icons package. Note that during their transformation to React components the svg filenames are PascalCased and prefixed with Icon. So apps-16.svg becomes IconApps16 and can then be imported as in the example above.

The default fill of our icons is inherited from color with currentColor. To set a custom icon color you can use the color prop like so:

<IconApps16 color="#DE683D" />

@dhis2/ui-forms

This package provides several components that allow for easy integration of our form components with react-final-form. Besides form components, we also export several validator functions for common usecases. Components from this library can be imported like so:

import { TextAreaFieldFF } from '@dhis2/ui'

The FF suffix ensures that these components don't clash with our regular field components from the widgets package and is an abbreviation of final-form. See our api docs or the live docs for a full list of the available components and validators.

Development

git clone [email protected]:dhis2/ui.git && cd ui

yarn install
yarn d2-style install
yarn setup
yarn start

# in case manager complains about the main.manager.bundle.js, e.g. cannot import @dhis2/ui-constants, then use:
yarn start --no-manager-cache

Reporting an issue or opening a PR

See CONTRIBUTING.md