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

@pagopa/io-app-design-system

v2.0.4

Published

The library defining the core components of the design system of @pagopa/io-app

Downloads

3,224

Readme

Getting started

Prerequisites

To contribute to the library development, you will need to install nodejs and yarn. We recommend using nvm to properly handle the supported nodejs version (see .nvmrc).

Learn more about the io-app prerequisites →

Installing the component library

To add the component library to the main app run:

yarn add @pagopa/io-app-design-system

Remember to encapsulate the app container with the SafeAreaProvider from react-native-safe-area-context in your App.tsx file. Also, remember to apply this wrapper in other relevant places such as the root components of modals and routes when utilizing react-native-screens:

import { SafeAreaProvider } from 'react-native-safe-area-context';

function App() {
  return <SafeAreaProvider>...</SafeAreaProvider>;
}

Launch the example app

For development purposes, a sample React Native application is included in the repository. To launch it:

# Move into `example` folder
cd example

# Install dependencies 
yarn install

# Install podfiles when targeting iOS (ignore this step for Android)
# Run this only during the first setup and when Pods dependencies change
cd iOS && bundle exec pod install

# Launch the app locally (simulator flag is optional)
yarn ios --simulator='iPhone 15 Pro'

Activate the toggle at the top of the application to view the experimental design system.

[!important] The sample application consists of several pages with some components for testing purposes. To view the continuously updated Design System section, please refer to the main app.

Playground & Documentation

A Storybook playground is also available to help develop and test components. To start it in the local environment, run the following command:

yarn storybook

Storybook documentation is a work in progress

Usage

To try a component, just import it:

import { ButtonSolid } from '@pagopa/io-app-design-system';

// [...]

const MainScreen = () => (
  <View>
    <ButtonSolid
      accessibilityLabel="Tap to trigger test alert"
      label="Hello world"
      onPress={() => Alert.alert("Alert", "Action triggered")}
    />
  </View>
);

Architecture

The library is made up of several parts:

Core

Essential core visual attributes of the design language. It includes:

  • IOColors: Defines the main color palette, themes (light/dark) and other color-related utilities
  • IOSpacing: Defines the main spacing scale and various component spacing attributes
  • IOStyles: Defines common styles shared across components
  • IOShapes: Defines visual shape-related attributes, such as radius
  • IOAnimations: Defines common animation attributes used for interactive elements (used by the reanimated library)
  • IOTransitions: Defines reusable custom enter/exit transitions (used by the reanimated library)

Explore the core folder →

Foundation

Essential atomic components:

Components

Explore the components folder →

[!note] Some components that can be tested in the official DS section are missing

Functions

Common functions used to wrap up external libraries and utilities

Explore the functions folder →

Dependencies


Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library