@kdcloudjs/kdesign 1.8.29 → 1.8.31

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 (171) hide show
  1. package/dist/kdesign-complete.less +897 -83
  2. package/dist/kdesign.css +650 -7
  3. package/dist/kdesign.css.map +1 -1
  4. package/dist/kdesign.js +188 -109
  5. package/dist/kdesign.js.map +1 -1
  6. package/dist/kdesign.min.css +3 -3
  7. package/dist/kdesign.min.js +5 -5
  8. package/dist/kdesign.min.js.map +1 -1
  9. package/es/anchor/anchor.js +7 -5
  10. package/es/anchor/style/index.css +14 -0
  11. package/es/anchor/style/index.less +15 -0
  12. package/es/button/button.js +4 -2
  13. package/es/button/group.js +5 -3
  14. package/es/button/style/index.css +32 -0
  15. package/es/button/style/index.less +42 -1
  16. package/es/checkbox/checkbox.js +5 -3
  17. package/es/checkbox/group.js +4 -2
  18. package/es/checkbox/style/index.css +38 -1
  19. package/es/checkbox/style/index.less +56 -15
  20. package/es/city-picker/city-picker.js +32 -14
  21. package/es/city-picker/option.js +7 -2
  22. package/es/city-picker/style/index.css +54 -0
  23. package/es/city-picker/style/index.less +67 -0
  24. package/es/collapse/collapse.js +4 -2
  25. package/es/collapse/style/index.css +24 -0
  26. package/es/collapse/style/index.less +26 -0
  27. package/es/color-picker/color-picker.js +6 -4
  28. package/es/color-picker/style/index.css +129 -4
  29. package/es/color-picker/style/index.less +174 -29
  30. package/es/config-provider/ConfigContext.d.ts +4 -0
  31. package/es/config-provider/ConfigContext.js +2 -0
  32. package/es/config-provider/compDefaultProps.d.ts +0 -1
  33. package/es/config-provider/compDefaultProps.js +0 -5
  34. package/es/config-provider/defaultConfig.d.ts +1 -0
  35. package/es/config-provider/defaultConfig.js +2 -1
  36. package/es/dropdown/dropdown.js +4 -2
  37. package/es/dropdown/menu.js +4 -2
  38. package/es/dropdown/style/index.css +3 -0
  39. package/es/dropdown/style/index.less +4 -0
  40. package/es/image/preview.js +6 -4
  41. package/es/image/style/index.css +11 -0
  42. package/es/image/style/index.less +20 -4
  43. package/es/input/ClearableLabeledInput.d.ts +1 -0
  44. package/es/input/ClearableLabeledInput.js +6 -4
  45. package/es/input/TextArea.js +7 -4
  46. package/es/input/input.js +6 -3
  47. package/es/input/style/index.css +48 -0
  48. package/es/input/style/index.less +55 -0
  49. package/es/link/link.js +4 -2
  50. package/es/link/style/index.css +11 -0
  51. package/es/link/style/index.less +14 -0
  52. package/es/menu/menu.js +4 -2
  53. package/es/menu/menuItem.js +5 -3
  54. package/es/menu/style/index.css +10 -0
  55. package/es/menu/style/index.less +33 -22
  56. package/es/menu/subMenu.js +6 -4
  57. package/es/modal/modal.js +4 -2
  58. package/es/modal/style/index.css +7 -0
  59. package/es/modal/style/index.less +14 -0
  60. package/es/pagination/pagination.js +16 -13
  61. package/es/pagination/style/index.css +72 -0
  62. package/es/pagination/style/index.less +99 -0
  63. package/es/qr-code/qr-code.js +4 -2
  64. package/es/qr-code/style/index.css +3 -0
  65. package/es/qr-code/style/index.less +7 -3
  66. package/es/radio/group.js +4 -2
  67. package/es/radio/radio.js +4 -2
  68. package/es/radio/style/index.css +38 -0
  69. package/es/radio/style/index.less +46 -0
  70. package/es/select/option.js +4 -2
  71. package/es/select/select.js +8 -6
  72. package/es/select/style/index.css +61 -0
  73. package/es/select/style/index.less +87 -0
  74. package/es/steps/Steps.js +4 -2
  75. package/es/steps/style/index.css +35 -0
  76. package/es/steps/style/index.less +59 -5
  77. package/es/switch/style/index.css +9 -0
  78. package/es/switch/style/index.less +9 -2
  79. package/es/switch/switch.js +4 -2
  80. package/es/tag/style/index.css +7 -0
  81. package/es/tag/style/index.less +8 -0
  82. package/es/tag/tag.js +4 -2
  83. package/es/tree/style/index.css +19 -0
  84. package/es/tree/style/index.less +27 -0
  85. package/es/tree/tree.js +4 -2
  86. package/es/tree/treeNode.js +3 -2
  87. package/es/upload/style/index.css +24 -1
  88. package/es/upload/style/index.less +40 -2
  89. package/es/upload/upload.js +4 -2
  90. package/lib/anchor/anchor.js +7 -5
  91. package/lib/anchor/style/index.css +14 -0
  92. package/lib/anchor/style/index.less +15 -0
  93. package/lib/button/button.js +4 -2
  94. package/lib/button/group.js +5 -3
  95. package/lib/button/style/index.css +32 -0
  96. package/lib/button/style/index.less +42 -1
  97. package/lib/checkbox/checkbox.js +5 -3
  98. package/lib/checkbox/group.js +4 -2
  99. package/lib/checkbox/style/index.css +38 -1
  100. package/lib/checkbox/style/index.less +56 -15
  101. package/lib/city-picker/city-picker.js +32 -14
  102. package/lib/city-picker/option.js +7 -2
  103. package/lib/city-picker/style/index.css +54 -0
  104. package/lib/city-picker/style/index.less +67 -0
  105. package/lib/collapse/collapse.js +4 -2
  106. package/lib/collapse/style/index.css +24 -0
  107. package/lib/collapse/style/index.less +26 -0
  108. package/lib/color-picker/color-picker.js +6 -4
  109. package/lib/color-picker/style/index.css +129 -4
  110. package/lib/color-picker/style/index.less +174 -29
  111. package/lib/config-provider/ConfigContext.d.ts +4 -0
  112. package/lib/config-provider/ConfigContext.js +4 -1
  113. package/lib/config-provider/compDefaultProps.d.ts +0 -1
  114. package/lib/config-provider/compDefaultProps.js +0 -5
  115. package/lib/config-provider/defaultConfig.d.ts +1 -0
  116. package/lib/config-provider/defaultConfig.js +2 -1
  117. package/lib/dropdown/dropdown.js +4 -2
  118. package/lib/dropdown/menu.js +4 -2
  119. package/lib/dropdown/style/index.css +3 -0
  120. package/lib/dropdown/style/index.less +4 -0
  121. package/lib/image/preview.js +6 -4
  122. package/lib/image/style/index.css +11 -0
  123. package/lib/image/style/index.less +20 -4
  124. package/lib/input/ClearableLabeledInput.d.ts +1 -0
  125. package/lib/input/ClearableLabeledInput.js +6 -4
  126. package/lib/input/TextArea.js +7 -4
  127. package/lib/input/input.js +6 -3
  128. package/lib/input/style/index.css +48 -0
  129. package/lib/input/style/index.less +55 -0
  130. package/lib/link/link.js +4 -2
  131. package/lib/link/style/index.css +11 -0
  132. package/lib/link/style/index.less +14 -0
  133. package/lib/menu/menu.js +4 -2
  134. package/lib/menu/menuItem.js +5 -3
  135. package/lib/menu/style/index.css +10 -0
  136. package/lib/menu/style/index.less +33 -22
  137. package/lib/menu/subMenu.js +6 -4
  138. package/lib/modal/modal.js +4 -2
  139. package/lib/modal/style/index.css +7 -0
  140. package/lib/modal/style/index.less +14 -0
  141. package/lib/pagination/pagination.js +16 -13
  142. package/lib/pagination/style/index.css +72 -0
  143. package/lib/pagination/style/index.less +99 -0
  144. package/lib/qr-code/qr-code.js +4 -2
  145. package/lib/qr-code/style/index.css +3 -0
  146. package/lib/qr-code/style/index.less +7 -3
  147. package/lib/radio/group.js +4 -2
  148. package/lib/radio/radio.js +4 -2
  149. package/lib/radio/style/index.css +38 -0
  150. package/lib/radio/style/index.less +46 -0
  151. package/lib/select/option.js +4 -2
  152. package/lib/select/select.js +8 -6
  153. package/lib/select/style/index.css +61 -0
  154. package/lib/select/style/index.less +87 -0
  155. package/lib/steps/Steps.js +4 -2
  156. package/lib/steps/style/index.css +35 -0
  157. package/lib/steps/style/index.less +59 -5
  158. package/lib/switch/style/index.css +9 -0
  159. package/lib/switch/style/index.less +9 -2
  160. package/lib/switch/switch.js +4 -2
  161. package/lib/tag/style/index.css +7 -0
  162. package/lib/tag/style/index.less +8 -0
  163. package/lib/tag/tag.js +4 -2
  164. package/lib/tree/style/index.css +19 -0
  165. package/lib/tree/style/index.less +27 -0
  166. package/lib/tree/tree.js +4 -2
  167. package/lib/tree/treeNode.js +3 -2
  168. package/lib/upload/style/index.css +24 -1
  169. package/lib/upload/style/index.less +40 -2
  170. package/lib/upload/upload.js +4 -2
  171. package/package.json +1 -1
