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

@uphillhealth/react-components

v1.7.18

Published

Library for UpHill Health's components

Downloads

353

Readme

lib-ts-react-components

aka react-components

Installation

npm install --save-dev @uphillhealth/react-components@latest

Below is the list of alll packages that the library needs in order to function properly, make sure to install all of them as devDependencies in your project.

| NPM Package | |-------------------------------| | @maskito/core | | @maskito/kit | | @maskito/react | | @radix-ui/react-accordion | | @radix-ui/react-avatar | | @radix-ui/react-collapsible | | @radix-ui/react-dialog | | @radix-ui/react-dropdown-menu | | @radix-ui/react-popover | | @radix-ui/react-select | | @radix-ui/react-switch | | @radix-ui/react-tabs | | @radix-ui/react-toast | | @radix-ui/react-toggle-group | | @radix-ui/react-tooltip | | @stitches/react | | @uphillhealth/i18n | | @uphillhealth/theme | | @uphillhealth/types | | country-data | | libphonenumber-js | | material-icons | | react | | react-dom | | uuid |

To install a package as a devDependency, add --save-dev or -D in the installation command.

npm install -D {package} or npm install --save-dev {package}

Install all needed packages (does not include react and react-dom):

npm install --save-dev @maskito/core @maskito/kit @maskito/react @radix-ui/react-accordion @radix-ui/react-avatar @radix-ui/react-collapsible @radix-ui/react-dialog @radix-ui/react-dropdown-menu @radix-ui/react-popover @radix-ui/react-select @radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-toast @radix-ui/react-toggle-group @radix-ui/react-tooltip @stitches/react @uphillhealth/i18n @uphillhealth/theme @uphillhealth/types country-data libphonenumber-js material-icons uuid


Overview

The library utilises radix primitive components for complex components and stitches to stylize all components.

Z-index

The library utilises z-index above 40 to create a buffer to applications z-indexes.

Translations

The library provides translations files for English, Spanish and Portuguese including all texts used to be added at your application.

The current translations provided by the library, you can copy then and translate to additional languages if necessary.

import languages from './languages';

export default {
  ...languages,
  'Showing {{start}}-{{end}} of {{total}}': 'Showing {{start}}-{{end}} of {{total}}',
  'My Preferences': 'My Preferences',
  Profile: 'Profile',
  Help: 'Help',
  'Application version': 'Application version',
  Language: 'Language',
  Logout: 'Logout',
};

Components documentation

ComponentsProvider

Create instances of all necessary providers for some components to work properly, like TooltipProvider. Instance this component at the root of your application.

You can customize the providers options if necessary:

interface ComponentsProviderProps {
  children?: ReactNode | ReactNode[];
  toastOptions?: Omit<ToastProviderProps, 'children'>;
  tooltipOptions?: Omit<TooltipProviderProps, 'children'>;
}
Usage
import { ComponentsProvider } from '@uphillhealth/react-components'

export default () => {
  return (
    <ComponentsProvider>
      <div>
        rest of the app...
      </div>
    </ComponentsProvider>
  )
}

Icon

Usage

Include at the application root to have the font icons from the library:

import 'material-icons/iconfont/filled.css';

Then just use the Icon component, you can check which icons are available at https://marella.me/material-icons/demo/

import { Icon } from '@uphillhealth/react-components'

export default () => {
  return (
    <Icon>
      visibility
    </Icon>
  )
}