@douyinfe/semi-ui 2.10.1 → 2.10.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/checkbox/checkbox.tsx +1 -3
- package/checkbox/checkboxInner.tsx +19 -14
- package/dist/css/semi.css +1 -0
- package/dist/umd/semi-ui.js +350 -343
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/form/baseForm.tsx +0 -1
- package/lib/cjs/checkbox/checkbox.js +1 -2
- package/lib/cjs/checkbox/checkboxInner.js +21 -17
- package/lib/cjs/form/baseForm.js +0 -1
- package/lib/es/checkbox/checkbox.js +1 -2
- package/lib/es/checkbox/checkboxInner.js +20 -17
- package/lib/es/form/baseForm.js +0 -1
- package/package.json +3 -3
package/form/baseForm.tsx
CHANGED
|
@@ -150,6 +150,7 @@ class Checkbox extends _baseComponent.default {
|
|
|
150
150
|
} = this.context.checkboxGroup;
|
|
151
151
|
props.isCardType = isCardType;
|
|
152
152
|
props.isPureCardType = isPureCardType;
|
|
153
|
+
props['name'] = this.context.checkboxGroup.name;
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
const prefix = prefixCls || _constants.checkboxClasses.PREFIX;
|
|
@@ -168,7 +169,6 @@ class Checkbox extends _baseComponent.default {
|
|
|
168
169
|
const extraCls = (0, _classnames.default)("".concat(prefix, "-extra"), {
|
|
169
170
|
["".concat(prefix, "-cardType_extra_noChildren")]: props.isCardType && !children
|
|
170
171
|
});
|
|
171
|
-
const name = inGroup && this.context.checkboxGroup.name;
|
|
172
172
|
|
|
173
173
|
const renderContent = () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children ? /*#__PURE__*/_react.default.createElement("span", {
|
|
174
174
|
id: this.addonId,
|
|
@@ -196,7 +196,6 @@ class Checkbox extends _baseComponent.default {
|
|
|
196
196
|
}, /*#__PURE__*/_react.default.createElement(_checkboxInner.default, (0, _assign.default)({}, this.props, props, {
|
|
197
197
|
addonId: children && this.addonId,
|
|
198
198
|
extraId: extra && this.extraId,
|
|
199
|
-
name: name,
|
|
200
199
|
isPureCardType: props.isPureCardType,
|
|
201
200
|
ref: ref => {
|
|
202
201
|
this.checkboxEntity = ref;
|
|
@@ -14,6 +14,8 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
14
14
|
|
|
15
15
|
exports.default = void 0;
|
|
16
16
|
|
|
17
|
+
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
|
18
|
+
|
|
17
19
|
var _noop2 = _interopRequireDefault(require("lodash/noop"));
|
|
18
20
|
|
|
19
21
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -63,27 +65,29 @@ class CheckboxInner extends _react.PureComponent {
|
|
|
63
65
|
["".concat(prefix, "-inner-display")]: true
|
|
64
66
|
});
|
|
65
67
|
const icon = checked ? /*#__PURE__*/_react.default.createElement(_semiIcons.IconCheckboxTick, null) : indeterminate ? /*#__PURE__*/_react.default.createElement(_semiIcons.IconCheckboxIndeterminate, null) : null;
|
|
66
|
-
|
|
67
|
-
className: wrapper
|
|
68
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
68
|
+
const inputProps = {
|
|
69
69
|
type: "checkbox",
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
ref: ref => {
|
|
79
|
-
this.inputEntity = ref;
|
|
80
|
-
},
|
|
70
|
+
'aria-label': this.props['aria-label'],
|
|
71
|
+
'aria-disabled': disabled,
|
|
72
|
+
'aria-checked': checked,
|
|
73
|
+
'aria-labelledby': addonId,
|
|
74
|
+
'aria-describedby': extraId || this.props['aria-describedby'],
|
|
75
|
+
'aria-invalid': this.props['aria-invalid'],
|
|
76
|
+
'aria-errormessage': this.props['aria-errormessage'],
|
|
77
|
+
'aria-required': this.props['aria-required'],
|
|
81
78
|
className: _constants.checkboxClasses.INPUT,
|
|
82
79
|
onChange: _noop2.default,
|
|
83
80
|
checked: checked,
|
|
84
|
-
disabled: disabled
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
disabled: disabled
|
|
82
|
+
};
|
|
83
|
+
name && (inputProps['name'] = name);
|
|
84
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
85
|
+
className: wrapper
|
|
86
|
+
}, /*#__PURE__*/_react.default.createElement("input", (0, _assign.default)({}, inputProps, {
|
|
87
|
+
ref: ref => {
|
|
88
|
+
this.inputEntity = ref;
|
|
89
|
+
}
|
|
90
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
87
91
|
className: inner
|
|
88
92
|
}, icon));
|
|
89
93
|
}
|
package/lib/cjs/form/baseForm.js
CHANGED
|
@@ -126,6 +126,7 @@ class Checkbox extends BaseComponent {
|
|
|
126
126
|
} = this.context.checkboxGroup;
|
|
127
127
|
props.isCardType = isCardType;
|
|
128
128
|
props.isPureCardType = isPureCardType;
|
|
129
|
+
props['name'] = this.context.checkboxGroup.name;
|
|
129
130
|
}
|
|
130
131
|
|
|
131
132
|
const prefix = prefixCls || css.PREFIX;
|
|
@@ -144,7 +145,6 @@ class Checkbox extends BaseComponent {
|
|
|
144
145
|
const extraCls = classnames("".concat(prefix, "-extra"), {
|
|
145
146
|
["".concat(prefix, "-cardType_extra_noChildren")]: props.isCardType && !children
|
|
146
147
|
});
|
|
147
|
-
const name = inGroup && this.context.checkboxGroup.name;
|
|
148
148
|
|
|
149
149
|
const renderContent = () => /*#__PURE__*/React.createElement(React.Fragment, null, children ? /*#__PURE__*/React.createElement("span", {
|
|
150
150
|
id: this.addonId,
|
|
@@ -172,7 +172,6 @@ class Checkbox extends BaseComponent {
|
|
|
172
172
|
}, /*#__PURE__*/React.createElement(CheckboxInner, _Object$assign({}, this.props, props, {
|
|
173
173
|
addonId: children && this.addonId,
|
|
174
174
|
extraId: extra && this.extraId,
|
|
175
|
-
name: name,
|
|
176
175
|
isPureCardType: props.isPureCardType,
|
|
177
176
|
ref: ref => {
|
|
178
177
|
this.checkboxEntity = ref;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _noop from "lodash/noop";
|
|
2
|
+
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
2
3
|
|
|
3
4
|
/* eslint-disable no-nested-ternary */
|
|
4
5
|
import React, { PureComponent } from 'react';
|
|
@@ -38,27 +39,29 @@ class CheckboxInner extends PureComponent {
|
|
|
38
39
|
["".concat(prefix, "-inner-display")]: true
|
|
39
40
|
});
|
|
40
41
|
const icon = checked ? /*#__PURE__*/React.createElement(IconCheckboxTick, null) : indeterminate ? /*#__PURE__*/React.createElement(IconCheckboxIndeterminate, null) : null;
|
|
41
|
-
|
|
42
|
-
className: wrapper
|
|
43
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
42
|
+
const inputProps = {
|
|
44
43
|
type: "checkbox",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
ref: ref => {
|
|
54
|
-
this.inputEntity = ref;
|
|
55
|
-
},
|
|
44
|
+
'aria-label': this.props['aria-label'],
|
|
45
|
+
'aria-disabled': disabled,
|
|
46
|
+
'aria-checked': checked,
|
|
47
|
+
'aria-labelledby': addonId,
|
|
48
|
+
'aria-describedby': extraId || this.props['aria-describedby'],
|
|
49
|
+
'aria-invalid': this.props['aria-invalid'],
|
|
50
|
+
'aria-errormessage': this.props['aria-errormessage'],
|
|
51
|
+
'aria-required': this.props['aria-required'],
|
|
56
52
|
className: css.INPUT,
|
|
57
53
|
onChange: _noop,
|
|
58
54
|
checked: checked,
|
|
59
|
-
disabled: disabled
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
disabled: disabled
|
|
56
|
+
};
|
|
57
|
+
name && (inputProps['name'] = name);
|
|
58
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
59
|
+
className: wrapper
|
|
60
|
+
}, /*#__PURE__*/React.createElement("input", _Object$assign({}, inputProps, {
|
|
61
|
+
ref: ref => {
|
|
62
|
+
this.inputEntity = ref;
|
|
63
|
+
}
|
|
64
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
62
65
|
className: inner
|
|
63
66
|
}, icon));
|
|
64
67
|
}
|
package/lib/es/form/baseForm.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.2-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@babel/runtime-corejs3": "^7.15.4",
|
|
17
17
|
"@douyinfe/semi-animation": "2.10.1",
|
|
18
|
-
"@douyinfe/semi-animation-react": "2.10.
|
|
18
|
+
"@douyinfe/semi-animation-react": "2.10.2-alpha.0",
|
|
19
19
|
"@douyinfe/semi-foundation": "2.10.1",
|
|
20
20
|
"@douyinfe/semi-icons": "2.10.1",
|
|
21
21
|
"@douyinfe/semi-illustrations": "2.10.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "0af26368c88d1654b57ca177c18ed1d92b1b8b61",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|