@@ -30,7 +30,6 @@
30
30
  background-color: @steps-color-white;
31
31
  }
32
32
  }
33
-
34
33
  }
35
34
 
36
35
  &-clickable&-wait {
@@ -60,7 +59,7 @@
60
59
 
61
60
  &:hover {
62
61
  .@{steps-prefix-cls}-item-title {
63
- color: @steps-color-completed
62
+ color: @steps-color-completed;
64
63
  }
65
64
  }
66
65
  }
@@ -85,7 +84,8 @@
85
84
  position: absolute;
86
85
  left: 50%;
87
86
  top: calc(50% - @steps-line-sizing-height / 2);
88
- transition: width @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96), background-color @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96)
87
+ transition: width @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96),
88
+ background-color @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96);
89
89
  }
90
90
 
91
91
  &:last-child {
@@ -144,7 +144,8 @@
144
144
  border-color: @steps-color-hover;
145
145
  }
146
146
 
147
- .@{steps-prefix-cls}-item-title, .@{steps-prefix-cls}-item-description {
147
+ .@{steps-prefix-cls}-item-title,
148
+ .@{steps-prefix-cls}-item-description {
148
149
  color: @steps-color-hover;
149
150
  }
150
151
  }
@@ -173,7 +174,6 @@
173
174
  }
