@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
@@ -815,3 +815,75 @@
815
815
  -webkit-transform: rotate(180deg);
816
816
  transform: rotate(180deg);
817
817
  }
818
+ .kd-pagination-rtl {
819
+ direction: rtl;
820
+ }
821
+ .kd-pagination-rtl .kd-pagination-total {
822
+ margin-left: 12px;
823
+ margin-right: 0;
824
+ }
825
+ .kd-pagination-rtl .kd-pagination-current {
826
+ margin-right: 0;
827
+ margin-left: 12px;
828
+ }
829
+ .kd-pagination-rtl .kd-pagination-action .kd-pagination-action-item.bordered {
830
+ margin-left: calc(2 * var(--kd-c-pagination-button-spacing, 4px));
831
+ margin-right: 0;
832
+ }
833
+ .kd-pagination-rtl .kd-pagination-action .kd-pagination-action-item.bordered:last-child {
834
+ margin-left: 0;
835
+ }
836
+ .kd-pagination-rtl .kd-pagination-selector {
837
+ margin-right: 20px;
838
+ margin-left: 0;
839
+ }
840
+ .kd-pagination-rtl .kd-pagination-selector .kd-pagination-selector-size i {
841
+ margin-left: 0;
842
+ margin-right: 4px;
843
+ }
844
+ .kd-pagination-rtl.simple .kd-pagination-action-item .kd-pagination-current {
845
+ margin-right: 0;
846
+ margin-left: 2px;
847
+ }
848
+ .kd-pagination-rtl.simple .kd-pagination-action-item .kd-pagination-total {
849
+ margin-left: 0;
850
+ margin-right: 2px;
851
+ }
852
+ .kd-pagination-rtl.less .kd-pagination-pages-item {
853
+ margin-left: var(--kd-c-pagination-button-spacing, 4px);
854
+ margin-right: 0;
855
+ }
856
+ .kd-pagination-rtl.less .kd-pagination-pages-item:last-child {
857
+ margin-left: 0;
858
+ }
859
+ .kd-pagination-rtl.nicety .kd-pagination-pages-item {
860
+ margin-left: var(--kd-c-pagination-button-spacing, 4px);
861
+ margin-right: 0;
862
+ }
863
+ .kd-pagination-rtl.nicety .kd-pagination-pages-item:last-child {
864
+ margin-left: 0;
865
+ }
866
+ .kd-pagination-rtl.nicety .kd-pagination-jumper {
867
+ margin-right: var(--kd-c-pagination-button-spacing, 4px);
868
+ margin-left: 0;
869
+ }
870
+ .kd-pagination-rtl.nicety .kd-pagination-jumper .kd-pagination-jumper-button {
871
+ margin-right: var(--kd-c-pagination-button-spacing, 4px);
872
+ margin-left: 0;
873
+ }
874
+ .kd-pagination-rtl.nicety .kd-pagination-options {
875
+ margin-right: 22px;
876
+ margin-left: 0;
877
+ }
878
+ .kd-pagination-rtl.nicety .kd-pagination-options .kd-pagination-options-size {
879
+ margin-right: 0;
880
+ margin-left: 8px;
881
+ padding: 0 4px 0 24px;
882
+ }
883
+ .kd-pagination-rtl.nicety .kd-pagination-options .kd-pagination-options-size i {
884
+ left: 5px;
885
+ right: auto;
886
+ }
887
+ .kd-pagination-rtl.nicety .kd-pagination-options .kd-dropdown-menu-item > span {
888
+ text-align: right;
889
+ }
@@ -617,3 +617,102 @@
617
617
  }
618
618
  }
619
619
  }
