JSPM

@procore/core-react

11.3.1-rc.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10583
  • Score
    100M100P100Q115082F
  • License SEE LICENSE IN LICENSE

React library of Procore Design Guidelines

Package Exports

  • @procore/core-react
  • @procore/core-react/dist/DateInput/DateInput
  • @procore/core-react/dist/DateInput/DateInput.js
  • @procore/core-react/dist/DropdownFlyout/DropdownFlyout.helpers
  • @procore/core-react/dist/DropdownFlyout/DropdownFlyout.helpers.js
  • @procore/core-react/dist/DropdownFlyout/DropdownFlyout.styles
  • @procore/core-react/dist/DropdownFlyout/DropdownFlyout.styles.js
  • @procore/core-react/dist/Form
  • @procore/core-react/dist/Form/Form.styles
  • @procore/core-react/dist/Form/Form.styles.js
  • @procore/core-react/dist/Form/index.js
  • @procore/core-react/dist/OverlayTrigger
  • @procore/core-react/dist/OverlayTrigger/index.js
  • @procore/core-react/dist/TieredDropdown/useSearch
  • @procore/core-react/dist/TieredDropdown/useSearch.js
  • @procore/core-react/dist/Typography/Typography.styles
  • @procore/core-react/dist/Typography/Typography.styles.js
  • @procore/core-react/dist/_styles/borderRadius
  • @procore/core-react/dist/_styles/borderRadius.js
  • @procore/core-react/dist/_styles/shadows
  • @procore/core-react/dist/_styles/shadows.js
  • @procore/core-react/dist/_styles/spacing
  • @procore/core-react/dist/_styles/spacing.js
  • @procore/core-react/dist/_utils/TinyMCE
  • @procore/core-react/dist/_utils/TinyMCE.js
  • @procore/core-react/dist/_utils/addSubcomponents
  • @procore/core-react/dist/_utils/addSubcomponents.js
  • @procore/core-react/dist/_utils/mergeRefs
  • @procore/core-react/dist/_utils/mergeRefs.js
  • @procore/core-react/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@procore/core-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CORE React npm npm

A set of React components implementing the design system spec.

Requirements

Node 14+ NPM or Yarn

Usage

Install

Install @procore/core-react from NPM.

yarn add @procore/core-react

or

npm install @procore/core-react

Install the peer dependencies.

yarn add formik styled-components react react-dom

Imports

Named imports support tree shaking and types.

import { Button, ButtonProps } from '@procore/core-react'
import { Cog } from '@procore/core-icons'

export function ButtonCustom(props: ButtonProps) {
  return <Button {...props} icon={<Cog />} />
}

Developing

To get started, type the following from the project root directory:

yarn

All commands below will be ran in the package directory:

cd packages/core-react

We use Storybook to develop. Stories are broken into two categories, Demos for interactions and Coverage for displaying variants.

yarn storybook

Testing

Testing currently consists of Jest snapshots, Enzyme tests, and React Testing Library tests.

yarn test

Visual Regression Testing is ran in CI, pixel snapshots of Coverage stories.

Building

yarn build

Contributing and Styleguide

Bug reports and pull requests are welcome on GitHub at https://github.com/procore/core. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

In lieu of a formal styleguide, we use husky to create a precommit hook, which executes lint-staged to automatically format any git staged files using prettier.

License

The package is available under the Procore Developers License

About Procore

Procore Logo

Procore - building the software that builds the world.

Learn more about the #1 most widely used construction management software at procore.com