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

@nuskin/foundation-theme

v1.6.0

Published

This repository contains the theme required for the nuskin applications

Downloads

712

Readme

@nuskin/foundation-themes

This repository houses a collection of Nuskin themes. Intended for utilization by developers across various teams, these themes serve as a standardized design system to ensure a consistent and cohesive visual identity throughout the Nuskin website.

Supports Dark Mode:

Enhance the user experience with a seamlessly integrated dark mode feature.

NuskinThemeProvider for Theme Change:

The repository includes a NuskinThemeProvider that simplifies the process of dynamically changing themes.

Tailwind CSS Utilities:

Utility CSS classes from Tailwind CSS included to provide a robust set of styling options.

Latest Release

Released Versions

Installation Guide

Clone the repository to your local machine

git clone [email protected]:ns-am/content-foundation/foundation-theme.git

Usage

The following example illustrates how to use this project

import { NextGenThemeProvider, forceForGoodTheme, FoundationTheme } from '@nuskin/foundation-theme';
import { NsButton } from '@nuskin/foundation-ui-components';

import Button from '@mui/material/Button';

export function App1(props) {
    const theme = useMemo(() => {
        if (props.theme === 'forceForGood') {
            return forceForGoodTheme;
        }
    }, props.theme);
    const { palette = {} } = theme || {};
    const colorVariables = Object.keys(palette) as FoundationTheme.PaletteColors[];
    return (
        <NextGenThemeProvider isSSR cacheKey="app" theme={theme}>
            {colorVariables?.map((color, index) => (
                <NsButton variant="contained" color={color} key={color + index}>
                  `Button ${index}`
                </NsButton>

            ))}
        </NextGenThemeProvider>
    );
}

Project Dependencies

Emotion Libraries

Material-UI

Utility Libraries

Testing

We use Jest for testing our project. Below are the available test scripts:

  • Run all tests and generate coverage report:**
    yarn test
  • Run tests for a specific pattern (e.g., accordion/*):
    yarn run test:pattern
  • Run only failed tests from the last test run:
    yarn run test:failed
  • Generate and view code coverage report:
    yarn run test:coverage
    
  • The yarn test script builds the project using Next.js before running Jest tests.
  • Feel free to customize the test patterns or add additional options as needed.

Coverage Report:

After running tests, open the index.html file in the coverage directory to view the coverage report.

Notes

1. To opt out of theme switching between light and dark mode, pass the darkModeEnabled prop with a false value.

2. The following example shows how to retrieve colors using ColorUtils.color

import { ColorUtils } from '@nuskin/foundation-theme';

const color = ColorUtils.color('primary', 'main')(validTheme);

3. The theme repository offers style exports through a Universal Module Definition (UMD) file.

4. Additionally, it provides convenient access to styling capabilities via the Styled and globalStyled features directly from the theme.