diff --git a/.changeset/few-bugs-promise.md b/.changeset/few-bugs-promise.md new file mode 100644 index 0000000000..57bbff1794 --- /dev/null +++ b/.changeset/few-bugs-promise.md @@ -0,0 +1,5 @@ +--- +'@leafygreen-ui/select': major +--- + +Initial release of Select component diff --git a/.changeset/wet-hotels-listen.md b/.changeset/wet-hotels-listen.md new file mode 100644 index 0000000000..c1cb1b23c3 --- /dev/null +++ b/.changeset/wet-hotels-listen.md @@ -0,0 +1,7 @@ +--- +'@leafygreen-ui/button': minor +--- + +- The default outline shown by the browser is no longer shown when a button is focused. Instead, a custom interaction ring will be displayed that conforms to LeafyGreen-UI style guidelines whenever the button is hovered or focused. +- Button now has a `darkMode` prop which for now only controls the interaction ring color. +- Button now has a `focused` prop which can be used to force the button to display as focused or unfocused. diff --git a/README.md b/README.md index c41d3d2c3c..6f622e1e0b 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ A set of CSS styles and React components built with design in mind. - [Portal](https://github.com/mongodb/leafygreen-ui/tree/master/packages/portal) - [Radio Box Group](https://github.com/mongodb/leafygreen-ui/tree/master/packages/radio-box-group) - [Radio Group](https://github.com/mongodb/leafygreen-ui/tree/master/packages/radio-group) +- [Select](https://github.com/mongodb/leafygreen-ui/tree/master/packages/select) - [Side Nav](https://github.com/mongodb/leafygreen-ui/tree/master/packages/side-nav) - [Stepper](https://github.com/mongodb/leafygreen-ui/tree/master/packages/stepper) - [Syntax](https://github.com/mongodb/leafygreen-ui/tree/master/packages/syntax) diff --git a/babel.config.js b/babel.config.js index f070543bf1..6970b6d894 100644 --- a/babel.config.js +++ b/babel.config.js @@ -21,6 +21,7 @@ module.exports = function (api) { '@babel/plugin-proposal-export-default-from', '@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-nullish-coalescing-operator', + '@babel/plugin-proposal-logical-assignment-operators', 'emotion', ]; diff --git a/build.tsconfig.json b/build.tsconfig.json index b0bdd2f18e..9693952e61 100644 --- a/build.tsconfig.json +++ b/build.tsconfig.json @@ -86,6 +86,9 @@ { "path": "./packages/radio-group" }, + { + "path": "./packages/select" + }, { "path": "./packages/side-nav" }, diff --git a/package.json b/package.json index d6933d124b..fc3505f159 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "@babel/plugin-proposal-class-properties": "7.8.3", "@babel/plugin-proposal-export-default-from": "7.8.3", "@babel/plugin-proposal-nullish-coalescing-operator": "7.8.3", + "@babel/plugin-proposal-logical-assignment-operators": "7.12.1", "@babel/plugin-proposal-object-rest-spread": "7.9.5", "@babel/plugin-proposal-optional-chaining": "7.9.0", "@babel/plugin-transform-react-jsx": "^7.9.4", diff --git a/packages/select/README.md b/packages/select/README.md new file mode 100644 index 0000000000..5f29ae3e7c --- /dev/null +++ b/packages/select/README.md @@ -0,0 +1,133 @@ +# Select + +![npm (scoped)](https://img.shields.io/npm/v/@leafygreen-ui/select.svg) + +#### [View on Storybook](https://mongodb.github.io/leafygreen-ui/?path=/story/select--default) + +## Installation + +### Yarn + +```shell +yarn add @leafygreen-ui/select +``` + +### NPM + +```shell +npm install @leafygreen-ui/select +``` + +## Example + +```js +import { Option, OptionGroup, Select, Size } from '@leafygreen-ui/select'; + +; +``` + +**Output HTML** + +```html +
+ +
Description
+ +
+``` + +## Select Properties + +| Prop | Type | Description | Default | +| ----------- | --------------------------------------------------- | ----------------------------------------------------------------- | ----------- | +| `children` | `node` | `