174
175
  }
175
176
 
176
-
177
177
  &-error {
178
178
  .@{steps-prefix-cls}-icon {
179
179
  color: @steps-color-error;
@@ -261,3 +261,57 @@
261
261
  }
262
262
  }
263
263
  }
264
+
265
+ .@{steps-prefix-cls}-rtl {
266
+ direction: rtl;
267
+ .@{steps-prefix-cls}-item:first-child {
268
+ .@{steps-prefix-cls}-item-iconContainer {
269
+ &::before {
270
+ display: none;
271
+ }
272
+ }
273
+ }
274
+ &.@{steps-prefix-cls}-horizontal {
275
+ &:first-child {
276
+ padding-right: 0;
277
+ }
278
+
279
+ &:last-child {
280
+ padding-right: 0;
281
+ padding-left: 0;
282
+ }
283
+ .@{steps-prefix-cls}-item {
284
+ .@{steps-prefix-cls}-item-container {
285
+ .@{steps-prefix-cls}-item-iconContainer {
286
+ &::after {
287
+ display: none;
288
+ }
289
+ &::before {
290
+ content: '';
291
+ width: ~'calc(100% + 35px)';
292
+ height: @steps-line-sizing-height;
293
+ border-bottom: 1px dashed @steps-color-wait;
294
+ border-left: 1px dashed @steps-color-wait;
295
+ position: absolute;
296
+ left: 50%;
297
+ top: calc(50% - @steps-line-sizing-height / 2);
298
+ transition: width @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96),
299
+ background-color @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96);
300
+
301
+ }
302
+ }
303
+ }
304
+ }
305
+ }
306
+ &.@{steps-prefix-cls}-vertical {
307
+ .@{steps-prefix-cls}-item {
308
+ &-iconContainer {
309
+ margin-left: 4px;
310
+ margin-right: 0;
311
+ }
312
+ &-content {
313
+ text-align: right;
314
+ }
315
+ }
316
+ }
317
+ }
@@ -217,3 +217,12 @@
217
217
  .kd-switch-size-large .kd-switch-inner {
218
218
  margin: var(--kd-c-switch-inner-spacing-margin-large, 0 5px 0 21px);
219
219
  }
