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

@deskpro/fa-picker

v0.2.0

Published

Customizable Slack-like font awesome icon picker for React based on emoji-mart

Downloads

2

Readme

Heavy thanks to Missive team for Emoji-mart

Installation

npm install --save emoji-mart

Components

Picker

import 'icon-mart/css/icon-mart.css'
import { Picker } from 'emoji-mart'

<Picker set='emojione' />
<Picker onSelect={this.addIcon} />
<Picker title='Pick your icon…' icon='hand-point-up' />
<Picker style={{ position: 'absolute', bottom: '20px', right: '20px' }} />
<Picker i18n={{ search: 'Recherche', categories: { search: 'Résultats de recherche', recent: 'Récents' } }} />

| Prop | Required | Default | Description | | ---- | :------: | ------- | ----------- | | autoFocus | | false | Auto focus the search input when mounted | | color | | #ae65c5 | The icon color | | icon | | department_store | The icon shown when no icons are hovered, set to an empty string to show nothing | | include | | [] | Only load included categories. Accepts I18n categories keys. Order will be respected, except for the recent category which will always be the first. | | exclude | | [] | Don't load excluded categories. Accepts I18n categories keys. | | custom | | [] | Custom icons | | recent | | | Pass your own frequently used icons as array of string IDs | | iconSize | | 24 | The icon width and height | | onClick | | | Params: (icon, style, color, event) => {}. Not called when icon is selected with enter | | onSelect | | | Params: (icon, style, color) => {} | | perLine | | 9 | Number of icons per line. While there’s no minimum or maximum, this will affect the picker’s width. This will set Frequently Used length as well (perLine * 4) | | i18n | | {…} | An object containing localized strings | | native | | false | Renders the native unicode icon | | backgroundImageFn | | ((set, sheetSize) => …) | A Fn that returns that image sheet to use for icons. Useful for avoiding a request if you have the sheet locally. | | iconsToShowFilter | | ((icon) => true) | A Fn to choose whether an icon should be displayed or not | | showPreview | | true | Display preview section | | showSkinTones | | true | Display skin tones picker. Disable both this and showPreview to remove the footer entirely. | | iconTooltip | | false | Show icons short name when hovering (title) | | style | | | Inline styles applied to the root element. Useful for positioning | | title | | Icon Mart™ | The title shown when no icons are hovered | | notFoundIcon | | sleuth_or_spy | The icon shown when there are no search results | | notFound | | | Not Found | | icons | | {} | Custom icons |

I18n

search: 'Search',
clear: 'Clear', // Accessible label on "clear" button
notfound: 'No Icon Found',
colortext: 'Choose your color',
categories: {
  search: 'Search Results',
  recent: 'Frequently Used',
  custom: 'Custom',
},

Tip: You usually do not need to translate the categories and skin tones by youself, because this data and their translations should be included in the Unicode CLDR (the "Common Locale Data Repository"). You can look them up and just take them from there.

Examples of emoji object:

{
  id: 'smiley',
  name: 'Smiling Face with Open Mouth',
  colons: ':smiley:',
  text: ':)',
  emoticons: [
    '=)',
    '=-)'
  ],
  skin: null,
  native: '😃'
}

{
  id: 'santa',
  name: 'Father Christmas',
  colons: ':santa::skin-tone-3:',
  text: '',
  emoticons: [],
  skin: 3,
  native: '🎅🏼'
}

{
  id: 'octocat',
  name: 'Octocat',
  colons: ':octocat:',
  text: '',
  emoticons: [],
  custom: true,
  imageUrl: 'https://github.githubassets.com/images/icons/emoji/octocat.png'
}