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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@dexma/ui-components

v8.0.29

Published

DEXMA UI Components (React)

Readme

Table of contents

Usage

  1. Install with npm: npm install --save @dexma/ui-components

  2. Use the component importing from the library

import { Button } from '@dexma/ui-components';
<Button text='Some text' variant='primary' size='medium' />;
  1. Optional: You can set the Theme with your personal variables, we provide the Theme component and you only need to set the options:
import { Theme, Button } from '@dexma/ui-components';
<Theme
    options={{
        primary: '#aa0800',
    }}
>
    <Button text='Some text' variant='primary' size='medium' />
</Theme>;

You can find all the configuration in the theme file theme.js

Installation

To run the installation locally on your machine, you need Node.js installed on your computer.

git clone https://github.com/dexma/ui-components
cd ui-components
npm install

Documentation

For the documentation we use storybook docs that transforms our stories into world-class component documentation.

  • Run storybook: npm run storybook
  • If you need to export static doc run npm run build-storybook this will export a static folder with all our component docs

Changelog

For changelogs, check out the CHANGELOG section of ui-components

Testing

We use React Testing Library as our testing lib you can check out the documentation

  • To run our test: npm run test

Note: Due to the use of third-party libraries, some components use methods that JSDOM (the DOM implementation used by Jest) hasn't implemented yet, testing it is not easily possible. This is the case with window.matchMedia(). Jest returns TypeError: window.matchMedia is not a function and doesn't properly execute the test.

In this case, to resolve this issue to execute successfully your tests when @dexma/ui-components is used, include the following code on setupTest file for Jest to mock matchMedia and it should solve the issue:

Object.defineProperty(window, 'matchMedia', {
    writable: true,
    value: jest.fn().mockImplementation((query) => ({
        matches: false,
        media: query,
        onchange: null,
        addListener: jest.fn(), // deprecated
        removeListener: jest.fn(), // deprecated
        addEventListener: jest.fn(),
        removeEventListener: jest.fn(),
        dispatchEvent: jest.fn(),
    })),
});

Contributing

Check out the CONTRIBUTING document in the root of the repository to learn how you can contribute.