@kdcloudjs/kdesign 1.1.2 → 1.1.3

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +3 -2
  2. package/dist/kdesign-complete.less +186 -145
  3. package/dist/kdesign.css +198 -171
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +34 -22
  6. package/dist/kdesign.js.map +1 -1
  7. package/dist/kdesign.min.css +3 -3
  8. package/dist/kdesign.min.js +2 -2
  9. package/dist/kdesign.min.js.map +1 -1
  10. package/es/_utils/usePopper.js +4 -4
  11. package/es/checkbox/checkbox.js +3 -4
  12. package/es/checkbox/style/index.css +36 -33
  13. package/es/checkbox/style/index.less +25 -18
  14. package/es/checkbox/style/token.less +34 -35
  15. package/es/input/style/index.css +53 -50
  16. package/es/input/style/index.less +5 -4
  17. package/es/input/style/mixin.less +1 -0
  18. package/es/input/style/token.less +23 -20
  19. package/es/layout/style/index.css +1 -1
  20. package/es/layout/style/index.less +1 -1
  21. package/es/layout/style/token.less +5 -5
  22. package/es/menu/menu.js +1 -1
  23. package/es/menu/style/index.css +37 -31
  24. package/es/menu/style/index.less +14 -0
  25. package/es/menu/style/mixin.less +1 -1
  26. package/es/menu/style/token.less +13 -16
  27. package/es/pagination/pagination.js +4 -4
  28. package/es/pagination/style/index.css +70 -55
  29. package/es/pagination/style/index.less +61 -43
  30. package/es/pagination/style/token.less +4 -4
  31. package/es/radio/radio.js +21 -8
  32. package/es/style/icon/kdicon.css +224 -0
  33. package/es/style/icon/kdicon.woff +0 -0
  34. package/lib/_utils/usePopper.js +4 -4
  35. package/lib/checkbox/checkbox.js +3 -4
  36. package/lib/checkbox/style/index.css +36 -33
  37. package/lib/checkbox/style/index.less +25 -18
  38. package/lib/checkbox/style/token.less +34 -35
  39. package/lib/input/style/index.css +53 -50
  40. package/lib/input/style/index.less +5 -4
  41. package/lib/input/style/mixin.less +1 -0
  42. package/lib/input/style/token.less +23 -20
  43. package/lib/layout/style/index.css +1 -1
  44. package/lib/layout/style/index.less +1 -1
  45. package/lib/layout/style/token.less +5 -5
  46. package/lib/menu/menu.js +1 -1
  47. package/lib/menu/style/index.css +37 -31
  48. package/lib/menu/style/index.less +14 -0
  49. package/lib/menu/style/mixin.less +1 -1
  50. package/lib/menu/style/token.less +13 -16
  51. package/lib/pagination/pagination.js +4 -3
  52. package/lib/pagination/style/index.css +70 -55
  53. package/lib/pagination/style/index.less +61 -43
  54. package/lib/pagination/style/token.less +4 -4
  55. package/lib/radio/radio.js +21 -8
  56. package/lib/style/icon/kdicon.css +224 -0
  57. package/lib/style/icon/kdicon.woff +0 -0
  58. package/package.json +1 -1
package/dist/kdesign.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/kdesign v1.1.1
3
+ * @kdcloudjs/kdesign v1.1.2
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -1473,7 +1473,7 @@ function usePopper(locatorElement, popperElement, props) {
1473
1473
  _props$placement = props.placement,
1474
1474
  placement = _props$placement === void 0 ? 'top' : _props$placement,
1475
1475
  _props$gap = props.gap,
1476
- defalutGap = _props$gap === void 0 ? 4 : _props$gap,
1476
+ defaultGap = _props$gap === void 0 ? 4 : _props$gap,
1477
1477
  _props$scrollHidden = props.scrollHidden,
1478
1478
  scrollHidden = _props$scrollHidden === void 0 ? false : _props$scrollHidden,
1479
1479
  _props$mouseEnterDela = props.mouseEnterDelay,
@@ -1520,7 +1520,7 @@ function usePopper(locatorElement, popperElement, props) {
1520
1520
  top: 0,
1521
1521
  left: 0
1522
1522
  };
1523
- var gap = defalutGap + (arrow ? 10 : 0);
1523
+ var gap = defaultGap + (arrow ? 10 : 0);
1524
1524
 
1525
1525
  var _useState = Object(react__WEBPACK_IMPORTED_MODULE_18__["useState"])(initPos),
1526
1526
  _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6___default()(_useState, 2),
@@ -1782,8 +1782,8 @@ function usePopper(locatorElement, popperElement, props) {
1782
1782
  };
1783
1783
  var popperNode = popperRef.current;
1784
1784
  var locatorNode = locatorRef.current;
1785
- Object(_hooks__WEBPACK_IMPORTED_MODULE_24__["useResizeObserver"])(popperNode, alignPopper);
1786
- Object(_hooks__WEBPACK_IMPORTED_MODULE_24__["useResizeObserver"])(locatorNode, alignPopper);
1785
+ Object(_hooks__WEBPACK_IMPORTED_MODULE_24__["useResizeObserver"])(popperNode || document.body, alignPopper);
1786
+ Object(_hooks__WEBPACK_IMPORTED_MODULE_24__["useResizeObserver"])(locatorNode || document.body, alignPopper);
1787
1787
  var showPopper = Object(react__WEBPACK_IMPORTED_MODULE_18__["useCallback"])(function (evType) {
1788
1788
  if (!disabled) {
1789
1789
  !exist && setExist(true);
@@ -5742,8 +5742,8 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
5742
5742
  return selected ? false : indeterminate;
5743
5743
  };
5744
5744
 
5745
- var getDefaultClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls, "-no-child"), !children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(size), true && !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(checkboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-disabled"), disabled), _classNames));
5746
- var getSquareClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(className, (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(checkboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-checked"), selected && !disabled), _classNames2));
5745
+ var getDefaultClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls, "-no-child"), !children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(size), true && !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(checkboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "checked", selected), _classNames));
5746
+ var getSquareClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(className, (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(checkboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-checked"), selected && !disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "checked", selected), _classNames2));
5747
5747
  var getRootClassName = isDefaultType() ? getDefaultClassName : getSquareClassName;
5748
5748
  var inputClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, "".concat(checkboxPrefixCls, "-input"), true));
5749
5749
  var checkedWrapperClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames4 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-no-child"), !children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-wrapper"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-wrapper-size"), !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-margin"), !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-checked"), selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-indeterminate"), getIndeterminate()), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-disabled"), disabled && !selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(checkboxType, "-checked-disabled"), disabled && selected), _classNames4));
@@ -5787,8 +5787,7 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
5787
5787
  ref: ref,
5788
5788
  value: value,
5789
5789
  checked: selected,
5790
- disabled: disabled,
5791
- name: name
5790
+ disabled: disabled
5792
5791
  })), children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", {
