@mapbox/mr-ui

2.10.1 • Public • Published

@mapbox/mr-ui

mr-ui logo

Build Status

Pronounced 'mis-tər yü-'ī. Mapbox React UI components.

UI components for Mapbox projects. See docs at https://mapbox.github.io/mr-ui/.

This project is for internal Mapbox usage. The code is open source and we appreciate bug reports; but we will only consider feature requests and pull requests from Mapbox developers.

Installation

npm install @mapbox/mr-ui

On Mapbox projects, pair these components with version 1.1.0+ of Mapbox's custom Assembly build. (This is not in peerDependencies because you might use <link> and <script> tags instead of the npm package.)

The public Assembly build should work fine, with maybe one or two hiccups.

Usage

Import individual components! All components are exposed at @mapbox/mr-ui/{component-name}. For example:

import Modal from '@mapbox/mr-ui/modal';
import Tooltip from '@mapbox/mr-ui/tooltip';

Only the component itself and whatever it depends on will be drawn into your bundle.

Utility functions

There are a few utility functions you can import from @mapbox/mr-ui/utils/{name}.

See the utils documentation.

Development

Here are some commands you'll probably want to use:

# Start the documentation site.
npm start

# Start Jest's CLI in watch mode.
npx jest --watchAll

# Lint and test everything.
npm test

Publishing

The build command creates a pkg/ directory that contains the code we want to publish, organized the way we want it. So pkg/ is the directory that we publish. pkg/package.json is a clone of package.json but with private: true removed.

  • Increment version numbers in package.json and package.lock.json, and ensure the changelog has an entry for the latest version. Then, create a new Git tag.
  • Build the pkg/ directory: npm run build.
  • cd into the pkg/ directory and mbx npm publish from there.
  • cd back to root and run npm run deploy-docs to update the docs at https://mapbox.github.io/mr-ui/

Readme

Keywords

Package Sidebar

Install

npm i @mapbox/mr-ui

Homepage

./

Weekly Downloads

371

Version

2.10.1

License

BSD-2-Clause

Unpacked Size

232 kB

Total Files

114

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user