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

@mudita/space-design-system

v1.3.1

Published

Mudita Design System

Downloads

2

Readme

Mudita Space Design System

A React based library for components and predefined styles used in Mudita products like Mudita Cloud.

All the currently available components can be seen on our Storybook. It's a kind of visual guide and documentation.

Usage

  1. Install @mudita/space-design-system package:

    npm install --save @mudita/space-design-system
  2. Install additional dependencies:

    • react in version 17 or higher
      npm install --save react
    • styled-components in version 5 or higher
      npm install --save styled-components
  3. Use the ThemeProvider from the package:

    import { MuditaThemeProvider } from "@mudita/space-design-system"
    
    ReactDOM.render(
      <MuditaThemeProvider>
        <App />
      </MuditaThemeProvider>,
      document.getElementById("root")
    )
  4. Now you can use the library freely:

    import { Button } from "@mudita/space-design-system"
    
    const SomeComponent = () => (
      <Button>
        Click me!
      </Button>
    )

    CJS, ESModules, and UMD module formats are supported.

    Fonts

    The basic Mudita's font is Facto but it's not open sourced, so we can't provide it to you. Instead, there is a very similar font used as a fallback - Arial. However, you can still attach a Facto font to your project if you own it.

    Then, you just need to import the CSS file in your main app's component:

    // index.tsx
       
    import "./path/to/font/style.css"
       
    ReactDOM.render(...)

    The Facto font has bigger priority, so no additional actions are required. It will be immediately displayed instead of other fonts.

Development

Installation

  1. Install dependencies:

    npm install
  2. Install Facto font (optional):

    1. add FONTS_DIRECTORY_URL and GITHUB_ACCESS_TOKEN environment variables to your repo with given font
    2. run font downloading script:
      npm run fonts:download

    Note: Please make sure you entered FONTS_DIRECTORY_URL in a proper format (refer to troubleshooting section).

Local testing

  1. Make appropriate changes.

  2. Increase package version manually (only in package.json file).

  3. Build the package:

    npm run build
  4. Pack the library into a tar package:

    npm pack
  5. In your project that consumes this library, instead of version number in dependencies for @mudita/space-design-system package put the path to the already generated .tar file:

    "@mudita/space-design-system": "file:../space-design-system/mudita-space-design-system-X.Y.Z.tgz",
  6. Reinstall the updated package:

    npm install @mudita/space-design-system
  7. Depending on your project's setup, rebuild it or reload the page to apply changes.

More information and different methods of developing and testing packages locally can be found in this awesome article.

Release flow

  1. Make appropriate changes.

  2. Rebuild the package:

    npm run build
  3. Increase package version:

    npm version <version>

    Note: For version 0.0.31 the command will be npm version 0.0.31. We are using semantic versioning.

  4. Publish the package to the NPM registry:

    npm publish
  5. Commit and push changes (with updated version) to the repo:

    git add .
    git commit -m "Updated to version x.y.z"
    git push -u origin master

Troubleshooting

  • Authentication error while downloading fonts (npm run fonts:download).

    Solution: Please make sure you have the following envs added in the .env file:

    GITHUB_ACCESS_TOKEN=
    FONTS_DIRECTORY_URL=https://raw.githubusercontent.com/<username | organisation name>/<repo name>/<branch name>/<path to directory with font files>

    Note: The token should have granted at least repo scope and be able to access the repository defined in FONTS_DIRECTORY_URL env.

Bundle analysis

Calculates the real cost of your library using size-limit with npm run size and visualize it with npm run analyze.