acud 0.0.65 → 0.0.68

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 (164) hide show
  1. package/dist/acud.css +299 -147
  2. package/dist/acud.css.map +1 -1
  3. package/dist/acud.js +1512 -1078
  4. package/dist/acud.js.map +1 -1
  5. package/dist/acud.min.css +1 -1
  6. package/dist/acud.min.css.map +1 -1
  7. package/dist/acud.min.js +11 -5
  8. package/dist/acud.min.js.map +1 -1
  9. package/es/breadcrumb/BreadcrumbItem.d.ts +1 -1
  10. package/es/breadcrumb/BreadcrumbItem.js +16 -4
  11. package/es/button/button.d.ts +1 -0
  12. package/es/button/button.js +1 -0
  13. package/es/cascader/index.js +20 -5
  14. package/es/cascader/style/index.css +2 -57
  15. package/es/cascader/style/index.less +2 -17
  16. package/es/clear/index.d.ts +12 -0
  17. package/es/clear/index.js +41 -0
  18. package/es/clear/style/css.js +2 -0
  19. package/es/clear/style/index.css +63 -0
  20. package/es/clear/style/index.d.ts +2 -0
  21. package/es/clear/style/index.js +2 -0
  22. package/es/clear/style/index.less +18 -0
  23. package/es/date-picker/generatePicker/generateRangePicker.js +2 -2
  24. package/es/date-picker/generatePicker/generateSinglePicker.js +2 -2
  25. package/es/date-picker/src/PickerPanel.js +4 -1
  26. package/es/date-picker/src/utils/uiUtil.js +4 -4
  27. package/es/date-picker/style/index.css +106 -53
  28. package/es/date-picker/style/panel.less +83 -18
  29. package/es/dialog-box/style/index.css +4 -4
  30. package/es/dropdown/dropdown-button.js +7 -1
  31. package/es/dropdown/rc-dropdown/Dropdown.js +1 -0
  32. package/es/dropdown/style/index.css +2 -1
  33. package/es/dropdown/style/index.less +2 -1
  34. package/es/form/style/horizontal.less +1 -0
  35. package/es/form/style/index.css +3 -0
  36. package/es/index.d.ts +1 -0
  37. package/es/index.js +1 -0
  38. package/es/modal/DialogBox.d.ts +1 -1
  39. package/es/modal/Modal.d.ts +5 -2
  40. package/es/modal/Modal.js +6 -4
  41. package/es/modal/style/index.css +41 -11
  42. package/es/modal/style/index.less +35 -7
  43. package/es/modal/style/mixin.less +4 -4
  44. package/es/progress/CircleProgress.js +2 -2
  45. package/es/progress/LineProgress.js +4 -2
  46. package/es/progress/style/common.less +5 -3
  47. package/es/progress/style/index.css +2 -1
  48. package/es/radio/index.d.ts +3 -0
  49. package/es/style/themes/dark/components/modal.less +14 -9
  50. package/es/style/themes/default/components/cascader.less +0 -4
  51. package/es/style/themes/default/components/clear.less +2 -0
  52. package/es/style/themes/default/components/datePicker.less +1 -0
  53. package/es/style/themes/default/components/index.less +1 -0
  54. package/es/style/themes/default/components/modal.less +13 -13
  55. package/es/switch/index.d.ts +2 -3
  56. package/es/switch/index.js +11 -3
  57. package/es/switch/interface.d.ts +4 -0
  58. package/es/switch/style/index.css +31 -0
  59. package/es/switch/style/index.less +33 -1
  60. package/es/tabs/src/TabNavList/index.js +2 -2
  61. package/es/tabs/style/index.css +0 -1
  62. package/es/tabs/style/index.less +0 -1
  63. package/es/time-picker/style/index.css +1 -0
  64. package/es/time-picker/style/index.less +1 -0
  65. package/es/tooltip/index.js +1 -1
  66. package/es/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
  67. package/es/transfer/{dataSource.js → DataSource.js} +37 -6
  68. package/{lib/transfer/sourceList.d.ts → es/transfer/SourceList.d.ts} +2 -2
  69. package/es/transfer/{sourceList.js → SourceList.js} +0 -0
  70. package/es/transfer/{target.d.ts → Target.d.ts} +1 -1
  71. package/es/transfer/{target.js → Target.js} +60 -4
  72. package/{lib/transfer/targetList.d.ts → es/transfer/TargetList.d.ts} +2 -2
  73. package/es/transfer/{targetList.js → TargetList.js} +0 -0
  74. package/es/transfer/index.d.ts +3 -0
  75. package/es/transfer/index.js +16 -7
  76. package/es/transfer/style/css.js +3 -1
  77. package/es/transfer/style/index.css +25 -5
  78. package/es/transfer/style/index.d.ts +1 -0
  79. package/es/transfer/style/index.js +3 -1
  80. package/es/transfer/style/index.less +30 -5
  81. package/es/upload/UploadList/ListItem.js +7 -2
  82. package/es/upload/UploadList/index.js +4 -7
  83. package/es/upload/style/index.css +17 -13
  84. package/es/upload/style/index.less +25 -20
  85. package/es/upload/utils.js +1 -1
  86. package/lib/breadcrumb/BreadcrumbItem.d.ts +1 -1
  87. package/lib/breadcrumb/BreadcrumbItem.js +21 -8
  88. package/lib/button/button.d.ts +1 -0
  89. package/lib/button/button.js +1 -0
  90. package/lib/cascader/index.js +21 -6
  91. package/lib/cascader/style/index.css +2 -57
  92. package/lib/cascader/style/index.less +2 -17
  93. package/lib/clear/index.d.ts +12 -0
  94. package/lib/clear/index.js +55 -0
  95. package/lib/clear/style/css.js +5 -0
  96. package/lib/clear/style/index.css +63 -0
  97. package/lib/clear/style/index.d.ts +2 -0
  98. package/lib/clear/style/index.js +5 -0
  99. package/lib/clear/style/index.less +18 -0
  100. package/lib/date-picker/generatePicker/generateRangePicker.js +3 -3
  101. package/lib/date-picker/generatePicker/generateSinglePicker.js +3 -3
  102. package/lib/date-picker/src/PickerPanel.js +4 -1
  103. package/lib/date-picker/src/utils/uiUtil.js +4 -4
  104. package/lib/date-picker/style/index.css +106 -53
  105. package/lib/date-picker/style/panel.less +83 -18
  106. package/lib/dialog-box/style/index.css +4 -4
  107. package/lib/dropdown/dropdown-button.js +7 -1
  108. package/lib/dropdown/rc-dropdown/Dropdown.js +1 -0
  109. package/lib/dropdown/style/index.css +2 -1
  110. package/lib/dropdown/style/index.less +2 -1
  111. package/lib/form/style/horizontal.less +1 -0
  112. package/lib/form/style/index.css +3 -0
  113. package/lib/index.d.ts +1 -0
  114. package/lib/index.js +8 -0
  115. package/lib/modal/DialogBox.d.ts +1 -1
  116. package/lib/modal/Modal.d.ts +5 -2
  117. package/lib/modal/Modal.js +6 -4
  118. package/lib/modal/style/index.css +41 -11
  119. package/lib/modal/style/index.less +35 -7
  120. package/lib/modal/style/mixin.less +4 -4
  121. package/lib/progress/CircleProgress.js +2 -2
  122. package/lib/progress/LineProgress.js +4 -2
  123. package/lib/progress/style/common.less +5 -3
  124. package/lib/progress/style/index.css +2 -1
  125. package/lib/radio/index.d.ts +3 -0
  126. package/lib/style/components.less +1 -0
  127. package/lib/style/themes/dark/components/modal.less +14 -9
  128. package/lib/style/themes/default/components/cascader.less +0 -4
  129. package/lib/style/themes/default/components/clear.less +2 -0
  130. package/lib/style/themes/default/components/datePicker.less +1 -0
  131. package/lib/style/themes/default/components/index.less +1 -0
  132. package/lib/style/themes/default/components/modal.less +13 -13
  133. package/lib/switch/index.d.ts +2 -3
  134. package/lib/switch/index.js +12 -3
  135. package/lib/switch/interface.d.ts +4 -0
  136. package/lib/switch/style/index.css +31 -0
  137. package/lib/switch/style/index.less +33 -1
  138. package/lib/tabs/src/TabNavList/index.js +2 -2
  139. package/lib/tabs/style/index.css +0 -1
  140. package/lib/tabs/style/index.less +0 -1
  141. package/lib/time-picker/style/index.css +1 -0
  142. package/lib/time-picker/style/index.less +1 -0
  143. package/lib/tooltip/index.js +1 -1
  144. package/lib/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
  145. package/lib/transfer/{dataSource.js → DataSource.js} +38 -6
  146. package/{es/transfer/sourceList.d.ts → lib/transfer/SourceList.d.ts} +2 -2
  147. package/lib/transfer/{sourceList.js → SourceList.js} +0 -0
  148. package/lib/transfer/{target.d.ts → Target.d.ts} +1 -1
  149. package/lib/transfer/{target.js → Target.js} +63 -5
  150. package/{es/transfer/targetList.d.ts → lib/transfer/TargetList.d.ts} +2 -2
  151. package/lib/transfer/{targetList.js → TargetList.js} +0 -0
  152. package/lib/transfer/index.d.ts +3 -0
  153. package/lib/transfer/index.js +18 -10
  154. package/lib/transfer/style/css.js +3 -1
  155. package/lib/transfer/style/index.css +25 -5
  156. package/lib/transfer/style/index.d.ts +1 -0
  157. package/lib/transfer/style/index.js +3 -1
  158. package/lib/transfer/style/index.less +30 -5
  159. package/lib/upload/UploadList/ListItem.js +7 -2
  160. package/lib/upload/UploadList/index.js +4 -7
  161. package/lib/upload/style/index.css +17 -13
  162. package/lib/upload/style/index.less +25 -20
  163. package/lib/upload/utils.js +1 -1
  164. package/package.json +2 -2
