{"name":"rc-select","version":"7.3.2","keywords":["react","react-component","react-select","select"],"_id":"rc-select@7.3.2","maintainers":[{"name":"afc163","email":"afc163@gmail.com"},{"name":"warmhug","email":"hualei5280@gmail.com"},{"name":"yesmeck","email":"yesmeck@gmail.com"},{"name":"yiminghe","email":"yiminghe@gmail.com"}],"homepage":"http://github.com/react-component/select","bugs":{"url":"http://github.com/react-component/select/issues"},"dist":{"shasum":"d49cb61b1e7fe0c81fb938fc345cd9989b0ff89d","tarball":"http://registry-npm.ywwl.com/rc-select/download/rc-select-7.3.2.tgz","integrity":"sha512-sFmFbf9odzf8BEYlFTvzRqCMqIzTj5FS+9fBMLCam8j6Wcgg+z6ZA5nTBFF7WSUyP6Br52DYnmSbHtG1TxE0KA==","signatures":[{"sig":"MEUCIFUfcRFJ/+b/ie3wj8V3zj9KJgmMU9LQGsZJ2qM+YzobAiEAqoQ7E47r+CA4+psLTOQQga+pjZQWgSOWCK9a1WTyvjs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":31844,"noattachment":false,"key":"/rc-select/-/rc-select-7.3.2.tgz"},"jest":{"transform":{"\\.jsx?$":"./node_modules/rc-tools/scripts/jestPreprocessor.js"},"setupFiles":["./tests/setup.js"],"collectCoverageFrom":["src/**/*"],"snapshotSerializers":["enzyme-to-json/serializer"]},"main":"./lib/index","files":["assets/*.css","es","lib"],"config":{"port":8003},"module":"./es/index","gitHead":"9a16773e8e3fe746a5c5cd9379df8adaa5fa0be3","scripts":{"pub":"rc-tools run pub --babel-runtime","lint":"rc-tools run lint","test":"jest","build":"rc-tools run build","start":"rc-tools run server","compile":"rc-tools run compile --babel-runtime","coverage":"jest --coverage","gh-pages":"rc-tools run gh-pages","lint:fix":"rc-tools run lint --fix","prepublish":"rc-tools run guard"},"_npmUser":{"name":"yesmeck","email":"yesmeck@gmail.com"},"licenses":"MIT","pre-commit":["lint"],"repository":{"url":"git+ssh://git@github.com/react-component/select.git","type":"git"},"_npmVersion":"5.5.1","description":"React Select","directories":{},"_nodeVersion":"9.0.0","dependencies":{"rc-menu":"^6.1.0","rc-util":"^4.0.4","warning":"^3.0.0","classnames":"2.x","prop-types":"^15.5.8","rc-animate":"2.x","rc-trigger":"^2.2.0","babel-runtime":"^6.23.0","component-classes":"1.x","dom-scroll-into-view":"1.x"},"devDependencies":{"jest":"^21.2.1","jsonp":"^0.2.0","react":"^16.0.0","enzyme":"^3.1.0","rc-tools":"7.x","rc-dialog":"6.x","react-dom":"^16.0.0","pre-commit":"1.x","querystring":"^0.2.0","enzyme-to-json":"^3.1.4","react-test-renderer":"^16.0.0","enzyme-adapter-react-16":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/rc-select-7.3.2.tgz_1511775637935_0.729798304149881","host":"s3://npm-registry-packages"},"readme":"# rc-select\n\n---\n\nReact Select\n\n<!-- prettier-ignore -->\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-select.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-select\n[travis-image]: https://img.shields.io/travis/react-component/select/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/select\n[github-actions-image]: https://github.com/react-component/select/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/select/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/select/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/select\n[david-url]: https://david-dm.org/react-component/select\n[david-image]: https://david-dm.org/react-component/select/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/select?type=dev\n[david-dev-image]: https://david-dm.org/react-component/select/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-select.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-select\n[bundlephobia-url]: https://bundlephobia.com/package/rc-select\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-select\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Screenshots\n\n<img src=\"https://gw.alipayobjects.com/zos/antfincdn/d13eUZlgdJ/tupian.png\" />\n\n## Feature\n\n- support IE11+,Chrome,Firefox,Safari\n\n### Keyboard\n\n- Open select (focus input || focus and click)\n- KeyDown/KeyUp/Enter to navigate menu\n\n## install\n\n[![rc-select](https://nodei.co/npm/rc-select.png)](https://npmjs.org/package/rc-select)\n\n## Usage\n\n### basic use\n\n```jsx | pure\nimport Select, { Option } from 'rc-select';\nimport 'rc-select/assets/index.css';\n\nexport default () => (\n  <Select>\n    <Option value=\"jack\">jack</Option>\n    <Option value=\"lucy\">lucy</Option>\n    <Option value=\"yiminghe\">yiminghe</Option>\n  </Select>\n);\n```\n\n## API\n\n### Select props\n\n<!-- prettier-ignore -->\n| name | description | type | default |\n| --- | --- | --- | --- |\n| id | html id to set on the component wrapper | String | '' |\n| className | additional css class of root dom node | String | '' |\n| data-\\* | html data attributes to set on the component wrapper | String | '' |\n| prefixCls | prefix class | String | '' |\n| animation | dropdown animation name. only support slide-up now | String | '' |\n| transitionName | dropdown css animation name | String | '' |\n| choiceTransitionName | css animation name for selected items at multiple mode | String | '' |\n| dropdownMatchSelectWidth | whether dropdown's width is same with select | boolean | true |\n| dropdownClassName | additional className applied to dropdown | String | - |\n| dropdownStyle | additional style applied to dropdown | React.CSSProperties | {} |\n| dropdownAlign | additional align applied to dropdown | [AlignType](https://github.com/react-component/trigger/blob/728d7e92394aa4b3214650f743fc47e1382dfa68/src/interface.ts#L25-L80) | {} |\n| dropdownMenuStyle | additional style applied to dropdown menu | Object | React.CSSProperties |\n| notFoundContent | specify content to show when no result matches. | ReactNode | 'Not Found' |\n| tokenSeparators | separator used to tokenize on tag/multiple mode | string[]? |  |\n| open | control select open | boolean |  |\n| defaultOpen | control select default open | boolean |  |\n| placeholder | select placeholder | React Node |  |\n| showSearch | whether show search input in single mode | boolean | true |\n| allowClear | whether allowClear | boolean | { clearIcon?: ReactNode } | false |\n| tags | when tagging is enabled the user can select from pre-existing options or create a new tag by picking the first choice, which is what the user has typed into the search box so far. | boolean | false |\n| tagRender | render custom tags. | (props: CustomTagProps) => ReactNode | - |\n| maxTagTextLength | max tag text length to show | number | - |\n| maxTagCount | max tag count to show | number | - |\n| maxTagPlaceholder | placeholder for omitted values | ReactNode/function(omittedValues) | - |\n| combobox | enable combobox mode(can not set multiple at the same time) | boolean | false |\n| multiple | whether multiple select | boolean | false |\n| disabled | whether disabled select | boolean | false |\n| filterOption | whether filter options by input value. default filter by option's optionFilterProp prop's value | boolean | true/Function(inputValue:string, option:Option) |\n| optionFilterProp | which prop value of option will be used for filter if filterOption is true | String | 'value' |\n| filterSort | Sort function for search options sorting, see [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)'s compareFunction. | Function(optionA:Option, optionB: Option) | - |\n| optionLabelProp | render option value or option children as content of select | String: 'value'/'children' | 'value' |\n| defaultValue | initial selected option(s) | String \\| String[] | - |\n| value | current selected option(s) | String \\| String[] \\| {key:String, label:React.Node} \\| {key:String, label:React.Node}[] | - |\n| labelInValue | whether to embed label in value, see above value type. Not support `combobox` mode | boolean | false |\n| backfill | whether backfill select option to search input (Only works in single and combobox mode) | boolean | false |\n| onChange | called when select an option or input value change(combobox) | function(value, option:Option \\| Option[]) | - |\n| onSearch | called when input changed | function | - |\n| onBlur | called when blur | function | - |\n| onFocus | called when focus | function | - |\n| onPopupScroll | called when menu is scrolled | function | - |\n| onSelect | called when a option is selected. param is option's value and option instance | Function(value, option:Option) | - |\n| onDeselect | called when a option is deselected. param is option's value. only called for multiple or tags | Function(value, option:Option) | - |\n| onInputKeyDown | called when key down on input | Function(event) | - |\n| defaultActiveFirstOption | whether active first option by default | boolean | true |\n| getPopupContainer | container which popup select menu rendered into | function(trigger:Node):Node | function(){return document.body;} |\n| getInputElement | customize input element | function(): Element | - |\n| showAction | actions trigger the dropdown to show | String[]? | - |\n| autoFocus | focus select after mount | boolean | - |\n| autoClearSearchValue | auto clear search input value when multiple select is selected/deselected | boolean | true |\n| suffixIcon | specify the select arrow icon | ReactNode | - |\n| clearIcon | specify the clear icon | ReactNode | - |\n| removeIcon | specify the remove icon | ReactNode | - |\n| menuItemSelectedIcon | specify the item selected icon | ReactNode \\| (props: MenuItemProps) => ReactNode | - |\n| dropdownRender | render custom dropdown menu | (menu: React.Node) => ReactNode | - |\n| loading | show loading icon in arrow | boolean | false |\n| virtual | Disable virtual scroll | boolean | true |\n| direction | direction of dropdown | 'ltr' \\| 'rtl' | 'ltr' |\n| optionRender | Custom rendering options | (oriOption: FlattenOptionData\\<BaseOptionType\\> , info: { index: number }) => React.ReactNode | - |\n| labelRender  | Custom rendering label   |  (props: LabelInValueType) => React.ReactNode   | - |\n| maxCount | The max number of items can be selected | number | - |\n\n### Methods\n\n| name  | description               | parameters | return |\n| ----- | ------------------------- | ---------- | ------ |\n| focus | focus select programmably | -          | -      |\n| blur  | blur select programmably  | -          | -      |\n\n### Option props\n\n| name | description | type | default |\n| --- | --- | --- | --- |\n| className | additional class to option | String | '' |\n| disabled | no effect for click or keydown for this item | boolean | false |\n| key | if react want you to set key, then key is same as value, you can omit value | String/number | - |\n| value | default filter by this attribute. if react want you to set key, then key is same as value, you can omit value | String/number | - |\n| title | if you are not satisfied with auto-generated `title` which is show while hovering on selected value, you can customize it with this property | String | - |\n\n### OptGroup props\n\n| name | description | type | default |\n| --- | --- | --- | --- |\n| label | group label | String/React.Element | - |\n| key | - | String | - |\n| value | default filter by this attribute. if react want you to set key, then key is same as value, you can omit value | String | - |\n| className | same as `Option props` | String | '' |\n| title | same as `Option props`| String | - |\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nlocal example: http://localhost:9001/\n\nonline example: http://select.react-component.now.sh/\n\n## Test Case\n\n```\nnpm test\n```\n\n## Coverage\n\n```\nnpm run coverage\n```\n\n## License\n\nrc-select is released under the MIT license.\n","publish_time":1511775638084,"_cnpm_publish_time":1511775638084,"dist-tags":{"beta":"8.6.7-alpha.0","latest":"14.16.8"}}