Socket
Socket
Sign inDemoInstall

@uiw/react-checkbox

Package Overview
Dependencies
Maintainers
2
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-checkbox - npm Package Compare versions

Comparing version 4.21.23 to 5.0.0-bate.2.0

cjs/style/index.d.ts

2

cjs/Checkbox.d.ts
import React from 'react';
import { RadioAbstractProps } from '@uiw/react-radio';
import { CheckboxGroup } from './Group';
import './style/index.less';
export interface CheckboxProps extends RadioAbstractProps {

@@ -14,1 +13,2 @@ indeterminate?: boolean;

export default _default;
//# sourceMappingURL=Checkbox.d.ts.map

@@ -13,2 +13,3 @@ "use strict";

var _Group = require("./Group");
var _style = require("./style");
var _jsxRuntime = require("react/jsx-runtime");

@@ -30,3 +31,4 @@ var _excluded = ["className", "prefixCls", "type", "indeterminate", "disabled", "value"];

var cls = [className, indeterminate && 'indeterminate'].filter(Boolean).join(' ').trim();
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRadio.RadioAbstract, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.CheckboxStyleBase, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
as: _reactRadio.RadioAbstract,
ref: ref

@@ -33,0 +35,0 @@ }, other), {}, {

import React from 'react';
import { IProps, HTMLDivProps } from '@uiw/utils';
import './style/group.less';
export declare type Value = string | number;

@@ -11,1 +10,2 @@ export interface CheckboxGroupPorps extends IProps, Omit<HTMLDivProps, 'onChange'> {

export declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupPorps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=Group.d.ts.map

@@ -12,2 +12,3 @@ "use strict";

var _react = _interopRequireWildcard(require("react"));
var _style = require("./style");
var _jsxRuntime = require("react/jsx-runtime");

@@ -29,3 +30,3 @@ var _excluded = ["prefixCls", "className", "name", "value", "onChange"];

}, [value]);
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, other), {}, {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.CheckGroupStyleBase, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, other), {}, {
className: cls,

@@ -32,0 +33,0 @@ ref: ref,

import Checkbox from './Checkbox';
export * from './Checkbox';
export * from './Group';
export * from './style';
export default Checkbox;
//# sourceMappingURL=index.d.ts.map

@@ -33,4 +33,16 @@ "use strict";

});
var _style = require("./style");
Object.keys(_style).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _style[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _style[key];
}
});
});
var _default = _Checkbox["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
import React from 'react';
import { RadioAbstractProps } from '@uiw/react-radio';
import { CheckboxGroup } from './Group';
import './style/index.less';
export interface CheckboxProps extends RadioAbstractProps {

@@ -14,1 +13,2 @@ indeterminate?: boolean;

export default _default;
//# sourceMappingURL=Checkbox.d.ts.map

@@ -7,3 +7,3 @@ import _extends from "@babel/runtime/helpers/extends";

import { CheckboxGroup } from './Group';
import "./style/index.css";
import { CheckboxStyleBase } from './style';
import { jsx as _jsx } from "react/jsx-runtime";

@@ -21,3 +21,4 @@ function InternalCheckbox(props, ref) {

var cls = [className, indeterminate && 'indeterminate'].filter(Boolean).join(' ').trim();
return /*#__PURE__*/_jsx(RadioAbstract, _extends({
return /*#__PURE__*/_jsx(CheckboxStyleBase, _extends({
as: RadioAbstract,
ref: ref

@@ -24,0 +25,0 @@ }, other, {

import React from 'react';
import { IProps, HTMLDivProps } from '@uiw/utils';
import './style/group.less';
export declare type Value = string | number;

@@ -11,1 +10,2 @@ export interface CheckboxGroupPorps extends IProps, Omit<HTMLDivProps, 'onChange'> {

export declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupPorps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=Group.d.ts.map

@@ -5,3 +5,3 @@ import _extends from "@babel/runtime/helpers/extends";

import React, { useMemo, useRef } from 'react';
import "./style/group.css";
import { CheckGroupStyleBase } from './style';
import { jsx as _jsx } from "react/jsx-runtime";

@@ -21,3 +21,3 @@ export var CheckboxGroup = /*#__PURE__*/React.forwardRef((props, ref) => {

useMemo(() => valueRef.current = value || [], [value]);
return /*#__PURE__*/_jsx("div", _extends({}, other, {
return /*#__PURE__*/_jsx(CheckGroupStyleBase, _extends({}, other, {
className: cls,

@@ -24,0 +24,0 @@ ref: ref,

import Checkbox from './Checkbox';
export * from './Checkbox';
export * from './Group';
export * from './style';
export default Checkbox;
//# sourceMappingURL=index.d.ts.map
import Checkbox from './Checkbox';
export * from './Checkbox';
export * from './Group';
export * from './style';
export default Checkbox;
//# sourceMappingURL=index.js.map
{
"name": "@uiw/react-checkbox",
"version": "4.21.23",
"version": "5.0.0-bate.2.0",
"description": "Checkbox component",

@@ -44,8 +44,9 @@ "author": "Kenny Wong <wowohoo@qq.com>",

"react": ">=16.9.0",
"react-dom": ">=16.9.0"
"react-dom": ">=16.9.0",
"styled-components": ">=5.3.5"
},
"dependencies": {
"@uiw/react-radio": "^4.21.23",
"@uiw/utils": "^4.21.23"
"@uiw/react-radio": "^5.0.0-bate.2.0",
"@uiw/utils": "^5.0.0-bate.2.0"
}
}

@@ -20,22 +20,21 @@ Checkbox 多选框

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';
import { Checkbox } from 'uiw';
export default function Demo() {
return(
<div>
<Checkbox onChange={(e) =>{
console.log(e.target.checked)
console.log(e.target)
}}>未选中</Checkbox>
<Checkbox checked >选中</Checkbox>
</div>
);
}
const Demo =()=> (
<div>
<Checkbox onChange={(e) =>{
console.log(e.target.checked)
console.log(e.target)
}}>未选中</Checkbox>
<Checkbox checked >选中</Checkbox>
</div>
);
export default Demo
```
### Form 中使用 Checkbox
```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -116,3 +115,2 @@ import { Form, Checkbox, Row, Col, Button, Notify } from 'uiw';

)
export default Demo;

@@ -125,15 +123,14 @@ ```

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';
import { Checkbox } from 'uiw';
export default function Demo() {
return(
<div>
<Checkbox disabled checked>未选中禁用</Checkbox>
<Checkbox disabled checked>选中禁用</Checkbox>
<Checkbox disabled indeterminate>半选中禁用</Checkbox>
</div>
);
}
const Demo= ()=>(
<div>
<Checkbox disabled checked>未选中禁用</Checkbox>
<Checkbox disabled checked>选中禁用</Checkbox>
<Checkbox disabled indeterminate>半选中禁用</Checkbox>
</div>
);
export default Demo
```

@@ -143,3 +140,3 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -191,2 +188,3 @@ import { Checkbox, Divider } from 'uiw';

}
export default Demo;

@@ -199,3 +197,3 @@ ```

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -250,3 +248,3 @@ import { Checkbox, Divider, Button } from 'uiw';

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -253,0 +251,0 @@ import { Checkbox, Button } from 'uiw';

@@ -5,2 +5,4 @@ import Checkbox from './Checkbox';

export * from './Group';
export * from './style';
export default Checkbox;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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