@ucloud-fe/react-components 1.14.0 → 1.16.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 +20 -0
- package/dist/main.min.js +8 -8
- package/index.d.ts +30 -15
- package/lib/components/Cascader/Cascade.d.ts +6 -1
- package/lib/components/Cascader/Cascade.js +4 -1
- package/lib/components/Cascader/Cascader.d.ts +8 -1
- package/lib/components/Cascader/Cascader.js +5 -2
- package/lib/components/Cascader/Items.d.ts +7 -1
- package/lib/components/Cascader/Items.js +16 -3
- package/lib/components/DatePicker/DatePicker.js +1 -1
- package/lib/components/DatePicker/Month.js +1 -1
- package/lib/components/DatePicker/Range.js +0 -4
- package/lib/components/DatePicker/usePicker.js +1 -1
- package/lib/components/Menu/locale/en_US.js +1 -1
- package/lib/components/Modal/locale/en_US.js +2 -2
- package/lib/components/Pagination/locale/en_US.js +11 -11
- package/lib/components/PopConfirm/locale/en_US.js +2 -2
- package/lib/components/Select/locale/en_US.js +3 -3
- package/lib/components/Slider/locale/en_US.js +4 -4
- package/lib/components/Switch/style/index.js +7 -5
- package/lib/components/Table/locale/en_US.js +11 -11
- package/lib/components/Tag/Group.d.ts +21 -15
- package/lib/components/Tag/Group.js +175 -31
- package/lib/components/Tag/Icon.d.ts +17 -0
- package/lib/components/Tag/Icon.js +31 -2
- package/lib/components/Tag/Tag.d.ts +19 -0
- package/lib/components/Tag/Tag.js +44 -6
- package/lib/components/Tag/index.d.ts +2 -2
- package/lib/components/Tag/style/index.d.ts +46 -1
- package/lib/components/Tag/style/index.js +259 -85
- package/lib/components/ThemeProvider/designTokens.d.ts +216 -0
- package/lib/components/ThemeProvider/designTokens.js +436 -4
- package/lib/components/ThemeProvider/designTokensDark.d.ts +216 -0
- package/lib/components/ThemeProvider/designTokensDark.js +435 -3
- package/lib/components/ThemeProvider/designTokensPrivate.d.ts +492 -0
- package/lib/components/ThemeProvider/designTokensPrivate.js +989 -0
- package/lib/components/ThemeProvider/private.js +17 -0
- package/lib/components/ZForm/controllerDecorator.js +31 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _designTokensPrivate = _interopRequireDefault(require("./designTokensPrivate"));
|
|
11
|
+
|
|
12
|
+
// 主题唯一标识
|
|
13
|
+
_designTokensPrivate.default['T_THEME'] = 'private';
|
|
14
|
+
var _default = {
|
|
15
|
+
designTokens: _designTokensPrivate.default
|
|
16
|
+
};
|
|
17
|
+
exports.default = _default;
|
|
@@ -71,10 +71,40 @@ var controllerDecorator = function controllerDecorator(options) {
|
|
|
71
71
|
zName = _this$props.zName,
|
|
72
72
|
zOptions = _this$props.zOptions,
|
|
73
73
|
controllerProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
74
|
+
var rules = (zOptions && zOptions.rules ? zOptions.rules : []).map(function (rule) {
|
|
75
|
+
(0, _newArrowCheck2.default)(this, _this2);
|
|
76
|
+
|
|
77
|
+
if (rule.validator) {
|
|
78
|
+
var propValidator = rule.validator;
|
|
79
|
+
return _objectSpread(_objectSpread({}, rule), {}, {
|
|
80
|
+
validator: function validator(rule, value, callback) {
|
|
81
|
+
var _this3 = this;
|
|
82
|
+
|
|
83
|
+
for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
84
|
+
args[_key - 3] = arguments[_key];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
propValidator.apply(void 0, [rule, value, function (res) {
|
|
88
|
+
(0, _newArrowCheck2.default)(this, _this3);
|
|
89
|
+
|
|
90
|
+
if (res !== null) {
|
|
91
|
+
callback(res);
|
|
92
|
+
} else {
|
|
93
|
+
callback();
|
|
94
|
+
}
|
|
95
|
+
}.bind(this)].concat(args));
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
} else {
|
|
99
|
+
return rule;
|
|
100
|
+
}
|
|
101
|
+
}.bind(this));
|
|
74
102
|
return /*#__PURE__*/_react.default.createElement(_ZForm.ZFormContext.Consumer, null, function (_ref) {
|
|
75
103
|
(0, _newArrowCheck2.default)(this, _this2);
|
|
76
104
|
var form = _ref.form;
|
|
77
|
-
return form.getFieldDecorator(zName, _objectSpread(_objectSpread({}, options), zOptions)
|
|
105
|
+
return form.getFieldDecorator(zName, _objectSpread(_objectSpread({}, options), _objectSpread(_objectSpread({}, zOptions), {}, {
|
|
106
|
+
rules: rules
|
|
107
|
+
})))( /*#__PURE__*/_react.default.createElement(Controller, controllerProps));
|
|
78
108
|
}.bind(this));
|
|
79
109
|
}
|
|
80
110
|
}]);
|