5793
5792
  className: "".concat(checkboxPrefixCls, "-children")
5794
5793
  }, children), !isDefaultType() && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", {
@@ -21354,7 +21353,7 @@ var Menu = function Menu(props) {
21354
21353
  onMouseEnter: handleMouseEnterMenu
21355
21354
  };
21356
21355
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_14__["createElement"]("div", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
21357
- className: classnames__WEBPACK_IMPORTED_MODULE_18___default()(prefixCls, className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-inline"), mode === 'inline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-vertical"), mode !== 'inline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-collapsed"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-").concat(theme === 'light' ? 'light' : 'dark'), true), _classNames)),
21356
+ className: classnames__WEBPACK_IMPORTED_MODULE_18___default()(prefixCls, className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-inline"), mode === 'inline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-vertical"), mode !== 'inline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-collapsed"), collapsed), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-").concat(theme === 'light' ? 'light' : 'dark'), true), _classNames)),
21358
21357
  role: "menu",
21359
21358
  style: style
21360
21359
  }, mouseEvent), children && renderMenu(), additionalTools);
@@ -23625,8 +23624,6 @@ __webpack_require__.r(__webpack_exports__);
23625
23624
 
23626
23625
 
23627
23626
 
23628
- /* eslint-disable react/jsx-no-comment-textnodes */
23629
-
23630
23627
 
23631
23628
 
23632
23629
 
@@ -23860,9 +23857,11 @@ var Pagination = function Pagination(props) {
23860
23857
  selectedKey: size,
23861
23858
  menu: sizeOptions,
23862
23859
  trigger: "click",
23860
+ placement: "bottomRight",
23863
23861
  disabled: disabled,
23862
+ prefix: "".concat(prefixCls, "-dropdown"),
23864
23863
  popperStyle: {
23865
- minWidth: 67
23864
+ minWidth: 64
23866
23865
  },
23867
23866
  onItemClick: handleChangeSize,
23868
23867
  getPopupContainer: function getPopupContainer(triggerNode) {
@@ -24012,7 +24011,7 @@ var Pagination = function Pagination(props) {
24012
24011
  menu: sizeOptions,
24013
24012
  disabled: disabled,
24014
24013
  popperStyle: {
24015
- minWidth: 67
24014
+ minWidth: 64
24016
24015
  },
24017
24016
  onItemClick: handleChangeSize,
24018
24017
  getPopupContainer: function getPopupContainer(triggerNode) {
@@ -25230,14 +25229,27 @@ var InternalRadio = function InternalRadio(props, ref) {
25230
25229
 
25231
25230
  var classString = classnames__WEBPACK_IMPORTED_MODULE_13___default()((_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_classNames, "".concat(radioPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_classNames, "".concat(radioPrefixCls, "-disabled"), radioProps.disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_classNames, "".concat(radioPrefixCls, "-checked"), context ? radioProps.checked : isChecked), _classNames), className); // 单选包裹元素class名称
25232
25231
 
25233
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12__["createElement"]("label", {
25234
- className: classString,
25235
- style: style,
25236
- ref: mergedRef
25237
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12__["createElement"]("input", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_7___default()({
25238
- type: "radio",
25239
- className: "".concat(radioPrefixCls, "-input")
25240
- }, radioProps)), children !== undefined ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12__["createElement"]("span", null, children) : null);
25232
+ var handleRepeatClick = function handleRepeatClick(e) {
25233
+ var element = e.target;
25234
+
25235
+ if (element.tagName !== 'INPUT') {
25236
+ e.stopPropagation();
25237
+ }
25238
+ };
25239
+
25240
+ return (
25241
+ /*#__PURE__*/
25242
+ // eslint-disable-next-line
25243
+ react__WEBPACK_IMPORTED_MODULE_12__["createElement"]("label", {
25244
+ className: classString,
25245
+ style: style,
25246
+ ref: mergedRef,
25247
+ onClick: handleRepeatClick
25248
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12__["createElement"]("input", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_7___default()({
25249
+ type: "radio",
25250
+ className: "".concat(radioPrefixCls, "-input")
25251
+ }, radioProps)), children !== undefined ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12__["createElement"]("span", null, children) : null)
25252
+ );
25241
25253
  };
25242
25254
 
25243
25255
  var Radio = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12__["forwardRef"](InternalRadio);