@@ -87,15 +87,17 @@ var Modal = function Modal(props) {
87
87
  var renderFooter = function renderFooter() {
88
88
  var okText = props.okText,
89
89
  cancelText = props.cancelText,
90
- confirmLoading = props.confirmLoading;
91
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_button["default"], {
90
+ confirmLoading = props.confirmLoading,
91
+ okButtonProps = props.okButtonProps,
92
+ cancelButtonProps = props.cancelButtonProps;
93
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_button["default"], (0, _extends2["default"])({
92
94
  onClick: handleCancel,
93
95
  type: "default"
94
- }, cancelText || '取消'), /*#__PURE__*/React.createElement(_button["default"], {
96
+ }, cancelButtonProps), cancelText || '取消'), /*#__PURE__*/React.createElement(_button["default"], (0, _extends2["default"])({
95
97
  onClick: handleOk,
96
98
  loading: confirmLoading,
97
99
  type: "primary"
98
- }, okText || '确定'));
100
+ }, okButtonProps), okText || '确定'));
99
101
  };
100
102
 
101
103
  var visible = props.visible,
@@ -57,23 +57,43 @@
57
57
  }
58
58
  .acud-modal-sm {
59
59
  width: 520px;
60
- height: 240px;
61
- max-height: 240px;
60
+ min-height: 240px;
61
+ max-height: 560px;
62
+ }
63
+ .acud-modal-sm > .acud-modal-content {
64
+ width: 100%;
65
+ min-height: 240px;
66
+ max-height: 560px;
62
67
  }
