@kdcloudjs/kdesign 1.1.3 → 1.2.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 +39 -3
- package/dist/kdesign-complete.less +407 -261
- package/dist/kdesign.css +154 -54
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +253 -19
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +4 -4
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/usePopper.js +0 -1
- package/es/anchor/anchor.js +0 -6
- package/es/anchor/style/index.css +5 -2
- package/es/anchor/style/index.less +6 -2
- package/es/anchor/style/token.less +2 -1
- package/es/button/button.d.ts +1 -1
- package/es/button/button.js +2 -2
- package/es/button/group.d.ts +21 -0
- package/es/button/group.js +130 -0
- package/es/button/index.d.ts +5 -1
- package/es/button/index.js +4 -1
- package/es/button/style/index.css +117 -21
- package/es/button/style/index.less +332 -192
- package/es/button/style/token.less +41 -25
- package/es/carousel/carousel.js +4 -0
- package/es/config-provider/compDefaultProps.d.ts +4 -0
- package/es/config-provider/compDefaultProps.js +4 -0
- package/es/empty/defaultEmptyImg.js +5 -3
- package/es/empty/illustrationEmptyImg.js +6 -4
- package/es/icon/interface.js +1 -1
- package/es/image/preview.js +1 -1
- package/es/image/style/index.css +8 -8
- package/es/image/style/index.less +5 -5
- package/es/image/style/token.less +12 -25
- package/es/rate/style/index.css +9 -9
- package/es/rate/style/token.less +6 -6
- package/es/stepper/style/index.css +1 -1
- package/es/stepper/style/token.less +1 -1
- package/es/style/icon/kdicon.css +2 -1
- package/es/style/icon/kdicon.woff +0 -0
- package/es/switch/style/index.css +11 -11
- package/es/switch/style/index.less +2 -2
- package/es/switch/style/token.less +7 -10
- package/lib/_utils/usePopper.js +0 -1
- package/lib/anchor/anchor.js +0 -6
- package/lib/anchor/style/index.css +5 -2
- package/lib/anchor/style/index.less +6 -2
- package/lib/anchor/style/token.less +2 -1
- package/lib/button/button.d.ts +1 -1
- package/lib/button/button.js +2 -2
- package/lib/button/group.d.ts +21 -0
- package/lib/button/group.js +166 -0
- package/lib/button/index.d.ts +5 -1
- package/lib/button/index.js +5 -1
- package/lib/button/style/index.css +117 -21
- package/lib/button/style/index.less +332 -192
- package/lib/button/style/token.less +41 -25
- package/lib/carousel/carousel.js +4 -0
- package/lib/config-provider/compDefaultProps.d.ts +4 -0
- package/lib/config-provider/compDefaultProps.js +4 -0
- package/lib/empty/defaultEmptyImg.js +6 -3
- package/lib/empty/illustrationEmptyImg.js +7 -4
- package/lib/icon/interface.js +1 -1
- package/lib/image/preview.js +1 -1
- package/lib/image/style/index.css +8 -8
- package/lib/image/style/index.less +5 -5
- package/lib/image/style/token.less +12 -25
- package/lib/rate/style/index.css +9 -9
- package/lib/rate/style/token.less +6 -6
- package/lib/stepper/style/index.css +1 -1
- package/lib/stepper/style/token.less +1 -1
- package/lib/style/icon/kdicon.css +2 -1
- package/lib/style/icon/kdicon.woff +0 -0
- package/lib/switch/style/index.css +11 -11
- package/lib/switch/style/index.less +2 -2
- package/lib/switch/style/token.less +7 -10
- package/package.json +1 -1
package/dist/kdesign.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/kdesign v1.1.
|
|
3
|
+
* @kdcloudjs/kdesign v1.1.3
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -1805,7 +1805,6 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
1805
1805
|
}
|
|
1806
1806
|
}, [disabled, exist, onTrigger, visible]);
|
|
1807
1807
|
var hidePopper = Object(react__WEBPACK_IMPORTED_MODULE_18__["useCallback"])(function () {
|
|
1808
|
-
setEvType('');
|
|
1809
1808
|
props.visible === undefined && setVisible(false);
|
|
1810
1809
|
onVisibleChange && onVisibleChange(false);
|
|
1811
1810
|
}, [onVisibleChange, props.visible]);
|
|
@@ -2766,12 +2765,6 @@ var InternalAnchor = function InternalAnchor(props, ref) {
|
|
|
2766
2765
|
var handleVisibleChange = function handleVisibleChange(visible) {
|
|
2767
2766
|
!isLocked && onVisibleChange && onVisibleChange(visible);
|
|
2768
2767
|
if (props.visible !== undefined) return;
|
|
2769
|
-
|
|
2770
|
-
if (visible) {
|
|
2771
|
-
setOptionShow(visible);
|
|
2772
|
-
return;
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
2768
|
!isLocked && setOptionShow(visible);
|
|
2776
2769
|
};
|
|
2777
2770
|
|
|
@@ -4400,7 +4393,7 @@ var _excluded = ["type", "iconPlace", "children", "className", "prefixCls", "siz
|
|
|
4400
4393
|
|
|
4401
4394
|
var ButtonTypes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_9__["tuple"])('second', 'primary', 'ghost', 'text');
|
|
4402
4395
|
var ButtonSizes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_9__["tuple"])('large', 'middle', 'small');
|
|
4403
|
-
var ButtonShapes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_9__["tuple"])('circle', 'round');
|
|
4396
|
+
var ButtonShapes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_9__["tuple"])('circle', 'round', 'none');
|
|
4404
4397
|
var ButtonIconPlaces = Object(_utils_type__WEBPACK_IMPORTED_MODULE_9__["tuple"])('left', 'right');
|
|
4405
4398
|
var ButtonHTMLTypes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_9__["tuple"])('submit', 'button', 'reset');
|
|
4406
4399
|
|
|
@@ -4482,7 +4475,7 @@ var InternalButton = function InternalButton(props, ref) {
|
|
|
4482
4475
|
|
|
4483
4476
|
var isTextBtn = type === 'text'; // 判断按钮是否文本类型。这些类型下有部分样式不适用
|
|
4484
4477
|
|
|
4485
|
-
var btnClasses = classnames__WEBPACK_IMPORTED_MODULE_6___default()(btnPrefixCls, className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-").concat(type), type), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-shape-").concat(shape), shape && !isTextBtn), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-no-border"), !bordered), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-background-ghost"), ghost && !disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-loading"), loading && !isTextBtn), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-block"), block && !shape), _classNames));
|
|
4478
|
+
var btnClasses = classnames__WEBPACK_IMPORTED_MODULE_6___default()(btnPrefixCls, className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-").concat(type), type), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-shape-").concat(shape), shape && !isTextBtn), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-no-border"), !bordered), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-background-ghost"), ghost && !disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-loading"), loading && !isTextBtn), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-block"), block && !shape), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(btnPrefixCls, "-icon-only"), !children && children !== 0 && icon), _classNames));
|
|
4486
4479
|
var iconWrapperClassName = "".concat(btnPrefixCls, "-iconWrapper-").concat(iconPlace === 'left' ? 'left' : 'right');
|
|
4487
4480
|
var iconNode = icon && !loading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("span", {
|
|
4488
4481
|
className: iconWrapperClassName
|
|
@@ -4527,6 +4520,188 @@ Button.displayName = 'Button';
|
|
|
4527
4520
|
|
|
4528
4521
|
/***/ }),
|
|
4529
4522
|
|
|
4523
|
+
/***/ "./components/button/group.tsx":
|
|
4524
|
+
/*!*************************************!*\
|
|
4525
|
+
!*** ./components/button/group.tsx ***!
|
|
4526
|
+
\*************************************/
|
|
4527
|
+
/*! exports provided: ButtonGroupTypes, default */
|
|
4528
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4529
|
+
|
|
4530
|
+
"use strict";
|
|
4531
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4532
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonGroupTypes", function() { return ButtonGroupTypes; });
|
|
4533
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
|
|
4534
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
4535
|
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
|
|
4536
|
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);
|
|
4537
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
4538
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
4539
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
|
|
4540
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
4541
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
|
|
4542
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
4543
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
4544
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
4545
|
+
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
|
|
4546
|
+
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
4547
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
4548
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
4549
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
4550
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
4551
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
|
|
4552
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
4553
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
|
|
4554
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
4555
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ "react");
|
|
4556
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);
|
|
4557
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
|
4558
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);
|
|
4559
|
+
/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
|
|
4560
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
|
|
4561
|
+
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../index */ "./components/index.tsx");
|
|
4562
|
+
/* harmony import */ var _utils_usePopper__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_utils/usePopper */ "./components/_utils/usePopper.tsx");
|
|
4563
|
+
/* harmony import */ var _utils_react_children__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../_utils/react-children */ "./components/_utils/react-children.ts");
|
|
4564
|
+
/* harmony import */ var _utils_type__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../_utils/type */ "./components/_utils/type.ts");
|
|
4565
|
+
|
|
4566
|
+
|
|
4567
|
+
|
|
4568
|
+
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; }
|
|
4569
|
+
|
|
4570
|
+
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; }
|
|
4571
|
+
|
|
4572
|
+
|
|
4573
|
+
|
|
4574
|
+
|
|
4575
|
+
|
|
4576
|
+
|
|
4577
|
+
|
|
4578
|
+
|
|
4579
|
+
|
|
4580
|
+
|
|
4581
|
+
|
|
4582
|
+
|
|
4583
|
+
|
|
4584
|
+
|
|
4585
|
+
|
|
4586
|
+
|
|
4587
|
+
|
|
4588
|
+
|
|
4589
|
+
var ButtonGroupTypes = Object(_utils_type__WEBPACK_IMPORTED_MODULE_18__["tuple"])('basic', 'similar');
|
|
4590
|
+
|
|
4591
|
+
var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
4592
|
+
var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_11__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_13__["default"]),
|
|
4593
|
+
getPrefixCls = _useContext.getPrefixCls,
|
|
4594
|
+
prefixCls = _useContext.prefixCls,
|
|
4595
|
+
userDefaultProps = _useContext.compDefaultProps;
|
|
4596
|
+
|
|
4597
|
+
var buttonGoupProps = Object(_utils__WEBPACK_IMPORTED_MODULE_14__["getCompProps"])('ButtonGroup', userDefaultProps, props);
|
|
4598
|
+
var style = buttonGoupProps.style,
|
|
4599
|
+
className = buttonGoupProps.className,
|
|
4600
|
+
children = buttonGoupProps.children,
|
|
4601
|
+
customPrefixcls = buttonGoupProps.prefixCls,
|
|
4602
|
+
onClick = buttonGoupProps.onClick,
|
|
4603
|
+
onItemClick = buttonGoupProps.onItemClick,
|
|
4604
|
+
overlay = buttonGoupProps.overlay,
|
|
4605
|
+
icon = buttonGoupProps.icon,
|
|
4606
|
+
type = buttonGoupProps.type,
|
|
4607
|
+
buttonType = buttonGoupProps.buttonType,
|
|
4608
|
+
disabled = buttonGoupProps.disabled,
|
|
4609
|
+
onVisibleChange = buttonGoupProps.onVisibleChange;
|
|
4610
|
+
|
|
4611
|
+
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_11__["useState"])(false),
|
|
4612
|
+
_useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),
|
|
4613
|
+
optionShow = _useState2[0],
|
|
4614
|
+
setOptionShow = _useState2[1]; // 下拉列表是否展示
|
|
4615
|
+
|
|
4616
|
+
|
|
4617
|
+
var refBtnGroup = react__WEBPACK_IMPORTED_MODULE_11___default.a.useRef(null) || ref;
|
|
4618
|
+
var triggerRef = react__WEBPACK_IMPORTED_MODULE_11___default.a.useRef(null);
|
|
4619
|
+
var isBsicType = type === 'basic';
|
|
4620
|
+
var btnGroupPrefixCls = getPrefixCls(prefixCls, 'btn-group', customPrefixcls);
|
|
4621
|
+
var btnGroupClasses = classnames__WEBPACK_IMPORTED_MODULE_12___default()("".concat(btnGroupPrefixCls), className, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, "".concat(btnGroupPrefixCls, "-").concat(type), type));
|
|
4622
|
+
var renderTriggerButton = Object(react__WEBPACK_IMPORTED_MODULE_11__["useCallback"])(function () {
|
|
4623
|
+
var _toArray = Object(_utils_react_children__WEBPACK_IMPORTED_MODULE_17__["toArray"])(icon),
|
|
4624
|
+
_toArray2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_toArray, 2),
|
|
4625
|
+
_toArray2$ = _toArray2[0],
|
|
4626
|
+
iconUp = _toArray2$ === void 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_15__["Icon"], {
|
|
4627
|
+
type: "arrow-up"
|
|
4628
|
+
}) : _toArray2$,
|
|
4629
|
+
_toArray2$2 = _toArray2[1],
|
|
4630
|
+
iconDown = _toArray2$2 === void 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_15__["Icon"], {
|
|
4631
|
+
type: "arrow-down"
|
|
4632
|
+
}) : _toArray2$2;
|
|
4633
|
+
|
|
4634
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement("div", {
|
|
4635
|
+
style: style,
|
|
4636
|
+
className: btnGroupClasses,
|
|
4637
|
+
ref: refBtnGroup
|
|
4638
|
+
}, isBsicType && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_15__["Button"], {
|
|
4639
|
+
type: buttonType,
|
|
4640
|
+
disabled: disabled
|
|
4641
|
+
}, children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement("span", {
|
|
4642
|
+
className: "".concat(btnGroupPrefixCls, "-basic-icon")
|
|
4643
|
+
}, optionShow ? iconUp : iconDown)), !isBsicType && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_15__["Button"], {
|
|
4644
|
+
type: buttonType,
|
|
4645
|
+
disabled: disabled,
|
|
4646
|
+
onClick: onClick
|
|
4647
|
+
}, children), !isBsicType && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement("span", {
|
|
4648
|
+
className: "".concat(btnGroupPrefixCls, "-trigger"),
|
|
4649
|
+
ref: triggerRef
|
|
4650
|
+
}, optionShow ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_15__["Button"], {
|
|
4651
|
+
icon: iconUp,
|
|
4652
|
+
type: buttonType,
|
|
4653
|
+
disabled: disabled
|
|
4654
|
+
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_15__["Button"], {
|
|
4655
|
+
icon: iconDown,
|
|
4656
|
+
type: buttonType,
|
|
4657
|
+
disabled: disabled
|
|
4658
|
+
})));
|
|
4659
|
+
}, [icon, btnGroupPrefixCls, style, btnGroupClasses, refBtnGroup, isBsicType, buttonType, disabled, children, optionShow, onClick]);
|
|
4660
|
+
var handleItemClick = Object(react__WEBPACK_IMPORTED_MODULE_11__["useCallback"])(function (data) {
|
|
4661
|
+
onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(data);
|
|
4662
|
+
setOptionShow(false);
|
|
4663
|
+
}, [onItemClick]);
|
|
4664
|
+
var renderContent = Object(react__WEBPACK_IMPORTED_MODULE_11__["useCallback"])(function () {
|
|
4665
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement("div", {
|
|
4666
|
+
className: "".concat(btnGroupPrefixCls, "-dropdown")
|
|
4667
|
+
}, (overlay || []).map(function (item) {
|
|
4668
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement("div", {
|
|
4669
|
+
key: item.value,
|
|
4670
|
+
className: "".concat(btnGroupPrefixCls, "-dropdown-item"),
|
|
4671
|
+
onClick: function onClick() {
|
|
4672
|
+
return handleItemClick === null || handleItemClick === void 0 ? void 0 : handleItemClick(item);
|
|
4673
|
+
}
|
|
4674
|
+
}, item.label);
|
|
4675
|
+
}));
|
|
4676
|
+
}, [btnGroupPrefixCls, overlay, handleItemClick]);
|
|
4677
|
+
|
|
4678
|
+
var handleVisibleChange = function handleVisibleChange(visible) {
|
|
4679
|
+
setOptionShow(visible);
|
|
4680
|
+
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(visible);
|
|
4681
|
+
};
|
|
4682
|
+
|
|
4683
|
+
var popperProps = _objectSpread(_objectSpread({
|
|
4684
|
+
placement: 'bottomLeft',
|
|
4685
|
+
trigger: 'click'
|
|
4686
|
+
}, buttonGoupProps), {}, {
|
|
4687
|
+
prefixCls: btnGroupPrefixCls,
|
|
4688
|
+
defaultVisible: optionShow,
|
|
4689
|
+
visible: optionShow,
|
|
4690
|
+
onVisibleChange: handleVisibleChange,
|
|
4691
|
+
getTriggerElement: function getTriggerElement(locatorNode) {
|
|
4692
|
+
return isBsicType ? locatorNode : triggerRef.current;
|
|
4693
|
+
}
|
|
4694
|
+
});
|
|
4695
|
+
|
|
4696
|
+
return Object(_utils_usePopper__WEBPACK_IMPORTED_MODULE_16__["default"])(renderTriggerButton(), renderContent(), popperProps);
|
|
4697
|
+
};
|
|
4698
|
+
|
|
4699
|
+
var ButtonGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default.a.forwardRef(InternalButtonGroup);
|
|
4700
|
+
ButtonGroup.displayName = 'ButtonGroup';
|
|
4701
|
+
/* harmony default export */ __webpack_exports__["default"] = (ButtonGroup);
|
|
4702
|
+
|
|
4703
|
+
/***/ }),
|
|
4704
|
+
|
|
4530
4705
|
/***/ "./components/button/index.tsx":
|
|
4531
4706
|
/*!*************************************!*\
|
|
4532
4707
|
!*** ./components/button/index.tsx ***!
|
|
@@ -4537,13 +4712,17 @@ Button.displayName = 'Button';
|
|
|
4537
4712
|
"use strict";
|
|
4538
4713
|
__webpack_require__.r(__webpack_exports__);
|
|
4539
4714
|
/* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button */ "./components/button/button.tsx");
|
|
4715
|
+
/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group */ "./components/button/group.tsx");
|
|
4540
4716
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonType", function() { return _button__WEBPACK_IMPORTED_MODULE_0__["ButtonType"]; });
|
|
4541
4717
|
|
|
4542
4718
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IButtonProps", function() { return _button__WEBPACK_IMPORTED_MODULE_0__["IButtonProps"]; });
|
|
4543
4719
|
|
|
4544
4720
|
|
|
4545
4721
|
|
|
4546
|
-
|
|
4722
|
+
var Button = _button__WEBPACK_IMPORTED_MODULE_0__["default"];
|
|
4723
|
+
Button.Dropdown = _group__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
4724
|
+
|
|
4725
|
+
/* harmony default export */ __webpack_exports__["default"] = (Button);
|
|
4547
4726
|
|
|
4548
4727
|
/***/ }),
|
|
4549
4728
|
|
|
@@ -4899,6 +5078,10 @@ var InternalCarousel = function InternalCarousel(props, ref) {
|
|
|
4899
5078
|
if (autoplay) {
|
|
4900
5079
|
play();
|
|
4901
5080
|
}
|
|
5081
|
+
|
|
5082
|
+
return function () {
|
|
5083
|
+
autoplayRef.current && clearTimeout(autoplayRef.current);
|
|
5084
|
+
};
|
|
4902
5085
|
}, [currentIndex, autoplay, intervalTime, play]);
|
|
4903
5086
|
|
|
4904
5087
|
var showDot = function showDot() {
|
|
@@ -7420,6 +7603,10 @@ var compDefaultProps = {
|
|
|
7420
7603
|
size: 'middle',
|
|
7421
7604
|
bordered: true
|
|
7422
7605
|
},
|
|
7606
|
+
ButtonGroup: {
|
|
7607
|
+
buttonType: 'primary',
|
|
7608
|
+
type: 'basic'
|
|
7609
|
+
},
|
|
7423
7610
|
Card: {
|
|
7424
7611
|
hoverable: false,
|
|
7425
7612
|
selectable: false
|
|
@@ -14064,6 +14251,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14064
14251
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14065
14252
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14066
14253
|
/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
|
|
14254
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js");
|
|
14255
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
14256
|
+
|
|
14067
14257
|
|
|
14068
14258
|
|
|
14069
14259
|
|
|
@@ -14073,6 +14263,7 @@ function DefaultEmptyImg() {
|
|
|
14073
14263
|
prefixCls = _useContext.prefixCls;
|
|
14074
14264
|
|
|
14075
14265
|
var emptyPrefixCls = getPrefixCls(prefixCls, 'empty');
|
|
14266
|
+
var linearGradientId = lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()(emptyPrefixCls + '-default-linearGradient');
|
|
14076
14267
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", {
|
|
14077
14268
|
className: "".concat(emptyPrefixCls, "-image"),
|
|
14078
14269
|
width: "168px",
|
|
@@ -14085,7 +14276,7 @@ function DefaultEmptyImg() {
|
|
|
14085
14276
|
y1: "0%",
|
|
14086
14277
|
x2: "50%",
|
|
14087
14278
|
y2: "100%",
|
|
14088
|
-
id:
|
|
14279
|
+
id: linearGradientId
|
|
14089
14280
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", {
|
|
14090
14281
|
stopColor: "#D6DCE7",
|
|
14091
14282
|
offset: "0%"
|
|
@@ -14135,7 +14326,7 @@ function DefaultEmptyImg() {
|
|
|
14135
14326
|
height: "6"
|
|
14136
14327
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", {
|
|
14137
14328
|
transform: "translate(108.000000, 40.000000)",
|
|
14138
|
-
fill: "url(#
|
|
14329
|
+
fill: "url(#".concat(linearGradientId, ")"),
|
|
14139
14330
|
id: "\u80CC\u666F/\u4E91",
|
|
14140
14331
|
opacity: "0.300000012"
|
|
14141
14332
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", {
|
|
@@ -14144,7 +14335,7 @@ function DefaultEmptyImg() {
|
|
|
14144
14335
|
d: "M3,39 L3,24 C3,15.7157288 9.71572875,9 18,9 C25.4616776,9 31.6508469,14.4482558 32.8063948,21.5836543 C33.797875,21.2064779 34.8748247,21 36,21 C40.9705627,21 45,25.0294373 45,30 L45,39 L3,39 Z"
|
|
14145
14336
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", {
|
|
14146
14337
|
transform: "translate(12.000000, 32.000000)",
|
|
14147
|
-
fill: "url(#
|
|
14338
|
+
fill: "url(#".concat(linearGradientId, ")"),
|
|
14148
14339
|
id: "\u80CC\u666F/\u4E91",
|
|
14149
14340
|
opacity: "0.300000012"
|
|
14150
14341
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", {
|
|
@@ -14267,6 +14458,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14267
14458
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14268
14459
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14269
14460
|
/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
|
|
14461
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js");
|
|
14462
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
14463
|
+
|
|
14270
14464
|
|
|
14271
14465
|
|
|
14272
14466
|
|
|
@@ -14276,6 +14470,7 @@ function IllustrationEmptyImg() {
|
|
|
14276
14470
|
prefixCls = _useContext.prefixCls;
|
|
14277
14471
|
|
|
14278
14472
|
var emptyPrefixCls = getPrefixCls(prefixCls, 'empty');
|
|
14473
|
+
var linearGradientId = lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()(emptyPrefixCls + '-illus-linearGradient-');
|
|
14279
14474
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", {
|
|
14280
14475
|
className: "".concat(emptyPrefixCls, "-image"),
|
|
14281
14476
|
width: "200px",
|
|
@@ -14294,7 +14489,7 @@ function IllustrationEmptyImg() {
|
|
|
14294
14489
|
y1: "0%",
|
|
14295
14490
|
x2: "50%",
|
|
14296
14491
|
y2: "100%",
|
|
14297
|
-
id:
|
|
14492
|
+
id: linearGradientId
|
|
14298
14493
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", {
|
|
14299
14494
|
stopColor: "#F2F5FA",
|
|
14300
14495
|
offset: "0%"
|
|
@@ -14307,7 +14502,7 @@ function IllustrationEmptyImg() {
|
|
|
14307
14502
|
y1: "0%",
|
|
14308
14503
|
x2: "50%",
|
|
14309
14504
|
y2: "100%",
|
|
14310
|
-
id: "
|
|
14505
|
+
id: "".concat(linearGradientId, "-1")
|
|
14311
14506
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("stop", {
|
|
14312
14507
|
stopColor: "#F2F5FA",
|
|
14313
14508
|
offset: "0%"
|
|
@@ -14361,7 +14556,7 @@ function IllustrationEmptyImg() {
|
|
|
14361
14556
|
transform: "translate(11.428571, 37.050000)"
|
|
14362
14557
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", {
|
|
14363
14558
|
transform: "translate(34.285714, 34.200000) scale(-1, 1) translate(-34.285714, -34.200000) ",
|
|
14364
|
-
fill: "url(#
|
|
14559
|
+
fill: "url(#".concat(linearGradientId, ")"),
|
|
14365
14560
|
id: "\u5F62\u72B6\u7ED3\u5408"
|
|
14366
14561
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", {
|
|
14367
14562
|
d: "M4.28571429,55.575 L4.28571429,34.2535714 C4.28571429,22.4188982 13.8796125,12.825 25.7142857,12.825 C36.3598894,12.825 45.1923741,20.587885 46.8597669,30.7616821 C48.2786739,30.2207368 49.8190861,29.925 51.4285714,29.925 C58.5293754,29.925 64.2857143,35.6813389 64.2857143,42.7821429 L64.2857143,55.575 L4.28571429,55.575 Z"
|
|
@@ -14370,7 +14565,7 @@ function IllustrationEmptyImg() {
|
|
|
14370
14565
|
id: "\u80CC\u666F/\u4E91"
|
|
14371
14566
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("g", {
|
|
14372
14567
|
transform: "translate(142.857143, 51.300000)",
|
|
14373
|
-
fill: "url(#
|
|
14568
|
+
fill: "url(#".concat(linearGradientId, "-1)"),
|
|
14374
14569
|
id: "\u5F62\u72B6\u7ED3\u5408"
|
|
14375
14570
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", {
|
|
14376
14571
|
d: "M17.1428571,8.55 C24.2401777,8.55 30.1286667,13.7256234 31.2399627,20.508509 C32.186033,20.1471098 33.2128549,19.95 34.2857143,19.95 C39.0195836,19.95 42.8571429,23.7875593 42.8571429,28.5214286 L42.8571429,37.05 L31.4281429,37.049 L31.4285714,37.05 L2.85714286,37.05 L2.85714286,22.8357143 C2.85714286,14.9459321 9.253075,8.55 17.1428571,8.55 Z"
|
|
@@ -18473,7 +18668,7 @@ var Preview = function Preview(props) {
|
|
|
18473
18668
|
}, operations, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__["createElement"]("span", {
|
|
18474
18669
|
onClick: onClose
|
|
18475
18670
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__["createElement"](_icon__WEBPACK_IMPORTED_MODULE_16__["default"], {
|
|
18476
|
-
type: "close"
|
|
18671
|
+
type: "close-solid"
|
|
18477
18672
|
}), "\u5173\u95ED"))));
|
|
18478
18673
|
return /*#__PURE__*/react_dom__WEBPACK_IMPORTED_MODULE_12___default.a.createPortal(peviewContainer, document.body);
|
|
18479
18674
|
};
|
|
@@ -101620,6 +101815,45 @@ function toString(value) {
|
|
|
101620
101815
|
module.exports = toString;
|
|
101621
101816
|
|
|
101622
101817
|
|
|
101818
|
+
/***/ }),
|
|
101819
|
+
|
|
101820
|
+
/***/ "./node_modules/lodash/uniqueId.js":
|
|
101821
|
+
/*!*****************************************!*\
|
|
101822
|
+
!*** ./node_modules/lodash/uniqueId.js ***!
|
|
101823
|
+
\*****************************************/
|
|
101824
|
+
/*! no static exports found */
|
|
101825
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
101826
|
+
|
|
101827
|
+
var toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js");
|
|
101828
|
+
|
|
101829
|
+
/** Used to generate unique IDs. */
|
|
101830
|
+
var idCounter = 0;
|
|
101831
|
+
|
|
101832
|
+
/**
|
|
101833
|
+
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
|
|
101834
|
+
*
|
|
101835
|
+
* @static
|
|
101836
|
+
* @since 0.1.0
|
|
101837
|
+
* @memberOf _
|
|
101838
|
+
* @category Util
|
|
101839
|
+
* @param {string} [prefix=''] The value to prefix the ID with.
|
|
101840
|
+
* @returns {string} Returns the unique ID.
|
|
101841
|
+
* @example
|
|
101842
|
+
*
|
|
101843
|
+
* _.uniqueId('contact_');
|
|
101844
|
+
* // => 'contact_104'
|
|
101845
|
+
*
|
|
101846
|
+
* _.uniqueId();
|
|
101847
|
+
* // => '105'
|
|
101848
|
+
*/
|
|
101849
|
+
function uniqueId(prefix) {
|
|
101850
|
+
var id = ++idCounter;
|
|
101851
|
+
return toString(prefix) + id;
|
|
101852
|
+
}
|
|
101853
|
+
|
|
101854
|
+
module.exports = uniqueId;
|
|
101855
|
+
|
|
101856
|
+
|
|
101623
101857
|
/***/ }),
|
|
101624
101858
|
|
|
101625
101859
|
/***/ "./node_modules/object-assign/index.js":
|