diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ba1b6815c5..ea0d97fb33 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,12 +1,30 @@
## Contributing to HIG
+
+
+
+
+- [Filing Issues](#filing-issues)
+ - [Suggestions](#suggestions)
+ - [Bugs](#bugs)
+- [Contributing Code](#contributing-code)
+- [Contributing Features](#contributing-features)
+ - [Fork the project](#fork-the-project)
+ - [Create a new branch off of the `development` branch](#create-a-new-branch-off-of-the-development-branch)
+ - [Develop new functionality](#develop-new-functionality)
+ - [Create a pull request](#create-a-pull-request)
+- [Open source governance](#open-source-governance)
+- [See Also](#see-also)
+
+
+
### Filing Issues
-**Suggestions**
+#### Suggestions
The HIG project is meant to evolve with feedback - the project and its users greatly appreciate any thoughts on ways to improve the design or features. Please use the `enhancement` tag to specifically denote issues that are suggestions - this helps us triage and respond appropriately.
-**Bugs**
+#### Bugs
As with all pieces of software, you may end up running into bugs. Please submit bugs as regular issues on GitHub - HIG developers are regularly monitoring issues and will try to fix open bugs quickly.
@@ -18,24 +36,32 @@ The HIG project accepts and greatly appreciates contributions. The project follo
When contributing code, please also include appropriate tests as part of the pull request, and follow the same comment and coding style as the rest of the project. Take a look through the existing code for examples of the testing and style practices the project follows.
+Please view the [contribution example][] for an example of the recommended package structure.
+
+[contribution example]: ./packages/contribution-example
+
### Contributing Features
All pull requests for new features must go through the following process:
-* Please familiarize yourself with the [DEVELOPING](DEVELOPING.md) resources
+
+* Please familiarize yourself with the [Developing guide](DEVELOPING.md).
* Start an Intent-to-implement GitHub issue for discussion of the new feature.
-* LGTM from Tech Lead and one other core committer is required
+* Written approval from the HIG engineering team (GitHub comment).
* Development occurs on a separate branch of a separate fork, noted in the intent-to-implement issue
* A pull request is created, referencing the issue.
-* HIG developers will provide feedback on pull requests, looking at code quality, style, tests, performance, and directional alignment with the goals of the project. That feedback should be discussed and incorporated
-* LGTM from Tech Lead and one other core committer, who confirm engineering quality and direction.
+* HIG developers will provide feedback on pull requests, looking at code quality, style, tests, performance, and directional alignment with the goals of the project. That feedback should be discussed and incorporated.
+* Approval via code review from the Tech Lead and another core committer, who can confirm engineering quality and direction.
#### Fork the project
+
Fork the `hig` project with your GitHub account.
#### Create a new branch off of the `development` branch
+
On your fork, locally, create a new branch off of `development`.
The name of your branch should include the type of change it holds, a brief description of the changes, and the issue number if relevant.
E.g. Fixing a typo in the readme as discussed in issue #101 would have a branch name like this:
+
```
bugs/fix-readme-type-101
```
@@ -43,19 +69,19 @@ bugs/fix-readme-type-101
#### Develop new functionality
Read [DEVELOPING](DEVELOPING.md) for more information about how to develop within this project. Once your changes are complete ensure your branch meets testing, coverage, and linting standards.
- Ensure changes are tested
- - Add to the playground for manual testing if needed
+ - Add to the Storybook for manual testing if needed
- Ensure branch meets testing, coverage, and linting standards
- `yarn test-ci`
- `yarn lint`
#### Create a pull request
+
When you're ready for feedback, create a pull request against the `development` branch. The title of your pull request should be a concise description of the changes within it. The description of the PR should include the reason behind your PR, a brief explanation of your approach, and highlights of any especially interesting or potentially surprising details. If the change is visual, add a screenshot or gif to the pull request description.
When you create a pull request, our continuous integration system automatically runs tests,ensures test coverage stays above a threshold, and ensures code complies with linting standards. All CI checks must pass before the pull request is ready to merge.
A core committer will review your pull request and provide feedback or merge it into `development` as appropriate.
-
### Open source governance
The HIG project's chief and primary concern is with the development of HIG Interface and platform specific implementations, an open source library of components which increase developer efficiency and provide a consistent look and feel to web applications across Autodesk. The look and feel of components is based on Autodesk Human Interface guidelines designs and the various product teams that contribute to HIG. The HIG project's governance model thus reflects only the need to steer the engineering direction of the components and not any other activities which are out of scope.
@@ -69,7 +95,7 @@ In the event there are no Core Committers, Autodesk Inc. will appoint one.
Core Committers:
- Tech Lead: Sean Durham (@nfiniteset)
-- Core Committer: Morris Allison (@morrisallison)
+- Core Committer: Morris Allison III (@morrisallison)
### See Also
diff --git a/DEVELOPING.md b/DEVELOPING.md
index fad042966c..1144ed170a 100644
--- a/DEVELOPING.md
+++ b/DEVELOPING.md
@@ -1,25 +1,114 @@
-# Developing - HIG
+# Developing
-We use Yarn workspaces and Lerna to manage interdependencies between packages. To get set up, run this from the project root:
+
+
+
+
+- [Prerequisites](#prerequisites)
+- [Getting Started](#getting-started)
+- [Project structure](#project-structure)
+ - [Monorepo](#monorepo)
+ - [Private packages](#private-packages)
+- [Code style](#code-style)
+- [Testing](#testing)
+ - [Unit testing](#unit-testing)
+ - [How it works](#how-it-works)
+ - [How to run manually](#how-to-run-manually)
+ - [Visual regression testing](#visual-regression-testing)
+ - [How it works](#how-it-works-1)
+ - [How to run manually](#how-to-run-manually-1)
+- [Git commits](#git-commits)
+- [Package versioning](#package-versioning)
+- [Deployment](#deployment)
+ - [How to deploy](#how-to-deploy)
+
+
+
+## Prerequisites
+
+The following dependencies must be available to be begin project development.
+
+* [Unix-like][] operating system _— [Windows Subsystem for Linux][] also works_
+* [Git][]
+* [Node][] `^9.7.1`
+* [Yarn][] `>=1.5.1`
+* [Python][] `^2.7` _— Some dependencies require `node-gyp` which uses Python_
+
+[Git]: https://git-scm.com/
+[Node]: https://nodejs.org
+[Python]: https://www.python.org
+[Unix-like]: https://en.wikipedia.org/wiki/Unix-like
+[Yarn]: https://yarnpkg.com
+[Windows Subsystem for Linux]: https://docs.microsoft.com/en-us/windows/wsl/about
+
+## Getting Started
+
+To get set up, run the following commands:
```bash
+git clone https://github.com/Autodesk/hig
+cd hig
yarn
+yarn build
```
-# Testing
+## Project structure
+
+### Monorepo
+
+This project is structured as a [monorepo][], with each package residing within its own directory.
+
+The monorepo uses [Yarn workspaces][] and [Lerna][] to manage the interdependencies between packages.
+
+[Lerna]: https://lernajs.io/
+[monorepo]: https://github.com/babel/babel/blob/master/doc/design/monorepo.md
+[Yarn workspaces]: https://yarnpkg.com/lang/en/docs/workspaces/
+
+### Private packages
+
+Private packages are used to organize development tools and dependencies. For example, the [`@hig/scripts`][hig-scripts] package contains the build script that's used to build every component package.
+
+[hig-scripts]: ./packages/scripts
+
+## Code style
+
+We use [ESLint][] and [Prettier][] to ensure consistency throughout the source code. Please view our [ESLint configuration][] for details on style rules.
+
+[ESLint]: https://eslint.org/
+[ESLint configuration]: ./packages/eslint-config
+[Prettier]: https://prettier.io/
-## Unit Tests
+## Testing
-Currently, to run Jest tests, run this from the project root:
+### Unit testing
+
+[Jest][] along with [Enzyme][] is used to run our unit testing suite. While we aim for the highest possible code coverage, every component should be covered with a [snapshot test][] at the very least.
+
+[Enzyme]: http://airbnb.io/enzyme/
+[Jest]: http://jestjs.io/
+[snapshot test]: http://jestjs.io/docs/en/snapshot-testing.html
+
+#### How it works
+
+Unit tests reside within module specifications (`moduleName.test.js`), which are placed next to their respective modules. Jest runs all of the project's unit tests together, and evaluates code coverage on the project as a whole.
+
+#### How to run manually
```bash
-cd packages/storybook
yarn test
```
-## Visual Regression Tests
+### Visual regression testing
+
+To ensure that changes do not break the visual presentation of components, we run a suite of visual regression tests via [Gemini][].
+
+[Gemini]: https://gemini-testing.github.io/
+
+#### How it works
+
+The tests are run upon a Storybook developed specifically for automated testing. Screenshots of each test are stored within the repository similar to unit test snapshots.
-We use Gemini to ensure that changes do not break the visual presentation of components. We use Storybook to render an example of a component, then save a screenshot of the example to the repository.
+#### How to run manually
```bash
cd packages/storybook
@@ -27,10 +116,33 @@ yarn gemini-update # Update snapshots
yarn gemini # Check components against committed snapshots
```
-# Deployment
+## Git commits
+
+Commit messages should adhere to the [Angular Git Commit Guidelines][].
+
+## Package versioning
+
+Package versioning is automated via [Semantic Release][] and determined by commit messages. Commit messages should adhere to [Angular Git Commit Guidelines][].
+
+[Angular Git Commit Guidelines]: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines
+[Semantic Release]: https://github.com/semantic-release/semantic-release
+
+## Deployment
+
+Packages are published via [Semantic Release][].
+
+### How to deploy
+
+1. Create a pull request (PR) to merge `development` into `master`.
+1. Wait for the PR to receive approval and all automation to finish.
+1. Merge the PR with a **merge commit**
+ * Merging with a merge commit ensures there's no loss of commit information.
+
+_Semantic Release will then:_
-1. Switch to `development` branch.
-1. `yarn update-packages # Update package version numbers and adds tags and publish commit`
-1. `git push --follow-tags # Push development and new tags`
-1. Create a pull request to merge `development` into `master`.
-1. Merge.
+1. Create new Git tags
+1. Create/update changelogs
+1. Publish new package versions to NPM
+1. Update the `master` branch
+1. Create GitHub releases
+1. Merge all changes into the `development` branch
diff --git a/docs/contribution-example/README.md b/docs/contribution-example/README.md
new file mode 100644
index 0000000000..e940cd7e10
--- /dev/null
+++ b/docs/contribution-example/README.md
@@ -0,0 +1,26 @@
+# Component Scaffold
+
+> This is a private example package which can serve as a base for contributions.
+
+[COMPONENT_DESCRIPTION]
+
+Read more about when and how to use the COMPONENT_NAME component [on the internal wiki](https://wiki.autodesk.com/display/HIG/COMPONENT_NAME).
+
+## Getting started
+
+```
+yarn add @hig/PACKAGE_NAME
+```
+
+## Import the component and CSS
+
+```
+import Banner from '@hig/PACKAGE_NAME';
+import '@hig/PACKAGE_NAME/build/index.css';
+```
+
+## Basic usage
+
+```jsx
+// Basic example
+```
diff --git a/docs/contribution-example/package.json b/docs/contribution-example/package.json
new file mode 100644
index 0000000000..85b74de7f2
--- /dev/null
+++ b/docs/contribution-example/package.json
@@ -0,0 +1,55 @@
+{
+ "private": true,
+ "name": "@hig/contribution-example",
+ "version": "0.1.0-alpha",
+ "description": "",
+ "author": "Autodesk Inc.",
+ "license": "Apache-2.0",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Autodesk/hig.git"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "build/index.js",
+ "module": "build/index.es.js",
+ "style": "build/index.css",
+ "files": [
+ "build/*"
+ ],
+ "dependencies": {
+ "prop-types": "^15.6.1",
+ "react-lifecycles-compat": "^2.0.0"
+ },
+ "devDependencies": {
+ "@hig/babel-preset": "^0.1.0",
+ "@hig/eslint-config": "^0.1.0",
+ "@hig/scripts": "^0.1.2",
+ "@hig/semantic-release-config": "^0.1.0",
+ "@hig/styles": "^0.1.1"
+ },
+ "peerDependencies": {
+ "react": "^15.4.1 || ^16.3.2"
+ },
+ "scripts": {
+ "build": "hig-scripts-build",
+ "lint": "hig-scripts-lint",
+ "release": "hig-scripts-release"
+ },
+ "eslintConfig": {
+ "extends": "@hig"
+ },
+ "release": {
+ "extends": "@hig/semantic-release-config"
+ },
+ "babel": {
+ "env": {
+ "test": {
+ "presets": [
+ "@hig/babel-preset/test"
+ ]
+ }
+ }
+ }
+}
diff --git a/docs/contribution-example/src/index.js b/docs/contribution-example/src/index.js
new file mode 100644
index 0000000000..ca6a744710
--- /dev/null
+++ b/docs/contribution-example/src/index.js
@@ -0,0 +1 @@
+export default function noop() {}
diff --git a/docs/contribution-example/src/index.test.js b/docs/contribution-example/src/index.test.js
new file mode 100644
index 0000000000..164eae564f
--- /dev/null
+++ b/docs/contribution-example/src/index.test.js
@@ -0,0 +1,7 @@
+import * as index from "./index";
+
+describe("contribution-example/index", () => {
+ it(`exports default`, () => {
+ expect(index).toHaveProperty("default", expect.any(Function));
+ });
+});
diff --git a/package.json b/package.json
index 2d85c7de0f..9a5b918261 100644
--- a/package.json
+++ b/package.json
@@ -19,10 +19,12 @@
"extract:dependencies": "bash scripts/extract-dependencies.sh",
"archive:builds": "node scripts/archive-builds.js",
"archive:dependencies": "node scripts/archive-dependencies.js",
- "update-development": "bash scripts/update-development.sh"
+ "update-development": "bash scripts/update-development.sh",
+ "docs": "doctoc --notitle DEVELOPING.md CONTRIBUTING.md"
},
"devDependencies": {
"archiver": "^2.1.1",
+ "doctoc": "^1.3.1",
"lerna": "^2.11.0",
"mkdirp": "^0.5.1",
"node-fetch": "^1.7.3",
diff --git a/packages/avatar/package.json b/packages/avatar/package.json
index 82393ca603..b87ee92a92 100644
--- a/packages/avatar/package.json
+++ b/packages/avatar/package.json
@@ -28,7 +28,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/banner/package.json b/packages/banner/package.json
index 8b8fe28e40..40be414bd9 100644
--- a/packages/banner/package.json
+++ b/packages/banner/package.json
@@ -32,7 +32,7 @@
"@hig/button": "^0.1.1",
"@hig/eslint-config": "^0.1.0",
"@hig/rich-text": "^0.1.1",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/button/package.json b/packages/button/package.json
index fc27fde318..2b1540ef1d 100644
--- a/packages/button/package.json
+++ b/packages/button/package.json
@@ -26,7 +26,7 @@
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
"@hig/icon": "^0.1.1",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json
index 85d17a3839..1d4877b4d5 100644
--- a/packages/checkbox/package.json
+++ b/packages/checkbox/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/components/package.json b/packages/components/package.json
index 2b83fa4e56..cf08d027a0 100644
--- a/packages/components/package.json
+++ b/packages/components/package.json
@@ -22,7 +22,7 @@
"@hig/banner": "^0.1.2",
"@hig/button": "^0.1.1",
"@hig/checkbox": "^0.1.1-alpha",
- "@hig/dropdown": "^0.1.1-alpha",
+ "@hig/dropdown": "^0.1.0-alpha.3",
"@hig/flyout": "^0.1.1-alpha",
"@hig/icon": "^0.1.1",
"@hig/icon-button": "^0.1.1",
@@ -53,7 +53,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"clean-css": "^4.1.11",
"esprima": "^4.0.0",
diff --git a/packages/dropdown/package.json b/packages/dropdown/package.json
index c0fb903d51..896053a96f 100644
--- a/packages/dropdown/package.json
+++ b/packages/dropdown/package.json
@@ -1,6 +1,6 @@
{
"name": "@hig/dropdown",
- "version": "0.1.1-alpha",
+ "version": "0.1.0-alpha.3",
"description": "HIG Dropdown",
"author": "Autodesk Inc.",
"license": "Apache-2.0",
@@ -18,8 +18,10 @@
"build/*"
],
"dependencies": {
+ "@hig/icon": "^0.1.2",
+ "@hig/text-field": "^0.3.1",
"classnames": "^2.2.5",
- "hig-react": "^0.29.0",
+ "downshift": "^1.31.15",
"prop-types": "^15.6.1",
"react-lifecycles-compat": "^3.0.2"
},
@@ -29,7 +31,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/dropdown/src/Dropdown.js b/packages/dropdown/src/Dropdown.js
index 85b6975adc..419568b672 100644
--- a/packages/dropdown/src/Dropdown.js
+++ b/packages/dropdown/src/Dropdown.js
@@ -1,6 +1,137 @@
-import { Dropdown } from "hig-react";
+import React, { Component } from "react";
+import PropTypes from "prop-types";
+import cx from "classnames";
+import Downshift from "downshift";
+import { TextFieldPresenter } from "@hig/text-field";
+import Icon from "@hig/icon";
+import "@hig/text-field/build/index.css";
+import "@hig/icon/build/index.css";
+
+import Option from "./presenters/Option";
+import composeEventHandlers from "./composeEventHandlers";
import "./dropdown.scss";
-Dropdown.displayName = "Dropdown";
+export default class Dropdown extends Component {
+ static propTypes = {
+ /**
+ * HTML ID attribute
+ */
+ id: PropTypes.string,
+ /**
+ * Text describing what the field represents
+ */
+ label: PropTypes.string,
+ /**
+ * Instructional text for the field
+ */
+ instructions: PropTypes.string,
+ /**
+ * Placeholder text to render when an option has not been selected
+ */
+ placeholder: PropTypes.string,
+ /**
+ * Prevents user actions on the field
+ */
+ disabled: PropTypes.bool,
+ /**
+ * Text describing why the field is required
+ */
+ required: PropTypes.string,
+ /**
+ * An array of objects to choose from.
+ */
+ options: PropTypes.arrayOf(
+ PropTypes.shape({
+ label: PropTypes.string,
+ value: PropTypes.string
+ })
+ ),
+ /**
+ * Called after user changes the value of the field. Called with the entire object that was selected.
+ */
+ onChange: PropTypes.func,
+ /**
+ * Called when user moves focus from the field
+ */
+ onBlur: PropTypes.func,
+ /**
+ * Called when user puts focus onto the field
+ */
+ onFocus: PropTypes.func
+ };
+
+ render() {
+ const {
+ id,
+ label,
+ instructions,
+ placeholder,
+ required,
+ disabled,
+ onBlur,
+ onChange,
+ onFocus,
+ options
+ } = this.props;
+
+ return (
+ (item ? item.label : "")}
+ >
+ {({
+ getInputProps,
+ getItemProps,
+ isOpen,
+ highlightedIndex,
+ selectedItem,
+ toggleMenu
+ }) => (
+
+
+
+
+ {/* @TODO: there are variations of the TextField with multiple icons at the end of the input. These icon nodes should be passed as props to TextField. */}
+
+
+
-export default Dropdown;
+ {isOpen && (
+
+ {options.map((option, index) => (
+
+ {option.label}
+
+ ))}
+
+ )}
+
+ )}
+
+ );
+ }
+}
diff --git a/packages/dropdown/src/Dropdown.test.js b/packages/dropdown/src/Dropdown.test.js
new file mode 100644
index 0000000000..94a6124e37
--- /dev/null
+++ b/packages/dropdown/src/Dropdown.test.js
@@ -0,0 +1,12 @@
+import renderer from "react-test-renderer";
+import React from "react";
+
+import Dropdown from "./Dropdown";
+
+describe("Dropdown", () => {
+ it("renders correctly", () => {
+ const tree = renderer.create( ).toJSON();
+
+ expect(tree).toMatchSnapshot();
+ });
+});
diff --git a/packages/dropdown/src/__gemini__/Dropdown.gemini.js b/packages/dropdown/src/__gemini__/Dropdown.gemini.js
new file mode 100644
index 0000000000..587d9d5376
--- /dev/null
+++ b/packages/dropdown/src/__gemini__/Dropdown.gemini.js
@@ -0,0 +1,23 @@
+gemini.suite("Dropdown", () => {
+ gemini.suite("basic", suite => {
+ suite
+ .setUrl("iframe.html?selectedKind=Dropdown&selectedStory=basic")
+ .setCaptureElements("body")
+ .capture("1 unfocused")
+ // Small differences in placeholder text can easily generate false negatives
+ .capture("2 focused", { tolerance: 5 }, actions => {
+ actions.focus("input");
+ })
+ .capture("3 navigating menu", actions => {
+ actions.sendKeys(gemini.ARROW_DOWN);
+ actions.sendKeys(gemini.ARROW_DOWN);
+ })
+ .capture("4 confirming selection", actions => {
+ actions.sendKeys(gemini.ENTER);
+ })
+ .capture("5 reopening menu", actions => {
+ actions.focus("body");
+ actions.focus("input");
+ });
+ });
+});
diff --git a/packages/dropdown/src/__gemini__/Dropdown.stories-test.js b/packages/dropdown/src/__gemini__/Dropdown.stories-test.js
new file mode 100644
index 0000000000..8daa814221
--- /dev/null
+++ b/packages/dropdown/src/__gemini__/Dropdown.stories-test.js
@@ -0,0 +1,28 @@
+import React from "react";
+import { storiesOf } from "@storybook/react";
+
+import Dropdown from "../index";
+
+const defaultProps = {
+ label: "HIG Theme",
+ instructions: "Choose one HIG theme to apply to your entire app.",
+ placeholder: "Select a theme",
+ options: [
+ {
+ label: "HIG Light Theme",
+ value: "HIGLightTheme"
+ },
+ {
+ label: "HIG Dark Blue Theme",
+ value: "HIGDarkBlueTheme"
+ },
+ {
+ label: "Matrix Theme",
+ value: "MatrixTheme"
+ }
+ ]
+};
+
+storiesOf("Dropdown", module).add("basic", () => (
+
+));
diff --git a/packages/dropdown/src/__snapshots__/Dropdown.test.js.snap b/packages/dropdown/src/__snapshots__/Dropdown.test.js.snap
new file mode 100644
index 0000000000..0620e10d7d
--- /dev/null
+++ b/packages/dropdown/src/__snapshots__/Dropdown.test.js.snap
@@ -0,0 +1,67 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Dropdown renders correctly 1`] = `
+
+
+
+
+
+
+
+ HIG Themes
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/packages/dropdown/src/__stories__/getKnobs.js b/packages/dropdown/src/__stories__/getKnobs.js
index f6af36fd1f..e5da2dbf57 100644
--- a/packages/dropdown/src/__stories__/getKnobs.js
+++ b/packages/dropdown/src/__stories__/getKnobs.js
@@ -1,5 +1,5 @@
import { action } from "@storybook/addon-actions";
-import { boolean, text } from "@storybook/addon-knobs/react";
+import { boolean, object, text } from "@storybook/addon-knobs/react";
const knobGroupIds = {
basic: "Basic"
@@ -9,15 +9,13 @@ const knobLabels = {
label: "Label",
instructions: "Instructions",
placeholder: "Placeholder",
- open: "Open",
disabled: "Disabled",
required: "Required",
onBlur: "onBlur",
+ onChange: "onChange",
onClickOutside: "onClickOutside",
onFocus: "onFocus",
- onKeypress: "onKeypress",
- onTargetClick: "onTargetClick",
- selectedOptionLabel: "Selected Option Label"
+ options: "Options"
};
export default function getKnobs(props) {
@@ -25,10 +23,9 @@ export default function getKnobs(props) {
label,
instructions,
placeholder,
- open,
disabled,
required,
- selectedOptionLabel,
+ options,
...otherProps
} = props;
@@ -41,18 +38,12 @@ export default function getKnobs(props) {
knobGroupIds.basic
),
placeholder: text(knobLabels.placeholder, placeholder, knobGroupIds.basic),
- open: boolean(knobLabels.open, open, knobGroupIds.basic),
disabled: boolean(knobLabels.disabled, disabled, knobGroupIds.basic),
required: text(knobLabels.required, required, knobGroupIds.basic),
onBlur: action(knobLabels.onBlur),
+ onChange: action(knobLabels.onChange),
onClickOutside: action(knobLabels.onClickOutside),
onFocus: action(knobLabels.onFocus),
- onKeypress: action(knobLabels.onKeypress),
- onTargetClick: action(knobLabels.onTargetClick),
- selectedOptionLabel: text(
- knobLabels.selectedOptionLabel,
- selectedOptionLabel,
- knobGroupIds.basic
- )
+ options: object(knobLabels.options, options, knobGroupIds.basic)
};
}
diff --git a/packages/dropdown/src/__stories__/stories.js b/packages/dropdown/src/__stories__/stories.js
index 7343ae1a1d..06d43999b5 100644
--- a/packages/dropdown/src/__stories__/stories.js
+++ b/packages/dropdown/src/__stories__/stories.js
@@ -1,21 +1,24 @@
export default [
{
- description: "uncontrolled",
+ description: "default",
getProps: () => ({
- label: "Uncontrolled Dropdown",
- instructions: "instructions for regular Uncontrolled dropdown",
- placeholder: "placeholder for regular Uncontrolled dropdown",
+ label: "HIG Theme",
+ instructions: "Choose one HIG theme to apply to your entire app.",
+ placeholder: "Select a theme",
options: [
{
- label: "foo",
- value: "foo value"
+ label: "HIG Light Theme",
+ value: "HIGLightTheme"
},
{
- label: "bar",
- value: "bar value"
+ label: "HIG Dark Blue Theme",
+ value: "HIGDarkBlueTheme"
+ },
+ {
+ label: "Matrix Theme",
+ value: "MatrixTheme"
}
- ],
- defaultValue: "bar value"
+ ]
})
},
{
diff --git a/packages/dropdown/src/composeEventHandlers.js b/packages/dropdown/src/composeEventHandlers.js
new file mode 100644
index 0000000000..e178f1cc8e
--- /dev/null
+++ b/packages/dropdown/src/composeEventHandlers.js
@@ -0,0 +1,8 @@
+/**
+ * Composes multiple event handlers into one.
+ * @param {Function} fns the event handler functions
+ * @return {Function} the event handler to add to an element
+ */
+export default function composeEventHandlers(...fns) {
+ return (event, ...args) => fns.forEach(fn => fn && fn(event, ...args));
+}
diff --git a/packages/dropdown/src/dropdown.scss b/packages/dropdown/src/dropdown.scss
index 87a7619c2f..80eccee8d4 100644
--- a/packages/dropdown/src/dropdown.scss
+++ b/packages/dropdown/src/dropdown.scss
@@ -1 +1,48 @@
-@import "~hig-react/lib/hig-react.css";
+@import "~@hig/styles/tokens/layers.scss";
+@import "~@hig/styles/mixins/colors.scss";
+@import "./tokens.scss";
+
+.hig__dropdown {
+ position: relative;
+ min-width: 300px;
+ max-width: 450px;
+
+ .hig__text-field__input{
+ font-weight: 600;
+ }
+
+ .hig__text-field__extra--dropdown-caret {
+ bottom: 6px;
+ }
+}
+
+.hig__dropdown__input-wrapper {
+ position: relative;
+}
+
+.hig__dropdown__input-caret {
+ position: absolute;
+ top: calc(#{$menu-top-offset} - 30px); // 30px = the height of the icon element
+ right: 7px;
+ z-index: -1;
+
+ .hig__dropdown--disabled & {
+ opacity: 0.3;
+ }
+}
+
+.hig__dropdown-v1__menu {
+ position: absolute;
+ min-width: 240px;
+ max-height: $menu-max-height;
+ top: $menu-top-offset;
+ overflow: auto;
+ z-index: $dropdown-layer;
+
+ border: 1px solid color(hig-cool-gray-30);
+ border-top: none;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ background-color: color(hig-white);
+ box-shadow: 0 1px 4px rgba(#717171, 0.3);
+}
diff --git a/packages/dropdown/src/index.js b/packages/dropdown/src/index.js
index 4d208f480a..3646498ed9 100644
--- a/packages/dropdown/src/index.js
+++ b/packages/dropdown/src/index.js
@@ -1 +1,3 @@
+import "@hig/styles/build/fonts.css";
+
export { default } from "./Dropdown";
diff --git a/packages/dropdown/src/presenters/Option.js b/packages/dropdown/src/presenters/Option.js
new file mode 100644
index 0000000000..093e85d3db
--- /dev/null
+++ b/packages/dropdown/src/presenters/Option.js
@@ -0,0 +1,69 @@
+import React, { Component } from "react";
+import PropTypes from "prop-types";
+import cx from "classnames";
+import Icon, { names } from "@hig/icon";
+
+import "./option.scss";
+
+export default class Option extends Component {
+ static propTypes = {
+ /**
+ * Visual representation of the option
+ */
+ children: PropTypes.node,
+ /**
+ * Indicates the option is currently highlighted. This is comparable to hover state, but useful when interacting by keyboard.
+ */
+ highlighted: PropTypes.bool,
+ /**
+ * Called when user finishes clicking on an option
+ */
+ onClick: PropTypes.func,
+ /**
+ * Called when user begins clicking on an option
+ */
+ onMouseDown: PropTypes.func,
+ /**
+ * Called when user moves mouse over the option
+ */
+ onMouseMove: PropTypes.func,
+ /**
+ * Called when user moves mouse over the option
+ */
+ onHover: PropTypes.func,
+ /**
+ * Called when the user selects the option by clicking or keyboard interaction
+ */
+ onSelect: PropTypes.func,
+ /**
+ * Indicates the option is currently selected
+ */
+ selected: PropTypes.bool,
+ /**
+ * Data represented by the option
+ */
+ value: PropTypes.string
+ };
+
+ render() {
+ const { children, highlighted, selected, ...otherProps } = this.props;
+
+ return (
+
+
{children}
+
+ {selected && (
+
+
+
+ )}
+
+ );
+ }
+}
diff --git a/packages/dropdown/src/presenters/option.scss b/packages/dropdown/src/presenters/option.scss
new file mode 100644
index 0000000000..b97975e60a
--- /dev/null
+++ b/packages/dropdown/src/presenters/option.scss
@@ -0,0 +1,34 @@
+@import "~@hig/styles/mixins/colors.scss";
+@import "~@hig/styles/mixins/typography.scss";
+
+@mixin highlighted() {
+ background-color: color(hig-blue-10);
+}
+
+.hig__dropdown-option {
+ @include typography-base;
+ @import "../tokens.scss";
+ box-sizing: border-box;
+ position: relative;
+
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ min-height: $option-height;
+ padding: 0 8px;
+
+ cursor: pointer;
+
+ &:hover {
+ @include highlighted;
+ }
+}
+
+.hig__dropdown-option--highlighted {
+ @include highlighted;
+}
+
+.hig__dropdown-option--focused {
+ background-color: color(hig-blue-10);
+}
diff --git a/packages/dropdown/src/tokens.scss b/packages/dropdown/src/tokens.scss
new file mode 100644
index 0000000000..66ba9f9867
--- /dev/null
+++ b/packages/dropdown/src/tokens.scss
@@ -0,0 +1,4 @@
+$option-height: 36px;
+
+$menu-max-height: $option-height * 10;
+$menu-top-offset: 43px; // Height from the top of the TextField wrapper to the input bottom border. @TODO: can be calculated dynamically?
diff --git a/packages/flyout/package.json b/packages/flyout/package.json
index 26253607c8..d6a860649f 100644
--- a/packages/flyout/package.json
+++ b/packages/flyout/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/icon-button/package.json b/packages/icon-button/package.json
index e83da9abe6..4e5c59fca8 100644
--- a/packages/icon-button/package.json
+++ b/packages/icon-button/package.json
@@ -27,7 +27,7 @@
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
"@hig/icons": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/icon/package.json b/packages/icon/package.json
index 88f355d2dc..00f9b87107 100644
--- a/packages/icon/package.json
+++ b/packages/icon/package.json
@@ -26,7 +26,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/icons/package.json b/packages/icons/package.json
index 24e7cc8e5f..5e762c2d0c 100644
--- a/packages/icons/package.json
+++ b/packages/icons/package.json
@@ -20,7 +20,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1",
"svgo": "^1.0.5"
diff --git a/packages/modal/package.json b/packages/modal/package.json
index b631042d68..473ffa7c8a 100644
--- a/packages/modal/package.json
+++ b/packages/modal/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/notifications-flyout/package.json b/packages/notifications-flyout/package.json
index 7346c9b4c3..d84782cf53 100644
--- a/packages/notifications-flyout/package.json
+++ b/packages/notifications-flyout/package.json
@@ -28,7 +28,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1",
"@hig/timestamp": "^0.1.1",
diff --git a/packages/notifications-toast/package.json b/packages/notifications-toast/package.json
index 0bb2a600f7..cf7c430f1c 100644
--- a/packages/notifications-toast/package.json
+++ b/packages/notifications-toast/package.json
@@ -29,7 +29,7 @@
"@hig/babel-preset": "^0.1.0",
"@hig/button": "^0.1.1",
"@hig/eslint-config": "0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/styles": "^0.1.1"
},
"scripts": {
diff --git a/packages/profile-flyout/package.json b/packages/profile-flyout/package.json
index 51442ab395..02b8a1e4b5 100644
--- a/packages/profile-flyout/package.json
+++ b/packages/profile-flyout/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/progress-bar/package.json b/packages/progress-bar/package.json
index e49f47aa0e..e39e8c125f 100644
--- a/packages/progress-bar/package.json
+++ b/packages/progress-bar/package.json
@@ -27,7 +27,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/progress-ring/package.json b/packages/progress-ring/package.json
index 0f6e9e71db..bfb82c2d1d 100644
--- a/packages/progress-ring/package.json
+++ b/packages/progress-ring/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/project-account-switcher/package.json b/packages/project-account-switcher/package.json
index 52b316b58c..ff279b77ae 100644
--- a/packages/project-account-switcher/package.json
+++ b/packages/project-account-switcher/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/radio-button/package.json b/packages/radio-button/package.json
index f5608c09a6..59804a6bb7 100644
--- a/packages/radio-button/package.json
+++ b/packages/radio-button/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/rich-text/package.json b/packages/rich-text/package.json
index 439ba1c1d4..8f3037f78a 100644
--- a/packages/rich-text/package.json
+++ b/packages/rich-text/package.json
@@ -25,7 +25,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/scripts/createExternalDeterminer.js b/packages/scripts/createExternalDeterminer.js
index d4f5e857dc..73062ff438 100644
--- a/packages/scripts/createExternalDeterminer.js
+++ b/packages/scripts/createExternalDeterminer.js
@@ -1,18 +1,15 @@
/**
* @param {string[]} externalDependencies dependencies and peerDependencies
- * @returns {Function} A function to use for `rollupConfig.inputOptions.external`
+ * @returns {function(string): boolean} A function to use for `rollupConfig.inputOptions.external`
*/
module.exports = function createExternalDeterminer(externalDependencies) {
- /**
- * Determines whether the given module is external
- * @param {string} moduleName
- * @returns {boolean}
- */
return function external(moduleName) {
- return Boolean(
- externalDependencies.find(dependencyName =>
+ const isCssModule = moduleName.endsWith(".css");
+ const isPackageDependency =
+ externalDependencies.findIndex(dependencyName =>
moduleName.startsWith(dependencyName)
- )
- );
+ ) >= 0;
+
+ return !isCssModule && isPackageDependency;
};
};
diff --git a/packages/scripts/createExternalDeterminer.test.js b/packages/scripts/createExternalDeterminer.test.js
index ea63e9e787..844ff09fb7 100644
--- a/packages/scripts/createExternalDeterminer.test.js
+++ b/packages/scripts/createExternalDeterminer.test.js
@@ -31,7 +31,7 @@ describe("scripts/createExternalDeterminer", () => {
},
{
moduleName: "foo/module-random.css",
- isExternal: true
+ isExternal: false
},
{
moduleName: "dependency/module-random.js",
diff --git a/packages/scripts/package.json b/packages/scripts/package.json
index 6cc18d07a3..40cc28738f 100644
--- a/packages/scripts/package.json
+++ b/packages/scripts/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@hig/scripts",
- "version": "0.1.1",
+ "version": "0.1.2",
"description": "Scripts for HIG React components",
"main": "index.js",
"repository": "https://github.com/Autodesk/hig",
diff --git a/packages/semantic-release-config/package.json b/packages/semantic-release-config/package.json
index 36c6ff8156..560446c952 100644
--- a/packages/semantic-release-config/package.json
+++ b/packages/semantic-release-config/package.json
@@ -18,12 +18,13 @@
"@semantic-release/github": "^4.2.17",
"@semantic-release/npm": "^3.2.0",
"read-pkg": "^3.0.0",
- "semantic-release-monorepo": "^6.0.3"
+ "semantic-release-monorepo": "^6.0.3",
+ "upgrade-dependents": "^1.0.0"
},
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"lodash.template": "^4.4.0"
},
"scripts": {
diff --git a/packages/semantic-release-config/src/__snapshots__/createGitHubSuccessComment.test.js.snap b/packages/semantic-release-config/src/__snapshots__/createGitHubSuccessComment.test.js.snap
deleted file mode 100644
index 5ce52803b7..0000000000
--- a/packages/semantic-release-config/src/__snapshots__/createGitHubSuccessComment.test.js.snap
+++ /dev/null
@@ -1,16 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`semantic-release-config/createGitHubSuccessComment returns a template source matching the given package name 1`] = `
-":tada: This <%= issue.pull_request ? \\"PR is included\\" : \\"issue has been resolved\\" %> in \`@hig/booya@<%= nextRelease.version %>\` :tada:
-
-<%= releases.filter(release => Boolean(release.name)).length > 0 ? \\"The release is available on:\\" + \\"\\\\n\\\\n\\" + releases.filter(release => Boolean(release.name)).map(releaseInfo => \`* [\${releaseInfo.name}](\${releaseInfo.url})\`).join(\\"\\\\n\\") : \\"\\" %>"
-`;
-
-exports[`semantic-release-config/createGitHubSuccessComment when used with \`lodash.template\` renders a success comment in markdown 1`] = `
-":tada: This PR is included in \`@hig/booya@0.2.0\` :tada:
-
-The release is available on:
-
-* [Example Release](http://example.com)
-* [Example Release v2](http://example.com/two)"
-`;
diff --git a/packages/semantic-release-config/src/createGitHubSuccessComment.js b/packages/semantic-release-config/src/createGitHubSuccessComment.js
deleted file mode 100644
index 5ecab65f3a..0000000000
--- a/packages/semantic-release-config/src/createGitHubSuccessComment.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/* eslint-disable max-len, no-template-curly-in-string */
-
-export default function createGitHubSuccessComment({ packageName }) {
- const subject =
- '<%= issue.pull_request ? "PR is included" : "issue has been resolved" %>';
- const mainHeading = `:tada: This ${subject} in \`${packageName}@<%= nextRelease.version %>\` :tada:`;
- const releaseInfosExp = "releases.filter(release => Boolean(release.name))";
- const hasReleasesExp = `${releaseInfosExp}.length > 0`;
- const releasesHeadingExp = '"The release is available on:"';
- const linkExp = "`* [${releaseInfo.name}](${releaseInfo.url})`";
- const releaseListExp = `${releaseInfosExp}.map(releaseInfo => ${linkExp}).join("\\n")`;
- const releasesExp = `${releasesHeadingExp} + "\\n\\n" + ${releaseListExp}`;
- const releases = `<%= ${hasReleasesExp} ? ${releasesExp} : "" %>`;
-
- return `${mainHeading}\n\n${releases}`;
-}
diff --git a/packages/semantic-release-config/src/createGitHubSuccessComment.test.js b/packages/semantic-release-config/src/createGitHubSuccessComment.test.js
deleted file mode 100644
index 0c825cf6dd..0000000000
--- a/packages/semantic-release-config/src/createGitHubSuccessComment.test.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import template from "lodash.template";
-
-import createGitHubSuccessComment from "./createGitHubSuccessComment";
-
-describe("semantic-release-config/createGitHubSuccessComment", () => {
- const packageName = "@hig/booya";
- const payload = {
- version: "",
- branch: "master",
- nextRelease: {
- version: "0.2.0"
- },
- releases: [
- {
- name: "Example Release",
- url: "http://example.com"
- },
- {
- name: "Example Release v2",
- url: "http://example.com/two"
- }
- ],
- issue: {
- pull_request: "foo"
- }
- };
-
- it("returns a template source matching the given package name", () => {
- const result = createGitHubSuccessComment({ packageName });
-
- expect(result).toMatchSnapshot();
- });
-
- describe("when used with `lodash.template`", () => {
- it("renders a success comment in markdown", () => {
- const templateSource = createGitHubSuccessComment({ packageName });
- const templateCompiled = template(templateSource);
- const result = templateCompiled(payload);
-
- expect(result).toMatchSnapshot();
- });
- });
-});
diff --git a/packages/semantic-release-config/src/createReleaseConfig.js b/packages/semantic-release-config/src/createReleaseConfig.js
index f8e6d5e4c2..700aa63cb8 100644
--- a/packages/semantic-release-config/src/createReleaseConfig.js
+++ b/packages/semantic-release-config/src/createReleaseConfig.js
@@ -1,7 +1,5 @@
import monorepoConfig from "semantic-release-monorepo";
-import createGitHubSuccessComment from "./createGitHubSuccessComment";
-
export default function createReleaseConfig({ packageName }) {
return {
...monorepoConfig,
@@ -9,13 +7,9 @@ export default function createReleaseConfig({ packageName }) {
prepare: [
"@semantic-release/changelog",
"@semantic-release/npm",
+ "upgrade-dependents/semantic-release",
"@semantic-release/git"
],
- success: [
- {
- path: "@semantic-release/github",
- successComment: createGitHubSuccessComment({ packageName })
- }
- ]
+ success: []
};
}
diff --git a/packages/side-nav/package.json b/packages/side-nav/package.json
index 31b66ed675..0185251998 100644
--- a/packages/side-nav/package.json
+++ b/packages/side-nav/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/skeleton-item/package.json b/packages/skeleton-item/package.json
index accc4b6583..51d6827265 100644
--- a/packages/skeleton-item/package.json
+++ b/packages/skeleton-item/package.json
@@ -26,7 +26,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/slider/package.json b/packages/slider/package.json
index acb57c9d51..310b9b1493 100644
--- a/packages/slider/package.json
+++ b/packages/slider/package.json
@@ -27,7 +27,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/storybook/gemini/chromeReact/Dropdown/basic/1 unfocused/chromeReact.png b/packages/storybook/gemini/chromeReact/Dropdown/basic/1 unfocused/chromeReact.png
new file mode 100644
index 0000000000..f508d04433
Binary files /dev/null and b/packages/storybook/gemini/chromeReact/Dropdown/basic/1 unfocused/chromeReact.png differ
diff --git a/packages/storybook/gemini/chromeReact/Dropdown/basic/2 focused/chromeReact.png b/packages/storybook/gemini/chromeReact/Dropdown/basic/2 focused/chromeReact.png
new file mode 100644
index 0000000000..93911c3848
Binary files /dev/null and b/packages/storybook/gemini/chromeReact/Dropdown/basic/2 focused/chromeReact.png differ
diff --git a/packages/storybook/gemini/chromeReact/Dropdown/basic/3 navigating menu/chromeReact.png b/packages/storybook/gemini/chromeReact/Dropdown/basic/3 navigating menu/chromeReact.png
new file mode 100644
index 0000000000..93911c3848
Binary files /dev/null and b/packages/storybook/gemini/chromeReact/Dropdown/basic/3 navigating menu/chromeReact.png differ
diff --git a/packages/storybook/gemini/chromeReact/Dropdown/basic/4 confirming selection/chromeReact.png b/packages/storybook/gemini/chromeReact/Dropdown/basic/4 confirming selection/chromeReact.png
new file mode 100644
index 0000000000..93911c3848
Binary files /dev/null and b/packages/storybook/gemini/chromeReact/Dropdown/basic/4 confirming selection/chromeReact.png differ
diff --git a/packages/storybook/gemini/chromeReact/Dropdown/basic/5 reopening menu/chromeReact.png b/packages/storybook/gemini/chromeReact/Dropdown/basic/5 reopening menu/chromeReact.png
new file mode 100644
index 0000000000..93911c3848
Binary files /dev/null and b/packages/storybook/gemini/chromeReact/Dropdown/basic/5 reopening menu/chromeReact.png differ
diff --git a/packages/storybook/package.json b/packages/storybook/package.json
index 5305ce1270..627105532a 100644
--- a/packages/storybook/package.json
+++ b/packages/storybook/package.json
@@ -25,7 +25,7 @@
"vanilla-test-serve": "http-server ../vanilla -p 8080"
},
"devDependencies": {
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@storybook/addon-actions": "^3.4.0",
"@storybook/addon-info": "^3.4.0",
"@storybook/addon-knobs": "^3.4.0",
diff --git a/packages/styles/package.json b/packages/styles/package.json
index 8f174e0071..20ce4bb6e3 100644
--- a/packages/styles/package.json
+++ b/packages/styles/package.json
@@ -22,7 +22,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"mkdirp": "^0.5.1",
"node-sass": "^4.9.0"
diff --git a/packages/table/package.json b/packages/table/package.json
index 732d38fbd2..eb6e8152d0 100644
--- a/packages/table/package.json
+++ b/packages/table/package.json
@@ -32,7 +32,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1",
"delay": "^2.0.0"
diff --git a/packages/tabs/README.md b/packages/tabs/README.md
index a989b95bf4..3083d63232 100644
--- a/packages/tabs/README.md
+++ b/packages/tabs/README.md
@@ -15,8 +15,8 @@ yarn add @hig/tabs
### Import the component and CSS
```js
-import { Tabs, Tab } from '@hig/tabs';
-import '@hig/tabs/build/index.css';
+import Tabs, { Tab } from "@hig/tabs";
+import "@hig/tabs/build/index.css";
```
## Basic usage
diff --git a/packages/tabs/package.json b/packages/tabs/package.json
index 5615afa254..323cd5f579 100644
--- a/packages/tabs/package.json
+++ b/packages/tabs/package.json
@@ -1,6 +1,6 @@
{
"name": "@hig/tabs",
- "version": "0.1.1-alpha",
+ "version": "0.1.0",
"description": "HIG Tabs",
"author": "Autodesk Inc.",
"license": "Apache-2.0",
@@ -18,18 +18,20 @@
"build/*"
],
"dependencies": {
+ "@hig/typography": "^0.1.2",
"classnames": "^2.2.5",
- "hig-react": "^0.29.0",
"prop-types": "^15.6.1",
- "react-lifecycles-compat": "^3.0.2"
+ "react-lifecycles-compat": "^3.0.2",
+ "render-fragment": "^0.1.1"
},
"peerDependencies": {
"react": "^15.4.1 || ^16.3.2"
},
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
+ "@hig/button": "^0.1.2",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/tabs/src/Tab.js b/packages/tabs/src/Tab.js
index a23331ba9c..126efe61c4 100644
--- a/packages/tabs/src/Tab.js
+++ b/packages/tabs/src/Tab.js
@@ -1,6 +1,53 @@
-import { Tab } from "hig-react";
-import "./tab.scss";
+import React from "react";
+import PropTypes from "prop-types";
-Tab.displayName = "Tab";
+import TabPresenter from "./presenters/TabPresenter";
-export default Tab;
+/**
+ * @typedef {Object} RenderTabPayload
+ * @property {string} key
+ * @property {boolean} [active]
+ * @property {string} [label]
+ * @property {Function} [handleClick]
+ */
+
+/**
+ * @param {RenderTabPayload} props
+ * @returns {JSX.Element}
+ */
+// eslint-disable-next-line react/prop-types
+function renderTab({ handleClick, ...otherProps }) {
+ return
;
+}
+
+/**
+ * @typedef {Object} TabProps
+ * @property {boolean} [active]
+ * @property {string} [children]
+ * @property {string} [label]
+ * @property {Function} [onClick]
+ * @property {string} render A render prop allowing for custom tab components to be rendered
+ */
+
+/**
+ * This component is a facade for interfacing with the `Tabs` component.
+ * The logic within the `Tabs` component is strictly separated from the `TabPresenter`.
+ *
+ * @param {TabProps} props
+ * @returns {null}
+ */
+export default function Tab() {
+ return null;
+}
+
+Tab.defaultProps = {
+ render: renderTab
+};
+
+Tab.propTypes = {
+ active: PropTypes.bool,
+ children: PropTypes.node,
+ label: PropTypes.string,
+ onClick: PropTypes.func,
+ render: PropTypes.func.isRequired
+};
diff --git a/packages/tabs/src/Tabs.js b/packages/tabs/src/Tabs.js
index c02ad35493..e786c65dd2 100644
--- a/packages/tabs/src/Tabs.js
+++ b/packages/tabs/src/Tabs.js
@@ -1,6 +1,182 @@
-import { Tabs } from "hig-react";
-import "./tabs.scss";
+import React, { Component, Children } from "react";
+import Fragment from "render-fragment";
+import PropTypes from "prop-types";
+import { polyfill } from "react-lifecycles-compat";
-Tabs.displayName = "Tabs";
+import { AVAILABLE_ALIGNMENTS, alignments } from "./alignments";
+import TabsPresenter from "./presenters/TabsPresenter";
+import Tab from "./Tab";
-export default Tabs;
+const FIRST_TAB_INDEX = 0;
+
+/**
+ * @typedef {import("./Tab").RenderTabPayload} RenderTabPayload
+ */
+
+/**
+ * @typedef {Object} TabMeta
+ * @property {string} key
+ * @property {import("./tab").TabProps} props
+ */
+
+/**
+ * @typedef {Object} TabsProps
+ * @property {string} [align]
+ * @property {ReactNode} [children]
+ */
+
+/**
+ * @typedef {Object} TabsState
+ * @property {number} activeTabIndex
+ */
+
+/**
+ * @param {ReactNode} children
+ * @returns {TabMeta[]}
+ */
+function createTabs(children) {
+ return Children.toArray(children).reduce((result, child) => {
+ const { type, key, props = {} } = child;
+
+ if (type === Tab) {
+ result.push({ key, props });
+ }
+
+ return result;
+ }, []);
+}
+
+class Tabs extends Component {
+ static propTypes = {
+ /**
+ * Specify how to justify the tabs within their container
+ */
+ align: PropTypes.oneOf(AVAILABLE_ALIGNMENTS),
+ /**
+ * Accepts Tab components
+ */
+ children: PropTypes.node,
+ /**
+ * Called when user activates a tab
+ */
+ onTabChange: PropTypes.func
+ };
+
+ /**
+ * @param {TabsProps} nextProps
+ * @param {TabsState} prevState
+ * @returns {TabsState | null}
+ */
+ static getDerivedStateFromProps(nextProps, prevState) {
+ const { children } = nextProps;
+ const nextTabs = createTabs(children);
+ const nextActiveTabIndex = nextTabs.findIndex(({ props }) => props.active);
+ const { activeTabIndex: prevActiveTabIndex } = prevState;
+
+ if (
+ // If no active tab was declared
+ nextActiveTabIndex < 0 ||
+ // If the declared active tab is the same as the current active tab
+ nextActiveTabIndex === prevActiveTabIndex
+ ) {
+ return null;
+ }
+
+ return {
+ activeTabIndex: nextActiveTabIndex
+ };
+ }
+
+ static defaultProps = {
+ align: alignments.CENTER,
+ onTabChange: () => {}
+ };
+
+ /** @type {TabsState} */
+ state = {
+ activeTabIndex: FIRST_TAB_INDEX
+ };
+
+ /** @returns {TabMeta[]} */
+ getTabs() {
+ return createTabs(this.props.children);
+ }
+
+ /** @returns {TabMeta|undefined} */
+ getActiveTab() {
+ const { activeTabIndex } = this.state;
+
+ return this.getTabs()[activeTabIndex];
+ }
+
+ /**
+ * @param {number} nextActiveTabIndex
+ */
+ setActiveTab(nextActiveTabIndex) {
+ const { activeTabIndex: prevActiveTabIndex } = this.state;
+ const { onTabChange } = this.props;
+
+ if (prevActiveTabIndex === nextActiveTabIndex) return;
+
+ onTabChange(nextActiveTabIndex);
+ this.setState({ activeTabIndex: nextActiveTabIndex });
+ }
+
+ /**
+ * @param {number} index
+ * @returns {Function}
+ */
+ createTabClickHandler(index) {
+ return () => {
+ this.setActiveTab(index);
+ };
+ }
+
+ /**
+ * @param {TabMeta} tab
+ * @param {number} index
+ * @returns {JSX.Element}
+ */
+ renderTab = ({ key, props }, index) => {
+ const { render, label } = props;
+ const { activeTabIndex } = this.state;
+ /** @type {RenderTabPayload} */
+ const payload = {
+ key,
+ label,
+ active: activeTabIndex === index,
+ handleClick: this.createTabClickHandler(index)
+ };
+
+ return render(payload);
+ };
+
+ /**
+ * @returns {JSX.Element}
+ */
+ renderTabs() {
+ return (
+
+ {this.getTabs().map(this.renderTab)}
+
+ );
+ }
+
+ /** @returns {ReactNode} */
+ renderContent() {
+ const activeTab = this.getActiveTab();
+
+ return activeTab ? activeTab.props.children : null;
+ }
+
+ render() {
+ return (
+
+ {this.renderTabs()}
+ {this.renderContent()}
+
+ );
+ }
+}
+
+export default polyfill(Tabs);
diff --git a/packages/tabs/src/Tabs.test.js b/packages/tabs/src/Tabs.test.js
new file mode 100644
index 0000000000..de9009b518
--- /dev/null
+++ b/packages/tabs/src/Tabs.test.js
@@ -0,0 +1,27 @@
+import React from "react";
+import renderer from "react-test-renderer";
+
+import Tab from "./Tab";
+import Tabs from "./Tabs";
+import { alignments } from "./alignments";
+
+describe("tabs/Tabs", () => {
+ it("renders tabs", () => {
+ const wrapper = (
+
+ {}}>
+ bar
+
+
+ world
+
+ }>
+ bang
+
+
+ );
+ const tree = renderer.create(wrapper).toJSON();
+
+ expect(tree).toMatchSnapshot();
+ });
+});
diff --git a/packages/tabs/src/__snapshots__/Tabs.test.js.snap b/packages/tabs/src/__snapshots__/Tabs.test.js.snap
new file mode 100644
index 0000000000..575fb10e85
--- /dev/null
+++ b/packages/tabs/src/__snapshots__/Tabs.test.js.snap
@@ -0,0 +1,38 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`tabs/Tabs renders tabs 1`] = `
+
+
+
+
+ foo
+
+
+
+
+ hello
+
+
+
+
+ world
+
+`;
diff --git a/packages/tabs/src/__stories__/infoOptions.js b/packages/tabs/src/__stories__/infoOptions.js
index 4c1b270e95..b3a8639298 100644
--- a/packages/tabs/src/__stories__/infoOptions.js
+++ b/packages/tabs/src/__stories__/infoOptions.js
@@ -1,7 +1,7 @@
import React from "react";
import RichText from "@hig/rich-text";
-import { Tabs, Tab } from "../index";
+import Tabs, { Tab } from "../index";
import readme from "../../README.md";
export default {
diff --git a/packages/tabs/src/__stories__/renderStory.js b/packages/tabs/src/__stories__/renderStory.js
index b8a8bde349..5e4d248f1a 100644
--- a/packages/tabs/src/__stories__/renderStory.js
+++ b/packages/tabs/src/__stories__/renderStory.js
@@ -1,5 +1,6 @@
import React from "react";
-import { Tabs } from "../index";
+
+import Tabs from "../index";
import getKnobs from "./getKnobs";
export default function renderStory(props) {
diff --git a/packages/tabs/src/__stories__/stories.js b/packages/tabs/src/__stories__/stories.js
index cee236891b..90f700d668 100644
--- a/packages/tabs/src/__stories__/stories.js
+++ b/packages/tabs/src/__stories__/stories.js
@@ -1,12 +1,24 @@
import React from "react";
import RichText from "@hig/rich-text";
+import Button, { types } from "@hig/button";
import { Tab } from "../index";
+/* eslint-disable-next-line react/prop-types */
+function renderCustomTab({ key, label, active, handleClick }) {
+ return (
+
+ );
+}
+
export default [
{
description: "default",
getProps: () => ({
- align: "center",
children: [
Details content
@@ -19,5 +31,27 @@ export default [
]
})
+ },
+ {
+ description: "custom tab",
+ getProps: () => ({
+ align: "center",
+ children: [
+
+ Details content
+ ,
+
+ Activities content
+ ,
+
+ Inspector content
+
+ ]
+ })
}
];
diff --git a/packages/tabs/src/alignments.js b/packages/tabs/src/alignments.js
index bcfb84b3be..d106b61ab9 100644
--- a/packages/tabs/src/alignments.js
+++ b/packages/tabs/src/alignments.js
@@ -4,4 +4,4 @@ export const alignments = Object.freeze({
RIGHT: "right"
});
-export const availableAlignments = Object.freeze(Object.values(alignments));
+export const AVAILABLE_ALIGNMENTS = Object.freeze(Object.values(alignments));
diff --git a/packages/tabs/src/alignments.test.js b/packages/tabs/src/alignments.test.js
index 5265c4d083..4b293f376e 100644
--- a/packages/tabs/src/alignments.test.js
+++ b/packages/tabs/src/alignments.test.js
@@ -2,7 +2,7 @@ import * as alignments from "./alignments";
describe("tabs/alignments", () => {
it("has an array of available alignments", () => {
- expect(alignments).toHavePropertyOfConstants("availableAlignments");
+ expect(alignments).toHavePropertyOfConstants("AVAILABLE_ALIGNMENTS");
});
it("has constants for alignments", () => {
diff --git a/packages/tabs/src/index.js b/packages/tabs/src/index.js
index 66f6c26fde..9e3c3c22c2 100644
--- a/packages/tabs/src/index.js
+++ b/packages/tabs/src/index.js
@@ -1,2 +1,5 @@
-export { default as Tabs } from "./Tabs";
+import "@hig/typography/build/index.css";
+
+export { default } from "./Tabs";
export { default as Tab } from "./Tab";
+export { alignments, AVAILABLE_ALIGNMENTS } from "./alignments";
diff --git a/packages/tabs/src/index.test.js b/packages/tabs/src/index.test.js
index 96d280ce63..f1f36cb47c 100644
--- a/packages/tabs/src/index.test.js
+++ b/packages/tabs/src/index.test.js
@@ -3,12 +3,20 @@ import * as index from "./index";
describe("tabs/index", () => {
[
{
- name: "Tabs",
+ name: "default",
value: expect.any(Function)
},
{
name: "Tab",
value: expect.any(Function)
+ },
+ {
+ name: "alignments",
+ value: expect.any(Object)
+ },
+ {
+ name: "AVAILABLE_ALIGNMENTS",
+ value: expect.any(Array)
}
].forEach(({ name, value }) => {
it(`exports ${name}`, () => {
diff --git a/packages/tabs/src/presenters/TabPresenter.js b/packages/tabs/src/presenters/TabPresenter.js
new file mode 100644
index 0000000000..010a231e45
--- /dev/null
+++ b/packages/tabs/src/presenters/TabPresenter.js
@@ -0,0 +1,41 @@
+import React from "react";
+import cx from "classnames";
+import PropTypes from "prop-types";
+
+import "./TabPresenter.scss";
+
+/**
+ * @typedef {Object} TabPresenterProps
+ * @property {boolean} [active]
+ * @property {string} label
+ * @property {Function} [onClick]
+ */
+
+/**
+ * @param {TabPresenterProps} props
+ * @returns {JSX.Element}
+ */
+export default function TabPresenter({ active, label, onClick }) {
+ const classes = cx("hig__tabs__tab", {
+ "hig__tabs__tab--active": active
+ });
+
+ return (
+
+
+ {label}
+
+
+ );
+}
+
+TabPresenter.propTypes = {
+ active: PropTypes.bool,
+ label: PropTypes.string,
+ onClick: PropTypes.func
+};
diff --git a/packages/tabs/src/presenters/TabPresenter.scss b/packages/tabs/src/presenters/TabPresenter.scss
new file mode 100644
index 0000000000..ff731dfba5
--- /dev/null
+++ b/packages/tabs/src/presenters/TabPresenter.scss
@@ -0,0 +1,56 @@
+@import '~@hig/styles/mixins/colors.scss';
+@import '~@hig/styles/mixins/spacing.scss';
+@import '~@hig/styles/mixins/typography.scss';
+
+.hig__tabs__tab {
+ @include typography-large;
+ position: relative;
+ display: flex;
+ align-content: center;
+ justify-content: center;
+ padding: 0 spacing(s);
+ margin: 0;
+
+ border-top: 2px solid transparent;
+ cursor: pointer;
+
+ color: color(hig-gray-70);
+ user-select: none;
+ font-weight: 700;
+ text-align: center;
+
+ &:before {
+ position: absolute;
+ content: '';
+ top: 6px;
+ bottom: 8px;
+ left: 0;
+ border-left: 1px solid color(hig-cool-gray-20);
+ }
+
+ &:first-child {
+ padding-left: 0;
+ &:before {
+ border: none;
+ }
+ }
+
+ &:last-child {
+ padding-right: 0;
+ }
+}
+
+.hig__tabs__tab-label {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border-bottom: 2px solid transparent;
+}
+
+.hig__tabs__tab--active {
+ .hig__tabs__tab-label {
+ padding: spacing(xxs) 0;
+ color: color(hig-blue-50);
+ border-bottom-color: color(hig-blue-50);
+ }
+}
diff --git a/packages/tabs/src/presenters/TabPresenter.test.js b/packages/tabs/src/presenters/TabPresenter.test.js
new file mode 100644
index 0000000000..20920aff0f
--- /dev/null
+++ b/packages/tabs/src/presenters/TabPresenter.test.js
@@ -0,0 +1,30 @@
+import React from "react";
+import renderer from "react-test-renderer";
+
+import TabPresenter from "./TabPresenter";
+
+describe("tabs/TabPresenter", () => {
+ const cases = [
+ {
+ description: "renders without props",
+ props: {}
+ },
+ {
+ description: "renders with all props",
+ props: {
+ active: true,
+ label: "Hello World",
+ onClick: function handleClick() {}
+ }
+ }
+ ];
+
+ cases.forEach(({ description, props: { children, ...otherProps } }) => {
+ it(description, () => {
+ const wrapper =
{children} ;
+ const tree = renderer.create(wrapper).toJSON();
+
+ expect(tree).toMatchSnapshot();
+ });
+ });
+});
diff --git a/packages/tabs/src/presenters/TabsPresenter.js b/packages/tabs/src/presenters/TabsPresenter.js
new file mode 100644
index 0000000000..dad1c2d2f7
--- /dev/null
+++ b/packages/tabs/src/presenters/TabsPresenter.js
@@ -0,0 +1,28 @@
+import React from "react";
+import cx from "classnames";
+import PropTypes from "prop-types";
+
+import { alignments, AVAILABLE_ALIGNMENTS } from "../alignments";
+
+import "./TabsPresenter.scss";
+
+const modifiersByAlignment = {
+ [alignments.LEFT]: "hig__tabs--align-left",
+ [alignments.CENTER]: "hig__tabs--align-center",
+ [alignments.RIGHT]: "hig__tabs--align-right"
+};
+
+export default function TabsPresenter({ align, children }) {
+ const classes = cx("hig__tabs", modifiersByAlignment[align]);
+
+ return
;
+}
+
+TabsPresenter.propTypes = {
+ align: PropTypes.oneOf(AVAILABLE_ALIGNMENTS),
+ children: PropTypes.node
+};
+
+TabsPresenter.defaultProps = {
+ align: alignments.CENTER
+};
diff --git a/packages/tabs/src/presenters/TabsPresenter.scss b/packages/tabs/src/presenters/TabsPresenter.scss
new file mode 100644
index 0000000000..217c53ab64
--- /dev/null
+++ b/packages/tabs/src/presenters/TabsPresenter.scss
@@ -0,0 +1,22 @@
+@import '~@hig/styles/mixins/base.scss';
+@import '~@hig/styles/mixins/spacing.scss';
+
+.hig__tabs {
+ @include reset;
+ flex-grow: 1;
+ display: flex;
+ line-height: 16px;
+ padding: spacing(xxs) 0 spacing(xs) 0;
+ margin: 0;
+}
+
+.hig__tabs--align-center {
+ justify-content: center;
+}
+
+.hig__tabs--align-left {
+ justify-content: flex-start;
+}
+.hig__tabs--align-right {
+ justify-content: flex-end;
+}
diff --git a/packages/tabs/src/presenters/TabsPresenter.test.js b/packages/tabs/src/presenters/TabsPresenter.test.js
new file mode 100644
index 0000000000..86d7c66a14
--- /dev/null
+++ b/packages/tabs/src/presenters/TabsPresenter.test.js
@@ -0,0 +1,42 @@
+import React from "react";
+import renderer from "react-test-renderer";
+
+import TabsPresenter from "./TabsPresenter";
+import { alignments } from "../alignments";
+
+describe("tabs/TabsPresenter", () => {
+ const cases = [
+ {
+ description: "renders without props",
+ props: {}
+ },
+ {
+ description: "renders with all props",
+ props: {
+ align: alignments.CENTER,
+ children: "Hello World"
+ }
+ },
+ {
+ description: "renders aligned left",
+ props: {
+ align: alignments.LEFT
+ }
+ },
+ {
+ description: "renders aligned right",
+ props: {
+ align: alignments.RIGHT
+ }
+ }
+ ];
+
+ cases.forEach(({ description, props: { children, ...otherProps } }) => {
+ it(description, () => {
+ const wrapper =
{children} ;
+ const tree = renderer.create(wrapper).toJSON();
+
+ expect(tree).toMatchSnapshot();
+ });
+ });
+});
diff --git a/packages/tabs/src/presenters/__snapshots__/TabPresenter.test.js.snap b/packages/tabs/src/presenters/__snapshots__/TabPresenter.test.js.snap
new file mode 100644
index 0000000000..32bfd13935
--- /dev/null
+++ b/packages/tabs/src/presenters/__snapshots__/TabPresenter.test.js.snap
@@ -0,0 +1,29 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`tabs/TabPresenter renders with all props 1`] = `
+
+
+ Hello World
+
+
+`;
+
+exports[`tabs/TabPresenter renders without props 1`] = `
+
+
+
+`;
diff --git a/packages/tabs/src/presenters/__snapshots__/TabsPresenter.test.js.snap b/packages/tabs/src/presenters/__snapshots__/TabsPresenter.test.js.snap
new file mode 100644
index 0000000000..3ec1a3b310
--- /dev/null
+++ b/packages/tabs/src/presenters/__snapshots__/TabsPresenter.test.js.snap
@@ -0,0 +1,27 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`tabs/TabsPresenter renders aligned left 1`] = `
+
+`;
+
+exports[`tabs/TabsPresenter renders aligned right 1`] = `
+
+`;
+
+exports[`tabs/TabsPresenter renders with all props 1`] = `
+
+`;
+
+exports[`tabs/TabsPresenter renders without props 1`] = `
+
+`;
diff --git a/packages/tabs/src/tab.scss b/packages/tabs/src/tab.scss
deleted file mode 100644
index 87a7619c2f..0000000000
--- a/packages/tabs/src/tab.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import "~hig-react/lib/hig-react.css";
diff --git a/packages/tabs/src/tabs.scss b/packages/tabs/src/tabs.scss
deleted file mode 100644
index 87a7619c2f..0000000000
--- a/packages/tabs/src/tabs.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import "~hig-react/lib/hig-react.css";
diff --git a/packages/text-area/package.json b/packages/text-area/package.json
index 6cdee7e3b4..edcbaf0455 100644
--- a/packages/text-area/package.json
+++ b/packages/text-area/package.json
@@ -28,7 +28,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/text-field/package.json b/packages/text-field/package.json
index 09ab3b3484..8482de895f 100644
--- a/packages/text-field/package.json
+++ b/packages/text-field/package.json
@@ -30,7 +30,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/text-link/package.json b/packages/text-link/package.json
index debde9fabe..4c91491a0d 100644
--- a/packages/text-link/package.json
+++ b/packages/text-link/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/themes/package.json b/packages/themes/package.json
index 86a054bfcb..4f4357a733 100644
--- a/packages/themes/package.json
+++ b/packages/themes/package.json
@@ -24,7 +24,7 @@
"@hig/babel-preset": "^0.1.0",
"@hig/banner": "^0.1.2",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/timestamp/package.json b/packages/timestamp/package.json
index 2383193343..6dc1612779 100644
--- a/packages/timestamp/package.json
+++ b/packages/timestamp/package.json
@@ -25,7 +25,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1",
"mockdate": "^2.0.2"
diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json
index e3d0cf2242..a471633531 100644
--- a/packages/tooltip/package.json
+++ b/packages/tooltip/package.json
@@ -29,7 +29,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/top-nav/package.json b/packages/top-nav/package.json
index 4754459401..0586ae394b 100644
--- a/packages/top-nav/package.json
+++ b/packages/top-nav/package.json
@@ -20,7 +20,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/packages/typography/package.json b/packages/typography/package.json
index 8e27dd7ec1..9d51a42a19 100644
--- a/packages/typography/package.json
+++ b/packages/typography/package.json
@@ -25,7 +25,7 @@
"devDependencies": {
"@hig/babel-preset": "^0.1.0",
"@hig/eslint-config": "^0.1.0",
- "@hig/scripts": "^0.1.1",
+ "@hig/scripts": "^0.1.2",
"@hig/semantic-release-config": "^0.1.0",
"@hig/styles": "^0.1.1"
},
diff --git a/yarn.lock b/yarn.lock
index 0a310e8316..24c2a6b7b5 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -16,6 +16,15 @@
esutils "^2.0.2"
js-tokens "^3.0.0"
+"@hig/flyout@^0.1.1-alpha":
+ version "0.1.1-alpha"
+ resolved "https://registry.yarnpkg.com/@hig/flyout/-/flyout-0.1.1-alpha.tgz#2ee37a643118a3547d21e58d00ea20ae7e7714fa"
+ dependencies:
+ classnames "^2.2.5"
+ hig-react "^0.29.0"
+ prop-types "^15.6.1"
+ react-lifecycles-compat "^3.0.2"
+
"@hig/styles@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@hig/styles/-/styles-0.1.1.tgz#02e85ee888b46767072ee040c286d4f80ed92ef2"
@@ -32,6 +41,15 @@
react-lifecycles-compat "^3.0.2"
react-virtualized "^9.19.1"
+"@hig/tabs@^0.1.1-alpha":
+ version "0.1.1-alpha"
+ resolved "https://registry.yarnpkg.com/@hig/tabs/-/tabs-0.1.1-alpha.tgz#e92af8b4aebb0451a56b326ebd20c645a33833ef"
+ dependencies:
+ classnames "^2.2.5"
+ hig-react "^0.29.0"
+ prop-types "^15.6.1"
+ react-lifecycles-compat "^3.0.2"
+
"@hig/text-field@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@hig/text-field/-/text-field-0.1.1.tgz#ce7b7c3b655c77f069720b612d9a054da30e2295"
@@ -42,6 +60,16 @@
prop-types "^15.6.1"
react-lifecycles-compat "^3.0.2"
+"@hig/text-field@^0.2.0":
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/@hig/text-field/-/text-field-0.2.0.tgz#d34c031606a7fe6d51819555bce18097016d4b04"
+ dependencies:
+ "@hig/icon-button" "^0.1.1"
+ classnames "^2.2.5"
+ hig-react "^0.29.0"
+ prop-types "^15.6.1"
+ react-lifecycles-compat "^3.0.2"
+
"@mrmlnc/readdir-enhanced@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
@@ -614,6 +642,12 @@ amdefine@>=0.0.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+anchor-markdown-header@^0.5.5:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/anchor-markdown-header/-/anchor-markdown-header-0.5.7.tgz#045063d76e6a1f9cd327a57a0126aa0fdec371a7"
+ dependencies:
+ emoji-regex "~6.1.0"
+
ansi-align@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f"
@@ -864,6 +898,10 @@ asap@^2.0.0, asap@~2.0.3:
version "2.0.6"
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
+asap@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/asap/-/asap-1.0.0.tgz#b2a45da5fdfa20b0496fc3768cc27c12fa916a7d"
+
asn1.js@^4.0.0:
version "4.10.1"
resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0"
@@ -2109,6 +2147,10 @@ babylon@~5.8.3:
version "5.8.38"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-5.8.38.tgz#ec9b120b11bf6ccd4173a18bf217e60b79859ffd"
+bail@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.3.tgz#63cfb9ddbac829b02a3128cd53224be78e6c21a3"
+
balanced-match@^0.4.2:
version "0.4.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
@@ -2250,6 +2292,10 @@ bottleneck@^2.0.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.3.1.tgz#16292092ff040ccbf2d05d0a09d69eab7b1c46bc"
+boundary@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/boundary/-/boundary-1.0.1.tgz#4d67dc2602c0cc16dd9bce7ebf87e948290f5812"
+
bowser@^1.0.0, bowser@^1.7.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.9.3.tgz#6643ae4d783f31683f6d23156976b74183862162"
@@ -2672,6 +2718,10 @@ caseless@~0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.9.0.tgz#b7b65ce6bf1413886539cfd533f0b30effa9cf88"
+ccount@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.3.tgz#f1cec43f332e2ea5a569fd46f9f5bde4e6102aff"
+
center-align@^0.1.1:
version "0.1.3"
resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
@@ -2742,6 +2792,22 @@ change-case@^3.0.1:
upper-case "^1.1.1"
upper-case-first "^1.1.0"
+character-entities-html4@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.2.tgz#c44fdde3ce66b52e8d321d6c1bf46101f0150610"
+
+character-entities-legacy@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.2.tgz#7c6defb81648498222c9855309953d05f4d63a9c"
+
+character-entities@^1.0.0:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.2.tgz#58c8f371c0774ef0ba9b2aca5f00d8f100e6e363"
+
+character-reference-invalid@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.2.tgz#21e421ad3d84055952dab4a43a04e73cd425d3ed"
+
chardet@^0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
@@ -2953,6 +3019,10 @@ code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+collapse-white-space@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.4.tgz#ce05cf49e54c3277ae573036a26851ba430a0091"
+
collection-visit@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
@@ -3909,7 +3979,7 @@ dateformat@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
-debug@2, debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9:
+debug@2, debug@2.6.9, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
dependencies:
@@ -4163,6 +4233,17 @@ dns-txt@^2.0.2:
dependencies:
buffer-indexof "^1.0.0"
+doctoc@^1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/doctoc/-/doctoc-1.3.1.tgz#f012e3603e3156254c2ef22ac88c7190f55426ba"
+ dependencies:
+ anchor-markdown-header "^0.5.5"
+ htmlparser2 "~3.9.2"
+ markdown-to-ast "~3.4.0"
+ minimist "~1.2.0"
+ underscore "~1.8.3"
+ update-section "^0.3.0"
+
doctrine@1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
@@ -4283,6 +4364,10 @@ dotenv@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"
+downshift@^1.31.15:
+ version "1.31.15"
+ resolved "https://registry.yarnpkg.com/downshift/-/downshift-1.31.15.tgz#ac31c601e2e9e34c5bb85b969c11ba87248f5e67"
+
du@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/du/-/du-0.1.0.tgz#f26e340a09c7bc5b6fd69af6dbadea60fa8c6f4d"
@@ -4360,6 +4445,10 @@ emoji-regex@^6.1.0:
version "6.5.1"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2"
+emoji-regex@~6.1.0:
+ version "6.1.3"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.3.tgz#ec79a3969b02d2ecf2b72254279bf99bc7a83932"
+
emojis-list@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
@@ -5406,6 +5495,13 @@ find-versions@^2.0.0:
array-uniq "^1.0.0"
semver-regex "^1.0.0"
+find-yarn-workspace-root@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.1.0.tgz#9817b6748cb90719f4dc37b4538bb200c697356f"
+ dependencies:
+ fs-extra "^4.0.3"
+ micromatch "^3.1.4"
+
findup-sync@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc"
@@ -5556,7 +5652,7 @@ fs-extra@^0.30.0:
path-is-absolute "^1.0.0"
rimraf "^2.2.8"
-fs-extra@^4.0.1:
+fs-extra@^4.0.1, fs-extra@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
dependencies:
@@ -5788,6 +5884,13 @@ get-caller-file@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"
+get-monorepo-packages@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/get-monorepo-packages/-/get-monorepo-packages-1.0.1.tgz#05b707d2fd12f91e20cbaff7bfde3bc7e8e35d54"
+ dependencies:
+ globby "^7.1.1"
+ load-json-file "^4.0.0"
+
get-pkg-repo@^1.0.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d"
@@ -6034,6 +6137,17 @@ globby@^6.1.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"
+globby@^7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
+ dependencies:
+ array-union "^1.0.1"
+ dir-glob "^2.0.0"
+ glob "^7.1.2"
+ ignore "^3.3.5"
+ pify "^3.0.0"
+ slash "^1.0.0"
+
globby@^8.0.0:
version "8.0.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50"
@@ -6425,7 +6539,7 @@ htmlescape@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351"
-htmlparser2@^3.9.1:
+htmlparser2@^3.9.1, htmlparser2@~3.9.2:
version "3.9.2"
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338"
dependencies:
@@ -6830,6 +6944,17 @@ is-accessor-descriptor@^1.0.0:
dependencies:
kind-of "^6.0.0"
+is-alphabetical@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.2.tgz#1fa6e49213cb7885b75d15862fb3f3d96c884f41"
+
+is-alphanumerical@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.2.tgz#1138e9ae5040158dc6ff76b820acd6b7a181fd40"
+ dependencies:
+ is-alphabetical "^1.0.0"
+ is-decimal "^1.0.0"
+
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
@@ -6850,7 +6975,7 @@ is-builtin-module@^1.0.0:
dependencies:
builtin-modules "^1.0.0"
-is-callable@^1.1.1, is-callable@^1.1.3:
+is-callable@^1.1.0, is-callable@^1.1.1, is-callable@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
@@ -6876,6 +7001,10 @@ is-date-object@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
+is-decimal@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.2.tgz#894662d6a8709d307f3a276ca4339c8fa5dff0ff"
+
is-descriptor@^0.1.0:
version "0.1.6"
resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
@@ -6970,6 +7099,10 @@ is-glob@^4.0.0:
dependencies:
is-extglob "^2.1.1"
+is-hexadecimal@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.2.tgz#b6e710d7d07bb66b98cb8cece5c9b4921deeb835"
+
is-installed-globally@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80"
@@ -7181,6 +7314,10 @@ is-wsl@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
+is@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/is/-/is-3.2.1.tgz#d0ac2ad55eb7b0bec926a5266f6c662aaa83dca5"
+
isarray@0.0.1, isarray@~0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
@@ -7850,6 +7987,16 @@ jsesc@~0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
+json-file-plus@^3.3.1:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/json-file-plus/-/json-file-plus-3.3.1.tgz#f4363806b82819ff8803d83d539d6a9edd2a5258"
+ dependencies:
+ is "^3.2.1"
+ node.extend "^2.0.0"
+ object.assign "^4.1.0"
+ promiseback "^2.0.2"
+ safer-buffer "^2.0.2"
+
json-loader@^0.5.4, json-loader@^0.5.7:
version "0.5.7"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d"
@@ -8398,6 +8545,10 @@ loglevel@^1.4.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa"
+longest-streak@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-1.0.0.tgz#d06597c4d4c31b52ccb1f5d8f8fe7148eafd6965"
+
longest@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
@@ -8510,6 +8661,19 @@ markdown-loader@^2.0.2:
loader-utils "^1.1.0"
marked "^0.3.9"
+markdown-table@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-0.4.0.tgz#890c2c1b3bfe83fb00e4129b8e4cfe645270f9d1"
+
+markdown-to-ast@~3.4.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/markdown-to-ast/-/markdown-to-ast-3.4.0.tgz#0e2cba81390b0549a9153ec3b0d915b61c164be7"
+ dependencies:
+ debug "^2.1.3"
+ remark "^5.0.1"
+ structured-source "^3.0.2"
+ traverse "^0.6.6"
+
marked-terminal@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-3.0.0.tgz#01758f657977a0e72ebd2a339f8ac100c1d04240"
@@ -8793,7 +8957,7 @@ minimist@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de"
-minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0:
+minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
@@ -9182,6 +9346,12 @@ node-uuid@~1.4.0:
version "1.4.8"
resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907"
+node.extend@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-2.0.0.tgz#7525a2875677ea534784a5e10ac78956139614df"
+ dependencies:
+ is "^3.2.1"
+
"nopt@2 || 3":
version "3.0.6"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
@@ -9310,7 +9480,7 @@ object-visit@^1.0.0:
dependencies:
isobject "^3.0.0"
-object.assign@^4.0.4:
+object.assign@^4.0.4, object.assign@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
dependencies:
@@ -9543,6 +9713,12 @@ p-limit@^1.2.0:
dependencies:
p-try "^1.0.0"
+p-limit@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec"
+ dependencies:
+ p-try "^2.0.0"
+
p-locate@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
@@ -9567,6 +9743,10 @@ p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
+p-try@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1"
+
package-json@^4.0.0, package-json@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed"
@@ -9624,6 +9804,17 @@ parse-domain@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/parse-domain/-/parse-domain-2.0.0.tgz#e9f42f697c30f7c2051dc5c55ff4d8a80da7943c"
+parse-entities@^1.0.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.1.2.tgz#9eaf719b29dc3bd62246b4332009072e01527777"
+ dependencies:
+ character-entities "^1.0.0"
+ character-entities-legacy "^1.0.0"
+ character-reference-invalid "^1.0.0"
+ is-alphanumerical "^1.0.0"
+ is-decimal "^1.0.0"
+ is-hexadecimal "^1.0.0"
+
parse-filepath@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891"
@@ -10389,6 +10580,12 @@ progress@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
+promise-deferred@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/promise-deferred/-/promise-deferred-2.0.1.tgz#b05398f1a43f6d87be0c97c52040046e83eb5454"
+ dependencies:
+ promise "~6.1.0"
+
promise-inflight@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
@@ -10417,6 +10614,19 @@ promise@^7.1.1:
dependencies:
asap "~2.0.3"
+promise@~6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/promise/-/promise-6.1.0.tgz#2ce729f6b94b45c26891ad0602c5c90e04c6eef6"
+ dependencies:
+ asap "~1.0.0"
+
+promiseback@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/promiseback/-/promiseback-2.0.2.tgz#424af89a43de0c6a8997bf3cb2d8139447fb3b97"
+ dependencies:
+ is-callable "^1.1.0"
+ promise-deferred "^2.0.1"
+
prompt@~0.2.14:
version "0.2.14"
resolved "https://registry.yarnpkg.com/prompt/-/prompt-0.2.14.tgz#57754f64f543fd7b0845707c818ece618f05ffdc"
@@ -11314,10 +11524,49 @@ relateurl@0.2.x:
version "0.2.7"
resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
+remark-parse@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-1.1.0.tgz#c3ca10f9a8da04615c28f09aa4e304510526ec21"
+ dependencies:
+ collapse-white-space "^1.0.0"
+ extend "^3.0.0"
+ parse-entities "^1.0.2"
+ repeat-string "^1.5.4"
+ trim "0.0.1"
+ trim-trailing-lines "^1.0.0"
+ unherit "^1.0.4"
+ unist-util-remove-position "^1.0.0"
+ vfile-location "^2.0.0"
+
+remark-stringify@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/remark-stringify/-/remark-stringify-1.1.0.tgz#a7105e25b9ee2bf9a49b75d2c423f11b06ae2092"
+ dependencies:
+ ccount "^1.0.0"
+ extend "^3.0.0"
+ longest-streak "^1.0.0"
+ markdown-table "^0.4.0"
+ parse-entities "^1.0.2"
+ repeat-string "^1.5.4"
+ stringify-entities "^1.0.1"
+ unherit "^1.0.4"
+
+remark@^5.0.1:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/remark/-/remark-5.1.0.tgz#cb463bd3dbcb4b99794935eee1cf71d7a8e3068c"
+ dependencies:
+ remark-parse "^1.1.0"
+ remark-stringify "^1.1.0"
+ unified "^4.1.1"
+
remove-trailing-separator@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
+render-fragment@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/render-fragment/-/render-fragment-0.1.1.tgz#b231f259b7eee333d34256aee0ef3169be7bef30"
+
renderkid@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319"
@@ -11332,7 +11581,7 @@ repeat-element@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
-repeat-string@^1.5.2, repeat-string@^1.6.1:
+repeat-string@^1.5.2, repeat-string@^1.5.4, repeat-string@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
@@ -11737,6 +11986,10 @@ safe-regex@^1.1.0:
dependencies:
ret "~0.1.10"
+safer-buffer@^2.0.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+
sane@^2.0.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.0.tgz#6359cd676f5efd9988b264d8ce3b827dd6b27bec"
@@ -11890,6 +12143,10 @@ semver-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9"
+semver-utils@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/semver-utils/-/semver-utils-1.1.2.tgz#197d758a0a28c3d3a009338cfbcc1211bccd76d4"
+
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.4.1:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
@@ -12482,6 +12739,15 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"
+stringify-entities@^1.0.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-1.3.2.tgz#a98417e5471fd227b3e45d3db1861c11caf668f7"
+ dependencies:
+ character-entities-html4 "^1.0.0"
+ character-entities-legacy "^1.0.0"
+ is-alphanumerical "^1.0.0"
+ is-hexadecimal "^1.0.0"
+
stringstream@~0.0.4, stringstream@~0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
@@ -12546,6 +12812,12 @@ strong-log-transformer@^1.0.6:
moment "^2.6.0"
through "^2.3.4"
+structured-source@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/structured-source/-/structured-source-3.0.2.tgz#dd802425e0f53dc4a6e7aca3752901a1ccda7af5"
+ dependencies:
+ boundary "^1.0.1"
+
style-inject@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3"
@@ -13021,7 +13293,7 @@ tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
-traverse@~0.6.6:
+traverse@^0.6.6, traverse@~0.6.6:
version "0.6.6"
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
@@ -13045,6 +13317,18 @@ trim-right@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
+trim-trailing-lines@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.1.tgz#e0ec0810fd3c3f1730516b45f49083caaf2774d9"
+
+trim@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd"
+
+trough@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.2.tgz#7f1663ec55c480139e2de5e486c6aef6cc24a535"
+
"true-case-path@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.2.tgz#7ec91130924766c7f573be3020c34f8fdfd00d62"
@@ -13184,10 +13468,28 @@ underscore.string@~3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.0.3.tgz#4617b8c1a250cf6e5064fbbb363d0fa96cf14552"
-underscore@^1.8.3:
+underscore@^1.8.3, underscore@~1.8.3:
version "1.8.3"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
+unherit@^1.0.4:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.1.tgz#132748da3e88eab767e08fabfbb89c5e9d28628c"
+ dependencies:
+ inherits "^2.0.1"
+ xtend "^4.0.1"
+
+unified@^4.1.1:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/unified/-/unified-4.2.1.tgz#76ff43aa8da430f6e7e4a55c84ebac2ad2cfcd2e"
+ dependencies:
+ bail "^1.0.0"
+ extend "^3.0.0"
+ has "^1.0.1"
+ once "^1.3.3"
+ trough "^1.0.0"
+ vfile "^1.0.0"
+
union-value@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
@@ -13235,6 +13537,22 @@ unique-string@^1.0.0:
dependencies:
crypto-random-string "^1.0.0"
+unist-util-is@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.2.tgz#1193fa8f2bfbbb82150633f3a8d2eb9a1c1d55db"
+
+unist-util-remove-position@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.2.tgz#86b5dad104d0bbfbeb1db5f5c92f3570575c12cb"
+ dependencies:
+ unist-util-visit "^1.1.0"
+
+unist-util-visit@^1.1.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.3.1.tgz#c019ac9337a62486be58531bc27e7499ae7d55c7"
+ dependencies:
+ unist-util-is "^2.1.1"
+
universalify@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
@@ -13276,6 +13594,23 @@ update-notifier@^2.3.0:
semver-diff "^2.0.0"
xdg-basedir "^3.0.0"
+update-section@^0.3.0:
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/update-section/-/update-section-0.3.3.tgz#458f17820d37820dc60e20b86d94391b00123158"
+
+upgrade-dependents@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/upgrade-dependents/-/upgrade-dependents-1.0.0.tgz#671622ad676acf042f109427a4e983dc8f25b0f1"
+ dependencies:
+ find-yarn-workspace-root "^1.1.0"
+ get-monorepo-packages "^1.0.1"
+ json-file-plus "^3.3.1"
+ p-limit "^2.0.0"
+ read-pkg "^3.0.0"
+ semver "^5.5.0"
+ semver-utils "^1.1.2"
+ yargs "^11.0.0"
+
upper-case-first@^1.1.0, upper-case-first@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115"
@@ -13473,6 +13808,14 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"
+vfile-location@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-2.0.3.tgz#083ba80e50968e8d420be49dd1ea9a992131df77"
+
+vfile@^1.0.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/vfile/-/vfile-1.4.0.tgz#c0fd6fa484f8debdb771f68c31ed75d88da97fe7"
+
vlq@^0.2.2:
version "0.2.3"
resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"