{"name":"rc-input-number","version":"9.4.0","keywords":["react","react-component","react-input-number","input-number"],"author":{"name":"tsjxyz@gmail.com"},"license":"MIT","_id":"rc-input-number@9.4.0","maintainers":[{"name":"silentcloud","email":"rjmuqiang@gmail.com"},{"name":"yesmeck","email":"yesmeck@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"yiminghe","email":"yiminghe@gmail.com"},{"name":"tsj1107","email":"tsjxyz@gmail.com"},{"name":"paranoidjk","email":"hust2012jiangkai@gmail.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"madccc","email":"1075746765@qq.com"}],"homepage":"https://github.com/react-component/input-number","bugs":{"url":"https://github.com/react-component/input-number/issues"},"dist":{"shasum":"65caf04f1b6d05f47e141b1f5f484724c1f7fd5a","tarball":"http://registry-npm.ywwl.com/rc-input-number/download/rc-input-number-9.4.0.tgz","fileCount":28,"integrity":"sha512-Tiy4DcXcFXAf9wDhN8aUAyMeCLHJUHA/VA/t7Hj8ZEx5ETvxG7MArDOSE6psbiSCo+vJPm4E3fGN710ITVn6GA==","signatures":[{"sig":"MEQCIGBOJQjs6lZM+DJP/a2WFRaDF8m8G7KP0bW2zse39xA3AiA2cZ/TMjD5IO820IQYLTd0WA7Lmy9RRVHnqPdVYSe3jA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":81542,"size":14922,"noattachment":false,"key":"/rc-input-number/-/rc-input-number-9.4.0.tgz"},"main":"./lib/index","types":"./es/index.d.ts","module":"./es/index","gitHead":"4671b1f89ae4a78949abf49071eda405e37379c4","scripts":{"lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","test":"rc-test","start":"dumi dev","compile":"father build && lessc assets/index.less assets/index.css","prepare":"husky install","coverage":"rc-test --coverage","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","now-build":"npm run docs:build","docs:build":"dumi build","docs:deploy":"gh-pages -d docs-dist","prepublishOnly":"npm run compile && np --yolo --no-publish"},"_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"repository":{"url":"git+ssh://git@github.com/react-component/input-number.git","type":"git"},"_npmVersion":"10.8.3","description":"React input-number component","directories":{},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write","git add"]},"_nodeVersion":"22.8.0","dependencies":{"rc-util":"^5.40.1","rc-input":"~1.7.1","classnames":"^2.2.5","@babel/runtime":"^7.10.1","@rc-component/mini-decimal":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.0.5","dumi":"^2.0.13","glob":"^11.0.0","less":"^4.1.3","husky":"^8.0.3","react":"^18.2.0","eslint":"^8.54.0","father":"^4.1.1","rc-test":"^7.0.14","ts-node":"^10.9.1","cross-env":"^7.0.3","expect.js":"~0.3.1","react-dom":"^18.2.0","rc-tooltip":"^6.0.1","typescript":"^5.1.6","@types/jest":"^29.2.4","@umijs/test":"^4.0.36","lint-staged":"^15.1.0","@types/react":"^18.0.26","@umijs/fabric":"^4.0.1","@swc-node/jest":"^1.5.5","@types/react-dom":"^18.0.9","@types/classnames":"^2.2.9","eslint-plugin-jest":"^27.2.1","@types/responselike":"^1.0.0","regenerator-runtime":"^0.14.1","eslint-plugin-unicorn":"^56.0.0","@testing-library/react":"^16.0.0","jest-environment-jsdom":"^29.3.1","@testing-library/jest-dom":"^6.1.5","@rc-component/father-plugin":"^1.0.1"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rc-input-number_9.4.0_1735613752149_0.13859023845599383","host":"s3://npm-registry-packages-npm-production"},"readme":"# rc-input-number\n\nInput number control.\n\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-input-number.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-input-number\n[travis-image]: https://img.shields.io/travis/react-component/input-number/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/input-number\n[github-actions-image]: https://github.com/react-component/input-number/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/input-number/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/input-number/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/input-number\n[david-url]: https://david-dm.org/react-component/input-number\n[david-image]: https://david-dm.org/react-component/input-number/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/input-number?type=dev\n[david-dev-image]: https://david-dm.org/react-component/input-number/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-input-number.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-input-number\n[bundlephobia-url]: https://bundlephobia.com/package/rc-input-number\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-input-number\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://user-images.githubusercontent.com/507615/83162463-61414a80-a13c-11ea-9420-971f8697d490.png\" width=\"288\"/>\n\n## Install\n\n[![rc-input-number](https://nodei.co/npm/rc-input-number.png)](https://npmjs.org/package/rc-input-number)\n\n## Usage\n\n```js\nimport InputNumber from 'rc-input-number';\n\nexport default () => <InputNumber defaultValue={10} />;\n```\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttp://127.0.0.1:8000/examples/\n\nonline example: https://input-number.vercel.app/\n\n## API\n\n### props\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>prefixCls</td>\n          <td>string</td>\n          <td>rc-input-number</td>\n          <td>Specifies the class prefix</td>\n        </tr>\n        <tr>\n          <td>min</td>\n          <td>Number</td>\n          <td></td>\n          <td>Specifies the minimum value</td>\n        </tr>\n        <tr>\n          <td>onClick</td>\n          <td></td>\n          <td></td>\n          <td></td>\n        </tr>\n        <tr>\n          <td>placeholder</td>\n          <td>string</td>\n          <td></td>\n          <td></td>\n        </tr>\n        <tr>\n          <td>max</td>\n          <td>Number</td>\n          <td></td>\n          <td>Specifies the maximum value</td>\n        </tr>\n        <tr>\n          <td>step</td>\n          <td>Number or String</td>\n          <td>1</td>\n          <td>Specifies the legal number intervals</td>\n        </tr>\n        <tr>\n          <td>precision</td>\n          <td>Number</td>\n          <td></td>\n          <td>Specifies the precision length of value</td>\n        </tr>\n        <tr>\n          <td>disabled</td>\n          <td>Boolean</td>\n          <td>false</td>\n          <td>Specifies that an InputNumber should be disabled</td>\n        </tr>\n        <tr>\n          <td>required</td>\n          <td>Boolean</td>\n          <td>false</td>\n          <td>Specifies that an InputNumber is required</td>\n        </tr>\n        <tr>\n          <td>autoFocus</td>\n          <td>Boolean</td>\n          <td>false</td>\n          <td>Specifies that an InputNumber should automatically get focus when the page loads</td>\n        </tr>\n        <tr>\n          <td>readOnly</td>\n          <td>Boolean</td>\n          <td>false</td>\n          <td>Specifies that an InputNumber is read only </td>\n        </tr>\n        <tr>\n          <td>controls</td>\n          <td>Boolean</td>\n          <td>true</td>\n          <td>Whether to enable the control buttons</td>\n        </tr>\n        <tr>\n          <td>name</td>\n          <td>String</td>\n          <td></td>\n          <td>Specifies the name of an InputNumber</td>\n        </tr>\n        <tr>\n          <td>id</td>\n          <td>String</td>\n          <td></td>\n          <td>Specifies the id of an InputNumber</td>\n        </tr>\n        <tr>\n          <td>value</td>\n          <td>Number</td>\n          <td></td>\n          <td>Specifies the value of an InputNumber</td>\n        </tr>\n        <tr>\n          <td>defaultValue</td>\n          <td>Number</td>\n          <td></td>\n          <td>Specifies the defaultValue of an InputNumber</td>\n        </tr>\n        <tr>\n          <td>onChange</td>\n          <td>Function</td>\n          <td></td>\n          <td>Called when value of an InputNumber changed</td>\n        </tr>\n        <tr>\n            <td>onBlur</td>\n            <td>Function</td>\n            <td></td>\n            <td>Called when user leaves an input field</td>\n        </tr>\n        <tr>\n          <td>onPressEnter</td>\n          <td>Function</td>\n          <td></td>\n          <td>The callback function that is triggered when Enter key is pressed.</td>\n        </tr>\n        <tr>\n          <td>onFocus</td>\n          <td>Function</td>\n          <td></td>\n          <td>Called when an element gets focus</td>\n        </tr>\n        <tr>\n          <td>style</td>\n          <td>Object</td>\n          <td></td>\n          <td>root style. such as {width:100}</td>\n        </tr>\n        <tr>\n          <td>upHandler</td>\n          <td>React.Node</td>\n          <td></td>\n          <td>custom the up step element</td>\n        </tr>\n        <tr>\n          <td>downHandler</td>\n          <td>React.Node</td>\n          <td></td>\n          <td>custom the down step element</td>\n        </tr>\n        <tr>\n          <td>formatter</td>\n          <td>(value: number|string): displayValue: string</td>\n          <td></td>\n          <td>Specifies the format of the value presented</td>\n        </tr>\n        <tr>\n          <td>parser</td>\n          <td>(displayValue: string) => value: number</td>\n          <td>`input => input.replace(/[^\\w\\.-]*/g, '')`</td>\n          <td>Specifies the value extracted from formatter</td>\n        </tr>\n        <tr>\n          <td>pattern</td>\n          <td>string</td>\n          <td></td>\n          <td>Specifies a regex pattern to be added to the input number element - useful for forcing iOS to open the number pad instead of the normal keyboard (supply a regex of \"\\d*\" to do this) or form validation</td>\n        </tr>\n        <tr>\n          <td>decimalSeparator</td>\n          <td>string</td>\n          <td></td>\n          <td>Specifies the decimal separator</td>\n        </tr>\n        <tr>\n          <td>inputMode</td>\n          <td>string</td>\n          <td></td>\n          <td>Specifies the inputmode of input</td>\n        </tr>\n        <tr>\n          <td>wheel</td>\n          <td>Boolean</td>\n          <td>true</td>\n          <td>Allows changing value with mouse wheel</td>\n        </tr>\n    </tbody>\n</table>\n\n## Keyboard Navigation\n* When you hit the <kbd>⬆</kbd> or <kbd>⬇</kbd> key, the input value will be increased or decreased by `step`\n* With the <kbd>Shift</kbd> key (<kbd>Shift+⬆</kbd>, <kbd>Shift+⬇</kbd>), the input value will be changed by `10 * step`\n* With the <kbd>Ctrl</kbd> or <kbd>⌘</kbd> key (<kbd>Ctrl+⬆</kbd> or <kbd>⌘+⬆</kbd> or <kbd>Ctrl+⬇</kbd> or <kbd>⌘+⬇</kbd> ), the input value will be changed by `0.1 * step`\n\n## Mouse Wheel\n* When you scroll up or down, the input value will be increased or decreased by `step`\n* Scrolling with the <kbd>Shift</kbd> key, the input value will be changed by `10 * step`\n\n## Test Case\n\n```\nnpm test\nnpm run chrome-test\n```\n\n## Coverage\n\n```\nnpm run coverage\n```\n\nopen coverage/ dir\n\n## License\n\nrc-input-number is released under the MIT license.\n","publish_time":1735613752319,"_cnpm_publish_time":1735613752319,"dist-tags":{"beta":"4.0.0-alpha.1","latest":"9.5.0"}}