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

@pinpt/ui-components

v3.0.96

Published

Pinpoint component library and house styles for React

Downloads

19

Readme

Getting Started

  1. Install via npm:
npm install --save @pinpt/ui-components
  1. Import global.less into less style sheets to use house styles:
@import (reference) '@pinpt/ui-components/global.less';

Note: you may need to update the host project build configuration.

  1. Icon fonts must be served from /webfonts. Clone the project and copy them to project_root/public/webfont.

Usage

import React from 'react';

import { Container, Semantic } from '@pinpt/ui-components';

const { Icon: SemanticIcon } = Semantic;

class Example extends React.Component {
    render () {
        return (
            <>
                <Container>
                    <SemanticIcon className="user-icon user" />
                </Container>
            </>
        );
    }
}
@import (reference) '@pinpt/ui-components/global.less';

.user-icon {
    color: @primary;
}

Semantic UI

Semantic UI components are limited to those used in this library (see semantic.json). To use a component not currently used, you must update the Semantic UI configuration and re-build both the Semantic UI CSS and this library.

Icon Fonts

To use icon fonts, inherit the relevant style class:

import React from 'react';

import { Semantic } from '@pinpt/ui-components';

const { Icon: SemanticIcon } = Semantic;

class Example extends React.Component {
    render () {
        return (
            <>
                <SemanticIcon className="solid-icon lock" />
            </>
        );
    }
}
@import (reference) '@pinpt/ui-components/global.less';

.solid-icon {
    .fas();
    color: @primary;
}

Development

This project was created using create-react-library and is packaged using rollup.js.

For local development, link the module:

[sudo] npm link
cd path/to/app/project
npm link @pinpt/ui-components

Link to the copy of react in the application project. E.g. for webapp-react, assuming sibling project directories:

npm link ../webapp-react/node_modules/react

For more details on why this is required see https://reactjs.org/warnings/invalid-hook-call-warning.html.

Start watching for changes:

npm run watch

Any changes made will automatically build and link the module.

Alternatively you can build the module using:

npm run build

House Styles

Global brand styles are defined in theme.less. On change, Semantic UI CSS must be generated and the module rebuilt.

Storybook

This project uses Storybook for testing components in isolation. All components should include a stories.js file containing stories to run. To run Storybook book:

npm run storybook

Semantic UI

Semantic UI provides the underlying set of components. Sepcifically, Semantic-UI-React provides the implementation and Semantic-UI provides the themed styling. Included component styles are listed in semantic.json, to use and expose any additional component it must be added here.

The themed CSS file (semantic/semantic[.min].css) can be generated using:

npm run build:semantic

Dependencies

Any npm dependency should be added to dependencies and peerDependencies in package.json. Rollup ignores modules in the peerDependencies list and will not include these in the packaged module.

License

All of this code is proprietary and Copyright © 2017-2019 by Pinpoint Software, Inc.