select-pure
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "select-pure", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Pure JavaScript select component.", | ||
@@ -81,3 +81,3 @@ "author": { | ||
"babel-preset-latest": "^6.24.1", | ||
"codecov": "^3.0.1", | ||
"codecov": "3.6.5", | ||
"commitizen": "4.0.3", | ||
@@ -84,0 +84,0 @@ "cz-conventional-changelog": "3.0.2", |
# SelectPure JavaScript component | ||
[![npm version](https://img.shields.io/npm/v/select-pure.svg)](https://www.npmjs.com/package/select-pure) | ||
[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/select-pure.svg)](https://www.npmjs.com/package/select-pure) | ||
[![gzip size](http://img.badgesize.io/https://unpkg.com/select-pure/dist/bundle.min.js?compression=gzip&label=gzip)](https://unpkg.com/select-pure/dist/bundle.min.js) | ||
[![brotli size](http://img.badgesize.io/https://unpkg.com/select-pure/dist/bundle.min.js?compression=brotli&label=brotli)](https://unpkg.com/select-pure/dist/bundle.min.js) | ||
[![npm](https://img.shields.io/npm/dt/select-pure.svg)](https://www.npmjs.com/package/select-pure) | ||
@@ -43,7 +44,4 @@ [![Build Status](https://travis-ci.org/dudyn5ky1/select-pure.svg?branch=master)](https://travis-ci.org/dudyn5ky1/select-pure) | ||
| --- | --- | --- | --- | | ||
| options | true | Array | Collection of options to be rendered. Each `option` consists of `value`, `label` and optional property `disabled`. | | ||
| options[].value | true | String | Value of an option. | | ||
| options[].label | true | String | Label of an option. | | ||
| classNames | false | Object | Object with custom classNames to be used inside select. In the next major version default classNames will be removed and this property will become required. | | ||
| options[].disabled | false | Boolean | `true` if option is disabled. `false` by default. | | ||
| [option](#option) | true | Array | Collection of options to be rendered. Each `option` consists of `value`, `label` and optional property `disabled`. Properties for the single option object are listed below. | | ||
| [classNames](#classNames) | false | Object | Object with custom classNames to be used inside select. In the next major version default classNames will be removed and this property will become required. | | ||
| multiple | false | Boolean | `true` if multiple options can be selected. | | ||
@@ -53,6 +51,16 @@ | autocomplete | false | Boolean | Adds autocomplete input. Disabled by default. | | ||
| inlineIcon | false | HMTLElement | Custom cross icon for multiple select. | | ||
| onChange | false | Function | Return value on select. Return `Array` if `multiple` is `true`. | | ||
| value | false | String \| Array | Initially selected value. If not provided - first option will be selected. If `multiple` is `true` -- `Array` should be provided. | | ||
| placeholder | false | String | Placeholder for cases when value is not selected by default. | | ||
| onChange | false | Function | Callback that returns value when option is being selected. Returns `Array` if `multiple` is `true`. | | ||
#### option | ||
Properties of a single option passed to the options Array in configuration. | ||
| Property | Required | Type | Description | | ||
| --- | --- | --- | --- | | ||
| value | true | String | Value of an option. | | ||
| label | true | String | Label of an option. | | ||
| disabled | false | Boolean | `true` if option is disabled. `false` by default. | | ||
#### classNames | ||
@@ -62,3 +70,3 @@ | ||
| Property | Required | Description | | ||
| Property | Default value | Description | | ||
| --- | --- | --- | | ||
@@ -95,5 +103,6 @@ | select | "select-pure__select" | Wrapper div. | | ||
- [ ] Callback for updating select | ||
- [ ] React wrapper | ||
- [ ] Angular wrapper | ||
- [ ] API method for updating select. | ||
- [ ] Mobile select support. | ||
- [ ] Drop support of default classNames (starting from 1.x.x versions). | ||
- [ ] Drop support of default icon, support only inline SVG instead. (starting from 1.x.x versions). | ||
@@ -100,0 +109,0 @@ ## License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50902
108