220
+ .kd-switch-rtl {
221
+ direction: rtl;
222
+ -webkit-transform: rotateY(180deg);
223
+ transform: rotateY(180deg);
224
+ }
225
+ .kd-switch-rtl .kd-switch-inner {
226
+ -webkit-transform: rotateY(180deg);
227
+ transform: rotateY(180deg);
228
+ }
@@ -4,7 +4,6 @@
4
4
  @switch-prefix-cls: ~'@{kd-prefix}-switch';
5
5
  @icon-prefix-cls: ~'@{kd-prefix}icon';
6
6
 
7
-
8
7
  .@{switch-prefix-cls} {
9
8
  .switch;
10
9
 
@@ -25,7 +24,7 @@
25
24
 
26
25
  .@{icon-prefix-cls}-loadding-circle {
27
26
  animation: loadingcircle 1s infinite;
28
- animation-timing-function: cubic-bezier(0.42, 0.00, 0.58, 1.00);
27
+ animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
29
28
  font-size: @switch-small-font-size;
30
29
  line-height: 1;
31
30
  vertical-align: baseline;
@@ -80,3 +79,11 @@
80
79
  }
81
80
  }
82
81
  }
82
+
83
+ .@{switch-prefix-cls}-rtl {
84
+ direction: rtl;
85
+ transform: rotateY(180deg);
86
+ .@{switch-prefix-cls}-inner {
87
+ transform: rotateY(180deg);
88
+ }
89
+ }
@@ -37,7 +37,8 @@ var Switch = function Switch(props) {
37
37
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
38
38
  getPrefixCls = _useContext.getPrefixCls,
39
39
  prefixCls = _useContext.prefixCls,
40
- userDefaultProps = _useContext.compDefaultProps;
40
+ userDefaultProps = _useContext.compDefaultProps,
41
+ direction = _useContext.direction;
41
42
  var switchProps = (0, _utils.getCompProps)('Switch', userDefaultProps, props);
42
43
  var size = switchProps.size,
43
44
  className = switchProps.className,
@@ -59,6 +60,7 @@ var Switch = function Switch(props) {
59
60
  newChecked = _useMergedState2[0],
60
61
  setChecked = _useMergedState2[1];
61
62
  var switchPrefixCls = getPrefixCls(prefixCls, 'switch', customPrefixcls);
63
+ var rtlCls = direction === 'rtl' ? "".concat(switchPrefixCls, "-rtl") : null;
62
64
  var handleClick = function handleClick(e) {
63
65
  var newV = triggerChange(!newChecked, e);
64
66
  onClick && onClick(newV, e);
@@ -73,7 +75,7 @@ var Switch = function Switch(props) {
73
75
  }
74
76
  return afterChangedChecked;
75
77
  }
76
- var switchClasses = (0, _classnames.default)(switchPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(switchPrefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames, "".concat(switchPrefixCls, "-disabled"), disabled || loading), (0, _defineProperty2.default)(_classNames, "".concat(switchPrefixCls, "-loading"), loading), (0, _defineProperty2.default)(_classNames, "".concat(switchPrefixCls, "-checked"), newChecked), _classNames));
78
+ var switchClasses = (0, _classnames.default)(switchPrefixCls, rtlCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(switchPrefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames, "".concat(switchPrefixCls, "-disabled"), disabled || loading), (0, _defineProperty2.default)(_classNames, "".concat(switchPrefixCls, "-loading"), loading), (0, _defineProperty2.default)(_classNames, "".concat(switchPrefixCls, "-checked"), newChecked), _classNames));
77
79
  var loadingIcon = loading ? _react.default.createElement("span", {
78
80
  className: "".concat(switchPrefixCls, "-loading-icon")
79
81
  }, _react.default.createElement(_icon.default, {
@@ -519,3 +519,10 @@
519
519
  cursor: pointer;
520
520
  font-size: 12px;
521
521
  }
522
+ .kd-tag-rtl {
523
+ direction: rtl;
524
+ }
525
+ .kd-tag-rtl .kd-tag-closeWrapper {
526
+ margin-right: 4px;
527
+ margin-left: 0;
528
+ }
@@ -131,3 +131,11 @@
131
131
  font-size: 12px;
132
132
  }
133
133
  }
