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

@highpoint/ui-elements

v18.23.0

Published

HighPoint UI elements

Downloads

416

Readme

HighPoint UI Elements

Library of common UI elements used by HighPoint's web applications.

Installation

yarn add @highpoint/ui-elements

Usage

Import the components from @highpoint/ui-elements. For example:

import { Checkbox } from '@highpoint/ui-elements';

Usage (Icons)

Import the components from @highpoint/ui-elements/icons. For example:

import { ChevronLeft } from '@highpoint/ui-elements/icons';

Typescript

If you are using typescript, to get full theme support, add 'node_modules/@highpoint/ui-elements/types' to the 'typeRoots' field in tsconfig.json.

Components

Live Component Demos and Documentation

Theme

import { Theme } from '@highpoint/ui-elements';

Theme.Provider

Wrap your app in <Provider /> to theme your Material UI components and make them match the style-guide

const config = {
  sansSerifFont: 'Arial',
  primaryAlt: 'FFF',
  primaryColor: 'F00',
  primaryText: '000'
};

<Theme.Provider config={config}> {children} </Theme.Provider>

Typography variants

header 1 -> h1
header 2 -> h2
header 3 -> h3
header 4 -> h4
basic -> body1
small -> body2
tiny -> caption

Theme.Consumer

Render Prop. Access themeObject.

<Theme.Consumer> {themeObject => children} </Theme.Consumer>

themeObject.color

const color = {
  primary,
  secondary,
  primaryDark,
  general: {
    background,
    secondaryBackground,
    line
  },
  text: {
    primary,
    secondary,
    primaryContrast
  },
  icons: {
    default,
    positive,
    negative,
    warning,
    pinned,
    friends
  }
};
Example
const redButton = css`
  button {
    background-color: ${color.icons.negative};
  }
`;

themeObject.font

const font = {
  weights: {
    light,
    regular,
    text,
    medium,
    semibold
  },
  family
};
Example
const mediumWeight = css`
  font-family: ${font.family};
`;

// or

const mediumWeight = css({
  fontWeight: font.weights.medium
});

themeObject.classes

Theme utility classes

const classes = {
  font: { light, regular, text, medium, semibold }
};
Example
const { classes } = Theme;

// This will change the h2 font weight to semibold
<Typography variant="h2" className={classes.font.semibold}> semi bold text </Typography>

Icons

Available icons: https://packages.pages.mhighpoint.com/ui-elements/storybook/?path=/docs/icons--primary

Import them like this:

import { Warning } from '@highpoint/ui-elements/icons';

Utilities

Utility functions to encapsulate common tasks.

Import them like this:

import { Utilities } from @highpoint/ui-elements;

const { isFramed } = Utilities;

datePicker

Grab default props for MaterialUI picker components.

generateId

Generates a unique ID, suitable for use as an element's id attribute.

getCrefUrl

Take a URL that was produced by %ContentReference and modifies parts of it to match the current URL.

Note: this assumes that the user is on a PeopleSoft-served page.

isFluidLayout

Determines if the page is being viewed within a Fluid wrapper.

isFramed

Determines if the page is being displayed inside an <iframe>.

isInPortal

Determines if the page is being displayed within a PeopleSoft portal.

Development

Run yarn storybook to start the development server. When you make a change to the src files, the dist files will be rebuilt and server will automatically update.