@kdcloudjs/kdesign 1.1.2 → 1.2.1

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 (160) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/kdesign-complete.less +1125 -926
  3. package/dist/kdesign.css +485 -432
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +516 -251
  6. package/dist/kdesign.js.map +1 -1
  7. package/dist/kdesign.min.css +4 -4
  8. package/dist/kdesign.min.js +8 -8
  9. package/dist/kdesign.min.js.map +1 -1
  10. package/es/_utils/usePopper.js +37 -16
  11. package/es/anchor/anchor.js +0 -6
  12. package/es/anchor/style/index.css +5 -2
  13. package/es/anchor/style/index.less +6 -2
  14. package/es/anchor/style/token.less +2 -1
  15. package/es/button/button.d.ts +1 -1
  16. package/es/button/button.js +2 -2
  17. package/es/button/group.d.ts +21 -0
  18. package/es/button/group.js +130 -0
  19. package/es/button/index.d.ts +5 -1
  20. package/es/button/index.js +4 -1
  21. package/es/button/style/index.css +117 -21
  22. package/es/button/style/index.less +332 -192
  23. package/es/button/style/token.less +41 -25
  24. package/es/carousel/carousel.js +4 -0
  25. package/es/checkbox/checkbox.js +3 -4
  26. package/es/checkbox/style/index.css +36 -33
  27. package/es/checkbox/style/index.less +25 -18
  28. package/es/checkbox/style/token.less +34 -35
  29. package/es/collapse/panel.d.ts +1 -0
  30. package/es/collapse/panel.js +17 -5
  31. package/es/collapse/style/index.css +32 -6
  32. package/es/collapse/style/index.less +24 -1
  33. package/es/collapse/style/token.less +12 -10
  34. package/es/config-provider/compDefaultProps.d.ts +4 -0
  35. package/es/config-provider/compDefaultProps.js +4 -0
  36. package/es/drawer/drawer.d.ts +1 -0
  37. package/es/drawer/drawer.js +56 -21
  38. package/es/empty/defaultEmptyImg.js +5 -3
  39. package/es/empty/illustrationEmptyImg.js +6 -4
  40. package/es/icon/interface.js +1 -1
  41. package/es/image/preview.js +1 -1
  42. package/es/image/style/index.css +8 -8
  43. package/es/image/style/index.less +5 -5
  44. package/es/image/style/token.less +12 -25
  45. package/es/input/style/index.css +53 -50
  46. package/es/input/style/index.less +5 -4
  47. package/es/input/style/mixin.less +1 -0
  48. package/es/input/style/token.less +23 -20
  49. package/es/layout/style/index.css +1 -1
  50. package/es/layout/style/index.less +1 -1
  51. package/es/layout/style/token.less +5 -5
  52. package/es/menu/menu.js +1 -1
  53. package/es/menu/style/index.css +37 -31
  54. package/es/menu/style/index.less +14 -0
  55. package/es/menu/style/mixin.less +1 -1
  56. package/es/menu/style/token.less +13 -16
  57. package/es/pagination/pagination.js +4 -4
  58. package/es/pagination/style/index.css +70 -55
  59. package/es/pagination/style/index.less +61 -43
  60. package/es/pagination/style/token.less +4 -4
  61. package/es/radio/radio.js +23 -8
  62. package/es/radio/style/index.css +46 -18
  63. package/es/radio/style/index.less +27 -1
  64. package/es/radio/style/token.less +4 -4
  65. package/es/rate/style/index.css +9 -9
  66. package/es/rate/style/token.less +6 -6
  67. package/es/select/option.js +1 -1
  68. package/es/select/style/index.css +14 -5
  69. package/es/select/style/index.less +374 -368
  70. package/es/select/style/token.less +2 -2
  71. package/es/stepper/style/index.css +1 -1
  72. package/es/stepper/style/token.less +1 -1
  73. package/es/steps/style/index.css +40 -32
  74. package/es/steps/style/index.less +23 -33
  75. package/es/steps/style/token.less +6 -9
  76. package/es/style/icon/kdicon.css +225 -0
  77. package/es/style/icon/kdicon.woff +0 -0
  78. package/es/switch/style/index.css +11 -11
  79. package/es/switch/style/index.less +2 -2
  80. package/es/switch/style/token.less +7 -10
  81. package/es/tag/style/index.css +2 -147
  82. package/es/tag/style/index.less +4 -24
  83. package/es/tag/style/mixin.less +0 -13
  84. package/es/tag/style/token.less +1 -1
  85. package/lib/_utils/usePopper.js +38 -16
  86. package/lib/anchor/anchor.js +0 -6
  87. package/lib/anchor/style/index.css +5 -2
  88. package/lib/anchor/style/index.less +6 -2
  89. package/lib/anchor/style/token.less +2 -1
  90. package/lib/button/button.d.ts +1 -1
  91. package/lib/button/button.js +2 -2
  92. package/lib/button/group.d.ts +21 -0
  93. package/lib/button/group.js +166 -0
  94. package/lib/button/index.d.ts +5 -1
  95. package/lib/button/index.js +5 -1
  96. package/lib/button/style/index.css +117 -21
  97. package/lib/button/style/index.less +332 -192
  98. package/lib/button/style/token.less +41 -25
  99. package/lib/carousel/carousel.js +4 -0
  100. package/lib/checkbox/checkbox.js +3 -4
  101. package/lib/checkbox/style/index.css +36 -33
  102. package/lib/checkbox/style/index.less +25 -18
  103. package/lib/checkbox/style/token.less +34 -35
  104. package/lib/collapse/panel.d.ts +1 -0
  105. package/lib/collapse/panel.js +17 -5
  106. package/lib/collapse/style/index.css +32 -6
  107. package/lib/collapse/style/index.less +24 -1
  108. package/lib/collapse/style/token.less +12 -10
  109. package/lib/config-provider/compDefaultProps.d.ts +4 -0
  110. package/lib/config-provider/compDefaultProps.js +4 -0
  111. package/lib/drawer/drawer.d.ts +1 -0
  112. package/lib/drawer/drawer.js +61 -27
  113. package/lib/empty/defaultEmptyImg.js +6 -3
  114. package/lib/empty/illustrationEmptyImg.js +7 -4
  115. package/lib/icon/interface.js +1 -1
  116. package/lib/image/preview.js +1 -1
  117. package/lib/image/style/index.css +8 -8
  118. package/lib/image/style/index.less +5 -5
  119. package/lib/image/style/token.less +12 -25
  120. package/lib/input/style/index.css +53 -50
  121. package/lib/input/style/index.less +5 -4
  122. package/lib/input/style/mixin.less +1 -0
  123. package/lib/input/style/token.less +23 -20
  124. package/lib/layout/style/index.css +1 -1
  125. package/lib/layout/style/index.less +1 -1
  126. package/lib/layout/style/token.less +5 -5
  127. package/lib/menu/menu.js +1 -1
  128. package/lib/menu/style/index.css +37 -31
  129. package/lib/menu/style/index.less +14 -0
  130. package/lib/menu/style/mixin.less +1 -1
  131. package/lib/menu/style/token.less +13 -16
  132. package/lib/pagination/pagination.js +4 -3
  133. package/lib/pagination/style/index.css +70 -55
  134. package/lib/pagination/style/index.less +61 -43
  135. package/lib/pagination/style/token.less +4 -4
  136. package/lib/radio/radio.js +23 -8
  137. package/lib/radio/style/index.css +46 -18
  138. package/lib/radio/style/index.less +27 -1
  139. package/lib/radio/style/token.less +4 -4
  140. package/lib/rate/style/index.css +9 -9
  141. package/lib/rate/style/token.less +6 -6
  142. package/lib/select/option.js +1 -1
  143. package/lib/select/style/index.css +14 -5
  144. package/lib/select/style/index.less +374 -368
  145. package/lib/select/style/token.less +2 -2
  146. package/lib/stepper/style/index.css +1 -1
  147. package/lib/stepper/style/token.less +1 -1
  148. package/lib/steps/style/index.css +40 -32
  149. package/lib/steps/style/index.less +23 -33
  150. package/lib/steps/style/token.less +6 -9
  151. package/lib/style/icon/kdicon.css +225 -0
  152. package/lib/style/icon/kdicon.woff +0 -0
  153. package/lib/switch/style/index.css +11 -11
  154. package/lib/switch/style/index.less +2 -2
  155. package/lib/switch/style/token.less +7 -10
  156. package/lib/tag/style/index.css +2 -147
  157. package/lib/tag/style/index.less +4 -24
  158. package/lib/tag/style/mixin.less +0 -13
  159. package/lib/tag/style/token.less +1 -1
  160. package/package.json +1 -1