134
+
135
+ .@{tag-prefix-cls}-rtl {
136
+ direction: rtl;
137
+ .@{tag-prefix-cls}-closeWrapper {
138
+ margin-right: 4px;
139
+ margin-left: 0;
140
+ }
141
+ }
package/lib/tag/tag.js CHANGED
@@ -40,7 +40,8 @@ var InteranalTag = function InteranalTag(props, ref) {
40
40
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
41
41
  getPrefixCls = _useContext.getPrefixCls,
42
42
  prefixCls = _useContext.prefixCls,
43
- userDefaultProps = _useContext.compDefaultProps;
43
+ userDefaultProps = _useContext.compDefaultProps,
44
+ direction = _useContext.direction;
44
45
  var tagProps = (0, _utils.getCompProps)('Tag', userDefaultProps, props);
45
46
  var className = tagProps.className,
46
47
  clickable = tagProps.clickable,
@@ -60,6 +61,7 @@ var InteranalTag = function InteranalTag(props, ref) {
60
61
  (0, _devwarning.default)(TagTypes.indexOf(type) === -1, 'tag', "cannot found tag type '".concat(type, "'"));
61
62
  (0, _devwarning.default)(TagSizes.indexOf(size) === -1, 'tag', "cannot found tag size '".concat(size, "'"));
62
63
  var tagPrefixCls = getPrefixCls(prefixCls, 'tag', customPrefixcls);
64
+ var rtlCls = direction === 'rtl' ? "".concat(tagPrefixCls, "-rtl") : null;
63
65
  var handleClick = function handleClick(e) {
64
66
  if (!clickable) return;
65
67
  onClick && onClick(e);
@@ -87,7 +89,7 @@ var InteranalTag = function InteranalTag(props, ref) {
87
89
  }, child);
88
90
  };
89
91
  var isPresetColor = ['process', 'success', 'warning', 'error', 'end', 'expired'].indexOf(color) > -1;
90
- var tagClasses = (0, _classnames.default)(tagPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(tagPrefixCls, "-shape-")).call(_context, type), type), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(tagPrefixCls, "-")).call(_context2, color), isPresetColor), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-has-color"), !isPresetColor && color && type === 'attribute'), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-clickable"), clickable), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-closable"), closable), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(tagPrefixCls, "-size-")).call(_context3, size), size), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-closable-disabled"), type === 'edit' && disabled), _classNames));
92
+ var tagClasses = (0, _classnames.default)(tagPrefixCls, rtlCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(tagPrefixCls, "-shape-")).call(_context, type), type), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(tagPrefixCls, "-")).call(_context2, color), isPresetColor), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-has-color"), !isPresetColor && color && type === 'attribute'), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-clickable"), clickable), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-closable"), closable), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(tagPrefixCls, "-size-")).call(_context3, size), size), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-closable-disabled"), type === 'edit' && disabled), _classNames));
91
93
  var tagColorStyle = !isPresetColor && color && type === 'attribute' ? {
92
94
  backgroundColor: color
93
95
  } : {};
@@ -373,3 +373,22 @@
373
373
  -ms-flex-align: center;
374
374
  align-items: center;
375
375
  }
376
+ .kd-tree-rtl {
377
+ direction: rtl;
378
+ }
379
+ .kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-indent {
380
+ margin-right: 0;
381
+ margin-left: 6px;
382
+ }
383
+ .kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-title-wrap {
384
+ padding-right: 4px;
385
+ padding-left: 0;
386
+ }
387
+ .kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-title-wrap .kd-checkbox-default-margin {
388
+ margin-right: 0;
389
+ margin-left: 4px;
390
+ }
391
+ .kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-animation-expand {
392
+ -webkit-transform: rotate(-90deg);
393
+ transform: rotate(-90deg);
394
+ }
@@ -200,3 +200,30 @@
200
200
  align-items: center;
201
201
  }
202
202
  }
203
+ .@{tree-prefix-cls}-rtl {
204
+ direction: rtl;
205
+ .@{tree-prefix-cls}-root {
206
+ .@{tree-node-prefix-cls}-item {
207
+ .@{tree-node-prefix-cls}-root {
208
+ .@{tree-node-prefix-cls}-indent {
209
+ margin-right: 0;
210
+ margin-left: 6px;
211
+ }
212
+ .@{tree-node-prefix-cls}-title-wrap {
213
+ padding-right: 4px;
214
+ padding-left: 0;
215
+ .@{kd-prefix}-checkbox {
216
+ &-default-margin {
217
+ margin-right: 0;
218
+ margin-left: 4px;
219
+ }
220
+ }
221
+ }
222
+ .@{tree-node-prefix-cls}-animation-expand {
223
+ transform: rotate(-90deg);
224
+ }
225
+ }
226
+ }
227
+ }
228
+ }
229
+
package/lib/tree/tree.js CHANGED
@@ -43,7 +43,8 @@ var InternalTree = _react.default.forwardRef(function (props, ref) {
43
43
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
44
44
  getPrefixCls = _useContext.getPrefixCls,
45
45
  prefixCls = _useContext.prefixCls,
46
- userDefaultProps = _useContext.compDefaultProps;
46
+ userDefaultProps = _useContext.compDefaultProps,
47
+ direction = _useContext.direction;
47
48
  var TreeProps = (0, _utils.getCompProps)('Tree', userDefaultProps, props);
48
49
  var customPrefixcls = TreeProps.prefixCls,
49
50
  treeData = TreeProps.treeData,
@@ -92,7 +93,8 @@ var InternalTree = _react.default.forwardRef(function (props, ref) {
92
93
  renderExtra = TreeProps.renderExtra,
93
94
  others = __rest(TreeProps, ["prefixCls", "treeData", "virtual", "showIcon", "switcherIcon", "icon", "checkable", "checkStrictly", "disabled", "draggable", "scrollToKey", "expandedKeys", "checkedKeys", "defaultExpandRoot", "defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys", "defaultCheckedKeys", "defaultSelectedKeys", "height", "onCheck", "onExpand", "onDragStart", "onDragOver", "onDragLeave", "onDragEnter", "onDragEnd", "onDrop", "onSelect", "selectedKeys", "setTreeNodeStyle", "setTreeNodeClassName", "estimatedItemSize", "style", "className", "filterTreeNode", "filterValue", "expandOnClickNode", "onlyExpandOnClickIcon", "loadData", "notFoundContent", "showLine", "expandOnFilterNode", "renderExtra"]);
94
95
  var treePrefixCls = getPrefixCls(prefixCls, 'tree', customPrefixcls);
95
- var treeNodeClassName = (0, _classnames.default)(className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(treePrefixCls), true), (0, _defineProperty2.default)(_classNames, "".concat(treePrefixCls, "-show-line"), showLine), _classNames));
96
+ var rtlCls = direction === 'rtl' ? "".concat(treePrefixCls, "-rtl") : null;
97
+ var treeNodeClassName = (0, _classnames.default)(className, rtlCls, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(treePrefixCls), true), (0, _defineProperty2.default)(_classNames, "".concat(treePrefixCls, "-show-line"), showLine), _classNames));
96
98
  var treeRootClassName = "".concat(treePrefixCls, "-root");