63
68
  .acud-modal-md {
64
69
  width: 800px;
65
- height: 400px;
66
- max-height: 400px;
70
+ min-height: 400px;
71
+ max-height: 560px;
72
+ }
73
+ .acud-modal-md > .acud-modal-content {
74
+ width: 100%;
75
+ min-height: 400px;
76
+ max-height: 560px;
67
77
  }
68
78
  .acud-modal-lg {
69
79
  width: 1120px;
70
- height: 480px;
71
- max-height: 480px;
80
+ min-height: 480px;
81
+ max-height: 560px;
82
+ }
83
+ .acud-modal-lg > .acud-modal-content {
84
+ width: 100%;
85
+ min-height: 480px;
86
+ max-height: 560px;
72
87
  }
73
88
  .acud-modal-xl {
74
89
  width: 1200px;
75
- height: 480px;
76
- max-height: 480px;
90
+ min-height: 480px;
91
+ max-height: 560px;
92
+ }
93
+ .acud-modal-xl > .acud-modal-content {
94
+ width: 100%;
95
+ min-height: 480px;
96
+ max-height: 560px;
77
97
  }
78
98
  .acud-modal-content {
79
99
  position: relative;
@@ -126,16 +146,18 @@
126
146
  .acud-modal-title {
127
147
  font-size: 14px;
128
148
  line-height: 22px;
149
+ padding-right: 12px;
129
150
  word-wrap: break-word;
130
151
  }
131
152
  .acud-modal-body {
132
- padding: 16px 24px 24px;
153
+ margin: 16px 24px 24px;
133
154
  font-size: 12px;
134
155
  font-weight: 400;
135
156
  line-height: 20px;
136
157
  word-wrap: break-word;
137
158
  color: #151B26;
138
159
  flex: 1;
160
+ overflow-y: auto;
139
161
  }
140
162
  .acud-modal-footer {
141
163
  padding: 0 24px 24px;
@@ -165,12 +187,20 @@
165
187
  align-items: center;
166
188
  padding-top: 2px;
167
189
  }
168
- .acud-modal-dialogbox .acud-modal-title .acudicon {
169
- font-size: 20px;
190
+ .acud-modal-dialogbox-title {
191
+ overflow: hidden;
192
+ padding-right: 12px;
170
193
  }
171
194
  .acud-modal-dialogbox-content {
195
+ width: 100%;
172
196
  padding-left: 32px;
173
197
  }
198
+ .acud-modal-dialogbox .acud-modal-title .acudicon {
199
+ font-size: 20px;
200
+ }
201
+ .acud-modal-dialogbox > .acud-modal-content {
202
+ min-height: 184px;
203
+ }
174
204
  .acud-modal-dialogbox-warning .acud-modal-dialogbox-icon {
175
205
  color: #FF9326;
176
206
  }
@@ -19,19 +19,35 @@
19
19
  max-width: calc(100vw - 32px);
20
20
 
21
21
  &-sm {
22
- .modal-size-config(sm);
22
+ .modal-size-config(sm, false);
23
+ }
24
+
25
+ &-sm > &-content {
26
+ .modal-size-config(sm, true);
23
27
  }
24
28
 
25
29
  &-md {
26
- .modal-size-config(md);
30
+ .modal-size-config(md, false);
31
+ }
32
+
33
+ &-md > &-content {
34
+ .modal-size-config(md, true);
27
35
  }
28
36
 
29
37
  &-lg {
30
- .modal-size-config(lg);
38
+ .modal-size-config(lg, false);
39
+ }
40
+
41
+ &-lg > &-content {
42
+ .modal-size-config(lg, true);
31
43
  }
32
44
 
33
45
  &-xl {
34
- .modal-size-config(xl);
46
+ .modal-size-config(xl, false);
47
+ }
48
+
49
+ &-xl > &-content {
50
+ .modal-size-config(xl, true);
35
51
  }
36
52
 
37
53
  // 弹框内容
@@ -94,18 +110,20 @@
94
110
  &-title {
95
111
  font-size: @modal-heading-font-size;
96
112
  line-height: @modal-heading-height;
113
+ padding-right: @P * 3;
97
114
  word-wrap: break-word;
98
115
  }
99
116
 
100
117
  // 内容body部分
101
118
  &-body {
102
- padding: @modal-body-padding;
119
+ margin: @modal-body-margin;
103
120
  font-size: @modal-body-font-size;
104
121
  font-weight: @modal-body-font-weight;
105
122
  line-height: @modal-body-line-height;
106
123
  word-wrap: break-word;
107
124
  color: @modal-body-font-color;
108
125
  flex: 1;
126
+ overflow-y: auto;
109
127
  }
110
128
 
111
129
  // 内容footer部分
@@ -143,14 +161,24 @@
143
161
  padding-top: 2px;
144
162
  }
145
163
 
164
+ &-title {
165
+ overflow: hidden;
166
+ padding-right: @P * 3;
167
+ }
168
+
169
+ &-content {
170
+ width: 100%;
171
+ padding-left: @P * 3 + @T6;
172
+ }
173
+
146
174
  .@{modal-prefix-cls}-title {
147
175
  .acudicon {
148
176
  font-size: @T6;
149
177
  }
150
178
  }
151
179
 
152
- &-content {
153
- padding-left: @P * 3 + @T6;
180
+ & > .@{modal-prefix-cls}-content {
181
+ min-height: @P * 46;
154
182
  }
155
183
  }
156
184
 
@@ -37,11 +37,11 @@
37
37
  }