@@ -34,6 +34,7 @@ export interface IDrawerProps {
34
34
  titleStyle?: CSSProperties;
35
35
  visible?: boolean;
36
36
  width?: string | number;
37
+ height?: string | number;
37
38
  zIndex?: string | number;
38
39
  }
39
40
  declare const Drawer: React.ForwardRefExoticComponent<IDrawerProps & React.RefAttributes<unknown>>;
@@ -1,11 +1,10 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
4
- import _endsWithInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/ends-with";
5
4
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
6
5
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
7
6
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
8
- import React, { useContext, useEffect, useState, useCallback, createRef } from 'react';
7
+ import React, { useContext, useEffect, useState, useCallback, createRef, useRef } from 'react';
9
8
  import { Icon } from '../index';
10
9
  import ReactDOM from 'react-dom';
11
10
  import { tuple } from '../_utils/type';
@@ -20,22 +19,23 @@ export var PlacementTypes = tuple('top', 'right', 'bottom', 'left');
20
19
  var relativePostionTypes = ['relative', 'absolute', 'fixed'];
21
20
  var horizontalPlacements = ['left', 'right'];
22
21
  var verticalPlacements = ['top', 'bottom'];
23
- var documentBody = document.body;
24
-
25
- function transformSize(size, placement) {
26
- if (typeof size === 'string') {
27
- // 只考虑px 或者 %
28
- devWarning(!(_endsWithInstanceProperty(size).call(size, 'px') && _endsWithInstanceProperty(size).call(size, '%')), 'drawer', "cannot calculate drawer size: width | height for '".concat(size, "' besides px or %"));
29
- if (placement === 'right' || placement === 'bottom') return size || 0;
30
- return size ? '-' + size : 0;
31
- }
32
-
33
- if (placement === 'right' || placement === 'bottom') return (size || 0) + 'px';
34
- return ('-' + size || 0) + 'px';
35
- }
22
+ var documentBody = document.body; // function transformSize(size: string | number, placement: string) {
23
+ // if (typeof size === 'string') {
24
+ // // 只考虑px 或者 %
25
+ // devWarning(
26
+ // !(size.endsWith('px') && size.endsWith('%')),
27
+ // 'drawer',
28
+ // `cannot calculate drawer size: width | height for '${size}' besides px or %`,
29
+ // )
30
+ // if (placement === 'right' || placement === 'bottom') return size || 0
31
+ // return size ? '-' + size : 0
32
+ // }
33
+ // if (placement === 'right' || placement === 'bottom') return (size || 0) + 'px'
34
+ // return ('-' + size || 0) + 'px'
35
+ // }
36
36
 
