Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

downshift

Package Overview
Dependencies
Maintainers
1
Versions
354
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

downshift - npm Package Compare versions

Comparing version 1.0.0-beta.12 to 1.0.0-beta.13

dist/downshift.cjs.js

27

package.json
{
"name": "downshift",
"version": "1.0.0-beta.12",
"version": "1.0.0-beta.13",
"description": "A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete components",
"main": "dist/index.js",
"engines": {
"node": "> 4",
"npm": "> 3"
},
"main": "dist/downshift.cjs.js",
"jsnext:main": "dist/downshift.es.js",
"module": "dist/downshift.es.js",
"scripts": {

@@ -17,5 +15,3 @@ "start": "nps",

},
"files": [
"dist"
],
"files": ["dist"],
"keywords": [],

@@ -33,4 +29,7 @@ "author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",

"babel-jest": "^20.0.3",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-inline-environment-variables": "^0.1.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-preset-env": "^1.6.0",

@@ -49,2 +48,3 @@ "babel-preset-react": "^6.24.1",

"opt-cli": "^1.5.1",
"preact": "^8.2.1",
"prettier-eslint-cli": "^4.1.1",

@@ -54,3 +54,10 @@ "prop-types": "^15.5.10",

"react-dom": "^15.6.1",
"react-test-renderer": "^15.6.1"
"react-test-renderer": "^15.6.1",
"rollup": "^0.45.2",
"rollup-plugin-alias": "^1.3.1",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-commonjs": "^8.1.0",
"rollup-plugin-json": "^2.3.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^2.0.1"
},

@@ -57,0 +64,0 @@ "lint-staged": {

@@ -38,3 +38,4 @@ <h1 align="center">

which effectively gives you maximum flexibility with a minimal API because you
are responsible for the rendering of the autocomplete components.
are responsible for the rendering of everything and you simply apply props to
what you're rendering.

@@ -60,5 +61,9 @@ This differs from other solutions which render things for their use case and

> This package also depends on `react` and `prop-types`. Please make sure you have
> those installed as well.
> This package also depends on `react` and `prop-types`. Please make sure you
> have those installed as well.
> Note also this library supports `preact` out of the box. If you are using
> `preact` then look in the `dist/` folder and use the module you want with the
> `preact` suffix.
## Usage

@@ -69,7 +74,7 @@

```jsx
import Autocomplete from 'downshift'
import Downshift from 'downshift'
function BasicAutocomplete({items, onChange}) {
return (
<Autocomplete onChange={onChange}>
<Downshift onChange={onChange}>
{({

@@ -110,3 +115,3 @@ getInputProps,

)}
</Autocomplete>
</Downshift>
)

@@ -127,3 +132,3 @@ }

### Autocomplete
### Downshift

@@ -149,3 +154,3 @@ This is the only component. It doesn't render anything itself, it just calls

This is the initial index to highlight when the autocomplete first opens.
This is the initial index to highlight when the menu first opens.

@@ -220,3 +225,3 @@ #### multiple

Whether the menu should be considered open or closed. Some aspects of the
autocomplete component respond differently based on this value (for example, if
downshift component respond differently based on this value (for example, if
`isOpen` is true when the user hits "Enter" on the input field, then the

@@ -269,3 +274,3 @@ item at the `highlightedIndex` item is selected).

Most of the time, you can just render a `div` yourself and `Autocompletely` will
Most of the time, you can just render a `div` yourself and `Downshift` will
apply the props it needs to do its job (and you don't need to call this

@@ -272,0 +277,0 @@ function). However, if you're rendering a composite component (custom component)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc