{"name":"rc-segmented","version":"2.7.0","description":"React segmented controls used in ant.design","keywords":["react","react-component","react-segmented","react-segmented-controls","segmented controls","antd","ant-design"],"main":"./lib/index","module":"./es/index","types":"./es/index.d.ts","homepage":"https://react-component.github.io/segmented","repository":{"type":"git","url":"git+ssh://git@github.com/react-component/segmented.git"},"bugs":{"url":"http://github.com/react-component/segmented/issues"},"license":"MIT","scripts":{"start":"dumi dev","type:check":"tsc --noEmit","docs:build":"dumi build","docs:deploy":"gh-pages -d .doc","compile":"father build && lessc assets/index.less assets/index.css","gh-pages":"GH_PAGES=1 npm run docs:build && npm run docs:deploy","prepublishOnly":"npm run compile && np --yolo --no-publish && npm run gh-pages","lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","pretty-quick":"pretty-quick","test":"jest","coverage":"jest --coverage","prepare":"husky install"},"dependencies":{"@babel/runtime":"^7.11.1","classnames":"^2.2.1","rc-motion":"^2.4.4","rc-util":"^5.17.0"},"devDependencies":{"@rc-component/father-plugin":"^1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.2.1","@testing-library/user-event":"^14.5.2","@types/classnames":"^2.2.9","@types/jest":"^29.2.4","@types/react":"^18.3.11","@types/react-dom":"^18.3.1","@umijs/fabric":"^3.0.0","@umijs/test":"^4.0.36","coveralls":"^3.0.6","cross-env":"^7.0.3","cssstyle":"^2.3.0","dumi":"^2.1.2","eslint":"^7.0.0","father":"^4.1.1","gh-pages":"^3.1.0","husky":"^8.0.0","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","less":"^3.10.3","np":"^7.0.0","prettier":"^2.0.5","pretty-quick":"^3.0.0","react":"^18.0.0","react-dom":"^18.0.0","ts-node":"^10.9.1","typescript":"^5.3.0"},"peerDependencies":{"react":">=16.0.0","react-dom":">=16.0.0"},"cnpm":{"mode":"npm"},"tnpm":{"mode":"npm"},"_id":"rc-segmented@2.7.0","gitHead":"8afca79cf06d70e1a9e16aea31526fc887f0e99c","_nodeVersion":"22.8.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-liijAjXz+KnTRVnxxXG2sYDGd6iLL7VpGGdR8gwoxAXy2KglviKCxLWZdjKYJzYzGSUwKDSTdYk8brj54Bn5BA==","shasum":"f56c2044abf8f03958b3a9a9d32987f10dcc4fc4","tarball":"http://registry-npm.ywwl.com/rc-segmented/download/rc-segmented-2.7.0.tgz","fileCount":14,"unpackedSize":50317,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBVx/O75qQ2XgsE0/Ig+IWOOOJG0AFC1gu9TwcmBXDlvAiEAs8Hne8YDhmZBwAnr+n4etCcqUng7tuMIkPrHnS/x31k="}],"size":9555,"noattachment":false,"key":"/rc-segmented/-/rc-segmented-2.7.0.tgz"},"_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-segmented_2.7.0_1733672422590_0.49528754232975314"},"_hasShrinkwrap":false,"readme":"# rc-segmented\n\n[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![bundle size][bundlephobia-image]][bundlephobia-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-segmented.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-segmented\n[github-actions-image]: https://github.com/react-component/segmented/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/segmented/actions\n[codecov-image]: https://codecov.io/gh/react-component/segmented/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/react-component/segmented/branch/master\n[download-image]: https://img.shields.io/npm/dm/rc-segmented.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-segmented\n[bundlephobia-url]: https://bundlephobia.com/package/rc-segmented\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-segmented\n\nReact Segmented Control.\n\n![](https://gw.alipayobjects.com/mdn/rms_50855f/afts/img/A*bmGGQpnWs0oAAAAAAAAAAAAAARQnAQ)\n\n## Live Demo\n\nhttps://react-component.github.io/segmented/\n\n## Install\n\n[![rc-segmented](https://nodei.co/npm/rc-segmented.png)](https://npmjs.org/package/rc-segmented)\n\n## Usage\n\n```js\nimport Segmented from 'rc-segmented';\nimport 'rc-segmented/assets/index.css'; // import 'rc-segmented/asssets/index.less';\nimport { render } from 'react-dom';\n\nrender(\n  <Segmented\n    options={['Antd', 'Antv', 'Egg.js']}\n    onChange={(value) => handleValueChange(value)}\n  />,\n  mountNode,\n);\n```\n\n## API\n\nPlease note that **onChange** API\n changed on v2.0.0+\n\n| Property     | Type                                                           | Default      | Description                        |\n| --------- | --------- | --------- | --------- |\n| prefixCls    | string                                                         | rc-segmented | prefixCls of this component |\n| className    | string                                                         | ''           | additional class name of segmented |\n| style        | React.CSSProperties                                            |              | style properties of segmented      |\n| options      | Array<string \\| number \\| [SegmentedOption](#SegmentedOption)> | []           | options for choices                |\n| value        | string \\| number                                               |              | value of segmented                 |\n| defaultValue | string \\| number                                               |              | defaultValue of segmented          |\n| value | string \\| number                                               |              | currently selected value of segmented          |\n| onChange     | (value: string \\| number) => void                                               |              | defaultValue of segmented          |\n| disabled     | boolean                                                        | false        | disabled status of segmented       |\n\n### SegmentedOption\n\n| Property  | Type      | Default | Description                               |\n| --------- | --------- | --------- | --------- |\n| label     | ReactNode |         | label of segmented option                 |\n| value     | string \\| number   |  | value of segmented option |\n| className | string    | ''      | additional class name of segmented option |\n| disabled  | boolean   | false   | disabled status of segmented option       |\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## License\n\nrc-segmented is released under the MIT license.\n","publish_time":1733672422798,"maintainers":[{"name":"afc163","email":"afc163@gmail.com"},{"name":"vagusx","email":"onlylae@sina.com"},{"name":"zombiej","email":"smith3816@gmail.com"}],"_cnpm_publish_time":1733672422798,"dist-tags":{"beta":"2.1.0-beta.0","latest":"2.7.1"}}