37
37
  var InternalDrawer = function InternalDrawer(props, ref) {
38
- var _classNames, _context2, _classNames2;
38
+ var _classNames, _context2, _context3, _classNames2;
39
39
 
40
40
  var _useContext = useContext(ConfigContext),
41
41
  getPrefixCls = _useContext.getPrefixCls,
@@ -63,6 +63,7 @@ var InternalDrawer = function InternalDrawer(props, ref) {
63
63
  footerClassName = drawerProps.footerClassName,
64
64
  visible = drawerProps.visible,
65
65
  width = drawerProps.width,
66
+ height = drawerProps.height,
66
67
  headerStyle = drawerProps.headerStyle,
67
68
  headerClassName = drawerProps.headerClassName,
68
69
  zindex = drawerProps.zIndex,
@@ -85,6 +86,7 @@ var InternalDrawer = function InternalDrawer(props, ref) {
85
86
 
86
87
 
87
88
  var containerRef = ref || /*#__PURE__*/createRef();
89
+ var contentRef = useRef(null);
88
90
  devWarning(PlacementTypes.indexOf(placement) === -1, 'drawer', "cannot found drawer type '".concat(placement, "'"));
89
91
  var drawerContainer = typeof getContainer === 'function' ? getContainer() : getContainer;
90
92
  var isAtOriginalPlace = drawerContainer === false;
@@ -167,17 +169,50 @@ var InternalDrawer = function InternalDrawer(props, ref) {
167
169
  closeDrawer();
168
170
  }
169
171
  }, [maskClosable, closeDrawer]);
172
+ var getHorizontalBoolAndPlacementName = useCallback(function () {
173
+ var isHorizontal = placement === 'left' || placement === 'right';
174
+ var placementName = "translate".concat(isHorizontal ? 'X' : 'Y');
175
+ return {
176
+ isHorizontal: isHorizontal,
177
+ placementName: placementName
178
+ };
179
+ }, [placement]);
180
+ var setDraerTransform = useCallback(function (_isOpen, _placementName, _value) {
181
+ if (!contentRef.current) return;
182
+ contentRef.current.style.transform = '';
183
+ }, [contentRef]);
184
+ useEffect(function () {
185
+ var _getHorizontalBoolAnd = getHorizontalBoolAndPlacementName(),
186
+ isHorizontal = _getHorizontalBoolAnd.isHorizontal,
187
+ placementName = _getHorizontalBoolAnd.placementName;
188
+
189
+ var contentValue = contentRef.current ? contentRef.current.getBoundingClientRect()[isHorizontal ? 'width' : 'height'] : 0;
190
+ var value = (isHorizontal ? width : height) || contentValue;
191
+
192
+ if (visible) {
193
+ setDraerTransform(visible, placementName, value);
194
+ }
195
+ }, [contentRef, getHorizontalBoolAndPlacementName, height, setDraerTransform, visible, width]);
170
196
  var drawerClasses = classNames(drawerPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(drawerPrefixCls, "-hide"), !visible), _defineProperty(_classNames, "".concat(drawerPrefixCls, "-active"), visible), _defineProperty(_classNames, "".concat(drawerPrefixCls, "-not-at-body"), !isBody), _classNames));