620
+
621
+ .@{pagination-prefix-cls}-rtl {
622
+ direction: rtl;
623
+ .@{pagination-prefix-cls}-total {
624
+ margin-left: 12px;
625
+ margin-right: 0;
626
+ }
627
+ .@{pagination-prefix-cls}-current {
628
+ margin-right: 0;
629
+ margin-left: 12px;
630
+ }
631
+ .@{pagination-action-prefix-cls} {
632
+ .@{pagination-action-prefix-cls}-item {
633
+ &.bordered {
634
+ margin-left: calc(2 * @pagination-button-spacing);
635
+ margin-right: 0;
636
+ &:last-child {
637
+ margin-left: 0;
638
+ }
639
+ }
640
+ }
641
+ }
642
+ .@{pagination-selector-prefix-cls} {
643
+ margin-right: 20px;
644
+ margin-left: 0;
645
+ .@{pagination-selector-prefix-cls}-size {
646
+ i {
647
+ margin-left: 0;
648
+ margin-right: 4px;
649
+ }
650
+ }
651
+ }
652
+ &.simple {
653
+ .@{pagination-prefix-cls}-action {
654
+ &-item {
655
+ .@{pagination-prefix-cls}-current {
656
+ margin-right: 0;
657
+ margin-left: 2px;
658
+ }
659
+ .@{pagination-prefix-cls}-total {
660
+ margin-left: 0;
661
+ margin-right: 2px;
662
+ }
663
+ }
664
+ }
665
+ }
666
+ &.less {
667
+ .@{pagination-pages-prefix-cls} {
668
+ &-item {
669
+ margin-left: @pagination-button-spacing;
670
+ margin-right: 0;
671
+ &:last-child {
672
+ margin-left: 0;
673
+ }
674
+ }
675
+ }
676
+ }
677
+ &.nicety {
678
+ .@{pagination-pages-prefix-cls} {
679
+ &-item {
680
+ margin-left: @pagination-button-spacing;
681
+ margin-right: 0;
682
+ &:last-child {
683
+ margin-left: 0;
684
+ }
685
+ }
686
+ }
687
+ .@{pagination-jumper-prefix-cls} {
688
+ margin-right: @pagination-button-spacing;
689
+ margin-left: 0;
690
+ .@{pagination-jumper-prefix-cls}-button {
691
+ margin-right: @pagination-button-spacing;
692
+ margin-left: 0;
693
+ }
694
+ }
695
+ .@{pagination-options-prefix-cls} {
696
+ margin-right: 22px;
697
+ margin-left: 0;
698
+ .@{pagination-options-prefix-cls}-size {
699
+ margin-right: 0;
700
+ margin-left: 8px;
701
+ padding: 0 4px 0 24px;
702
+ i {
703
+ left: 5px;
704
+ right: auto;
705
+ }
706
+ }
707
+ .@{kd-prefix}-dropdown {
708
+ &-menu {
709
+ &-item {
710
+ & > span {
711
+ text-align: right;
712
+ }
713
+ }
714
+ }
715
+ }
716
+ }
717
+ }
718
+ }
@@ -33,7 +33,8 @@ var QRCode = function QRCode(props) {
33
33
  getPrefixCls = _useContext.getPrefixCls,
34
34
  prefixCls = _useContext.prefixCls,
35
35
  userDefaultProps = _useContext.compDefaultProps,
36
- getCompLangMsg = _useContext.locale.getCompLangMsg;
36
+ getCompLangMsg = _useContext.locale.getCompLangMsg,
37
+ direction = _useContext.direction;
37
38
  var qrCodeProps = (0, _utils.getCompProps)('QRCode', userDefaultProps, props);
38
39
  var value = qrCodeProps.value,
39
40
  size = qrCodeProps.size,
@@ -52,7 +53,8 @@ var QRCode = function QRCode(props) {
52
53
  var className = qrCodeProps.className,
53
54
  customPrefixcls = qrCodeProps.prefixCls;
54
55
  var qrCodePrefixCls = getPrefixCls(prefixCls, 'qrcode', customPrefixcls);
55
- var qrCodeClass = (0, _classnames.default)(qrCodePrefixCls, className, (0, _defineProperty2.default)({}, "".concat(qrCodePrefixCls, "-borderless"), !bordered));
56
+ var rtlCls = direction === 'rtl' ? "".concat(qrCodePrefixCls, "-rtl") : null;
57
+ var qrCodeClass = (0, _classnames.default)(qrCodePrefixCls, rtlCls, className, (0, _defineProperty2.default)({}, "".concat(qrCodePrefixCls, "-borderless"), !bordered));
56
58
  var qrCodeLangMsg = getCompLangMsg({
57
59
  componentName: 'QRCode'
58
60
  });
@@ -152,3 +152,6 @@
152
152
  .kd-qrcode-borderless {
153
153
  border: none;
154
154
  }
155
+ .kd-qrcode-rtl {
156
+ direction: rtl;
157
+ }
@@ -19,11 +19,11 @@
19
19
  list-style: none;
20
20
  overflow: hidden;
21
21
 
22
- &-expired{
22
+ &-expired {
23
23
  margin-bottom: @qrcode-spacing-margin-vertical;
24
24
  }
25
25
 
26
- &-mask{
26
+ &-mask {
27
27
  position: absolute;
28
28
  z-index: 10;
29
29
  display: flex;
@@ -36,7 +36,11 @@
36
36
  background: @qrcode-color-background;
37
37
  text-align: center;
38
38
  }
39
- &-borderless{
39
+ &-borderless {
40
40
  border: none;
41
41
  }
42
42
  }
43
+
44
+ .@{qrcode-prefix-cls}-rtl {
45
+ direction: rtl;
46
+ }
@@ -23,7 +23,8 @@ var RadioGroup = React.forwardRef(function (props, ref) {
23
23
  var _React$useContext = React.useContext(_ConfigContext.default),
24
24
  getPrefixCls = _React$useContext.getPrefixCls,
25
25
  prefixCls = _React$useContext.prefixCls,
26
- userDefaultProps = _React$useContext.compDefaultProps;
26
+ userDefaultProps = _React$useContext.compDefaultProps,
27
+ direction = _React$useContext.direction;
27
28
  var initValue = typeof props.value === 'undefined' ? props.defaultValue : props.value;
28
29
  var _React$useState = React.useState(initValue),
29
30
  _React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
@@ -55,6 +56,7 @@ var RadioGroup = React.forwardRef(function (props, ref) {
55
56
  optionType = _getCompProps.optionType,
56
57
  customPrefixcls = _getCompProps.prefixCls;
57
58
  var groupPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio-group", customPrefixcls);
59
+ var rtlCls = direction === 'rtl' ? "".concat(groupPrefixCls, "-rtl") : null;
58
60
  var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio", customPrefixcls);
59
61
  var childrenToRender = children;
60
62
  if (options && options.length > 0) {
@@ -81,7 +83,7 @@ var RadioGroup = React.forwardRef(function (props, ref) {
81
83
  });
82
84
  }
83
85
  return React.createElement("div", {
84
- className: (0, _classnames.default)(groupPrefixCls, className),
86
+ className: (0, _classnames.default)(groupPrefixCls, rtlCls, className),
85
87
  style: style,
86
88
  id: id,
87
89
  ref: ref
@@ -37,7 +37,8 @@ var InternalRadio = function InternalRadio(props, ref) {
37
37
  var _React$useContext = _react.default.useContext(_ConfigContext.default),
38
38
  getPrefixCls = _React$useContext.getPrefixCls,
39
39
  prefixCls = _React$useContext.prefixCls,
40
- userDefaultProps = _React$useContext.compDefaultProps;
40
+ userDefaultProps = _React$useContext.compDefaultProps,
41
+ direction = _React$useContext.direction;
41
42
  var innerRef = _react.default.useRef();
42
43
  var mergedRef = ref || innerRef;
43
44
  var _a = (0, _utils.getCompProps)('Radio', userDefaultProps, props),
@@ -59,6 +60,7 @@ var InternalRadio = function InternalRadio(props, ref) {
59
60
  return "radio".concat(radioType === 'square' ? "-".concat(radioType) : '');
60
61
  };
61
62
  var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, getPrefix(radioType), customPrefixcls);
63
+ var rtlCls = direction === 'rtl' ? "".concat(radioPrefixCls, "-rtl") : null;
62
64
  var _React$useState = _react.default.useState(initValue),
63
65
  _React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
64
66
  isChecked = _React$useState2[0],
@@ -79,7 +81,7 @@ var InternalRadio = function InternalRadio(props, ref) {
79
81
  context.onChange(e, value);
80
82
  }
81
83
  };
82
- var classString = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls), true), (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls, "-checked"), isChecked), _classNames), className);
84
+ var classString = (0, _classnames.default)(rtlCls, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls), true), (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls, "-checked"), isChecked), _classNames), className);
83
85
  (0, _react.useEffect)(function () {
84
86
  var _a;
85
87
  var handleRepeatClick = function handleRepeatClick(e) {
@@ -454,3 +454,41 @@
454
454
  display: block;
455
455
  line-height: 1.5;
456
456
  }
457
+ .kd-radio-rtl {
458
+ direction: rtl;
459
+ }
460
+ .kd-radio-button-rtl {
461
+ direction: rtl;
462
+ }
463
+ .kd-radio-button-rtl.kd-radio-button {
464
+ border: var(--kd-c-radio-radius-border-width, 1px) solid var(--kd-c-radio-color-border, var(--kd-g-color-border-strong, #d9d9d9));
465
+ border-right: none;
466
+ }
467
+ .kd-radio-button-rtl.kd-radio-button.kd-radio-button:first-child {
468
+ border-radius: 0 2px 2px 0;
469
+ border-right: var(--kd-c-radio-radius-border-width, 1px) solid var(--kd-c-radio-color-border, var(--kd-g-color-border-strong, #d9d9d9));
470
+ }
471
+ .kd-radio-button-rtl.kd-radio-button.kd-radio-button:first-child::before {
472
+ content: none;
473
+ }
474
+ .kd-radio-button-rtl.kd-radio-button.kd-radio-button:last-child {
475
+ border-radius: 2px 0 0 2px;
476
+ }
477
+ .kd-radio-square-rtl {
478
+ direction: rtl;
479
+ }
480
+ .kd-radio-square-rtl.kd-radio-square {
481
+ margin-left: var(--kd-c-radio-spacing-margin-right, 8px);
482
+ margin-right: 0;
483
+ }
484
+ .kd-radio-square-rtl.kd-radio-square.kd-radio-square::after {
485
+ left: calc(-1 * (var(--kd-c-radio-square-sizing-height, 32px) - 10px) / 2);
486
+ right: auto;
487
+ }
488
+ .kd-radio-square-rtl.kd-radio-square.kd-radio-square-checked::after {
489
+ left: calc(-1 * (var(--kd-c-radio-square-sizing-height, 32px) - 10px) / 2);
490
+ right: auto;
491
+ }
492
+ .kd-radio-group-rtl {
493
+ direction: rtl;
494
+ }
@@ -365,3 +365,49 @@
365
365
  line-height: 1.5;
366
366
  }
367
367
  }
368
+
369
+ .@{radio-prefix-cls}-rtl {
370
+ direction: rtl;
371
+ }
372
+
373
+ .@{radio-button-prefix-cls}-rtl {
374
+ direction: rtl;
375
+ &.@{radio-button-prefix-cls} {
376
+ border: @radio-border-width solid @radio-color-border;
377
+ border-right: none;
378
+ &.@{radio-button-prefix-cls}:first-child {
379
+ border-radius: 0 @radius-size @radius-size 0;
380
+ border-right: @radio-border-width solid @radio-color-border;
381
+ &::before {
382
+ content: none;
383
+ }
384
+ }
385
+
386
+ &.@{radio-button-prefix-cls}:last-child {
387
+ border-radius: @radius-size 0 0 @radius-size;
388
+ }
389
+ }
390
+
391
+ }
392
+
393
+ .@{radio-square-prefix-cls}-rtl {
394
+ direction: rtl;
395
+ &.@{radio-square-prefix-cls} {
396
+ margin-left: @radio-margin-right;
397
+ margin-right: 0;
398
+ &.@{radio-square-prefix-cls}::after {
399
+ left: calc(-1 * (@radio-square-height - 10px) / 2);
400
+ right: auto;
401
+ }
402
+ &.@{radio-square-prefix-cls}-checked {
403
+ &::after {
404
+ left: calc(-1 * (@radio-square-height - 10px) / 2);
405
+ right: auto;
406
+ }
407
+ }
408
+ }
409
+
410
+ }
411
+ .@{radio-group-prefix-cls}-rtl {
412
+ direction: rtl;
413
+ }
@@ -41,8 +41,10 @@ var InternalOption = function InternalOption(props, ref) {
41
41
  var optionProps = (0, _extends2.default)({}, props);
42
42
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
43
43
  getPrefixCls = _useContext.getPrefixCls,
44
- prefixCls = _useContext.prefixCls;
44
+ prefixCls = _useContext.prefixCls,
45
+ direction = _useContext.direction;
45
46
  var selectOptionPrefixCls = getPrefixCls(prefixCls, 'select-item');
47
+ var rtlCls = direction === 'rtl' ? "".concat(selectOptionPrefixCls, "-rtl") : null;
46
48
  (0, _react.useEffect)(function () {
47
49
  if (isMultiple) {
48
50
  setSelected((values === null || values === void 0 ? void 0 : values.indexOf(value)) > -1);
@@ -50,7 +52,7 @@ var InternalOption = function InternalOption(props, ref) {
50
52
  setSelected(value !== undefined ? value === values : false);
51
53
  }
52
54
  });
53
- var optionCls = (0, _classnames.default)(selectOptionPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-option"), true), (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-option-active"), activeIndex === index), (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-option-selected"), isSelected), (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-option-disabled"), disabled), _classNames));
55
+ var optionCls = (0, _classnames.default)(selectOptionPrefixCls, rtlCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-option"), true), (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-option-active"), activeIndex === index), (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-option-selected"), isSelected), (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-option-disabled"), disabled), _classNames));
54
56
  var contentCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectOptionPrefixCls, "-option-content"), true));
