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

@meeco/style-kit

v2.0.1

Published

Meeco branded components and style mixins

Downloads

5

Readme

Meeco Style Kit

Styled building blocks for Meeco web applications.

Installation

In your node application/module

  1. Run npm install --save @meeco/stylekit
  2. Import the css file into the top of your main scss file with @import '~@meeco/style-kit/build/main';

Usage

For detailed usage instructions and examples see the docs at https://meeco.github.io/sdk-docs/style-kit/?path=/docs/.

Assets

If you use the Meeco icon font, the files are located in the assets folder. You can copy them to your server or use a bundler to do it automatically. The following formats should be included:

node_modules/
  @meeco/
    style-kit/
      assets/
        meeco-icons.eot
        meeco-icons.svg
        meeco-icons.ttf
        meeco-icons.woff

Development

Once you have checked out this repository change to the project repository and run npm install.

If you run npm start in this directory, it will start the storybook project which should open itself in your default browser;

All view stories should be contained in the stories/ folder.

All publicly available style kit should live in the src/ folder.

Where possible, keep styles free from side-effects. That is, use mixins so only the styles that a developer wishes to use are included in their final are used and the rest can be shaken out.

Good

@mixin meeco-button {
  // these styles are only included if the dev wires `@include meeco-button`
  button {
    background-color: $meeco-red;
    border-radius: 16px;
  }
}

Bad

// these styles always included, even if the dev does not require them
button {
  background-color: $meeco-red;
  border-radius: 16px;
  &.hover {
    background-color: lighten($meeco-red, 20%);
  }
}

The exception being the main css file which is expected to be a complete css drop-in framework version of the style-kit (sort of lik Bootstrap) which could be imported into a page and used.

Writing Stories

All stories should have a default export of at least their title:

export default { title: 'My Widget' };

There are several ways to write stories. The name of the export is the subtitle of the story, and the return can be either a string or a function that returns a HTML element:

export const basicButton = () => `<button>Basic</button>`;

export const complexButton = () => {
  const button = document.createElement('button');
  button.innerHTML = 'complex';
  button.className = 'complex-button';
  return button;
};

See the storybook documentation for more information;

Including styles

Styles that are loaded with the style-loader will automatically include the imported file in the <styles> tag at the top of the page. These should be kept only to storybook files to avoid side effects:

import 'style-loader!./button.scss';

Styles imported using the to-string-loader (the default) return only the text of the scss/css file allowing them to be used in, for example, web components:

import styles from './hello-world.scss';

/// ...

shadowRoot.innerHTML = `
  <style>
    ${styles.toString()}
  </style>
  <p>Hello World!</p>
`;