acud 0.0.67 → 0.0.70

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 (137) hide show
  1. package/dist/acud.css +250 -144
  2. package/dist/acud.css.map +1 -1
  3. package/dist/acud.js +1367 -1159
  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 +8 -6
  8. package/dist/acud.min.js.map +1 -1
  9. package/es/button/button.d.ts +1 -0
  10. package/es/button/button.js +1 -0
  11. package/es/cascader/Cascader.js +2 -1
  12. package/es/cascader/MenuItem.js +7 -13
  13. package/es/cascader/Menus.d.ts +3 -2
  14. package/es/cascader/Menus.js +30 -24
  15. package/es/cascader/index.js +32 -11
  16. package/es/cascader/style/index.css +17 -68
  17. package/es/cascader/style/index.less +23 -31
  18. package/es/clear/index.d.ts +12 -0
  19. package/es/clear/index.js +41 -0
  20. package/es/clear/style/css.js +2 -0
  21. package/es/clear/style/index.css +63 -0
  22. package/es/clear/style/index.d.ts +2 -0
  23. package/es/clear/style/index.js +2 -0
  24. package/es/clear/style/index.less +18 -0
  25. package/es/date-picker/generatePicker/generateRangePicker.js +2 -2
  26. package/es/date-picker/generatePicker/generateSinglePicker.js +9 -7
  27. package/es/date-picker/src/PickerPanel.js +4 -1
  28. package/es/date-picker/src/utils/uiUtil.js +4 -4
  29. package/es/date-picker/style/index.css +106 -53
  30. package/es/date-picker/style/panel.less +83 -18
  31. package/es/dropdown/dropdown.js +2 -3
  32. package/es/dropdown/rc-dropdown/Dropdown.js +1 -0
  33. package/es/form/style/horizontal.less +3 -1
  34. package/es/form/style/index.css +2 -0
  35. package/es/index.d.ts +1 -0
  36. package/es/index.js +1 -0
  37. package/es/input-number/src/hooks/useLayoutEffect.d.ts +1 -1
  38. package/es/locale/en_US.js +2 -0
  39. package/es/locale/zh_CN.js +2 -0
  40. package/es/menu/menu.d.ts +2 -1
  41. package/es/modal/DialogBox.d.ts +1 -1
  42. package/es/progress/CircleProgress.js +2 -2
  43. package/es/progress/LineProgress.js +4 -2
  44. package/es/radio/Radio.d.ts +1 -0
  45. package/es/radio/Radio.js +3 -2
  46. package/es/radio/RadioButton.js +3 -2
  47. package/es/radio/RadioGroup.d.ts +1 -0
  48. package/es/radio/RadioGroup.js +4 -1
  49. package/es/radio/context.d.ts +1 -0
  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/switch/index.d.ts +2 -3
  55. package/es/switch/index.js +11 -3
  56. package/es/switch/interface.d.ts +4 -0
  57. package/es/switch/style/index.css +31 -0
  58. package/es/switch/style/index.less +33 -1
  59. package/es/toast/index.js +5 -6
  60. package/es/toast/style/index.css +1 -1
  61. package/es/toast/style/index.less +3 -3
  62. package/es/tooltip/index.js +1 -1
  63. package/es/transfer/SourceList.js +1 -0
  64. package/es/transfer/index.js +5 -5
  65. package/es/transfer/style/index.css +3 -0
  66. package/es/transfer/style/index.less +3 -0
  67. package/es/upload/Upload.js +4 -1
  68. package/es/upload/UploadList/ListItem.js +2 -2
  69. package/es/upload/UploadList/index.js +1 -1
  70. package/es/upload/style/index.css +25 -21
  71. package/es/upload/style/index.less +28 -21
  72. package/lib/button/button.d.ts +1 -0
  73. package/lib/button/button.js +1 -0
  74. package/lib/cascader/Cascader.js +2 -1
  75. package/lib/cascader/MenuItem.js +7 -13
  76. package/lib/cascader/Menus.d.ts +3 -2
  77. package/lib/cascader/Menus.js +31 -24
  78. package/lib/cascader/index.js +34 -12
  79. package/lib/cascader/style/index.css +17 -68
  80. package/lib/cascader/style/index.less +23 -31
  81. package/lib/clear/index.d.ts +12 -0
  82. package/lib/clear/index.js +55 -0
  83. package/lib/clear/style/css.js +5 -0
  84. package/lib/clear/style/index.css +63 -0
  85. package/lib/clear/style/index.d.ts +2 -0
  86. package/lib/clear/style/index.js +5 -0
  87. package/lib/clear/style/index.less +18 -0
  88. package/lib/date-picker/generatePicker/generateRangePicker.js +3 -3
  89. package/lib/date-picker/generatePicker/generateSinglePicker.js +10 -8
  90. package/lib/date-picker/src/PickerPanel.js +4 -1
  91. package/lib/date-picker/src/utils/uiUtil.js +4 -4
  92. package/lib/date-picker/style/index.css +106 -53
  93. package/lib/date-picker/style/panel.less +83 -18
  94. package/lib/dropdown/dropdown.js +2 -3
  95. package/lib/dropdown/rc-dropdown/Dropdown.js +1 -0
  96. package/lib/form/style/horizontal.less +3 -1
  97. package/lib/form/style/index.css +2 -0
  98. package/lib/index.d.ts +1 -0
  99. package/lib/index.js +8 -0
  100. package/lib/input-number/src/hooks/useLayoutEffect.d.ts +1 -1
  101. package/lib/locale/en_US.js +5 -0
  102. package/lib/locale/zh_CN.js +5 -0
  103. package/lib/menu/menu.d.ts +2 -1
  104. package/lib/modal/DialogBox.d.ts +1 -1
  105. package/lib/progress/CircleProgress.js +2 -2
  106. package/lib/progress/LineProgress.js +4 -2
  107. package/lib/radio/Radio.d.ts +1 -0
  108. package/lib/radio/Radio.js +3 -2
  109. package/lib/radio/RadioButton.js +3 -2
  110. package/lib/radio/RadioGroup.d.ts +1 -0
  111. package/lib/radio/RadioGroup.js +5 -1
  112. package/lib/radio/context.d.ts +1 -0
  113. package/lib/style/components.less +1 -0
  114. package/lib/style/themes/default/components/cascader.less +0 -4
  115. package/lib/style/themes/default/components/clear.less +2 -0
  116. package/lib/style/themes/default/components/datePicker.less +1 -0
  117. package/lib/style/themes/default/components/index.less +1 -0
  118. package/lib/switch/index.d.ts +2 -3
  119. package/lib/switch/index.js +12 -3
  120. package/lib/switch/interface.d.ts +4 -0
  121. package/lib/switch/style/index.css +31 -0
  122. package/lib/switch/style/index.less +33 -1
  123. package/lib/toast/index.js +5 -6
  124. package/lib/toast/style/index.css +1 -1
  125. package/lib/toast/style/index.less +3 -3
  126. package/lib/tooltip/index.js +1 -1
  127. package/lib/transfer/SourceList.js +1 -0
  128. package/lib/transfer/index.js +5 -5
  129. package/lib/transfer/style/index.css +3 -0
  130. package/lib/transfer/style/index.less +3 -0
  131. package/lib/upload/Upload.js +4 -1
  132. package/lib/upload/UploadList/ListItem.js +2 -2
  133. package/lib/upload/UploadList/index.js +1 -1
  134. package/lib/upload/style/index.css +25 -21
  135. package/lib/upload/style/index.less +28 -21
  136. package/package.json +2 -2
  137. package/CHANGELOG.md +0 -4
