@kdcloudjs/kdesign 1.8.15 → 1.8.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.
Files changed (73) hide show
  1. package/dist/kdesign-complete.less +297 -81
  2. package/dist/kdesign.css +269 -58
  3. package/dist/kdesign.css.map +1 -1
  4. package/dist/kdesign.js +842 -381
  5. package/dist/kdesign.js.map +1 -1
  6. package/dist/kdesign.min.css +3 -3
  7. package/dist/kdesign.min.js +10 -10
  8. package/dist/kdesign.min.js.map +1 -1
  9. package/es/breadcrumb/breadcrumb.js +2 -2
  10. package/es/button/group.d.ts +1 -1
  11. package/es/button/group.js +5 -3
  12. package/es/city-picker/city-picker.js +1 -0
  13. package/es/city-picker/style/index.css +8 -0
  14. package/es/city-picker/style/index.less +10 -0
  15. package/es/color-picker/color-picker-panel.js +332 -82
  16. package/es/color-picker/color-picker.js +128 -58
  17. package/es/color-picker/constant/colorTypes.js +4 -4
  18. package/es/color-picker/constant/defaultColor.d.ts +1 -1
  19. package/es/color-picker/constant/defaultColor.js +1 -1
  20. package/es/color-picker/interface.d.ts +33 -11
  21. package/es/color-picker/style/index.css +256 -53
  22. package/es/color-picker/style/index.less +277 -73
  23. package/es/color-picker/style/token.less +6 -2
  24. package/es/color-picker/utils/colorFormat.d.ts +5 -1
  25. package/es/color-picker/utils/colorFormat.js +10 -10
  26. package/es/color-picker/utils/convertLetters.d.ts +1 -0
  27. package/es/color-picker/utils/convertLetters.js +12 -0
  28. package/es/color-picker/utils/validateColor.js +12 -9
  29. package/es/config-provider/compDefaultProps.d.ts +8 -0
  30. package/es/config-provider/compDefaultProps.js +8 -0
  31. package/es/popper/index.d.ts +1 -1
  32. package/es/popper/index.js +8 -3
  33. package/es/popper/style/index.css +4 -4
  34. package/es/popper/style/index.less +4 -6
  35. package/es/signature/signature.d.ts +1 -0
  36. package/es/signature/signature.js +42 -8
  37. package/es/tree/tree.d.ts +1 -0
  38. package/es/tree/tree.js +3 -1
  39. package/es/tree/treeNode.d.ts +1 -0
  40. package/es/tree/treeNode.js +3 -2
  41. package/lib/breadcrumb/breadcrumb.js +2 -2
  42. package/lib/button/group.d.ts +1 -1
  43. package/lib/button/group.js +5 -3
  44. package/lib/city-picker/city-picker.js +1 -0
  45. package/lib/city-picker/style/index.css +8 -0
  46. package/lib/city-picker/style/index.less +10 -0
  47. package/lib/color-picker/color-picker-panel.js +329 -79
  48. package/lib/color-picker/color-picker.js +125 -55
  49. package/lib/color-picker/constant/colorTypes.js +4 -4
  50. package/lib/color-picker/constant/defaultColor.d.ts +1 -1
  51. package/lib/color-picker/constant/defaultColor.js +1 -1
  52. package/lib/color-picker/interface.d.ts +33 -11
  53. package/lib/color-picker/style/index.css +256 -53
  54. package/lib/color-picker/style/index.less +277 -73
  55. package/lib/color-picker/style/token.less +6 -2
  56. package/lib/color-picker/utils/colorFormat.d.ts +5 -1
  57. package/lib/color-picker/utils/colorFormat.js +10 -9
  58. package/lib/color-picker/utils/convertLetters.d.ts +1 -0
  59. package/lib/color-picker/utils/convertLetters.js +13 -0
  60. package/lib/color-picker/utils/validateColor.js +12 -9
  61. package/lib/config-provider/compDefaultProps.d.ts +8 -0
  62. package/lib/config-provider/compDefaultProps.js +8 -0
  63. package/lib/popper/index.d.ts +1 -1
  64. package/lib/popper/index.js +8 -3
  65. package/lib/popper/style/index.css +4 -4
  66. package/lib/popper/style/index.less +4 -6
  67. package/lib/signature/signature.d.ts +1 -0
  68. package/lib/signature/signature.js +42 -8
  69. package/lib/tree/tree.d.ts +1 -0
  70. package/lib/tree/tree.js +3 -1
  71. package/lib/tree/treeNode.d.ts +1 -0
  72. package/lib/tree/treeNode.js +3 -2
  73. package/package.json +1 -1
@@ -142,8 +142,8 @@ var Breadcrumb = function Breadcrumb(props) {
142
142
  };
