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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@focus8/design-token

v0.1.26

Published

Package for design-tokens for Focus8, made to be used in conjunction with restyle.

Readme

Focus8 Design Tokens

A comprehensive design token package for Focus8, built to work seamlessly with Shopify's Restyle library. This package provides consistent theming, spacing, and color systems across the Focus8 application ecosystem.

Installation

npm install design-token

Usage

Quickstart

import { baseTheme, darkTheme, Theme } from 'design-token';
import { ThemeProvider } from '@shopify/restyle';

// Use in your app
function App() {
  const [isDark, setIsDark] = useState(false);
  const theme = isDark ? darkTheme : baseTheme;

  return (
    <ThemeProvider theme={theme}>
      {/* Your app components */}
    </ThemeProvider>
  );
}

Theme Structure

The package exports two main themes and includes a text variant system:

  • baseTheme - Light theme variant
  • darkTheme - Dark theme variant
  • Theme - TypeScript type for theme objects

Text Variants

The textVariants system provides predefined styles for text components, ensuring consistency across the application. Each variant includes properties like fontSize, lineHeight, and fontFamily, with support for responsive design (e.g., tablet-specific sizes).

Default Variant

  • fontFamily: RobotoFlex_400Regular
  • fontSize: 16
  • lineHeight: 24
  • color: plannerForeground

Available Variants

  • xs, s, m, l, xl, 2xl, 3xl, 4xl, 5xl, 6xl, 7xl, 8xl, 9xl

Some sizes also have variations to provide flexibility:

  • l: Standard large text
  • lBold: Large text with bold font weight
  • lNarrow: Large text with reduced width

Each variant can define responsive properties, such as:

{
  fontSize: {
    tablet: 12,
  },
  lineHeight: {
    tablet: 16,
  },
}

Color System

The theme includes semantic color tokens organized by component areas:

Planner Colors

  • plannerBackground, plannerForeground
  • plannerMutedForeground, plannerBorder
  • plannerToday, plannerTime
  • plannerButtonBackground, plannerButtonForeground, plannerButtonIcon
  • plannerPrimaryButtonBackground, plannerPrimaryButtonForeground, plannerPrimaryButtonIcon

Calendar Colors

  • calendarBackground, calendarForeground
  • calendarMutedBackground, calendarMutedForeground
  • calendarCellBorder
  • calendarTodayBackground, calendarTodayForeground

Timer Colors

  • timerPrimary, timerRingBackground
  • timerBackground, timerForeground
  • timerMutedForeground, timerBorder
  • timerTintedBackground

Event Colors

Comprehensive event color system with full spectrum support:

  • Available colors: neutral, rose, pink, fuchsia, purple, violet, indigo, blue, sky, cyan, teal, emerald, green, lime, yellow, amber, orange, red

Each event color includes:

  • event[Color]Background - Background color
  • event[Color]Foreground - Primary text color
  • event[Color]Details - Secondary text color
  • event[Color]Primary - Accent color
  • event[Color]ButtonBackground - Button background
  • event[Color]ButtonForeground - Button text color

Example:

// Event color tokens
eventBlueBackground
eventBlueForeground
eventBlueDetails
eventBluePrimary
eventBlueButtonBackground
eventBlueButtonForeground

Spacing Scale

const spacing = {
  0: 0,
  xxs: 2,
  xs: 4,
  s: 8,
  m: 16,
  l: 24,
  xl: 32,
  xxl: 40,
  xxxl: 48,
};

Using with Restyle Components

import { createBox, createText } from '@shopify/restyle';
import { Theme } from 'design-token';

const Box = createBox<Theme>();
const Text = createText<Theme>();

// Usage example
<Box backgroundColor="plannerBackground" padding="md">
  <Text color="plannerForeground" variant="body">
    Hello Focus8!
  </Text>
</Box>

Theme Switching

Both themes maintain the same structure and token names, making it easy to switch between light and dark modes:

const currentTheme = isDarkMode ? darkTheme : baseTheme;

<ThemeProvider theme={currentTheme}>
  {/* Your components will automatically adapt */}
</ThemeProvider>

TypeScript Support

Full TypeScript support is included with proper type definitions. The Theme type ensures type safety when creating custom components or extending the theme system.

License

MIT