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

@velove/design-system

v6.2.11

Published

Velove design system for React applications

Downloads

21

Readme

Velove Design System for React

Design tokens, theme, React components and helpers for Velove

Velove applications take advantage of the white-label Theme UI project, based on Emotion

This package contains a specific Theme UI theme branded for Velove, as well as shared, themed components.

Source code written in TypeScript, built to ESM, CJS and UMD formats thanks to preconstruct, tested with jest, documented with storybook.

Installation

yarn add theme-ui @velove/design-system
# or
npm install -S theme-ui @velove/design-system

Usage

Refer to Theme UI's Getting Started guide:

/** @jsx jsx */
import { ThemeProvider, jsx } from 'theme-ui';
import { SchedulingTheme } from '@velove/design-system';

const App: React.FC = ({ children }) => <ThemeProvider theme={ThemeProvider}>{children}</ThemeProvider>;

Regarding the different components and/or helpers as well as design guidelines, the Storybook should be the best place to look at.

Contributing

An automated workflow is in place for the publication: open a Pull-Request against the "master" branch (for the current stable version) or the "next" branch (for the next major version).

Ensure that your changes are tested and documented.

Also, since this project uses conventional commits, please follow the convention for commit messages (this is what will define the semantic version to publish with your changes).

Several scripts are available locally:

  • figmagic: fetch design tokens defined in Figma
  • figmagic:graphics: fetch SVG icons defined in Figma as graphics then generate React components from the code
  • lint: run eslint with --fix flag
  • lint:fix: run eslint with --fix flag
  • storybook: launch the storybook project
  • test: test using jest (and ts-jest), you can also use the --watch flag

Design handover with figmagic

figmagic is a CLI tool helping the Design <-> Development handover from a structured Figma document

We use it in this package for 2 main purposes:

  • design tokens (colors, spaces, fonts properties etc.)
  • icons (designed as SVG components in Figma)

The Figma document used for this Design System defines a set of tokens (in a page called "Design Tokens"), using Figma's Velove Design System under the hood (that designers use in Figma to design the different components), as well as SVG icons (in a page called "Graphics")

As mentioned earlier, there are 2 local scripts that can be used to sync those:

  • figmagic: sync the design tokens: will update the src/tokens files with updated values, then run prettier
  • figmagic:graphics: sync the SVG icons: will update the src/components/Icon/icons files with updated SVG code, then run svgr to generate React components from the SVG source code. svgr uses svgo under the hood to optimise SVG source code, which is configured in .svgo.yml

To use figmagic locally, you will need a local .env file in this folder containing

# The Figma document (URL) used to maintain tokens and graphics
FIGMA_URL='{FIGMA_DOCUMENT_URL}'
# Your personal Figma token: read only is enough - obviously, your account needs access to the referenced document for figmagic to work.
FIGMA_TOKEN='xxxxx-yyyyyyyy-zzzz-zzzz-zzzz-xxxxxxxxxxxx'

Then run one of the scripts above using yarn run