171
197
  var headerClass = "".concat(drawerPrefixCls, "-header");
172
198
 
199
+ var _getHorizontalBoolAnd2 = getHorizontalBoolAndPlacementName(),
200
+ placementName = _getHorizontalBoolAnd2.placementName;
201
+
202
+ var placementPos = placement === 'left' || placement === 'top' ? '-100%' : '100%';
203
+ var transform = visible ? '' : _concatInstanceProperty(_context2 = "".concat(placementName, "(")).call(_context2, placementPos, ")");
204
+
173
205
  var containerStyle = _extends(_defineProperty({}, placement, 0), _includesInstanceProperty(horizontalPlacements).call(horizontalPlacements, placement) ? {
174
- width: currentWidth,
175
- transform: "translateX(".concat(visible ? 0 : transformSize(currentWidth, placement), ")")
176
- } : {});
206
+ width: width,
207
+ transform: transform
208
+ } : {
209
+ transform: transform
210
+ });
177
211
 
178
212
  var container = /*#__PURE__*/React.createElement("div", {
179
- className: classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(drawerPrefixCls, "-container-box"), true), _defineProperty(_classNames2, "".concat(drawerPrefixCls, "-has-container-box"), drawerContainer), _defineProperty(_classNames2, _concatInstanceProperty(_context2 = "".concat(drawerPrefixCls, "-container-")).call(_context2, placement), true), _classNames2)),
180
- style: containerStyle
213
+ className: classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(drawerPrefixCls, "-container-box"), true), _defineProperty(_classNames2, "".concat(drawerPrefixCls, "-has-container-box"), drawerContainer), _defineProperty(_classNames2, _concatInstanceProperty(_context3 = "".concat(drawerPrefixCls, "-container-")).call(_context3, placement), true), _classNames2)),
214
+ style: containerStyle,
215
+ ref: contentRef
181
216
  }, (title || closable) && /*#__PURE__*/React.createElement("div", {
182
217
  className: classNames(headerClass, headerClassName),
183
218
  style: headerStyle
@@ -1,5 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
2
  import ConfigContext from '../config-provider/ConfigContext';
3
+ import uniqueId from 'lodash/uniqueId';
3
4
 
4
5
  function DefaultEmptyImg() {
5
6
  var _useContext = useContext(ConfigContext),
@@ -7,6 +8,7 @@ function DefaultEmptyImg() {
7
8
  prefixCls = _useContext.prefixCls;
8
9
 
9
10
  var emptyPrefixCls = getPrefixCls(prefixCls, 'empty');
11
+ var linearGradientId = uniqueId(emptyPrefixCls + '-default-linearGradient');
10
12
  return /*#__PURE__*/React.createElement("svg", {
11
13
  className: "".concat(emptyPrefixCls, "-image"),
12
14
  width: "168px",
@@ -19,7 +21,7 @@ function DefaultEmptyImg() {
19
21
  y1: "0%",
20
22
  x2: "50%",
21
23
  y2: "100%",
22
- id: "linearGradient-1"
24
+ id: linearGradientId
23
25
  }, /*#__PURE__*/React.createElement("stop", {
24
26
  stopColor: "#D6DCE7",
25
27
  offset: "0%"
@@ -69,7 +71,7 @@ function DefaultEmptyImg() {
69
71
  height: "6"
70
72
  })), /*#__PURE__*/React.createElement("g", {
71
73
  transform: "translate(108.000000, 40.000000)",
72
- fill: "url(#linearGradient-1)",
74
+ fill: "url(#".concat(linearGradientId, ")"),
73
75
  id: "\u80CC\u666F/\u4E91",
74
76
  opacity: "0.300000012"
75
77
  }, /*#__PURE__*/React.createElement("g", {
@@ -78,7 +80,7 @@ function DefaultEmptyImg() {
78
80
  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"
79
81
  }))), /*#__PURE__*/React.createElement("g", {
80
82
  transform: "translate(12.000000, 32.000000)",
81
- fill: "url(#linearGradient-1)",
83
+ fill: "url(#".concat(linearGradientId, ")"),
82
84
  id: "\u80CC\u666F/\u4E91",
83
85
  opacity: "0.300000012"
84
86
  }, /*#__PURE__*/React.createElement("g", {
@@ -1,5 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
2
  import ConfigContext from '../config-provider/ConfigContext';
3
+ import uniqueId from 'lodash/uniqueId';
3
4
 
4
5
  function IllustrationEmptyImg() {
5
6
  var _useContext = useContext(ConfigContext),
@@ -7,6 +8,7 @@ function IllustrationEmptyImg() {
7
8
  prefixCls = _useContext.prefixCls;
8
9
 
9
10
  var emptyPrefixCls = getPrefixCls(prefixCls, 'empty');
11
+ var linearGradientId = uniqueId(emptyPrefixCls + '-illus-linearGradient-');
10
12
  return /*#__PURE__*/React.createElement("svg", {
11
13
  className: "".concat(emptyPrefixCls, "-image"),
12
14
  width: "200px",
@@ -25,7 +27,7 @@ function IllustrationEmptyImg() {
25
27
  y1: "0%",
26
28
  x2: "50%",
27
29
  y2: "100%",
28
- id: "linearGradient-3"
30
+ id: linearGradientId
29
31
  }, /*#__PURE__*/React.createElement("stop", {
30
32
  stopColor: "#F2F5FA",
31
33
  offset: "0%"
@@ -38,7 +40,7 @@ function IllustrationEmptyImg() {
38
40
  y1: "0%",
39
41
  x2: "50%",
40
42
  y2: "100%",
41
- id: "linearGradient-4"
43
+ id: "".concat(linearGradientId, "-1")
42
44
  }, /*#__PURE__*/React.createElement("stop", {
43
45
  stopColor: "#F2F5FA",
44
46
  offset: "0%"
@@ -92,7 +94,7 @@ function IllustrationEmptyImg() {
92
94
  transform: "translate(11.428571, 37.050000)"
93
95
  }, /*#__PURE__*/React.createElement("g", {
94
96
  transform: "translate(34.285714, 34.200000) scale(-1, 1) translate(-34.285714, -34.200000) ",
95
- fill: "url(#linearGradient-3)",
97
+ fill: "url(#".concat(linearGradientId, ")"),
96
98
  id: "\u5F62\u72B6\u7ED3\u5408"
97
99
  }, /*#__PURE__*/React.createElement("path", {
98
100
  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"
@@ -101,7 +103,7 @@ function IllustrationEmptyImg() {
101
103
  id: "\u80CC\u666F/\u4E91"
102
104
  }, /*#__PURE__*/React.createElement("g", {
103
105
  transform: "translate(142.857143, 51.300000)",
104
- fill: "url(#linearGradient-4)",
106
+ fill: "url(#".concat(linearGradientId, "-1)"),
105
107
  id: "\u5F62\u72B6\u7ED3\u5408"
106
108
  }, /*#__PURE__*/React.createElement("path", {
107
109
  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"
@@ -1,5 +1,5 @@
1
1
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
2
2
  import { tuple } from '../_utils/type';
3
- export var BaseIcon = ['arrow-up', 'arrow-down', 'arrow-left', 'arrow-right', 'first', 'last', 'double-arrow-left', 'double-arrow-right', 'push-down', 'put-top', 'put-bottom', 'put-on', 'put-off', 'switch-up', 'switch-down', 'all-border', 'top-border', 'right-border', 'bottom-border', 'left-border', 'left-extension', 'right-extension', 'left-unfold', 'right-unfold', 'unfoldmenu', 'foldmenu', 'enlarge', 'expand', 'close-full-screen', 'split', 'back', 'arrow', 'no-border', 'border', 'rough-border', 'align-left', 'align-right', 'align-center', 'vertical-center', 'delete-indentation', 'equal', 'greater-equal', 'not-equal', 'male', 'female', 'copy', 'print', 'lock', 'scanning', 'like', 'project', 'user-info', 'shutdown', 'image', 'delete-line', 'add-line', 'job-info', 'detect', 'cancel', 'stop', 'cell', 'fixed-shrink', 'attachment', 'location', 'reduce', 'resign-report', 'forbid', 'education', 'unlock', 'contract', 'filter', 'more', 'operating-element', 'fail', 'edit', 'have-attachment', 'hide', 'preview', 'unfold-all', 'wrap', 'filter-switch', 'qualification-info', 'cn', 'en', 'git', 'reset', 'preview-view', 'unfold', 'comment', 'shoppingcart', 'add-child', 'save', 'detail', 'table-setting', 'edit-view', 'edit-border', 'hyperlink', 'code', 'import', 'address', 'analysis', 'share', 'chart', 'fixed-window', 'order', 'phone', 'classify', 'feedback', 'menu', 'voice', 'search-border', 'material', 'finish', 'more-info', 'fixed', 'change', 'copy-code', 'return', 'qrcode', 'counterclockwise', 'list', 'switch', 'task-process', 'add', 'delete', 'add-word', 'two-window', 'spin', 'ordered-list', 'cooperation', 'quit', 'shrink', 'zoom', 'graffiti', 'experience', 'medical-report', 'bankcard', 'yunzhijia', 'customize', 'refresh', 'search', 'loadding', 'loadding-circle', 'right', 'close', 'upload', 'download', 'upload-cloud', 'waiting', 'warning', 'exclamatory', 'tips', 'setting', 'chart-display', 'date', 'more-item', 'international', 'little-k', 'bellOutlined'];
3
+ export var BaseIcon = ['arrow-up', 'arrow-down', 'arrow-left', 'arrow-right', 'first', 'last', 'double-arrow-left', 'double-arrow-right', 'push-down', 'put-top', 'put-bottom', 'put-on', 'put-off', 'switch-up', 'switch-down', 'all-border', 'top-border', 'right-border', 'bottom-border', 'left-border', 'left-extension', 'right-extension', 'left-unfold', 'right-unfold', 'unfoldmenu', 'foldmenu', 'enlarge', 'expand', 'close-full-screen', 'split', 'back', 'arrow', 'no-border', 'border', 'rough-border', 'align-left', 'align-right', 'align-center', 'vertical-center', 'delete-indentation', 'equal', 'greater-equal', 'not-equal', 'male', 'female', 'copy', 'print', 'lock', 'scanning', 'like', 'project', 'user-info', 'shutdown', 'image', 'delete-line', 'add-line', 'job-info', 'detect', 'cancel', 'stop', 'cell', 'fixed-shrink', 'attachment', 'location', 'reduce', 'resign-report', 'forbid', 'education', 'unlock', 'contract', 'filter', 'more', 'operating-element', 'fail', 'edit', 'have-attachment', 'hide', 'preview', 'unfold-all', 'wrap', 'filter-switch', 'qualification-info', 'cn', 'en', 'git', 'reset', 'preview-view', 'unfold', 'comment', 'shoppingcart', 'add-child', 'save', 'detail', 'table-setting', 'edit-view', 'edit-border', 'hyperlink', 'code', 'import', 'address', 'analysis', 'share', 'chart', 'fixed-window', 'order', 'phone', 'classify', 'feedback', 'menu', 'voice', 'search-border', 'material', 'finish', 'more-info', 'fixed', 'change', 'copy-code', 'return', 'qrcode', 'counterclockwise', 'list', 'switch', 'task-process', 'add', 'delete', 'add-word', 'two-window', 'spin', 'ordered-list', 'cooperation', 'quit', 'shrink', 'zoom', 'graffiti', 'experience', 'medical-report', 'bankcard', 'yunzhijia', 'customize', 'refresh', 'search', 'loadding', 'loadding-circle', 'right', 'close', 'upload', 'download', 'upload-cloud', 'waiting', 'warning', 'exclamatory', 'tips', 'setting', 'chart-display', 'date', 'more-item', 'international', 'little-k', 'bellOutlined', 'sigma'];
4
4
  export var SolidIcon = ['arrow-up-solid', 'arrow-right-solid', 'arrow-down-solid', 'arrow-left-solid', 'left-unfold-solid', 'right-unfold-solid', 'unlock-solid', 'multiply', 'division-solid', 'title-solid', 'communication-solid', 'fixed-solid', 'more-info-solid', 'timezone-solid', 'mosaic-solid', 'strike-solid', 'lock-solid', 'filter-solid', 'person-solid', 'bold-solid', 'delete-solid', 'processing-solid', 'tips-solid', 'quote-solid', 'oblique-solid', 'sun-solid', 'underline-solid', 'font-background-solid', 'eliminate-solid', 'font-color-solid', 'fx', 'refresh-solid', 'right-solid', 'location-solid', 'add-solid', 'warning-solid', 'close-solid', 'right-bold', 'close-bold', 'workbench', 'star', 'notice'];
5
5
  export var IconTypes = tuple.apply(void 0, _concatInstanceProperty(BaseIcon).call(BaseIcon, SolidIcon));
@@ -172,7 +172,7 @@ var Preview = function Preview(props) {
172
172
  }, operations, /*#__PURE__*/React.createElement("span", {
173
173
  onClick: onClose
174
174
  }, /*#__PURE__*/React.createElement(Icon, {
175
- type: "close"
175
+ type: "close-solid"
176
176
  }), "\u5173\u95ED"))));
177
177
  return /*#__PURE__*/ReactDOM.createPortal(peviewContainer, document.body);
178
178
  };
@@ -137,8 +137,8 @@
137
137
  opacity: 0;
138
138
  -webkit-transform: translateY(100%);
139
139
  transform: translateY(100%);
140
- -webkit-transition: all var(--kd-c-image-action-transition, var(--kd-g-duration-quickly, 0.2s)) ease-out;
141
- transition: all var(--kd-c-image-action-transition, var(--kd-g-duration-quickly, 0.2s)) ease-out;
140
+ -webkit-transition: all 0.2s ease-out;
141
+ transition: all 0.2s ease-out;
142
142
  background-color: var(--kd-c-image-action-color-background, rgba(0, 0, 0, 0.5));
143
143
  }
144
144
  .kd-image-action > * {
@@ -151,7 +151,7 @@
151
151
  margin-left: 20px;
152
152
  }
153
153
  .kd-image-preview {
154
- z-index: var(--kd-c-image-z-index-masker, var(--kd-g-z-index-masker, 3000));
154
+ z-index: 3000;
155
155
  position: fixed;
156
156
  top: 0;
157
157
  right: 0;
@@ -161,8 +161,8 @@
161
161
  -webkit-transform: scale(0.15);
162
162
  transform: scale(0.15);
163
163
  visibility: hidden;
164
- -webkit-transition: all calc(var(--kd-c-image-transition-duration, 0.3s) - 0.1s) var(--kd-c-image-motion-ease-out, var(--kd-g-ease-in, cubic-bezier(0.4, 0, 1, 0.6)));
165
- transition: all calc(var(--kd-c-image-transition-duration, 0.3s) - 0.1s) var(--kd-c-image-motion-ease-out, var(--kd-g-ease-in, cubic-bezier(0.4, 0, 1, 0.6)));
164
+ -webkit-transition: all 0.2s cubic-bezier(0.4, 0, 1, 0.6);
165
+ transition: all 0.2s cubic-bezier(0.4, 0, 1, 0.6);
166
166
  -webkit-overflow-scrolling: touch;
167
167
  }
168
168
  .kd-image-preview.show {
@@ -170,8 +170,8 @@
170
170
  -webkit-transform: scale(1);
171
171
  transform: scale(1);
172
172
  visibility: visible;
173
- -webkit-transition: all calc(var(--kd-c-image-transition-duration, 0.3s) - 0.1s) var(--kd-c-image-motion-ease-out, var(--kd-g-ease-out, cubic-bezier(0, 0.4, 0.4, 1)));
174
- transition: all calc(var(--kd-c-image-transition-duration, 0.3s) - 0.1s) var(--kd-c-image-motion-ease-out, var(--kd-g-ease-out, cubic-bezier(0, 0.4, 0.4, 1)));
173
+ -webkit-transition: all 0.2s cubic-bezier(0, 0.4, 0.4, 1);
174
+ transition: all 0.2s cubic-bezier(0, 0.4, 0.4, 1);
175
175
  }
176
176
  .kd-image-preview-mask {
177
177
  position: fixed;
@@ -255,7 +255,7 @@
255
255
  }
256
256
  .kd-image-preview-action i {
257
257
  color: var(--kd-c-image-icon-color, var(--kd-g-color-white, #fff));
258
- font-size: var(--kd-c-image-icon-font-size, 27px);
258
+ font-size: var(--kd-c-image-icon-font-size, 26px);
259
259
  cursor: pointer;
260
260
  }
261
261
  .kd-image-preview-action i:hover,
@@ -41,7 +41,7 @@
41
41
  text-align: center;
42
42
  opacity: 0;
43
43
  transform: translateY(100%);
44
- transition: all @image-action-transition ease-out;
44
+ transition: all 0.2s ease-out;
45
45
  background-color: @image-action-background-color;
46
46
 
47
47
  >* {
@@ -58,7 +58,7 @@
58
58
  }
59
59
 
60
60
  .@{image-preview-prefix-cls} {
61
- z-index: @image-z-index-masker;
61
+ z-index: 3000;
62
62
  position: fixed;
63
63
  top: 0;
64
64
  right: 0;
@@ -67,14 +67,14 @@
67
67
  opacity: 0;
68
68
  transform: scale(0.15);
69
69
  visibility: hidden;
70
- transition: all calc(@image-transition-duration - 0.1s) @image-motion-ease-in;
70
+ transition: all 0.2s cubic-bezier(0.4,0,1,0.6);
71
71
  -webkit-overflow-scrolling: touch;
72
72
 
73
73
  &.show {
74
74
  opacity: 1;
75
75
  transform: scale(1);
76
76
  visibility: visible;
77
- transition: all calc(@image-transition-duration - 0.1s) @image-motion-ease-out;
77
+ transition: all 0.2s cubic-bezier(0,.4,.4,1);
78
78
  }
79
79
 
80
80
  &-mask {
@@ -104,7 +104,7 @@
104
104
 
105
105
  &:hover,
106
106
  &:active {
107
- color: @theme-color;
107
+ color: #5582f3;
108
108
  }
109
109
  }
110
110
 
@@ -2,31 +2,18 @@
2
2
 
3
3
  @image-prefix: '--@{kd-prefix}-c-image';
4
4
 
5
- @image-transition-duration: var(~'@{image-prefix}-transition-duration',@transition-duration);
6
- @image-motion-ease-out: var(~'@{image-prefix}-motion-ease-out',@motion-ease-out);
7
- @image-motion-ease-in: var(~'@{image-prefix}-motion-ease-out',@motion-ease-in);
8
- @image-z-index-masker: var(~'@{image-prefix}-z-index-masker',@z-index-masker);
9
- @image-border-radius: var(~'@{image-prefix}-radius-border',@radius-border);
10
- @image-action-transition: var(~'@{image-prefix}-action-transition',@duration-quickly);
11
-
12
-
13
-
14
-
15
5
  // color
16
- @image-icon-color: var(~'@{image-prefix}-icon-color',@color-white);//图片预览 图标颜色
17
- @image-close-color-background: var(~'@{image-prefix}-close-color-background',#666666);//删除图标 背景色
18
- @image-action-background-color: var(~'@{image-prefix}-action-color-background',rgba(0, 0, 0, 0.5));
19
-
20
-
6
+ @image-icon-color: var(~'@{image-prefix}-icon-color', @color-white); //图片预览 图标颜色
7
+ @image-close-color-background: var(~'@{image-prefix}-close-color-background', #666666); //删除图标 背景色
8
+ @image-action-background-color: var(~'@{image-prefix}-action-color-background', rgba(0, 0, 0, 0.5));
21
9
  // font
22
- @image-icon-font-size: var(~'@{image-prefix}-icon-font-size',27px);//图片预览 图标大小
23
- @image-preview-close-font-size: var(~'@{image-prefix}-preview-font-size',28px);
24
- @image-font-size-x-large: var(~'@{image-prefix}-font-size-x-large',@font-size-x-large);
25
-
10
+ @image-icon-font-size: var(~'@{image-prefix}-icon-font-size', 26px); //图片预览 图标大小
11
+ @image-preview-close-font-size: var(~'@{image-prefix}-preview-font-size', 28px);
12
+ @image-font-size-x-large: var(~'@{image-prefix}-font-size-x-large', @font-size-x-large);
13
+ // radius
14
+ @image-border-radius: var(~'@{image-prefix}-radius-border', @radius-border);
26
15
  // sizing
27
- @image-action-width: var(~'@{image-prefix}-action-sizing-width',100%);
28
- @image-preview-close-width: var(~'@{image-prefix}-preview-sizing-width',18px);
29
- @image-preview-close-height: var(~'@{image-prefix}-preview-sizing-height',18px);
30
- @image-action-height: var(~'@{image-prefix}-action-sizing-height',28px);
31
-
32
-
16
+ @image-action-width: var(~'@{image-prefix}-action-sizing-width', 100%);
17
+ @image-preview-close-width: var(~'@{image-prefix}-preview-sizing-width', 18px);
18
+ @image-preview-close-height: var(~'@{image-prefix}-preview-sizing-height', 18px);
19
+ @image-action-height: var(~'@{image-prefix}-action-sizing-height', 28px);