38
38
  }
39
39
 
40
- .modal-size-config(@type) {
40
+ .modal-size-config(@type, @content) {
41
41
  @width: ~'modal-width-@{type}';
42
- @height: ~'modal-height-@{type}';
42
+ @min-height: ~'modal-height-@{type}';
43
43
  @max-height: ~'modal-max-height-@{type}';
44
- width: @@width;
45
- height: @@height;
44
+ width: if(@content, 100%, @@width);
45
+ min-height: @@min-height;
46
46
  max-height: @@max-height;
47
47
  }
@@ -89,7 +89,7 @@ var CircleProgress = function CircleProgress(_ref) {
89
89
  style: labelStyles
90
90
  }, labelText);
91
91
 
92
- var iconWidth = _common.sizeRatioMap[size] * 10; // 若信息类型为图标,在成功和异常时,显示图标
92
+ var iconWidth = _common.sizeRatioMap[size] * 12; // 若信息类型为图标,在成功和异常时,显示图标
93
93
 
94
94
  if (infoType === 'icon') {
95
95
  if (status === 'success') {
@@ -126,7 +126,7 @@ var CircleProgress = function CircleProgress(_ref) {
126
126
  }, /*#__PURE__*/_react["default"].createElement("path", {
127
127
  d: circlePath,
128
128
  stroke: strokeColor || 'currentColor',
129
- strokeWidth: strokeWidth,
129
+ strokeWidth: percent ? strokeWidth : 0,
130
130
  strokeLinecap: strokeLinecap,
131
131
  fill: "none",
132
132
  style: progressStyles
@@ -84,12 +84,14 @@ var LineProgress = function LineProgress(_ref) {
84
84
  if (status === 'success') {
85
85
  ProgressLabel = /*#__PURE__*/_react["default"].createElement(_acudIcon.MultiToneSuccess, {
86
86
  className: labelClassNames,
87
- color: strokeColor
87
+ color: strokeColor,
88
+ width: "16px"
88
89
  });
89
90
  } else if (status === 'error') {
90
91
  ProgressLabel = /*#__PURE__*/_react["default"].createElement(_acudIcon.MultiToneError, {
91
92
  className: labelClassNames,
92
- color: strokeColor
93
+ color: strokeColor,
94
+ width: "16px"
93
95
  });
94
96
  }
95
97
  }
@@ -29,6 +29,8 @@
29
29
  }
30
30
  }
31
31
 
32
- .@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label {
33
- display: none;
34
- }
32
+ .@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label{
33
+ &.@{progress-prefix-cls}-label-outer, &.@{progress-prefix-cls}-label-inner{
34
+ display: none;
35
+ }
36
+ }
@@ -23,7 +23,8 @@
23
23
  .acud-progress-success .acud-progress-label-icon {
24
24
  font-size: 0;
25
25
  }
26
- .acud-progress-label-hidden .acud-progress-label {
26
+ .acud-progress-label-hidden .acud-progress-label.acud-progress-label-outer,
27
+ .acud-progress-label-hidden .acud-progress-label.acud-progress-label-inner {
27
28
  display: none;
28
29
  }
29
30
  .acud-progress-line {
@@ -1,2 +1,5 @@
1
1
  import Radio from './Radio';
2
+ export { RadioProps } from './Radio';
3
+ export { ContextProps } from './context';
4
+ export { BaseRadioGourpProps } from './RadioGroup';
2
5
  export default Radio;
@@ -9,6 +9,7 @@
9
9
  @import "../carousel/style/index.less";
10
10
  @import "../cascader/style/index.less";
11
11
  @import "../checkbox/style/index.less";
12
+ @import "../clear/style/index.less";
12
13
  @import "../collapse/style/index.less";
13
14
  @import "../config-provider/style/index.less";
14
15
  @import "../date-picker/style/index.less";
@@ -10,15 +10,20 @@
10
10
  @modal-mask-color: fade(@G5, 50%);
11
11
 
12
12
  // 默认宽高设置
13
- @modal-width-sm: 100*@P;
14
- @modal-width-md: 150*@P;
15
- @modal-width-lg: 200*@P;
16
- @modal-width-xl: 300*@P;
13
+ @modal-width-sm: 100 * @P;
14
+ @modal-width-md: 150 * @P;
15
+ @modal-width-lg: 200 * @P;
16
+ @modal-width-xl: 300 * @P;
17
17
 
18
- @modal-max-height-sm: 160*@P;
19
- @modal-max-height-md: 160*@P;
20
- @modal-max-height-lg: 160*@P;
21
- @modal-max-height-xl: 160*@P;
18
+ @modal-max-height-sm: 140 * @P;
19
+ @modal-max-height-md: 140 * @P;
20
+ @modal-max-height-lg: 140 * @P;
21
+ @modal-max-height-xl: 140 * @P;
22
+
23
+ @modal-height-sm: 60 * @P;
24
+ @modal-height-md: 100 * @P;
25
+ @modal-height-lg: 120 * @P;
26
+ @modal-height-xl: 120 * @P;
22
27
 
23
28
  // Content
24
29
  @modal-content-bg-color: @G11;
@@ -36,7 +41,7 @@
36
41
  @modal-close-font-size: @T4;
37
42
 
38
43
  // Body
39
- @modal-body-padding: 6*@P 8*@P;
44
+ @modal-body-margin: 4*@P 6*@P 6*@P;
40
45
  @modal-body-bg-color: @G11;
41
46
  @modal-body-font-size: @T2;
42
47
  @modal-body-line-height: 5*@P;
@@ -34,10 +34,6 @@
34
34
  @cascader-picker-font-size-md: @T2;
35
35
  @cascader-picker-font-size-lg: @T3;
36
36
 
37
- // clear
38
- @cascader-picker-clear-tp: tp9;
39
- @cascader-picker-clear-p: p9;
40
-
41
37
  // 级联menus cascader-menus
42
38
  @cascader-menus-z-index: 1050;
43
39
  @cascader-menus-font-size: @T2;
@@ -0,0 +1,2 @@
1
+ @clear-tp: tp9;
2
+ @clear-p: p9;
@@ -22,6 +22,7 @@
22
22
  @date-picker-date-tp: tp31;
23
23
  @date-picker-date-p: p40;
24
24
  @date-picker-header-icon-tp: tp24;
25
+ @date-picker-header-tp: tp3;
25
26
 
26
27
  @picker-panel-cell-height: 6*@P;
27
28
  @primary-color: @B2;
@@ -43,3 +43,4 @@
43
43
  @import './rate.less';
44
44
  @import './timeline.less';
45
45
  @import './popconfirm.less';
46
+ @import './clear.less';
@@ -10,20 +10,20 @@
10
10
  @modal-mask-color: fade(@G5, 50%);
11
11
 
12
12
  // 默认宽高设置
13
- @modal-width-sm: 130*@P;
14
- @modal-width-md: 200*@P;
15
- @modal-width-lg: 280*@P;
16
- @modal-width-xl: 300*@P;
13
+ @modal-width-sm: 130 * @P;
14
+ @modal-width-md: 200 * @P;
15
+ @modal-width-lg: 280 * @P;
16
+ @modal-width-xl: 300 * @P;
17
17
 
18
- @modal-max-height-sm: 60*@P;
19
- @modal-max-height-md: 100*@P;
20
- @modal-max-height-lg: 120*@P;
21
- @modal-max-height-xl: 120*@P;
18
+ @modal-max-height-sm: 140 * @P;
19
+ @modal-max-height-md: 140 * @P;
20
+ @modal-max-height-lg: 140 * @P;
21
+ @modal-max-height-xl: 140 * @P;
22
22
 
23
- @modal-height-sm: 60*@P;
24
- @modal-height-md: 100*@P;
25
- @modal-height-lg: 120*@P;
26
- @modal-height-xl: 120*@P;
23
+ @modal-height-sm: 60 * @P;
24
+ @modal-height-md: 100 * @P;
25
+ @modal-height-lg: 120 * @P;
26
+ @modal-height-xl: 120 * @P;
27
27
 
28
28
  // Content
29
29
  @modal-content-bg-color: @G11;
@@ -42,7 +42,7 @@
42
42
  @modal-close-font-size: @T4;
43
43
 
44
44
  // Body
45
- @modal-body-padding: 4*@P 6*@P 6*@P;
45
+ @modal-body-margin: 4*@P 6*@P 6*@P;
46
46
  @modal-body-bg-color: @G11;
47
47
  @modal-body-font-color: @G2;
48
48
  @modal-body-font-size: @T2;
@@ -1,4 +1,3 @@
1
- import { FC } from 'react';
2
- import { SwitchProps } from './interface';
3
- declare const Switch: FC<SwitchProps>;
1
+ import { CompoundedComponent } from './interface';
2
+ declare const Switch: CompoundedComponent;
4
3
  export default Switch;
@@ -15,6 +15,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
15
15
 
16
16
  var _react = _interopRequireDefault(require("react"));
17
17
 
18
+ var _acudIcon = require("acud-icon");
19
+
18
20
  var _classnames = _interopRequireDefault(require("classnames"));
19
21
 
20
22
  var _useMergedState3 = _interopRequireDefault(require("../_util/hooks/useMergedState"));
@@ -41,12 +43,13 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_a, ref) {
41
43
  checked = _a.checked,
42
44
  defaultChecked = _a.defaultChecked,
43
45
  disabled = _a.disabled,
44
- loadingIcon = _a.loadingIcon,
46
+ loading = _a.loading,
47
+ customLoadingIcon = _a.loadingIcon,
45
48
  checkedChildren = _a.checkedChildren,
46
49
  unCheckedChildren = _a.unCheckedChildren,
47
50
  onClick = _a.onClick,
48
51
  onChange = _a.onChange,
49
- restProps = __rest(_a, ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange"]);
52
+ restProps = __rest(_a, ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loading", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange"]);
50
53
 
51
54
  var _useMergedState = (0, _useMergedState3["default"])(false, {
52
55
  value: checked,
@@ -56,6 +59,11 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_a, ref) {
56
59
  innerChecked = _useMergedState2[0],
57
60
  setInnerChecked = _useMergedState2[1];
58
61
 
62
+ var loadingIcon = loading && (customLoadingIcon || /*#__PURE__*/_react["default"].createElement(_acudIcon.OutlinedLoading, {
63
+ className: "".concat(prefixCls, "-loading-icon"),
64
+ animation: "spin"
65
+ }));
66
+
59
67
  function triggerChange(newChecked, event) {
60
68
  var mergedChecked = innerChecked;
61
69
 
@@ -73,7 +81,7 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_a, ref) {
73
81
  onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
74
82
  }
75
83
 
76
- var switchClassName = (0, _classnames["default"])(prefixCls, className, (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
84
+ var switchClassName = (0, _classnames["default"])(prefixCls, className, (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-loading"), loading), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
77
85
  return /*#__PURE__*/_react["default"].createElement("button", (0, _extends2["default"])({}, restProps, {
78
86
  type: "button",
79
87
  role: "switch",
@@ -88,5 +96,6 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_a, ref) {
88
96
  });
89
97
 
90
98
  Switch.displayName = 'Switch';
99
+ Switch.__ACUD_SWITCH = true;
91
100
  var _default = Switch;
92
101
  exports["default"] = _default;
@@ -5,6 +5,7 @@ export interface SwitchProps extends Omit<React.HTMLAttributes<HTMLButtonElement
5
5
  className?: string;
6
6
  prefixCls?: string;
7
7
  disabled?: boolean;
8
+ loading?: boolean;
8
9
  checkedChildren?: React.ReactNode;
9
10
  unCheckedChildren?: React.ReactNode;
10
11
  onChange?: SwitchChangeEventHandler;
@@ -16,3 +17,6 @@ export interface SwitchProps extends Omit<React.HTMLAttributes<HTMLButtonElement
16
17
  style?: React.CSSProperties;
17
18
  title?: string;
18
19
  }
20
+ export interface CompoundedComponent extends React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLElement>> {
21
+ __ACUD_SWITCH: boolean;
22
+ }
@@ -148,6 +148,34 @@
148
148
  .acud-switch-checked[disabled]:after {
149
149
  background-color: #FFFFFF;
150
150
  }
151
+ .acud-switch-checked[disabled].acud-switch-loading .acud-switch-loading-icon {
152
+ color: #D4E5FF;
153
+ }
154
+ .acud-switch-checked.acud-switch-loading .acud-switch-loading-icon {
155
+ color: #2468F2;
156
+ left: initial;
157
+ right: 2px;
158
+ }
159
+ .acud-switch-loading {
160
+ cursor: no-drop;
161
+ }
162
+ .acud-switch-loading:after {
163
+ cursor: no-drop;
164
+ -webkit-animation-name: none;
165
+ animation-name: none;
166
+ }
167
+ .acud-switch-loading:hover:after {
168
+ width: 16px;
169
+ -webkit-animation-name: none;
170
+ animation-name: none;
171
+ }
172
+ .acud-switch-loading .acud-switch-loading-icon {
173
+ position: absolute;
174
+ top: 1px;
175
+ z-index: 99;
176
+ color: #D4D6D9;
177
+ left: 2px;
178
+ }
151
179
  .acud-switch-disabled {
152
180
  cursor: no-drop;
153
181
  }
@@ -162,6 +190,9 @@
162
190
  -webkit-animation-name: none;
163
191
  animation-name: none;
164
192
  }
193
+ .acud-switch-disabled .acud-switch-loading-icon {
194
+ color: #F2F2F4;
195
+ }
165
196
  .acud-switch-label {
166
197
  display: inline-block;
167
198
  padding-left: 10px;
@@ -96,9 +96,38 @@
96
96
  &:after {
97
97
  background-color: @switch-handle-color;
98
98
  }
99
+ &.@{switch-prefix-cls}-loading {
100
+ .@{switch-prefix-cls}-loading-icon {
101
+ color: @B2;
102
+ }
103
+ }
104
+ }
105
+ &.@{switch-prefix-cls}-loading {
106
+ .@{switch-prefix-cls}-loading-icon {
107
+ color: @B6;
108
+ left: initial;
109
+ right: 0.5 * @P;
110
+ }
111
+ }
112
+ }
113
+ &-loading {
114
+ cursor: no-drop;
115
+ &:after {
116
+ cursor: no-drop;
117
+ animation-name: none;
118
+ }
119
+ &:hover:after {
120
+ width: @switch-inner-width;
121
+ animation-name: none;
122
+ }
123
+ .@{switch-prefix-cls}-loading-icon {
124
+ position: absolute;
125
+ top: 1px;
126
+ z-index: 99;
127
+ color: @G7;
128
+ left: 0.5 * @P;
99
129
  }
100
130
  }
101
-
102
131
  &-disabled {
103
132
  cursor: no-drop;
104
133
  &:after {
@@ -110,6 +139,9 @@
110
139
  width: @switch-inner-width;
111
140
  animation-name: none;
112
141
  }
142
+ .@{switch-prefix-cls}-loading-icon {
143
+ color: @G9;
144
+ }
113
145
  }
114
146
 
115
147
  &-label {
@@ -396,9 +396,9 @@ function TabNavList(props, ref) {
396
396
 
397
397
  if (btnNode) {
398
398
  newSizes.set(key, {
399
- width: btnNode.offsetWidth,
399
+ width: btnNode.offsetWidth - 32,
400
400
  height: btnNode.offsetHeight,
401
- left: btnNode.offsetLeft,
401
+ left: btnNode.offsetLeft + 16,
402
402
  top: btnNode.offsetTop
403
403
  });
404
404
  }
@@ -556,7 +556,6 @@
556
556
  }
557
557
  .acud-tabs-tab-active {
558
558
  color: #2468F2;
559
- background: #FFFFFF;
560
559
  }
561
560
  .acud-tabs-tab-btn {
562
561
  outline: none;
@@ -155,7 +155,6 @@
155
155
 
156
156
  &-active {
157
157
  color: @tabs-active-color;
158
- background: @tabs-card-head-background;
159
158
  }
160
159
 
161
160
  &-btn {
@@ -231,6 +231,7 @@
231
231
  text-align: left;
232
232
  color: #2468F2;
233
233
  cursor: pointer;
234
+ margin-top: 0;
234
235
  }
235
236
  .acud-time-panel-wrap .acud-picker-decade-panel .acud-picker-cell-inner {
236
237
  padding: 0 6px;
@@ -183,6 +183,7 @@
183
183
  text-align: left;
184
184
  color: @picker-time-active-color;
185
185
  cursor: pointer;
186
+ margin-top: 0;
186
187
  }
187
188
  // ===================== Decade Panel =====================
188
189
  &-decade-panel {
@@ -63,7 +63,7 @@ var PresetColorRegex = new RegExp("^(".concat(PresetColorTypes.join('|'), ")(-in
63
63
  function getDisabledCompatibleChildren(element, prefixCls) {
64
64
  var elementType = element.type;
65
65
 
66
- if ((elementType.__ANT_BUTTON === true || elementType.__ANT_SWITCH === true || elementType.__ANT_CHECKBOX === true || element.type === 'button') && element.props.disabled) {
66
+ if ((elementType.__ACUD_BUTTON === true || elementType.__ACUD_SWITCH === true || elementType.__ACUD_CHECKBOX === true || element.type === 'button') && element.props.disabled) {
67
67
  // Pick some layout related style properties up to span
68
68
  var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']),
69
69
  picked = _splitObject.picked,
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TransferItem, TransferProps } from './';
2
+ import { TransferItem, TransferProps } from '.';
3
3
  export interface DataSourceProps<RecordType> extends TransferProps<RecordType> {
4
4
  tKeys: string[];
5
5
  setTKeys: (t: string[]) => void;