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

@digital-ai/dot-icons

v1.1.39

Published

Standalone package with icons used by Digital.ai

Downloads

1,207

Readme

dot-icons

Icon repository to be used either on its own or in conjunction with dot-components

Objectives

  • [x] Allow UX designers to easily update icons without having to create a new release of dot-components
  • [x] Allow icons to be used in any project, regardless of the technology stack
  • [x] Setup GitHub to automatically publish icons to NPM after merging to main
  • [x] Update dot-components to use dot-icons as an npm package
  • [x] add a note about using resolutions to update dot-icons separate of dot-components
  • [x] update dot-components to always pull latest dot-icons
  • [x] Update documentation around usage
    • [x] Option 1: Standard Icon HTML
    • [x] Option 2: React Component

Usage

React Component via dot-components

If you are already consuming dot-components then the easiest way would be to use the DotIcon component, documentation is available here

Standard HTML

If not using dot-components then import @digital-ai/dot-icons into your project as an npm package or as a git submodule. You can also download the contents of this repository and copy the fonts folder and index.css into your project.

<link rel="stylesheet" href="./index.css" />

...

<span class="dot-icon">
  <i class="icon-flow"></i>
</span>

Configuring Jest

We are utilizing @digital-ai/dot-icons which uses @font-face. If you are using Jest then you'll need to update the following files. The location of the files may be different based on the structure of your application

jest.config.js

moduleNameMapper: {
  '@digital-ai/dot-icons': '<rootDir>/testing-utils/style-mock.ts',
}

style-mock.ts

module.exports = {};

Contributing

You can import selection.json back to the IcoMoon app using the Import Icons button (or via Main Menu → Manage Projects) to retrieve your icon selection.

After downloading generated files from IcoMoon only the following files should be copied over.

  • fonts/dot.woff
  • fonts/dot.ttf
  • fonts/dot.svg
  • selection.json

You'll also need to copy the icon styles from the generated style.css and paste them at the bottom of index.css, or you can do it directly from icon moon app

HTML and CSS code for icon add in icon moon

as

  .dot-icon i.icon-add:before {
    content: '\e9be';
  }

Be sure to update demo/script.js with the new icon class name that we are using in index.css alphabetically ordered

function doMagic() {
  const list = document.getElementById("icon-list");
  const icons = [
    "GitOps",
    "Increment",
    "Portfolio",
    "abort",
    "activity",
    "add", <-
    "add-from-list",
    "add-outlined",
    "add-solid",
    "alphabet-icon",
    "analytics",
    "announcement",
    "applications",

Once complete, please submit a pull request with the updated files and request someone to review in the #dot-components channel on slack.

More information is available in the .dot design system

Troubleshooting

If for some reason the latest version of dot-icons is not available in dot-components then you can update your package.json to use the latest version of dot-icons by adding the following to your resolutions section.

  "resolutions": {
    "@digital-ai/dot-icons": "latest",
  }