143
143
  useEffect(function () {
144
144
  var isMore = itemsConfig === null || itemsConfig === void 0 ? void 0 : itemsConfig.some(function (item) {
145
- var _a, _b;
146
- return ((_b = (_a = item === null || item === void 0 ? void 0 : item.title) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children.type.displayName) === 'Tooltip';
145
+ var _a, _b, _c, _d;
146
+ return ((_d = (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.title) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c.type) === null || _d === void 0 ? void 0 : _d.displayName) === 'Tooltip';
147
147
  });
148
148
  setOpenEllipsis(isMore && itemsConfig.length === MIN_ITEM);
149
149
  }, [itemsConfig]);
@@ -1,6 +1,6 @@
1
1
  import React, { CSSProperties, ReactNode } from 'react';
2
- import { PopperProps } from '../_utils/usePopper';
3
2
  import { ButtonType, ButtonSize } from './button';
3
+ import { PopperProps } from '../popper';
4
4
  export declare const ButtonGroupTypes: ["basic", "similar"];
5
5
  export declare type ButtonGroupType = typeof ButtonGroupTypes[number];
6
6
  export interface OverlayType {
@@ -8,9 +8,9 @@ import classNames from 'classnames';
8
8
  import ConfigContext from '../config-provider/ConfigContext';
9
9
  import { getCompProps } from '../_utils';
10
10
  import { Button, Icon } from '../index';
11
- import usePopper from '../_utils/usePopper';
12
11
  import { toArray } from '../_utils/react-children';
13
12
  import { tuple } from '../_utils/type';
13
+ import Popper from '../popper';
14
14
  export var ButtonGroupTypes = tuple('basic', 'similar');
15
15
  var InternalButtonGroup = function InternalButtonGroup(props, ref) {
16
16
  var _context;
@@ -37,7 +37,7 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
37
37
  _useState2 = _slicedToArray(_useState, 2),
38
38
  optionShow = _useState2[0],
39
39
  setOptionShow = _useState2[1];
40
- var refBtnGroup = React.useRef(null) || ref;
40
+ var refBtnGroup = ref || React.createRef();
41
41
  var triggerRef = React.useRef(null);
42
42
  var isBsicType = type === 'basic';
43
43
  var btnGroupPrefixCls = getPrefixCls(prefixCls, 'btn-group', customPrefixcls);
@@ -120,7 +120,9 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
120
120
  return isBsicType ? locatorNode : triggerRef.current;
121
121
  }
122
122
  });
123
- return usePopper(renderTriggerButton(), renderContent(), popperProps);
123
+ return React.createElement(Popper, _extends({
124
+ tip: renderContent()
125
+ }, popperProps), renderTriggerButton());
124
126
  };
125
127
  var ButtonGroup = React.forwardRef(InternalButtonGroup);
126
128
  ButtonGroup.displayName = 'ButtonGroup';
@@ -471,6 +471,7 @@ var InternalSelect = function InternalSelect(props, ref) {
471
471
  defaultVisible: optionShow,
472
472
  visible: optionShow,
473
473
  onVisibleChange: handleVisibleChange,
474
+ clickToClose: !searchValue,
474
475
  onTransitionEnd: function onTransitionEnd() {
475
476
  if (optionShow === false) {
476
477
  handleClear();
@@ -270,6 +270,14 @@
270
270
  -webkit-box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
271
271
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
272
272
  }
273
+ .kd-city-picker-dropdown.kd-popper-bottom-start-in {
274
+ -webkit-animation-name: kdSlideUpIn;
275
+ animation-name: kdSlideUpIn;
276
+ }
277
+ .kd-city-picker-dropdown.kd-popper-bottom-start-out {
278
+ -webkit-animation-name: kdSlideUpOut;
279
+ animation-name: kdSlideUpOut;
280
+ }
273
281
  .kd-city-picker-dropdown .kd-tabs-tab-list {
274
282
  width: 100%;
275
283
  }
@@ -4,6 +4,7 @@
4
4
 
5
5
  @city-picker-prefix-cls: ~'@{kd-prefix}-city-picker';
6
6
  @tabs-prefix-cls: ~'@{kd-prefix}-tabs';
7
+ @popper-prefix-cls: ~'@{kd-prefix}-popper';
7
8
 
8
9
  .@{city-picker-prefix-cls} {
9
10
  position: relative;
@@ -156,6 +157,15 @@
156
157
  outline: none;
157
158
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
158
159
 
160
+ &.@{popper-prefix-cls}-bottom-start {
161
+ &-in {
162
+ animation-name: kdSlideUpIn;
163
+ }
164
+
165
+ &-out {
166
+ animation-name: kdSlideUpOut;
167
+ }
168
+ }
159
169
  // 调整tabs样式
160
170
  .@{tabs-prefix-cls}-tab-list {
161
171
  width: 100%;