@@ -29,7 +29,7 @@ var _OutlinedClose = _interopRequireDefault(require("acud-icon/lib/icons/Outline
29
29
 
30
30
  var _OutlinedCloudDownload = _interopRequireDefault(require("acud-icon/lib/icons/OutlinedCloudDownload"));
31
31
 
32
- var _OutlinedRefresh = _interopRequireDefault(require("acud-icon/lib/icons/OutlinedRefresh"));
32
+ var _OutlinedButtonUpload = _interopRequireDefault(require("acud-icon/lib/icons/OutlinedButtonUpload"));
33
33
 
34
34
  var _tooltip = _interopRequireDefault(require("../../tooltip"));
35
35
 
@@ -185,7 +185,7 @@ var ListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
185
185
  title: locale.previewFile
186
186
  }, /*#__PURE__*/React.createElement(_OutlinedEye["default"], null)) : null; // 上传icon
187
187
 
188
- var uploadIcon = showUploadIcon ? actionIconRender((typeof customUploadIcon === 'function' ? customUploadIcon(file) : customUploadIcon) || /*#__PURE__*/React.createElement(_OutlinedRefresh["default"], null), function () {
188
+ var uploadIcon = showUploadIcon ? actionIconRender((typeof customUploadIcon === 'function' ? customUploadIcon(file) : customUploadIcon) || /*#__PURE__*/React.createElement(_OutlinedButtonUpload["default"], null), function () {
189
189
  return onUpload(file);
190
190
  }, prefixCls, locale.uploadFile) : null;
191
191
  var actions = listType === 'picture-card' && file.status !== 'uploading' && /*#__PURE__*/React.createElement("span", {
@@ -92,7 +92,7 @@ var renderIcon = function renderIcon(fileName) {
92
92
  }
93
93
 
94
94
  return /*#__PURE__*/React.createElement(Icon, {
95
- width: 14
95
+ width: 16
96
96
  });
97
97
  };
98
98
 
@@ -123,6 +123,12 @@
123
123
  .acud-upload.acud-upload-drag.acud-upload-drag-hover:not(.acud-upload-disabled) {
124
124
  border-color: #144BCC;
125
125
  }
126
+ .acud-upload.acud-upload-drag.acud-upload-drag-click:not(.acud-upload-disabled) {
127
+ border-color: #144BCC;
128
+ }
129
+ .acud-upload.acud-upload-drag.acud-upload-drag-click:not(.acud-upload-disabled):hover {
130
+ border-color: #144BCC;
131
+ }
126
132
  .acud-upload.acud-upload-drag.acud-upload-disabled {
127
133
  background: #fafafa;
128
134
  cursor: not-allowed;
@@ -192,9 +198,9 @@
192
198
  }
193
199
  .acud-upload-list-item {
194
200
  position: relative;
195
- height: 24px;
196
- margin-top: 8px;
197
201
  font-size: 12px;
202
+ transition: background-color 0.3s;
203
+ overflow-y: hidden;
198
204
  }
199
205
  .acud-upload-list-item-name {
200
206
  display: inline-block;
@@ -221,7 +227,7 @@
221
227
  }
222
228
  .acud-upload-list-item-card-actions {
223
229
  position: absolute;
224
- right: 0;
230
+ right: 4px;
225
231
  }
226
232
  .acud-upload-list-item-card-actions-btn {
227
233
  opacity: 0;
@@ -257,9 +263,8 @@
257
263
  color: #B8BABF;
258
264
  }
259
265
  .acud-upload-list-item-info {
260
- height: 100%;
266
+ height: 24px;
261
267
  padding: 0 2px;
262
- transition: background-color 0.3s;
263
268
  border-radius: 2px;
264
269
  }
265
270
  .acud-upload-list-item-info > span {
@@ -307,7 +312,7 @@
307
312
  .acud-upload-list-item .acuicon-outlined-close:hover {
308
313
  color: #151B26;
309
314
  }
310
- .acud-upload-list-item:hover .acud-upload-list-item-info {
315
+ .acud-upload-list-item:hover {
311
316
  background-color: #F7F7F9;
312
317
  }
313
318
  .acud-upload-list-item:hover .acuicon-outlined-close {
@@ -339,10 +344,9 @@
339
344
  color: #F33E3E;
340
345
  }
341
346
  .acud-upload-list-item-progress {
342
- position: absolute;
343
- bottom: -12px;
344
347
  width: 100%;
345
348
  padding-left: 4px;
349
+ padding-right: 4px;
346
350
  font-size: 12px;
347
351
  line-height: 0;
348
352
  }
@@ -432,13 +436,6 @@
432
436
  .acud-upload-list-picture-card .acud-upload-list-item-uploading .acud-upload-list-item-name {
433
437
  margin-bottom: 12px;
434
438
  }
435
- .acud-upload-list-picture .acud-upload-list-item-progress,
436
- .acud-upload-list-picture-card .acud-upload-list-item-progress {
437
- bottom: 14px;
438
- width: calc(100% - 24px);
439
- margin-top: 0;
440
- padding-left: 56px;
441
- }
442
439
  .acud-upload-list-picture .acuicon-outlined-close,
443
440
  .acud-upload-list-picture-card .acuicon-outlined-close {
444
441
  position: absolute;
@@ -491,7 +488,7 @@
491
488
  opacity: 0;
492
489
  transition: all 0.3s;
493
490
  }
494
- .acud-upload-list-picture-card .acud-upload-list-item-actions .acuicon-outlined-refresh,
491
+ .acud-upload-list-picture-card .acud-upload-list-item-actions .acuicon-outlined-button-upload,
495
492
  .acud-upload-list-picture-card .acud-upload-list-item-actions .acuicon-outlined-eye,
496
493
  .acud-upload-list-picture-card .acud-upload-list-item-actions .acuicon-outlined-download,
497
494
  .acud-upload-list-picture-card .acud-upload-list-item-actions .acuicon-outlined-delete {
@@ -519,8 +516,8 @@
519
516
  display: block;
520
517
  width: 100%;
521
518
  height: 100%;
522
- -o-object-fit: contain;
523
- object-fit: contain;
519
+ -o-object-fit: cover;
520
+ object-fit: cover;
524
521
  }
525
522
  .acud-upload-list-picture-card .acud-upload-list-item-name {
526
523
  display: none;
@@ -547,6 +544,7 @@
547
544
  line-height: 140px;
548
545
  }
549
546
  .acud-upload-list-picture-card .acud-upload-list-item-progress {
547
+ position: absolute;
550
548
  top: 44px;
551
549
  padding-left: 8px;
552
550
  padding-right: 8px;
@@ -583,9 +581,15 @@
583
581
  margin: 0;
584
582
  padding: 0 8px 0 4px;
585
583
  }
586
- .acud-upload-list-text .acud-upload-list-item-card-actions,
587
- .acud-upload-list-picture .acud-upload-list-item-card-actions {
588
- position: static;
584
+ .acud-upload-list-text-container {
585
+ margin-bottom: 4px;
586
+ }
587
+ .acud-upload-list-text-container:first-child {
588
+ margin-top: 8px;
589
+ }
590
+ .acud-upload-list-text .acud-upload-list-item-progress {
591
+ margin-top: 4px;
592
+ margin-bottom: 2px;
589
593
  }
590
594
  .acud-upload-list .acud-upload-animate-inline-appear,
591
595
  .acud-upload-list .acud-upload-animate-inline-enter,
@@ -97,7 +97,12 @@
97
97
  &.@{upload-prefix-cls}-drag-hover:not(.@{upload-prefix-cls}-disabled) {
98
98
  border-color: @primary-7;
99
99
  }
100
-
100
+ &.@{upload-prefix-cls}-drag-click:not(.@{upload-prefix-cls}-disabled) {
101
+ border-color: @B7;
102
+ &:hover{
103
+ border-color: @B7;
104
+ }
105
+ }
101
106
  &.@{upload-prefix-cls}-disabled {
102
107
  background: @background-color-light;
103
108
  cursor: not-allowed;
@@ -181,10 +186,9 @@
181
186
  // ============================ Item ============================
182
187
  &-item {
183
188
  position: relative;
184
- height: @P * 6;
185
- margin-top: @margin-xs;
186
189
  font-size: @font-size-base;
187
-
190
+ transition: background-color .3s;
191
+ overflow-y: hidden;
188
192
  &-name {
189
193
  display: inline-block;
190
194
  width: 100%;
@@ -198,7 +202,7 @@
198
202
 
199
203
  &-card-actions {
200
204
  position: absolute;
201
- right: 0;
205
+ right: @P;
202
206
 
203
207
  &-btn {
204
208
  opacity: 0;
@@ -226,9 +230,8 @@
226
230
  }
227
231
 
228
232
  &-info {
229
- height: 100%;
233
+ height: @P * 6;
230
234
  padding: 0 .5 * @P;
231
- transition: background-color .3s;
232
235
  border-radius: @R2;
233
236
 
234
237
  > span {
@@ -264,7 +267,7 @@
264
267
  }
265
268
  }
266
269
 
267
- &:hover &-info {
270
+ &:hover {
268
271
  // background-color: @item-hover-bg;
269
272
  background-color: ~'@{@{upload-list-p}-hover-background-color}';
270
273
  }
@@ -303,10 +306,9 @@
303
306
  }
304
307
 
305
308
  &-progress {
306
- position: absolute;
307
- bottom: -12px;
308
309
  width: 100%;
309
310
  padding-left: @P;
311
+ padding-right: @P;
310
312
  font-size: @T2;
311
313
  line-height: 0;
312
314
  }
@@ -410,13 +412,6 @@
410
412
  margin-bottom: 12px;
411
413
  }
412
414
 
413
- .@{upload-item}-progress {
414
- bottom: 14px;
415
- width: ~'calc(100% - 24px)';
416
- margin-top: 0;
417
- padding-left: 56px;
418
- }
419
-
420
415
  .@{iconfont-css-prefix}-outlined-close {
421
416
  position: absolute;
422
417
  top: 8px;
@@ -478,7 +473,7 @@
478
473
  transform: translate(-50%, -50%);
479
474
  opacity: 0;
480
475
  transition: all .3s;
481
- .@{iconfont-css-prefix}-outlined-refresh,
476
+ .@{iconfont-css-prefix}-outlined-button-upload,
482
477
  .@{iconfont-css-prefix}-outlined-eye,
483
478
  .@{iconfont-css-prefix}-outlined-download,
484
479
  .@{iconfont-css-prefix}-outlined-delete {
@@ -510,7 +505,7 @@
510
505
  display: block;
511
506
  width: 100%;
512
507
  height: 100%;
513
- object-fit: contain;
508
+ object-fit: cover;
514
509
  }
515
510
 
516
511
  .@{upload-item}-name {
@@ -544,6 +539,7 @@
544
539
  }
545
540
 
546
541
  .@{upload-item}-progress {
542
+ position: absolute;
547
543
  top: 44px;
548
544
  padding-left: 8px;
549
545
  padding-right: 8px;
@@ -589,12 +585,23 @@
589
585
  }
590
586
 
591
587
  .@{upload-item}-card-actions {
592
- position: static;
588
+ // position: static;
593
589
  }
594
590
  }
595
591
 
596
592
  // ============================ Text ============================
597
-
593
+ &-text {
594
+ &-container {
595
+ margin-bottom: @P;
596
+ &:first-child {
597
+ margin-top: @P * 2;
598
+ }
599
+ }
600
+ .@{upload-item}-progress {
601
+ margin-top: @P;
602
+ margin-bottom: @P * 0.5;
603
+ }
604
+ }
598
605
  // =========================== Motion ===========================
599
606
  .@{upload-prefix-cls}-animate-inline-appear,
600
607
  .@{upload-prefix-cls}-animate-inline-enter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acud",
3
- "version": "0.0.67",
3
+ "version": "0.0.70",
4
4
  "description": "acg react 组件库",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -25,7 +25,7 @@
25
25
  "pub": "npm publish"
26
26
  },
27
27
  "dependencies": {
28
- "acud-icon": "^0.0.21",
28
+ "acud-icon": "^0.0.22",
29
29
  "aiflow": "^2.0.4",
30
30
  "array-tree-filter": "^2.1.0",
31
31
  "classnames": "2.2.6",
package/CHANGELOG.md DELETED
@@ -1,4 +0,0 @@
1
- # 0.0.16
2
- `2021-12-24`
3
- 1. fix input、textarea的clear不触发上层的onchange的bug
4
- 2. fix textarea的length 在有值得情况下初始化的时候展示0的bug