97
99
  var estimatedItemSize = innerEstimatedItemSize;
98
100
  var _React$useMemo = _react.default.useMemo(function () {
@@ -35,7 +35,8 @@ var TreeNode = _react.default.forwardRef(function (props) {
35
35
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
36
36
  getPrefixCls = _useContext.getPrefixCls,
37
37
  prefixCls = _useContext.prefixCls,
38
- userDefaultProps = _useContext.compDefaultProps;
38
+ userDefaultProps = _useContext.compDefaultProps,
39
+ direction = _useContext.direction;
39
40
  var TreeNodeProps = (0, _utils.getCompProps)('TreeNode', userDefaultProps, props);
40
41
  var nodeKey = TreeNodeProps.nodeKey,
41
42
  customPrefixcls = TreeNodeProps.prefixCls,
@@ -188,7 +189,7 @@ var TreeNode = _react.default.forwardRef(function (props) {
188
189
  className: (0, _classnames.default)("".concat(treeNodePrefixCls, "-icon"), (_classNames3 = {}, (0, _defineProperty2.default)(_classNames3, "".concat(treeNodePrefixCls, "-animation-expand"), expandState), (0, _defineProperty2.default)(_classNames3, "".concat(treeNodePrefixCls, "-animation-collapse"), !expandState), (0, _defineProperty2.default)(_classNames3, "".concat(treeNodePrefixCls, "-icon-hover"), !expandOnClickNode), _classNames3)),
189
190
  onClick: expandOnClickNode ? onlyExpandOnClickIcon ? handleExpandIconClick : undefined : handleExpandIconClick
190
191
  }, renderIcon(switcherIcon || _react.default.createElement(_icon.default, {
191
- type: "arrow-right-solid"
192
+ type: "arrow-".concat(direction === 'rtl' ? 'left' : 'right', "-solid")
192
193
  })));
193
194
  } else {
194
195
  return _react.default.createElement("span", {
@@ -164,7 +164,7 @@
164
164
  opacity: 0;
165
165
  overflow: hidden;
166
166
  }
167
- .kd-upload-input input[type="file"] {
167
+ .kd-upload-input input[type='file'] {
168
168
  position: absolute;
169
169
  top: -20%;
170
170
  left: 0;
@@ -386,3 +386,26 @@
386
386
  color: var(--kd-c-upload-panel-button-color, #0E5FD8);
387
387
  font-size: var(--kd-c-upload-picture-action-font-size, var(--kd-g-font-size-small, 12px));
388
388
  }
389
+ .kd-upload-rtl {
390
+ direction: rtl;
391
+ }
392
+ .kd-upload-rtl.kd-upload .kd-upload-text-list-item-name {
393
+ margin: 0 var(--kd-c-upload-text-list-item-name-padding-left, 4px) 0 var(--kd-c-upload-text-list-item-name-padding-right, 8px);
394
+ }
395
+ .kd-upload-rtl.kd-upload .kd-upload-text-list-item-action {
396
+ left: 0;
397
+ right: auto;
398
+ -webkit-transform: translateX(-5px);
399
+ transform: translateX(-5px);
400
+ }
401
+ .kd-upload-rtl.kd-upload .kd-upload-text-list-item-action a:not(:first-child) {
402
+ margin-right: 20px;
403
+ margin-left: 0;
404
+ }
405
+ .kd-upload-rtl.kd-upload .kd-upload-picture-list-item {
406
+ margin: 0 0 28px 28px;
407
+ }
408
+ .kd-upload-rtl.kd-upload .kd-upload-picture-list-item-error a:not(:first-child) {
409
+ margin-right: 10px;
410
+ margin-left: auto;
411
+ }
@@ -46,7 +46,7 @@
46
46
  opacity: 0;
47
47
  overflow: hidden;
48
48
 
49
- input[type="file"] {
49
+ input[type='file'] {
50
50
  position: absolute;
51
51
  top: -20%;
52
52
  left: 0;
@@ -94,7 +94,8 @@
94
94
  font-size: @upload-font-size;
95
95
  }
96
96
 
97
- &-name,&-icon {
97
+ &-name,
98
+ &-icon {
98
99
  cursor: pointer;
99
100
  }
100
101
 
@@ -239,3 +240,40 @@
239
240
  }
240
241
  }
241
242
  }
243
+
244
+ .@{upload-prefix-cls}-rtl {
245
+ direction: rtl;
246
+ &.@{upload-prefix-cls} {
247
+ .@{upload-prefix-text-list-cls} {
248
+ &-item {
249
+ &-name {
250
+ margin: 0 @upload-text-list-item-name-padding-left 0 @upload-text-list-item-name-padding-right;
251
+ }
252
+ &-action {
253
+ left: 0;
254
+ right: auto;
255
+ transform: translateX(-5px);
256
+ a {
257
+ &:not(:first-child) {
258
+ margin-right: 20px;
259
+ margin-left: 0;
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+ .@{upload-prefix-picture-list-cls} {
266
+ &-item {
267
+ margin: 0 0 28px 28px;
268
+ &-error {
269
+ a {
270
+ &:not(:first-child) {
271
+ margin-right: 10px;
272
+ margin-left: auto;
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }
@@ -89,7 +89,8 @@ var InternalUpload = function InternalUpload(props, ref) {
89
89
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
90
90
  getPrefixCls = _useContext.getPrefixCls,
91
91
  pkgPrefixCls = _useContext.prefixCls,
92
- userDefaultProps = _useContext.compDefaultProps;
92
+ userDefaultProps = _useContext.compDefaultProps,
93
+ direction = _useContext.direction;
93
94
  var inputRef = (0, _react.useRef)(null);
94
95
  var allProps = (0, _utils.getCompProps)('Upload', userDefaultProps, props);
95
96
  var type = allProps.type,
@@ -325,6 +326,7 @@ var InternalUpload = function InternalUpload(props, ref) {
325
326
  }
326
327
  };
327
328
  var prefixCls = getPrefixCls(pkgPrefixCls, 'upload', customPrefixcls);
329
+ var rtlCls = direction === 'rtl' ? "".concat(prefixCls, "-rtl") : null;
328
330
  var inputFileProps = {
329
331
  accept: accept,
330
332
  onClick: onClick,
@@ -398,7 +400,7 @@ var InternalUpload = function InternalUpload(props, ref) {
398
400
  };
399
401
  });
400
402
  return _react.default.createElement("div", {
401
- className: (0, _classnames.default)(prefixCls, {
403
+ className: (0, _classnames.default)(prefixCls, rtlCls, {
402
404
  disabled: disabled
403
405
  }, className),
404
406
  style: style
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.8.29",
3
+ "version": "1.8.31",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [