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

@fabric-ds/icons

v0.6.8

Published

Fabric's icon set

Downloads

4,371

Readme

Fabric Icons

The icon set for Fabric, imported from the Figma project.

Note that the icons in the "raw" folder in this repository should never be used directly, as they aren't optimized.

Usage

Elements

Using NPM package

Install dependencies

You will need to install both Fabric Elements and Lit Element which is the library we use for custom elements

npm install lit @fabric-ds/icons
Import elements

Import the individual element file, importing will load the component. Once imported, run your script through whatever bundling process your app uses (Rollup, Esbuild, etc) after which the component can be used in the page.

import '@fabric-ds/icons/elements/attachment-16';
import '@fabric-ds/icons/elements/attachment-24';
<f-icon-attachment16></f-icon-attachment16>
<f-icon-attachment24></f-icon-attachment24>

Development

Updating the icons

Icons should never be added or edited manually in this repository, as the source of truth is in Figma.

Figma access token

If you are running the import script for the first time, it will prompt your for a Figma access token. The token is is required to access Figma's API. It can be generated on your Figma account settings page.

The import script may store the token to a local file, so you won't have to supply the token again on subsequent runs.

Import script

To update the icons, run the following script. If it has a valid Figma access token (see above), it will proceed to download all the icons as SVG files.

./scripts/figma-import.js

Local preview

You can open a local preview of the icons. Use this to verify that the icons looks as they should. Run the following command.

npm run start

Publishing

If everything looks correct, publish the changes.

npm publish
git push --follow-tags

Eik

Eik versions for each of Vue, Elements and React icons are automatically created in the ./dist folder when builds are run. Eik configuration is based on values in package.json (name, version and eik keys) and running Eik publish will publish everything in the dist folder to Eik under the path https://assets.finn.no/pkg/{name}/{version}/.

Example Paths:

  • React: https://assets.finn.no/pkg/@fabric-ds/icons/v1/react/icons.min.js
  • Vue: https://assets.finn.no/pkg/@fabric-ds/icons/v1/vue/icons.min.js
  • Custom Elements: https://assets.finn.no/pkg/@fabric-ds/icons/v1/elements/icons.min.js
  • Raw ads svg at size 16: https://assets.finn.no/pkg/@fabric-ds/icons/v1/16/ads.svg
  • Raw air con svg at size 24: https://assets.finn.no/pkg/@fabric-ds/icons/v1/24/air-con.svg

Troubleshooting

Auth

If the scripts authentication issues, you could try to create a new access token and delete the local file .FIGMA_TOKEN before running the script again.

Figma project structure

The script is probably not resilient to changes in the structure of the Figma project. Changes there will probably require an update of the import script.