55
57
  var handleClick = function handleClick(e) {
56
58
  e.preventDefault();
@@ -38,16 +38,17 @@ var _KeyCode = _interopRequireDefault(require("../_utils/KeyCode"));
38
38
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
39
39
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
40
40
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
41
- function _unsupportedIterableToArray(o, minLen) { var _context6; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context6 = Object.prototype.toString.call(o)).call(_context6, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
41
+ function _unsupportedIterableToArray(o, minLen) { var _context7; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context7 = Object.prototype.toString.call(o)).call(_context7, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
42
42
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
43
43
  var INPUT_MIN_WIDTH = 4;
44
44
  var InternalSelect = function InternalSelect(props, ref) {
45
- var _context, _classNames5, _classNames6, _classNames12, _context5;
45
+ var _context, _classNames5, _classNames6, _classNames12, _context5, _context6;
46
46
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
47
47
  getPrefixCls = _useContext.getPrefixCls,
48
48
  prefixCls = _useContext.prefixCls,
49
49
  userDefaultProps = _useContext.compDefaultProps,
50
- locale = _useContext.locale;
50
+ locale = _useContext.locale,
51
+ direction = _useContext.direction;
51
52
  var selectProps = (0, _utils.getCompProps)('Select', userDefaultProps, props);
52
53
  var selectLangMsg = locale.getCompLangMsg({
53
54
  componentName: 'Select'
@@ -137,7 +138,8 @@ var InternalSelect = function InternalSelect(props, ref) {
137
138
  return (0, _isBoolean.default)(showSearch) ? showSearch : isMultiple;
138
139
  }, [isMultiple, showSearch]);
139
140
  var selectPrefixCls = getPrefixCls(prefixCls, 'select', customPrefixcls);
140
- var selectCls = (0, _classnames.default)(selectPrefixCls, className, (0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-visible"), optionShow));
141
+ var rtlCls = direction === 'rtl' ? "".concat(selectPrefixCls, "-rtl") : null;
142
+ var selectCls = (0, _classnames.default)(selectPrefixCls, rtlCls, className, (0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-visible"), optionShow));
141
143
  var selectionCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-selector"), true));
142
144
  var dropContentCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-dropdown-scroll"), (isMultiple ? (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 8 : (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 10) || selectProps.dropdownRender));
143
145
  var multipleFooterCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-multiple-footer"), true));
@@ -701,7 +703,7 @@ var InternalSelect = function InternalSelect(props, ref) {
701
703
  var multipleCls = (0, _classnames.default)(commCls, (_classNames10 = {}, (0, _defineProperty2.default)(_classNames10, "".concat(selectPrefixCls, "-multiple-disabled"), disabled), (0, _defineProperty2.default)(_classNames10, (0, _concat.default)(_context3 = "".concat(selectPrefixCls, "-")).call(_context3, mode), mode), (0, _defineProperty2.default)(_classNames10, "".concat(selectPrefixCls, "-focused"), focusd || optionShow), _classNames10));
702
704
  var itemCls = (0, _classnames.default)((_classNames11 = {}, (0, _defineProperty2.default)(_classNames11, "".concat(selectPrefixCls, "-selection-item"), true), (0, _defineProperty2.default)(_classNames11, (0, _concat.default)(_context4 = "".concat(selectPrefixCls, "-selection-item-")).call(_context4, size), size), _classNames11));
703
705
  var TagStyle = {
704
- margin: '2px 8px 2px 0',
706
+ margin: direction === 'rtl' ? '2px 0 2px 8px' : '2px 8px 2px 0',
705
707
  maxWidth: '100%'
706
708
  };
707
709
  var totalText = locale.getLangMsg('Select', 'total', {
@@ -917,7 +919,7 @@ var InternalSelect = function InternalSelect(props, ref) {
917
919
  }
918
920
  };
919
921
  var popperProps = (0, _extends2.default)((0, _extends2.default)({}, selectProps), {
920
- prefixCls: (0, _concat.default)(_context5 = "".concat(selectPrefixCls, "-dropdown-panel")).call(_context5, isMultiple ? " ".concat(selectPrefixCls, "-multiple-dropdown-panel") : ''),
922
+ prefixCls: (0, _concat.default)(_context5 = (0, _concat.default)(_context6 = "".concat(selectPrefixCls, "-dropdown-panel")).call(_context6, isMultiple ? " ".concat(selectPrefixCls, "-multiple-dropdown-panel") : '', " ")).call(_context5, rtlCls),
921
923
  placement: 'bottomLeft',
922
924
  popperStyle: catchStyle(),
923
925
  defaultVisible: optionShow,
@@ -717,3 +717,64 @@
717
717
  -webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
718
718
  transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
719
719
  }
720
+ .kd-select-rtl {
721
+ direction: rtl;
722
+ }
723
+ .kd-select-rtl .kd-select-selector .kd-select-wrapper {
724
+ padding: 1px 0 1px 28px;
725
+ }
726
+ .kd-select-rtl .kd-select-selector .kd-select-wrapper .kd-select-suffix {
727
+ position: absolute;
728
+ right: auto;
729
+ left: 0;
730
+ margin-left: 0;
731
+ margin-right: 8px;
732
+ }
733
+ .kd-select-rtl .kd-select-selector .kd-select-wrapper .kd-select-placeholder {
734
+ right: 0;
735
+ left: 28px;
736
+ }
737
+ .kd-select-rtl .kd-select-selector .kd-select-wrapper.kd-select-single .kd-select-selection-search {
738
+ padding-left: auto;
739
+ position: absolute;
740
+ left: 28px;
741
+ right: 0;
742
+ height: 100%;
743
+ top: 0;
744
+ bottom: 0;
745
+ }
746
+ .kd-select-rtl .kd-select-selector .kd-select-multiple .kd-select-selection-tag .kd-tag {
747
+ margin: 2px 0 2px 8px;
748
+ }
749
+ .kd-select-rtl .kd-select-selector .kd-select-multiple .kd-select-selection-tag .kd-tag-closeWrapper {
750
+ margin-right: 4px;
751
+ margin-left: 0;
752
+ }
753
+ .kd-select-rtl .kd-select-selector .kd-select-bordered {
754
+ padding-left: auto !important;
755
+ padding-right: var(--kd-c-select-bordered-spacing-padding-left, 8px) !important;
756
+ }
757
+ .kd-select-rtl .kd-select-selector .kd-select-bordered .kd-select-suffix {
758
+ padding-left: 8px;
759
+ }
760
+ .kd-select-rtl .kd-select-selector .kd-select-bordered.kd-select-single .kd-select-selection-search {
761
+ padding-right: var(--kd-c-select-bordered-spacing-padding-left, 8px);
762
+ }
763
+ .kd-select-rtl .kd-select-selector .kd-select-bordered .kd-select-placeholder {
764
+ padding-right: var(--kd-c-select-bordered-spacing-padding-left, 8px);
765
+ }
766
+ .kd-select-rtl .kd-select-dropdown .kd-select-multiple-footer-hadSelected {
767
+ padding-right: 12px;
768
+ padding-left: 0;
769
+ }
770
+ .kd-select-rtl .kd-select-dropdown .kd-select-multiple-footer .kd-checkbox-default-margin {
771
+ margin-right: 0;
772
+ margin-left: 4px;
773
+ }
774
+ .kd-select-item-rtl {
775
+ direction: rtl;
776
+ }
777
+ .kd-select-item-rtl.kd-select-item .kd-select-item-option-content .kd-checkbox-default-margin {
778
+ margin-right: 0;
779
+ margin-left: 4px;
780
+ }
@@ -459,3 +459,90 @@
459
459
  }
460
460
  }
461
461
  }
462
+
463
+ .@{select-prefix-cls}-rtl {
464
+ direction: rtl;
465
+ .@{select-prefix-cls}-selector {
466
+ .@{select-prefix-cls}-wrapper {
467
+ padding: 1px 0 1px 28px;
468
+ .@{select-prefix-cls}-suffix {
469
+ position: absolute;
470
+ right: auto;
471
+ left: 0;
472
+ margin-left: 0;
473
+ margin-right: 8px;
474
+ }
475
+ .@{select-prefix-cls}-placeholder {
476
+ right: 0;
477
+ left: 28px;
478
+ }
479
+ &.@{select-prefix-cls}-single {
480
+ .@{select-prefix-cls}-selection-search {
481
+ padding-left: auto;
482
+ position: absolute;
483
+ left: 28px;
484
+ right: 0;
485
+ height: 100%;
486
+ top: 0;
487
+ bottom: 0;
488
+ }
489
+ }
490
+ }
491
+ .@{select-prefix-cls}-multiple {
492
+ .@{select-prefix-cls}-selection-tag {
493
+ .@{kd-prefix}-tag {
494
+ margin: 2px 0 2px 8px;
495
+ &-closeWrapper {
496
+ margin-right: 4px;
497
+ margin-left: 0;
498
+ }
499
+ }
500
+ }
501
+ }
502
+ .@{select-prefix-cls}-bordered {
503
+ padding-left: auto !important;
504
+ padding-right: @select-bordered !important;
505
+ .@{select-prefix-cls}-suffix {
506
+ padding-left: 8px;
507
+ }
508
+
509
+ &.@{select-prefix-cls}-single {
510
+ .@{select-prefix-cls}-selection-search {
511
+ padding-right: @select-bordered;
512
+ }
513
+ }
514
+
515
+ .@{select-prefix-cls}-placeholder {
516
+ padding-right: @select-bordered;
517
+ }
518
+ }
519
+ }
520
+ .@{select-prefix-cls}-dropdown {
521
+ .@{select-prefix-cls}-multiple-footer {
522
+ &-hadSelected {
523
+ padding-right: 12px;
524
+ padding-left: 0;
525
+ }
526
+ .@{kd-prefix}-checkbox {
527
+ &-default-margin {
528
+ margin-right: 0;
529
+ margin-left: 4px;
530
+ }
531
+ }
532
+ }
533
+ }
534
+ }
535
+
536
+ .@{select-prefix-cls}-item-rtl {
537
+ direction: rtl;
538
+ &.@{select-prefix-cls}-item {
539
+ .@{select-prefix-cls}-item-option-content {
540
+ .@{kd-prefix}-checkbox {
541
+ &-default-margin {
542
+ margin-right: 0;
543
+ margin-left: 4px;
544
+ }
545
+ }
546
+ }
547
+ }
548
+ }
@@ -36,7 +36,8 @@ var Steps = function Steps(props) {
36
36
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
37
37
  getPrefixCls = _useContext.getPrefixCls,
38
38
  prefixCls = _useContext.prefixCls,
39
- userDefaultProps = _useContext.compDefaultProps;
39
+ userDefaultProps = _useContext.compDefaultProps,
40
+ rtlDirection = _useContext.direction;
40
41
  var stepsProps = (0, _utils.getCompProps)('Steps', userDefaultProps, props);
41
42
  var direction = stepsProps.direction,
42
43
  initial = stepsProps.initial,
@@ -58,7 +59,8 @@ var Steps = function Steps(props) {
58
59
  (0, _devwarning.default)(_interface.Statuses.indexOf(status) === -1, 'steps', "cannot found steps status '".concat(status, "'"));
59
60
  (0, _devwarning.default)(_interface.LabelPlacements.indexOf(labelPlacement) === -1, 'steps', "cannot found steps labelPlacement '".concat(labelPlacement, "'"));
60
61
  var stepsPrefixCls = getPrefixCls(prefixCls, 'steps', customPrefixcls);
61
- var stepsClassName = (0, _classnames.default)(stepsPrefixCls, (0, _concat.default)(_context = "".concat(stepsPrefixCls, "-")).call(_context, direction), className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-leftLable"), labelPlacement === 'left'), (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-rightLable"), labelPlacement === 'right'), (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-bottomLable"), labelPlacement === 'bottom'), (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-topLable"), labelPlacement === 'top'), _classNames));
62
+ var rtlCls = rtlDirection === 'rtl' ? "".concat(stepsPrefixCls, "-rtl") : null;
63
+ var stepsClassName = (0, _classnames.default)(stepsPrefixCls, rtlCls, (0, _concat.default)(_context = "".concat(stepsPrefixCls, "-")).call(_context, direction), className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-leftLable"), labelPlacement === 'left'), (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-rightLable"), labelPlacement === 'right'), (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-bottomLable"), labelPlacement === 'bottom'), (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-topLable"), labelPlacement === 'top'), _classNames));
62
64
  var onStepClick = function onStepClick(next) {
63
65
  if (canClickCurrentStep || onChange && current !== next) {
64
66
  onChange(next);
@@ -337,3 +337,38 @@
337
337
  text-align: left;
338
338
  margin-top: 1px;
339
339
  }
340
+ .kd-steps-rtl {
341
+ direction: rtl;
342
+ }
343
+ .kd-steps-rtl .kd-steps-item:first-child .kd-steps-item-iconContainer::before {
344
+ display: none;
345
+ }
346
+ .kd-steps-rtl.kd-steps-horizontal:first-child {
347
+ padding-right: 0;
348
+ }
349
+ .kd-steps-rtl.kd-steps-horizontal:last-child {
350
+ padding-right: 0;
351
+ padding-left: 0;
352
+ }
353
+ .kd-steps-rtl.kd-steps-horizontal .kd-steps-item .kd-steps-item-container .kd-steps-item-iconContainer::after {
354
+ display: none;
355
+ }
356
+ .kd-steps-rtl.kd-steps-horizontal .kd-steps-item .kd-steps-item-container .kd-steps-item-iconContainer::before {
357
+ content: '';
358
+ width: calc(100% + 35px);
359
+ height: var(--kd-c-steps-line-sizing-height, 1px);
360
+ border-bottom: 1px dashed var(--kd-c-steps-color-wait, #999);
361
+ border-left: 1px dashed var(--kd-c-steps-color-wait, #999);
362
+ position: absolute;
363
+ left: 50%;
364
+ top: calc(50% - var(--kd-c-steps-line-sizing-height, 1px) / 2);
365
+ -webkit-transition: width var(--kd-c-steps-motion-duration, var(--kd-g-duration, 0.3s)) cubic-bezier(0.48, 0.04, 0.52, 0.96), background-color var(--kd-c-steps-motion-duration, var(--kd-g-duration, 0.3s)) cubic-bezier(0.48, 0.04, 0.52, 0.96);
366
+ transition: width var(--kd-c-steps-motion-duration, var(--kd-g-duration, 0.3s)) cubic-bezier(0.48, 0.04, 0.52, 0.96), background-color var(--kd-c-steps-motion-duration, var(--kd-g-duration, 0.3s)) cubic-bezier(0.48, 0.04, 0.52, 0.96);
367
+ }
368
+ .kd-steps-rtl.kd-steps-vertical .kd-steps-item-iconContainer {
369
+ margin-left: 4px;
370
+ margin-right: 0;
371
+ }
372
+ .kd-steps-rtl.kd-steps-vertical .kd-steps-item-content {
373
+ text-align: right;
374
+ }