@nutui/nutui-react 1.2.2-beta.0 → 1.2.3-beta.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/CHANGELOG.md +17 -0
- package/dist/esm/Divider.js +6 -3
- package/dist/esm/Radio.js +24 -4
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +24 -7
- package/dist/nutui.react.umd.js +6 -6
- package/dist/style.es.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## v1.2.2
|
|
2
|
+
`2022-08-10`
|
|
3
|
+
|
|
4
|
+
* :zap: feat: range组件props补齐+国际化 (#201) @vickyYE
|
|
5
|
+
* :zap: feat: signature组件增加单元测试、文档和demo国际化 (#205) @irisSong
|
|
6
|
+
* :zap: test(navbar): navbar unit test (#203) @szg2008
|
|
7
|
+
* :zap: test(tabbar): tabbar unit test (#204) @szg2008
|
|
8
|
+
* :zap: feat: 新增 searchbar 组件 (#186) @Ymm0008
|
|
9
|
+
* :zap: feat(numberkeyboard): new components (#192) @Drjingfubo
|
|
10
|
+
* :zap: feat(tabbar): 组件能力补齐 (#178) @szg2008
|
|
11
|
+
* :zap: feat: progress 组件 (#187) @ailululu
|
|
12
|
+
* :zap: chore: tag 组件 eslint 修复 (#200) @libin0824
|
|
13
|
+
* :zap: feat: datepicker 功能补齐 (#182) @yangxiaolu1993
|
|
14
|
+
* :zap: feat: tag 组件新增 onClick 事件,closeable 支持非受控(#195) @libin0824
|
|
15
|
+
* :zap: feat: divider组件增加单元测试 (#194) @vickyYE
|
|
16
|
+
* :zap: feat: Dialog组件增加在线调试能力,文档多语言支持 (#193) @libin0824
|
|
17
|
+
|
|
1
18
|
## v1.2.1
|
|
2
19
|
`2022-08-03`
|
|
3
20
|
|
package/dist/esm/Divider.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "contentPosition", "dashed", "hairline", "styles", "className", "direction"];
|
|
2
4
|
|
|
3
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
6
|
|
|
@@ -25,14 +27,15 @@ var Divider = function Divider(props) {
|
|
|
25
27
|
hairline = _defaultProps$props.hairline,
|
|
26
28
|
styles = _defaultProps$props.styles,
|
|
27
29
|
className = _defaultProps$props.className,
|
|
28
|
-
direction = _defaultProps$props.direction
|
|
30
|
+
direction = _defaultProps$props.direction,
|
|
31
|
+
rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
29
32
|
|
|
30
33
|
var dividerBem = cn('divider');
|
|
31
34
|
var classes = direction === 'horizontal' ? classNames((_classNames = {}, _defineProperty(_classNames, dividerBem(), true), _defineProperty(_classNames, dividerBem('center'), children), _defineProperty(_classNames, dividerBem('left'), contentPosition === 'left'), _defineProperty(_classNames, dividerBem('right'), contentPosition === 'right'), _defineProperty(_classNames, dividerBem('dashed'), dashed), _defineProperty(_classNames, dividerBem('hairline'), hairline), _classNames)) : classNames((_classNames2 = {}, _defineProperty(_classNames2, dividerBem(), true), _defineProperty(_classNames2, dividerBem('vertical'), direction === 'vertical'), _classNames2));
|
|
32
|
-
return React__default.createElement("div", {
|
|
35
|
+
return React__default.createElement("div", _objectSpread({
|
|
33
36
|
className: "".concat(classes, " ").concat(className || ''),
|
|
34
37
|
style: styles
|
|
35
|
-
}, children);
|
|
38
|
+
}, rest), children);
|
|
36
39
|
};
|
|
37
40
|
|
|
38
41
|
Divider.defaultProps = defaultProps;
|
package/dist/esm/Radio.js
CHANGED
|
@@ -76,7 +76,15 @@ var Radio = function Radio(props) {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
var color = function color() {
|
|
79
|
-
|
|
79
|
+
if (disabledStatement) {
|
|
80
|
+
return 'nut-radio__icon--disable';
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (checkedStatement) {
|
|
84
|
+
return 'nut-radio__icon';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return 'nut-radio__icon--unchecked';
|
|
80
88
|
};
|
|
81
89
|
|
|
82
90
|
var renderIcon = function renderIcon() {
|
|
@@ -90,10 +98,22 @@ var Radio = function Radio(props) {
|
|
|
90
98
|
});
|
|
91
99
|
};
|
|
92
100
|
|
|
101
|
+
var renderRadioItem = function renderRadioItem() {
|
|
102
|
+
if (shape === 'button') {
|
|
103
|
+
return renderButton();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (reverseState) {
|
|
107
|
+
return [renderLabel(), renderIcon()];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return [renderIcon(), renderLabel()];
|
|
111
|
+
};
|
|
112
|
+
|
|
93
113
|
var handleClick = function handleClick(e) {
|
|
94
|
-
if (disabledStatement) return;
|
|
114
|
+
if (disabledStatement || checkedStatement) return;
|
|
95
115
|
setCheckedStatement(!checkedStatement);
|
|
96
|
-
|
|
116
|
+
onChange && onChange(e);
|
|
97
117
|
context && context.onChange(valueStatement);
|
|
98
118
|
};
|
|
99
119
|
|
|
@@ -101,7 +121,7 @@ var Radio = function Radio(props) {
|
|
|
101
121
|
return React__default.createElement("div", _objectSpread({
|
|
102
122
|
className: "nut-radio ".concat(className),
|
|
103
123
|
onClick: handleClick
|
|
104
|
-
}, rest),
|
|
124
|
+
}, rest), renderRadioItem());
|
|
105
125
|
};
|
|
106
126
|
|
|
107
127
|
Radio.defaultProps = defaultProps;
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.2.
|
|
2
|
+
* @nutui/nutui-react v1.2.2 Thu Aug 11 2022 14:28:42 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -2460,7 +2460,8 @@ const Divider = (props) => {
|
|
|
2460
2460
|
hairline,
|
|
2461
2461
|
styles,
|
|
2462
2462
|
className,
|
|
2463
|
-
direction
|
|
2463
|
+
direction,
|
|
2464
|
+
...rest
|
|
2464
2465
|
} = {
|
|
2465
2466
|
...defaultProps$_,
|
|
2466
2467
|
...props
|
|
@@ -2479,7 +2480,8 @@ const Divider = (props) => {
|
|
|
2479
2480
|
});
|
|
2480
2481
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
2481
2482
|
className: `${classes} ${className || ""}`,
|
|
2482
|
-
style: styles
|
|
2483
|
+
style: styles,
|
|
2484
|
+
...rest
|
|
2483
2485
|
}, children);
|
|
2484
2486
|
};
|
|
2485
2487
|
Divider.defaultProps = defaultProps$_;
|
|
@@ -5994,7 +5996,13 @@ const Radio = (props) => {
|
|
|
5994
5996
|
}, children);
|
|
5995
5997
|
};
|
|
5996
5998
|
const color = () => {
|
|
5997
|
-
|
|
5999
|
+
if (disabledStatement) {
|
|
6000
|
+
return "nut-radio__icon--disable";
|
|
6001
|
+
}
|
|
6002
|
+
if (checkedStatement) {
|
|
6003
|
+
return "nut-radio__icon";
|
|
6004
|
+
}
|
|
6005
|
+
return "nut-radio__icon--unchecked";
|
|
5998
6006
|
};
|
|
5999
6007
|
const renderIcon = () => {
|
|
6000
6008
|
const { iconName: iconName2, iconSize: iconSize2, iconActiveName: iconActiveName2 } = props;
|
|
@@ -6004,11 +6012,20 @@ const Radio = (props) => {
|
|
|
6004
6012
|
className: color()
|
|
6005
6013
|
});
|
|
6006
6014
|
};
|
|
6015
|
+
const renderRadioItem = () => {
|
|
6016
|
+
if (shape === "button") {
|
|
6017
|
+
return renderButton();
|
|
6018
|
+
}
|
|
6019
|
+
if (reverseState) {
|
|
6020
|
+
return [renderLabel(), renderIcon()];
|
|
6021
|
+
}
|
|
6022
|
+
return [renderIcon(), renderLabel()];
|
|
6023
|
+
};
|
|
6007
6024
|
const handleClick = (e2) => {
|
|
6008
|
-
if (disabledStatement)
|
|
6025
|
+
if (disabledStatement || checkedStatement)
|
|
6009
6026
|
return;
|
|
6010
6027
|
setCheckedStatement(!checkedStatement);
|
|
6011
|
-
|
|
6028
|
+
onChange && onChange(e2);
|
|
6012
6029
|
context2 && context2.onChange(valueStatement);
|
|
6013
6030
|
};
|
|
6014
6031
|
const reverseState = textPosition === "left";
|
|
@@ -6016,7 +6033,7 @@ const Radio = (props) => {
|
|
|
6016
6033
|
className: `nut-radio ${className}`,
|
|
6017
6034
|
onClick: handleClick,
|
|
6018
6035
|
...rest
|
|
6019
|
-
},
|
|
6036
|
+
}, renderRadioItem());
|
|
6020
6037
|
};
|
|
6021
6038
|
Radio.defaultProps = defaultProps$H;
|
|
6022
6039
|
Radio.displayName = "NutRadio";
|