@kdcloudjs/kdesign 1.6.16 → 1.6.17
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 +13 -0
- package/dist/kdesign-complete.less +3 -0
- package/dist/kdesign.css +3 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +120 -167
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/usePopper.js +2 -0
- package/es/checkbox/checkbox.d.ts +1 -4
- package/es/checkbox/checkbox.js +26 -19
- package/es/checkbox/group.d.ts +11 -1
- package/es/checkbox/group.js +43 -71
- package/es/checkbox/index.d.ts +2 -1
- package/es/checkbox/index.js +1 -1
- package/es/stepper/style/index.css +2 -0
- package/es/stepper/style/index.less +3 -0
- package/lib/_utils/usePopper.js +2 -0
- package/lib/checkbox/checkbox.d.ts +1 -4
- package/lib/checkbox/checkbox.js +32 -25
- package/lib/checkbox/group.d.ts +11 -1
- package/lib/checkbox/group.js +49 -75
- package/lib/checkbox/index.d.ts +2 -1
- package/lib/checkbox/index.js +4 -4
- package/lib/stepper/style/index.css +2 -0
- package/lib/stepper/style/index.less +3 -0
- package/package.json +1 -1
package/dist/kdesign.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/kdesign v1.6.
|
|
3
|
+
* @kdcloudjs/kdesign v1.6.16
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -2609,10 +2609,12 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
2609
2609
|
focus: 'mousedown',
|
|
2610
2610
|
contextMenu: 'mousedown'
|
|
2611
2611
|
};
|
|
2612
|
+
popperNode === null || popperNode === void 0 ? void 0 : popperNode.addEventListener('mouseleave', debounceHidePopper);
|
|
2612
2613
|
Array.isArray(trigger) ? trigger.forEach(function (action) {
|
|
2613
2614
|
return document.addEventListener(mapEvent[action], debounceHidePopper);
|
|
2614
2615
|
}) : document.addEventListener(mapEvent[trigger], debounceHidePopper);
|
|
2615
2616
|
return function () {
|
|
2617
|
+
popperNode === null || popperNode === void 0 ? void 0 : popperNode.removeEventListener('mouseleave', debounceHidePopper);
|
|
2616
2618
|
Array.isArray(trigger) ? trigger.forEach(function (action) {
|
|
2617
2619
|
return document.removeEventListener(mapEvent[action], debounceHidePopper);
|
|
2618
2620
|
}) : document.removeEventListener(mapEvent[trigger], debounceHidePopper);
|
|
@@ -6832,13 +6834,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6832
6834
|
/*!******************************************!*\
|
|
6833
6835
|
!*** ./components/checkbox/checkbox.tsx ***!
|
|
6834
6836
|
\******************************************/
|
|
6835
|
-
/*! exports provided:
|
|
6837
|
+
/*! exports provided: default */
|
|
6836
6838
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6837
6839
|
|
|
6838
6840
|
"use strict";
|
|
6839
6841
|
__webpack_require__.r(__webpack_exports__);
|
|
6840
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxTypes", function() { return CheckboxTypes; });
|
|
6841
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxSizes", function() { return CheckboxSizes; });
|
|
6842
6842
|
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
|
|
6843
6843
|
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
|
6844
6844
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
|
|
@@ -6855,9 +6855,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6855
6855
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
|
|
6856
6856
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
|
6857
6857
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__);
|
|
6858
|
-
/* harmony import */ var
|
|
6859
|
-
/* harmony import */ var
|
|
6860
|
-
/* harmony import */ var
|
|
6858
|
+
/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./group */ "./components/checkbox/group.tsx");
|
|
6859
|
+
/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
|
|
6860
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
|
|
6861
6861
|
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash/isBoolean */ "./node_modules/lodash/isBoolean.js");
|
|
6862
6862
|
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash_isBoolean__WEBPACK_IMPORTED_MODULE_11__);
|
|
6863
6863
|
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../icon */ "./components/icon/index.tsx");
|
|
@@ -6877,18 +6877,16 @@ var _excluded = ["checkboxType", "className", "prefixCls", "defaultChecked", "ch
|
|
|
6877
6877
|
|
|
6878
6878
|
|
|
6879
6879
|
|
|
6880
|
-
var CheckboxTypes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_10__["tuple"])('default', 'square');
|
|
6881
|
-
var CheckboxSizes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_10__["tuple"])('large', 'middle', 'small');
|
|
6882
6880
|
|
|
6883
6881
|
var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
6884
6882
|
var _classNames, _classNames2, _classNames4, _classNames5;
|
|
6885
6883
|
|
|
6886
|
-
var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_6__["useContext"])(
|
|
6884
|
+
var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_6__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_9__["default"]),
|
|
6887
6885
|
getPrefixCls = _useContext.getPrefixCls,
|
|
6888
6886
|
prefixCls = _useContext.prefixCls,
|
|
6889
6887
|
userDefaultProps = _useContext.compDefaultProps;
|
|
6890
6888
|
|
|
6891
|
-
var CheckboxProps = Object(
|
|
6889
|
+
var CheckboxProps = Object(_utils__WEBPACK_IMPORTED_MODULE_10__["getCompProps"])('Checkbox', userDefaultProps, props);
|
|
6892
6890
|
|
|
6893
6891
|
var checkboxType = CheckboxProps.checkboxType,
|
|
6894
6892
|
className = CheckboxProps.className,
|
|
@@ -6905,38 +6903,47 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
6905
6903
|
name = CheckboxProps.name,
|
|
6906
6904
|
rest = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3___default()(CheckboxProps, _excluded);
|
|
6907
6905
|
|
|
6908
|
-
var
|
|
6909
|
-
|
|
6910
|
-
|
|
6906
|
+
var checkboxGroup = react__WEBPACK_IMPORTED_MODULE_6___default.a.useContext(_group__WEBPACK_IMPORTED_MODULE_8__["GroupContext"]);
|
|
6907
|
+
var mergedDisabled = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.disabled) || disabled;
|
|
6908
|
+
var mergedCheckboxType = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.checkboxType) || checkboxType;
|
|
6909
|
+
var mergedName = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.name) || name;
|
|
6910
|
+
var initChecked = checkboxGroup !== null && checkboxGroup !== void 0 && checkboxGroup.groupValue ? (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.groupValue.indexOf(value)) > -1 : lodash_isBoolean__WEBPACK_IMPORTED_MODULE_11___default()(checked) ? checked : defaultChecked;
|
|
6911
6911
|
|
|
6912
|
-
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_6__["useState"])(
|
|
6912
|
+
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_6__["useState"])(initChecked),
|
|
6913
6913
|
_useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),
|
|
6914
6914
|
selected = _useState2[0],
|
|
6915
6915
|
setSelected = _useState2[1];
|
|
6916
6916
|
|
|
6917
6917
|
var labelRef = Object(react__WEBPACK_IMPORTED_MODULE_6__["useRef"])(null);
|
|
6918
|
-
|
|
6919
|
-
|
|
6918
|
+
react__WEBPACK_IMPORTED_MODULE_6___default.a.useEffect(function () {
|
|
6919
|
+
setSelected(checkboxGroup !== null && checkboxGroup !== void 0 && checkboxGroup.groupValue ? (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.groupValue.indexOf(value)) > -1 : lodash_isBoolean__WEBPACK_IMPORTED_MODULE_11___default()(checked) ? checked : defaultChecked);
|
|
6920
|
+
}, [checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.groupValue, checked, defaultChecked]);
|
|
6921
|
+
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_13__["default"])(_group__WEBPACK_IMPORTED_MODULE_8__["CheckboxTypes"].indexOf(mergedCheckboxType) === -1, 'checkbox', "cannot found checkbox type '".concat(mergedCheckboxType, "'"));
|
|
6922
|
+
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_13__["default"])(_group__WEBPACK_IMPORTED_MODULE_8__["CheckboxSizes"].indexOf(size) === -1, 'checkbox', "cannot found size type '".concat(size, "'"));
|
|
6920
6923
|
var checkboxPrefixCls = getPrefixCls(prefixCls, 'checkbox', customPrefixcls);
|
|
6921
6924
|
|
|
6922
6925
|
var isDefaultType = function isDefaultType() {
|
|
6923
|
-
return
|
|
6926
|
+
return mergedCheckboxType === 'default';
|
|
6924
6927
|
};
|
|
6925
6928
|
|
|
6926
6929
|
var getIndeterminate = function getIndeterminate() {
|
|
6927
6930
|
return selected ? false : indeterminate;
|
|
6928
6931
|
};
|
|
6929
6932
|
|
|
6930
|
-
var getDefaultClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-no-child"), !children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(size), true && !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(
|
|
6931
|
-
var getSquareClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(className, (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(
|
|
6933
|
+
var getDefaultClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-no-child"), !children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(size), true && !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-disabled"), mergedDisabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "checked", selected), _classNames));
|
|
6934
|
+
var getSquareClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(className, (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-disabled"), mergedDisabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-checked"), selected && !mergedDisabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "checked", selected), _classNames2));
|
|
6932
6935
|
var getRootClassName = isDefaultType() ? getDefaultClassName : getSquareClassName;
|
|
6933
6936
|
var inputClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(checkboxPrefixCls, "-input"), true));
|
|
6934
|
-
var checkedWrapperClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames4 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(
|
|
6935
|
-
var triangleClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames5 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames5, "".concat(checkboxPrefixCls, "-").concat(
|
|
6936
|
-
var innerIconClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(checkboxPrefixCls, "-").concat(
|
|
6937
|
+
var checkedWrapperClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames4 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-no-child"), !children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-wrapper"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-wrapper-size"), !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-margin"), !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-checked"), selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-indeterminate"), getIndeterminate()), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-disabled"), mergedDisabled && !selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-checked-disabled"), mergedDisabled && selected), _classNames4));
|
|
6938
|
+
var triangleClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames5 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames5, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-triangle"), !selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames5, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-triangle-checked"), selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames5, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-triangle-disabled"), mergedDisabled), _classNames5));
|
|
6939
|
+
var innerIconClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-inner"), true));
|
|
6937
6940
|
var handleChange = Object(react__WEBPACK_IMPORTED_MODULE_6__["useCallback"])(function (e) {
|
|
6938
6941
|
onChange && onChange(e);
|
|
6939
|
-
|
|
6942
|
+
(checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange) && (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange(value, e.target.checked));
|
|
6943
|
+
|
|
6944
|
+
if (!(checkboxGroup !== null && checkboxGroup !== void 0 && checkboxGroup.isControlled)) {
|
|
6945
|
+
setSelected(e.target.checked);
|
|
6946
|
+
}
|
|
6940
6947
|
}, [onChange]);
|
|
6941
6948
|
Object(react__WEBPACK_IMPORTED_MODULE_6__["useEffect"])(function () {
|
|
6942
6949
|
lodash_isBoolean__WEBPACK_IMPORTED_MODULE_11___default()(checked) && checked !== selected && setSelected(checked);
|
|
@@ -6975,7 +6982,7 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
6975
6982
|
className: innerIconClassName
|
|
6976
6983
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_12__["default"], {
|
|
6977
6984
|
type: "right-bold",
|
|
6978
|
-
className: "".concat(checkboxPrefixCls, "-").concat(
|
|
6985
|
+
className: "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-inner-icon")
|
|
6979
6986
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("input", {
|
|
6980
6987
|
type: "checkbox",
|
|
6981
6988
|
className: inputClassName,
|
|
@@ -6983,8 +6990,8 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
6983
6990
|
ref: ref,
|
|
6984
6991
|
value: value,
|
|
6985
6992
|
checked: selected,
|
|
6986
|
-
disabled:
|
|
6987
|
-
name:
|
|
6993
|
+
disabled: mergedDisabled,
|
|
6994
|
+
name: mergedName
|
|
6988
6995
|
})), children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("span", {
|
|
6989
6996
|
className: "".concat(checkboxPrefixCls, "-children")
|
|
6990
6997
|
}, children), !isDefaultType() && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("span", {
|
|
@@ -6993,7 +7000,7 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
6993
7000
|
className: innerIconClassName
|
|
6994
7001
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_12__["default"], {
|
|
6995
7002
|
type: "right-bold",
|
|
6996
|
-
className: "".concat(checkboxPrefixCls, "-").concat(
|
|
7003
|
+
className: "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-inner-icon")
|
|
6997
7004
|
}))))
|
|
6998
7005
|
);
|
|
6999
7006
|
};
|
|
@@ -7011,71 +7018,36 @@ Checkbox.displayName = 'Checkbox';
|
|
|
7011
7018
|
/*!***************************************!*\
|
|
7012
7019
|
!*** ./components/checkbox/group.tsx ***!
|
|
7013
7020
|
\***************************************/
|
|
7014
|
-
/*! exports provided: CheckboxTypes, CheckboxSizes, default */
|
|
7021
|
+
/*! exports provided: CheckboxTypes, CheckboxSizes, GroupContext, default */
|
|
7015
7022
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7016
7023
|
|
|
7017
7024
|
"use strict";
|
|
7018
7025
|
__webpack_require__.r(__webpack_exports__);
|
|
7019
7026
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxTypes", function() { return CheckboxTypes; });
|
|
7020
7027
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxSizes", function() { return CheckboxSizes; });
|
|
7021
|
-
/* harmony
|
|
7022
|
-
/* harmony import */ var
|
|
7023
|
-
/* harmony import */ var
|
|
7024
|
-
/* harmony import */ var
|
|
7025
|
-
/* harmony import */ var
|
|
7026
|
-
/* harmony import */ var
|
|
7027
|
-
/* harmony import */ var
|
|
7028
|
-
/* harmony import */ var
|
|
7029
|
-
/* harmony import */ var
|
|
7030
|
-
/* harmony import */ var
|
|
7031
|
-
/* harmony import */ var
|
|
7032
|
-
/* harmony import */ var
|
|
7033
|
-
/* harmony import */ var
|
|
7034
|
-
/* harmony import */ var
|
|
7035
|
-
/* harmony import */ var
|
|
7036
|
-
/* harmony import */ var
|
|
7037
|
-
/* harmony import */ var
|
|
7038
|
-
/* harmony import */ var
|
|
7039
|
-
/* harmony import */ var
|
|
7040
|
-
/* harmony import */ var
|
|
7041
|
-
/* harmony import */ var
|
|
7042
|
-
/* harmony import */ var
|
|
7043
|
-
/* harmony import */ var
|
|
7044
|
-
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
7045
|
-
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
7046
|
-
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
7047
|
-
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
|
|
7048
|
-
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
7049
|
-
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
|
|
7050
|
-
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
7051
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! react */ "react");
|
|
7052
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_15__);
|
|
7053
|
-
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
|
7054
|
-
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);
|
|
7055
|
-
/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
|
|
7056
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
|
|
7057
|
-
/* harmony import */ var _utils_type__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../_utils/type */ "./components/_utils/type.ts");
|
|
7058
|
-
/* harmony import */ var _utils_arrayUtil__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../_utils/arrayUtil */ "./components/_utils/arrayUtil.ts");
|
|
7059
|
-
/* harmony import */ var lodash_isArray__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! lodash/isArray */ "./node_modules/lodash/isArray.js");
|
|
7060
|
-
/* harmony import */ var lodash_isArray__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(lodash_isArray__WEBPACK_IMPORTED_MODULE_21__);
|
|
7061
|
-
/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./checkbox */ "./components/checkbox/checkbox.tsx");
|
|
7062
|
-
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! lodash/isBoolean */ "./node_modules/lodash/isBoolean.js");
|
|
7063
|
-
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(lodash_isBoolean__WEBPACK_IMPORTED_MODULE_23__);
|
|
7064
|
-
/* harmony import */ var _utils_devwarning__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../_utils/devwarning */ "./components/_utils/devwarning.ts");
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
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; }
|
|
7069
|
-
|
|
7070
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7028
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupContext", function() { return GroupContext; });
|
|
7029
|
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
|
|
7030
|
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);
|
|
7031
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
7032
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
7033
|
+
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
|
|
7034
|
+
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
7035
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
7036
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
7037
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
7038
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
7039
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
|
|
7040
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
7041
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react");
|
|
7042
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
|
|
7043
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
|
7044
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__);
|
|
7045
|
+
/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
|
|
7046
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
|
|
7047
|
+
/* harmony import */ var _utils_type__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_utils/type */ "./components/_utils/type.ts");
|
|
7048
|
+
/* harmony import */ var _utils_arrayUtil__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_utils/arrayUtil */ "./components/_utils/arrayUtil.ts");
|
|
7049
|
+
/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./checkbox */ "./components/checkbox/checkbox.tsx");
|
|
7050
|
+
/* harmony import */ var _utils_devwarning__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../_utils/devwarning */ "./components/_utils/devwarning.ts");
|
|
7079
7051
|
|
|
7080
7052
|
|
|
7081
7053
|
|
|
@@ -7091,18 +7063,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7091
7063
|
|
|
7092
7064
|
|
|
7093
7065
|
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
var
|
|
7097
|
-
var
|
|
7098
|
-
var CheckboxGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default.a.forwardRef(function (props, ref) {
|
|
7066
|
+
var CheckboxTypes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_10__["tuple"])('default', 'square');
|
|
7067
|
+
var CheckboxSizes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_10__["tuple"])('large', 'middle', 'small');
|
|
7068
|
+
var GroupContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createContext(null);
|
|
7069
|
+
var CheckboxGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.forwardRef(function (props, ref) {
|
|
7099
7070
|
// const CheckboxGroup = (props: CheckboxGroupProps): FunctionComponentElement<CheckboxGroupProps> => {
|
|
7100
|
-
var _useContext = Object(
|
|
7071
|
+
var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_6__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_8__["default"]),
|
|
7101
7072
|
getPrefixCls = _useContext.getPrefixCls,
|
|
7102
7073
|
prefixCls = _useContext.prefixCls,
|
|
7103
7074
|
userDefaultProps = _useContext.compDefaultProps;
|
|
7104
7075
|
|
|
7105
|
-
var CheckboxProps = Object(
|
|
7076
|
+
var CheckboxProps = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getCompProps"])('Checkbox', userDefaultProps, props); // 按钮属性需要合并一遍用户定义的默认属性
|
|
7106
7077
|
|
|
7107
7078
|
var checkboxType = CheckboxProps.checkboxType,
|
|
7108
7079
|
className = CheckboxProps.className,
|
|
@@ -7116,110 +7087,85 @@ var CheckboxGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default.a.f
|
|
|
7116
7087
|
defaultValue = CheckboxProps.defaultValue,
|
|
7117
7088
|
value = CheckboxProps.value,
|
|
7118
7089
|
name = CheckboxProps.name;
|
|
7090
|
+
var initData = value || (Array.isArray(defaultValue) ? defaultValue : typeof defaultValue !== 'undefined' ? [defaultValue] : []);
|
|
7119
7091
|
|
|
7120
|
-
var _React$useState =
|
|
7121
|
-
_React$useState2 =
|
|
7092
|
+
var _React$useState = react__WEBPACK_IMPORTED_MODULE_6___default.a.useState([]),
|
|
7093
|
+
_React$useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_React$useState, 2),
|
|
7122
7094
|
groupValue = _React$useState2[0],
|
|
7123
7095
|
setGroupValue = _React$useState2[1];
|
|
7124
7096
|
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
}, [value]);
|
|
7097
|
+
var innerValue = react__WEBPACK_IMPORTED_MODULE_6___default.a.useRef(initData);
|
|
7098
|
+
react__WEBPACK_IMPORTED_MODULE_6___default.a.useEffect(function () {
|
|
7099
|
+
innerValue.current = value || (Array.isArray(defaultValue) ? defaultValue : typeof defaultValue !== 'undefined' ? [defaultValue] : []);
|
|
7100
|
+
setGroupValue(innerValue.current);
|
|
7101
|
+
}, [value, defaultValue]);
|
|
7102
|
+
var isControlled = typeof value !== 'undefined';
|
|
7130
7103
|
var checkboxGroupPrefixCls = getPrefixCls(prefixCls, 'checkbox-group', customPrefixcls); // 按钮样式前缀
|
|
7131
7104
|
|
|
7132
|
-
Object(
|
|
7133
|
-
|
|
7134
|
-
var getDisabled = function getDisabled(optionDisabled) {
|
|
7135
|
-
return lodash_isBoolean__WEBPACK_IMPORTED_MODULE_23___default()(optionDisabled) ? optionDisabled : disabled;
|
|
7136
|
-
};
|
|
7137
|
-
|
|
7138
|
-
var getChecked = function getChecked(props, value) {
|
|
7139
|
-
return lodash_isArray__WEBPACK_IMPORTED_MODULE_21___default()(value) ? value.includes((props === null || props === void 0 ? void 0 : props.value) || props) || value.includes(String((props === null || props === void 0 ? void 0 : props.value) || props)) : String(value) === String((props === null || props === void 0 ? void 0 : props.value) || props);
|
|
7140
|
-
};
|
|
7105
|
+
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_13__["default"])(Object(_utils_arrayUtil__WEBPACK_IMPORTED_MODULE_11__["isArrayValueRepeat"])(groupValue), 'checkboxGroup', "variable value's value should be unique ");
|
|
7141
7106
|
|
|
7142
7107
|
var getReduceItem = function getReduceItem(targetValue) {
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7108
|
+
return innerValue.current.filter(function (d) {
|
|
7109
|
+
return d !== targetValue;
|
|
7110
|
+
});
|
|
7146
7111
|
};
|
|
7147
7112
|
|
|
7148
7113
|
var getAddItem = function getAddItem(targetValue) {
|
|
7149
|
-
return
|
|
7114
|
+
return innerValue.current.indexOf(targetValue) > -1 ? innerValue.current : innerValue.current.concat(targetValue);
|
|
7150
7115
|
};
|
|
7151
7116
|
|
|
7152
|
-
var onCheckboxChange = function onCheckboxChange(
|
|
7153
|
-
var _item$props;
|
|
7154
|
-
|
|
7155
|
-
var val = ev.target.value;
|
|
7156
|
-
var checked = ev.target.checked;
|
|
7117
|
+
var onCheckboxChange = function onCheckboxChange(checkedValue, isChecked) {
|
|
7157
7118
|
var newVal = [];
|
|
7158
7119
|
|
|
7159
|
-
if (
|
|
7160
|
-
newVal = getAddItem(
|
|
7120
|
+
if (isChecked) {
|
|
7121
|
+
newVal = getAddItem(checkedValue);
|
|
7161
7122
|
} else {
|
|
7162
|
-
newVal = getReduceItem(
|
|
7123
|
+
newVal = getReduceItem(checkedValue);
|
|
7124
|
+
}
|
|
7125
|
+
|
|
7126
|
+
if (!isControlled) {
|
|
7127
|
+
innerValue.current = newVal;
|
|
7163
7128
|
}
|
|
7164
7129
|
|
|
7165
|
-
setGroupValue(newVal);
|
|
7166
7130
|
onChange && onChange(newVal);
|
|
7167
|
-
|
|
7131
|
+
};
|
|
7132
|
+
|
|
7133
|
+
var context = {
|
|
7134
|
+
groupValue: groupValue,
|
|
7135
|
+
disabled: disabled,
|
|
7136
|
+
name: name,
|
|
7137
|
+
isControlled: isControlled,
|
|
7138
|
+
checkboxType: checkboxType,
|
|
7139
|
+
onCheckboxGroupChange: function onCheckboxGroupChange(checkedValue, isChecked) {
|
|
7140
|
+
onCheckboxChange(checkedValue, isChecked);
|
|
7141
|
+
}
|
|
7168
7142
|
};
|
|
7169
7143
|
|
|
7170
7144
|
var renderByOptions = function renderByOptions() {
|
|
7171
7145
|
return options.map(function (option, index) {
|
|
7172
|
-
return /*#__PURE__*/
|
|
7146
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(_checkbox__WEBPACK_IMPORTED_MODULE_12__["default"], {
|
|
7173
7147
|
size: size,
|
|
7174
|
-
disabled:
|
|
7148
|
+
disabled: option.disabled,
|
|
7175
7149
|
key: index,
|
|
7176
7150
|
name: name,
|
|
7177
|
-
defaultChecked:
|
|
7178
|
-
checked:
|
|
7151
|
+
defaultChecked: option.defaultValue,
|
|
7152
|
+
checked: option.checked,
|
|
7179
7153
|
checkboxType: checkboxType,
|
|
7180
7154
|
value: (option === null || option === void 0 ? void 0 : option.value) || option,
|
|
7181
|
-
onChange:
|
|
7182
|
-
return onCheckboxChange(e, option);
|
|
7183
|
-
}
|
|
7155
|
+
onChange: option.onChange
|
|
7184
7156
|
}, option.label || option);
|
|
7185
7157
|
});
|
|
7186
7158
|
};
|
|
7187
7159
|
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
var _item$props2, _item$props3;
|
|
7191
|
-
|
|
7192
|
-
var groupProps = {};
|
|
7193
|
-
groupProps = {
|
|
7194
|
-
name: name,
|
|
7195
|
-
size: size,
|
|
7196
|
-
onChange: function onChange(e) {
|
|
7197
|
-
return onCheckboxChange(e, item);
|
|
7198
|
-
},
|
|
7199
|
-
checkboxType: checkboxType || ((_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.checkboxType),
|
|
7200
|
-
disabled: lodash_isBoolean__WEBPACK_IMPORTED_MODULE_23___default()(disabled) ? disabled : (_item$props3 = item.props) === null || _item$props3 === void 0 ? void 0 : _item$props3.disabled,
|
|
7201
|
-
checked: getChecked(item.props, groupValue),
|
|
7202
|
-
defaultChecked: getChecked(item.props, defaultValue)
|
|
7203
|
-
};
|
|
7204
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default.a.cloneElement(item, _objectSpread(_objectSpread({}, item.props), groupProps));
|
|
7205
|
-
});
|
|
7206
|
-
};
|
|
7207
|
-
|
|
7208
|
-
var renderCheckbox = function renderCheckbox() {
|
|
7209
|
-
if (lodash_isArray__WEBPACK_IMPORTED_MODULE_21___default()(options)) {
|
|
7210
|
-
return renderByOptions();
|
|
7211
|
-
} else if (children) {
|
|
7212
|
-
return renderChildren();
|
|
7213
|
-
}
|
|
7214
|
-
};
|
|
7215
|
-
|
|
7216
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default.a.createElement("ul", {
|
|
7217
|
-
className: classnames__WEBPACK_IMPORTED_MODULE_16___default()(checkboxGroupPrefixCls, className),
|
|
7160
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("ul", {
|
|
7161
|
+
className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(checkboxGroupPrefixCls, className),
|
|
7218
7162
|
style: style,
|
|
7219
7163
|
ref: ref
|
|
7220
|
-
},
|
|
7164
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(GroupContext.Provider, {
|
|
7165
|
+
value: context
|
|
7166
|
+
}, options && options.length > 0 ? renderByOptions() : children));
|
|
7221
7167
|
});
|
|
7222
|
-
/* harmony default export */ __webpack_exports__["default"] = (/*#__PURE__*/
|
|
7168
|
+
/* harmony default export */ __webpack_exports__["default"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.memo(CheckboxGroup));
|
|
7223
7169
|
|
|
7224
7170
|
/***/ }),
|
|
7225
7171
|
|
|
@@ -7227,7 +7173,7 @@ var CheckboxGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default.a.f
|
|
|
7227
7173
|
/*!***************************************!*\
|
|
7228
7174
|
!*** ./components/checkbox/index.tsx ***!
|
|
7229
7175
|
\***************************************/
|
|
7230
|
-
/*! exports provided:
|
|
7176
|
+
/*! exports provided: CheckboxSizes, CheckboxTypes, CheckboxSize, CheckboxType, CheckboxValueType, CheckboxGroupProps, CheckboxProps, Group, default */
|
|
7231
7177
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7232
7178
|
|
|
7233
7179
|
"use strict";
|
|
@@ -7236,14 +7182,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7236
7182
|
/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group */ "./components/checkbox/group.tsx");
|
|
7237
7183
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Group", function() { return _group__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
7238
7184
|
|
|
7239
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
7185
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxSizes", function() { return _group__WEBPACK_IMPORTED_MODULE_1__["CheckboxSizes"]; });
|
|
7186
|
+
|
|
7187
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxTypes", function() { return _group__WEBPACK_IMPORTED_MODULE_1__["CheckboxTypes"]; });
|
|
7188
|
+
|
|
7189
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxSize", function() { return _group__WEBPACK_IMPORTED_MODULE_1__["CheckboxSize"]; });
|
|
7240
7190
|
|
|
7241
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
7191
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxType", function() { return _group__WEBPACK_IMPORTED_MODULE_1__["CheckboxType"]; });
|
|
7242
7192
|
|
|
7243
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
7193
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxValueType", function() { return _group__WEBPACK_IMPORTED_MODULE_1__["CheckboxValueType"]; });
|
|
7244
7194
|
|
|
7245
7195
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxGroupProps", function() { return _group__WEBPACK_IMPORTED_MODULE_1__["CheckboxGroupProps"]; });
|
|
7246
7196
|
|
|
7197
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckboxProps", function() { return _checkbox__WEBPACK_IMPORTED_MODULE_0__["CheckboxProps"]; });
|
|
7198
|
+
|
|
7199
|
+
|
|
7247
7200
|
|
|
7248
7201
|
|
|
7249
7202
|
|