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

@genexus/design-system-tokens-editor

v18.9.109

Published

GeneXus Design System Tokens Editor

Downloads

838

Readme

Design System Tokens

A token is the most basic element of a Design System that allows you to capture an option for visual or interaction design. A token allows you to model a – platform-agnostic– choice of color, typography, spacing, time, media, zindex, border, opacity, size.

With tokens, you can give options for low-level values of your product.

Having a Token set for your Design System will allow your product to be more maintainable and consistent in terms of design.

Getting Started

Clone this repo and then:

npm install
npm start

Building for production

npm run build

Token Definition Basic Sample

tokens MyDesignSystemTokens {
  #colors {
    primary: rgb(108, 154, 235);
    secondary: #ab2;
    background: rgba(200, 200, 150, 0.9);
  }
  #spacing {
    small: 12px;
    medium: 22px;
    large: 45px;
  }
  #fonts {
    primary: arial;
    secondary: georgia;
    third: roboto;
  }
  #fontsizes {
    xsmall: 5px;
    small: 10px;
    regular: 22px;
    big: 50px;
  }
  #zindex {
    high: 5;
  }
  #borders {
    hard: 15px;
    medium: 5px;
    thin: 1px;
    none: 0px;
  }
  #radius {
    strict: 0px;
    soft: 10px;
    regular: 16px;
    medium: 22px;
    big: 34px;
  }
  #times {
    snail: 3s;
    rabbit: 1s;
    horse: 0.3s;
  }
}

Token Set

Allow grouping a set of tokens.

tokens MyDesignTokens
{
  // Here define tokens
}

See more on Token Sets

Token Types

A specific Token Set includes several tokens defined by Types.

There is a set of predefined token types. Having Token Types allow giving a clear meaning of the kind of token we are creating.

Readers can have a clear understanding of what context this token can be used, and tools can give different ways of editing or showing these tokens.

Predefined token types are:

#colors
#spacing
#borders
#opacity
#radius
#shadows
#times  (Use timing tokens for animation durations.)
#fonts
#fontsizes
#mediaqueries
#zindex

Sample

tokens MyDesignTokens {
  #colors {
    active: red;
    text: #FFFFF;
  }
}

See more on Token Types

Tokens

For each Token Type inside a Token Set we can define Tokens.

Each Token has at least a Token Name and a Token Value

Depending on the Token Type is the kind of Token Value allowed.

The syntax for the two required elements is equal to a css property, the only difference is that validators should take into account that the domain for values has constraints depending on the Token Type group.

Sample

tokens MyDesignSystemTokens {
  #spacing {
    small: 12px;
    big: 45px;
  }
  #colors {
    active: red;
    text: #ffffff;
  }
}

See more on Tokens

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.