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
@@ -20,6 +20,7 @@
20
20
  line-height: 8*@P;
21
21
  color: @G2;
22
22
  > li {
23
+ .basic-tp-config(@date-picker-header-tp);
23
24
  margin-right: 6*@P;
24
25
  display: inline-block;
25
26
  cursor: pointer;
@@ -28,7 +29,7 @@
28
29
 
29
30
  &.@{picker-prefix-cls}-panel-has-range {
30
31
  .@{picker-prefix-cls}-date-panel .@{picker-prefix-cls}-content td:not(.@{picker-prefix-cls}-cell-range-hover-start):not(.@{picker-prefix-cls}-cell-range-hover-end):not(.@{picker-prefix-cls}-cell-range-start):not(.@{picker-prefix-cls}-cell-range-end):not(.@{picker-prefix-cls}-cell-today):hover {
31
- background-color: @G10 !important;
32
+ // background-color: @G10 !important;
32
33
 
33
34
  .@{picker-prefix-cls}-cell-inner {
34
35
  background-color: @G10 !important;
@@ -53,7 +54,7 @@
53
54
  width: @date-picker-panel-width;
54
55
  }
55
56
 
56
- &-month-panel {
57
+ &-month-panel, &-year-panel {
57
58
  .@{picker-prefix-cls}-cell-in-range, .@{picker-prefix-cls}-cell-range-hover {
58
59
  &:not(:first-child)::before {
59
60
  width: 3*@P;
@@ -62,17 +63,21 @@
62
63
  }
63
64
  }
64
65
  .@{picker-prefix-cls}-cell-in-view {
65
- &.@{picker-prefix-cls}-cell-in-range {
66
+ &.@{picker-prefix-cls}-cell-in-range {
66
67
  &.@{picker-prefix-cls}-cell-range-hover-end, &.@{picker-prefix-cls}-cell-range-hover-start {
67
68
  &:hover {
68
- background-color: @B2;
69
+ .@{picker-prefix-cls}-cell-inner {
70
+ background-color: @B2;
71
+ }
69
72
  }
70
73
  }
71
74
  }
72
75
 
73
76
  &.@{picker-prefix-cls}-cell-range-hover-end, &.@{picker-prefix-cls}-cell-range-hover-start {
74
- &:hover {
75
- background: @picker-basic-cell-active-with-range-color;
77
+ &:not(.@{picker-prefix-cls}-cell-in-range):not(.@{picker-prefix-cls}-cell-selected):not(.@{picker-prefix-cls}-cell-range-end):not(.@{picker-prefix-cls}-cell-range-start):hover {
78
+ .@{picker-prefix-cls}-cell-inner {
79
+ background: @picker-basic-cell-active-with-range-color;
80
+ }
76
81
  }
77
82
  }
78
83
  }
@@ -123,8 +128,10 @@
123
128
  .basic-tp-config(@date-picker-date-tp);
124
129
 
125
130
  button {
131
+ font-size: @T2;
126
132
  color: inherit;
127
- font-weight: inherit;
133
+ font-weight: 400;
134
+ .basic-tp-config(@date-picker-header-tp);
128
135
 
129
136
  &:not(:first-child) {
130
137
  margin-left: 2*@P;
@@ -227,7 +234,7 @@
227
234
  }
228
235
 
229
236
  td {
230
- .basic-p-config(@date-picker-date-p);
237
+ // .basic-p-config(@date-picker-date-p);
231
238
  }
232
239
  }
233
240
 
@@ -279,7 +286,7 @@
279
286
  }
280
287
  }
281
288
 
282
- &-today:not(&-in-range):not(&-range-hover):not(&-range-end):not(&-selected):not(&-range-start) {
289
+ &-today:not(&-in-range):not(&-range-hover):not(&-range-end):not(&-selected):not(&-range-start):not(&-disabled) {
283
290
  background-color: transparent !important;
284
291
  .@{picker-prefix-cls}-cell-inner {
285
292
  background-color: transparent !important;
@@ -344,6 +351,12 @@
344
351
  }
345
352
  }
346
353
 
354
+ &-in-view&-range-start&-range-end {
355
+ &::before {
356
+ background: transparent;
357
+ }
358
+ }
359
+
347
360
  &-in-view&-range-start&-range-end&-selected, &-in-view&-range-start&-range-hover-start&-range-hover-end {
348
361
  &::before {
349
362
  background: transparent !important;
@@ -421,6 +434,10 @@
421
434
  left: 0;
422
435
  }
423
436
 
437
+ .@{picker-prefix-cls}-date-panel &-in-view&-range-hover:not(:first-child)::before {
438
+ left: -3*@P + 3;
439
+ }
440
+
424
441
  // Hover with range start & end
425
442
  &-range-hover&-range-start::after {
426
443
  right: 50%;
@@ -529,7 +546,7 @@
529
546
 
530
547
  &-date-panel {
531
548
  .@{picker-prefix-cls}-content td:hover {
532
- border-radius: @R2;
549
+ // border-radius: @R2;
533
550
 
534
551
  // &:not(.@{picker-prefix-cls}-cell-in-range) {
535
552
  // background-color: transparent;
@@ -569,9 +586,11 @@
569
586
  }
570
587
 
571
588
  .@{picker-prefix-cls}-cell-in-view {
572
- &.@{picker-prefix-cls}-cell-range-hover-end, &.@{picker-prefix-cls}-cell-range-hover-start {
589
+ &.@{picker-prefix-cls}-cell-range-hover-end:not(.@{picker-prefix-cls}-cell-range-end), &.@{picker-prefix-cls}-cell-range-hover-start:not(.@{picker-prefix-cls}-cell-range-start) {
573
590
  &:hover {
574
- background-color: @picker-basic-cell-active-with-range-color;
591
+ .@{picker-prefix-cls}-cell-inner {
592
+ background-color: @picker-basic-cell-active-with-range-color;
593
+ }
575
594
  }
576
595
  }
577
596
  }
@@ -584,6 +603,9 @@
584
603
  // line-height: @picker-text-height - 2 * @border-width-base;
585
604
  text-align: center;
586
605
  border-top: 1px solid @G8;
606
+ font-size: @T2;
607
+ line-height: 24px;
608
+ cursor: pointer;
587
609
  // border-bottom: @border-width-base @border-style-base transparent;
588
610
 
589
611
  .@{picker-prefix-cls}-panel & {
@@ -628,8 +650,23 @@
628
650
 
629
651
  // ===================== Decade Panel =====================
630
652
  &-decade-panel {
631
- .@{picker-cell-inner-cls} {
632
- padding: 0 (@padding-xs / 2);
653
+ tr {
654
+ display: block;
655
+ margin: 3*@P 0;
656
+
657
+ td {
658
+ display: inline-block;
659
+ margin-right: 3*@P;
660
+ width: 79px;
661
+
662
+ &:last-child {
663
+ margin-right: 0;
664
+ }
665
+ }
666
+
667
+ .@{picker-cell-inner-cls} {
668
+ width: 100%;
669
+ }
633
670
  }
634
671
 
635
672
  .@{picker-prefix-cls}-cell::before {
@@ -650,7 +687,7 @@
650
687
  td {
651
688
  display: inline-block;
652
689
  margin-right: 3*@P;
653
- border-radius: @R2;
690
+ // border-radius: @R2;
654
691
 
655
692
  &:last-child {
656
693
  margin-right: 0;
@@ -695,6 +732,14 @@
695
732
  .@{picker-prefix-cls}-date-panel {
696
733
  width: 234px;
697
734
  }
735
+
736
+ .@{picker-prefix-cls}-decade-panel {
737
+ width: 285px;
738
+
739
+ .@{picker-prefix-cls}-header, .@{picker-prefix-cls}-body {
740
+ padding-right: 12px !important;
741
+ }
742
+ }
698
743
  }
699
744
 
700
745
  // ====================== Week Panel ======================
@@ -741,7 +786,7 @@
741
786
  }
742
787
  }
743
788
 
744
- &-date-panel, &-month-panel {
789
+ &-date-panel, &-month-panel, &-year-panel {
745
790
  tr {
746
791
  td.@{picker-prefix-cls}-cell-in-view.@{picker-prefix-cls}-cell-in-range, td.@{picker-prefix-cls}-cell-range-hover {
747
792
  &:first-child {
@@ -753,8 +798,28 @@
753
798
  }
754
799
  }
755
800
 
756
- td.@{picker-prefix-cls}-cell-range-hover-end {
757
- border-radius: 0 @R2 @R2 0;
801
+ td.@{picker-prefix-cls}-cell-range-hover-end:not(.@{picker-prefix-cls}-cell-range-end):not(.@{picker-prefix-cls}-cell-in-range) {
802
+ .@{picker-prefix-cls}-cell-inner {
803
+ border-radius: 0 @R2 @R2 0;
804
+ }
805
+
806
+ &:first-child, &.@{picker-prefix-cls}-cell-selected {
807
+ .@{picker-prefix-cls}-cell-inner {
808
+ border-radius: @R2;
809
+ }
810
+ }
811
+ }
812
+
813
+ td.@{picker-prefix-cls}-cell-range-hover-start:not(.@{picker-prefix-cls}-cell-selected):not(.@{picker-prefix-cls}-cell-range-start):not(.@{picker-prefix-cls}-cell-in-range) {
814
+ .@{picker-prefix-cls}-cell-inner {
815
+ border-radius: @R2 0 0 @R2;
816
+ }
817
+
818
+ &:last-child, &.@{picker-prefix-cls}-cell-selected {
819
+ .@{picker-prefix-cls}-cell-inner {
820
+ border-radius: @R2;
821
+ }
822
+ }
758
823
  }
759
824
  }
760
825
  }
@@ -111,12 +111,11 @@ var Dropdown = function Dropdown(props) {
111
111
  return fixedModeOverlay;
112
112
  };
113
113
 
114
- return /*#__PURE__*/React.createElement(RcDropdown, _extends({
114
+ return /*#__PURE__*/React.createElement(RcDropdown, _extends({}, rest, {
115
115
  prefixCls: prefixCls,
116
116
  trigger: triggerActions,
117
117
  onVisibleChange: onVisibleChange,
118
- visible: mergedVisible
119
- }, rest, {
118
+ visible: mergedVisible,
120
119
  overlay: function overlay() {
121
120
  return renderOverlay();
122
121
  },
@@ -74,6 +74,7 @@ function Dropdown(props, ref) {
74
74
  var onOverlayClick = props.onOverlayClick;
75
75
  var overlayProps = getOverlayElement().props;
76
76
  setTriggerVisible(false);
77
+ onVisibleChange(false);
77
78
 
78
79
  if (onOverlayClick) {
79
80
  onOverlayClick(e);
@@ -9,6 +9,8 @@
9
9
  .@{form-item-prefix-cls}-label {
10
10
  flex-grow: 0;
11
11
  line-height: @form-line-height-base;
12
+ padding-left: ~"calc(.5em + @{P})";
13
+ box-sizing: content-box;
12
14
 
13
15
  &:not([class*=~"' @{acud-prefix}-col-'"]) {
14
16
  margin-right: 4 * @P;
@@ -17,7 +19,7 @@
17
19
  > label {
18
20
  &.@{form-item-prefix-cls}-required:not(.@{form-item-prefix-cls}-required-mark-optional)::before {
19
21
  text-indent: -.5em;
20
- margin-left: -4px;
22
+ margin-left: -@P;
21
23
  }
22
24
  }
23
25
  }
@@ -111,6 +111,8 @@
111
111
  .acud-form-horizontal .acud-form-item-label {
112
112
  flex-grow: 0;
113
113
  line-height: 1.6667;
114
+ padding-left: calc(.5em + 4px);
115
+ box-sizing: content-box;
114
116
  }
115
117
  .acud-form-horizontal .acud-form-item-label:not([class*=' acud-col-']) {
116
118
  margin-right: 16px;
package/es/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { default as Button } from './button';
7
7
  export { default as Carousel } from './carousel';
8
8
  export { default as Cascader } from './cascader';
9
9
  export { default as Checkbox } from './checkbox';
10
+ export { default as Clear } from './clear';
10
11
  export { default as Col } from './col';
11
12
  export { default as Collapse } from './collapse';
12
13
  export { default as ConfigProvider } from './config-provider';
package/es/index.js CHANGED
@@ -11,6 +11,7 @@ export { default as Button } from './button';
11
11
  export { default as Carousel } from './carousel';
12
12
  export { default as Cascader } from './cascader';
13
13
  export { default as Checkbox } from './checkbox';
14
+ export { default as Clear } from './clear';
14
15
  export { default as Col } from './col';
15
16
  export { default as Collapse } from './collapse';
16
17
  export { default as ConfigProvider } from './config-provider';
@@ -1,2 +1,2 @@
1
1
  import * as React from 'react';
2
- export declare const useLayoutEffect: typeof React.useEffect;
2
+ export declare const useLayoutEffect: typeof React.useLayoutEffect;
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable no-template-curly-in-string */
2
2
  // import {Locale} from '../locale-provider';
3
+ import DatePicker from '../date-picker/locale/en_US';
3
4
  var typeTemplate = '${label} is not a valid ${type}'; // const localeValues: Locale = {
4
5
 
5
6
  var localeValues = {
@@ -7,6 +8,7 @@ var localeValues = {
7
8
  global: {
8
9
  placeholder: 'Please select'
9
10
  },
11
+ DatePicker: DatePicker,
10
12
  Table: {
11
13
  filterTitle: 'Filter menu',
12
14
  filterConfirm: 'OK',
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable no-template-curly-in-string */
2
2
  // import {Locale} from '../locale-provider';
3
+ import DatePicker from '../date-picker/locale/zh_CN';
3
4
  var typeTemplate = '${label}不是一个有效的${type}'; // const localeValues: Locale = {
4
5
 
5
6
  var localeValues = {
@@ -8,6 +9,7 @@ var localeValues = {
8
9
  global: {
9
10
  placeholder: '请选择'
10
11
  },
12
+ DatePicker: DatePicker,
11
13
  Table: {
12
14
  filterTitle: '筛选',
13
15
  filterConfirm: '确定',
package/es/menu/menu.d.ts CHANGED
@@ -8,8 +8,9 @@ import { MenuItemInterface } from './MenuItem';
8
8
  import { SubMenuInterface } from './SubMenu';
9
9
  import { MenuHeadInterface } from './MenuHead';
10
10
  import { HeaderMenuProps } from './header';
11
+ import { GlobalSiderBarProps } from './globalSilderBar';
11
12
  import { BaseMenuProps } from './baseMenu';
12
- export interface MenuProps extends RcMenuProps, HeaderMenuProps, BaseMenuProps {
13
+ export interface MenuProps extends RcMenuProps, HeaderMenuProps, BaseMenuProps, GlobalSiderBarProps {
13
14
  iconList?: React.ReactNode[];
14
15
  scope?: 'global' | 'local';
15
16
  mode?: 'inline' | 'horizontal' | 'inline';
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export interface ModalFuncProps {
3
3
  /** 对话框标题 */
4
- title?: string;
4
+ title?: React.ReactNode;
5
5
  /** 对话框内容 */
6
6
  content?: React.ReactNode;
7
7
  /** 点击确定回调 */
@@ -75,7 +75,7 @@ var CircleProgress = function CircleProgress(_ref) {
75
75
  className: labelClassNames,
76
76
  style: labelStyles
77
77
  }, labelText);
78
- var iconWidth = sizeRatioMap[size] * 10; // 若信息类型为图标,在成功和异常时,显示图标
78
+ var iconWidth = sizeRatioMap[size] * 12; // 若信息类型为图标,在成功和异常时,显示图标
79
79
 
80
80
  if (infoType === 'icon') {
81
81
  if (status === 'success') {
@@ -112,7 +112,7 @@ var CircleProgress = function CircleProgress(_ref) {
112
112
  }, /*#__PURE__*/React.createElement("path", {
113
113
  d: circlePath,
114
114
  stroke: strokeColor || 'currentColor',
115
- strokeWidth: strokeWidth,
115
+ strokeWidth: percent ? strokeWidth : 0,
116
116
  strokeLinecap: strokeLinecap,
117
117
  fill: "none",
118
118
  style: progressStyles
@@ -70,12 +70,14 @@ var LineProgress = function LineProgress(_ref) {
70
70
  if (status === 'success') {
71
71
  ProgressLabel = /*#__PURE__*/React.createElement(MultiToneSuccess, {
72
72
  className: labelClassNames,
73
- color: strokeColor
73
+ color: strokeColor,
74
+ width: "16px"
74
75
  });
75
76
  } else if (status === 'error') {
76
77
  ProgressLabel = /*#__PURE__*/React.createElement(MultiToneError, {
77
78
  className: labelClassNames,
78
- color: strokeColor
79
+ color: strokeColor,
80
+ width: "16px"
79
81
  });
80
82
  }
81
83
  }
@@ -7,6 +7,7 @@ export interface RadioProps {
7
7
  disabled?: boolean | undefined;
8
8
  children?: React.ReactNode;
9
9
  label?: string;
10
+ className?: string;
10
11
  onChange?: (e: Event) => {} | void;
11
12
  value?: any;
12
13
  }
package/es/radio/Radio.js CHANGED
@@ -26,9 +26,10 @@ var InternalRadio = function InternalRadio(props, ref) {
26
26
  var _props$prefixCls = props.prefixCls,
27
27
  prefixCls = _props$prefixCls === void 0 ? 'acud-radio' : _props$prefixCls,
28
28
  children = props.children,
29
+ className = props.className,
29
30
  onChange = props.onChange,
30
31
  label = props.label,
31
- restProps = __rest(props, ["prefixCls", "children", "onChange", "label"]);
32
+ restProps = __rest(props, ["prefixCls", "children", "className", "onChange", "label"]);
32
33
 
33
34
  var radioRef = /*#__PURE__*/React.createRef();
34
35
  React.useImperativeHandle(ref, function () {
@@ -43,7 +44,7 @@ var InternalRadio = function InternalRadio(props, ref) {
43
44
  radioProps.disabled = props.disabled || (context === null || context === void 0 ? void 0 : context.disabled);
44
45
  }
45
46
 
46
- var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), radioProps.disabled), _defineProperty(_classNames, "".concat(prefixCls, "-checked"), radioProps.checked), _classNames));
47
+ var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), radioProps.disabled), _defineProperty(_classNames, "".concat(prefixCls, "-checked"), radioProps.checked), _classNames), className);
47
48
  var handleClick = useCallback(function (e) {
48
49
  var _a;
49
50
 
@@ -24,9 +24,10 @@ export default (function (props) {
24
24
  var _props$prefixCls = props.prefixCls,
25
25
  prefixCls = _props$prefixCls === void 0 ? 'acud-radio-button' : _props$prefixCls,
26
26
  children = props.children,
27
+ className = props.className,
27
28
  onChange = props.onChange,
28
29
  label = props.label,
29
- restProps = __rest(props, ["prefixCls", "children", "onChange", "label"]);
30
+ restProps = __rest(props, ["prefixCls", "children", "className", "onChange", "label"]);
30
31
 
31
32
  var context = useContext(RadioGroupContext);
32
33
 
@@ -37,7 +38,7 @@ export default (function (props) {
37
38
  radioProps.disabled = props.disabled || (context === null || context === void 0 ? void 0 : context.disabled);
38
39
  }
39
40
 
40
- var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), radioProps.disabled), _defineProperty(_classNames, "".concat(prefixCls, "-checked"), radioProps.checked), _classNames));
41
+ var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), radioProps.disabled), _defineProperty(_classNames, "".concat(prefixCls, "-checked"), radioProps.checked), _classNames), className);
41
42
  var handleClick = useCallback(function (e) {
42
43
  var _a;
43
44
 
@@ -8,6 +8,7 @@ export interface BaseRadioGourpProps {
8
8
  optionType?: string;
9
9
  options?: RadioProps[];
10
10
  children?: React.ReactNode;
11
+ className?: string;
11
12
  onChange?: (e: Event) => {} | void;
12
13
  }
13
14
  declare const _default: (props: BaseRadioGourpProps) => JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React, { Fragment, useCallback } from 'react';
4
+ import classnames from 'classnames';
4
5
  import useMergedState from '../_util/hooks/useMergedState';
5
6
  import Radio from './Radio';
6
7
  import Context from './context';
@@ -12,6 +13,7 @@ export default (function (props) {
12
13
  optionType = _props$optionType === void 0 ? 'default' : _props$optionType,
13
14
  options = props.options,
14
15
  children = props.children,
16
+ className = props.className,
15
17
  onChange = props.onChange;
16
18
 
17
19
  var _useMergedState = useMergedState(props.defaultValue, {
@@ -35,8 +37,9 @@ export default (function (props) {
35
37
  }
36
38
  }, [value, disabled, onChange]);
37
39
  var Compo = optionType === 'default' ? Radio : Radio.Button;
40
+ var classNames = classnames(prefixCls, className);
38
41
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
39
- className: prefixCls
42
+ className: classNames
40
43
  }, /*#__PURE__*/React.createElement(Context.Provider, {
41
44
  value: {
42
45
  value: value,
@@ -4,6 +4,7 @@ export interface ContextProps {
4
4
  value: any;
5
5
  disabled?: boolean;
6
6
  name?: string;
7
+ className?: string;
7
8
  }
8
9
  declare const RadioGroupContext: import("react").Context<ContextProps>;
9
10
  export default RadioGroupContext;
@@ -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';
@@ -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;
@@ -16,6 +16,7 @@ var __rest = this && this.__rest || function (s, e) {
16
16
  };
17
17
 
18
18
  import React from 'react';
19
+ import { OutlinedLoading } from 'acud-icon';
19
20
  import classNames from 'classnames';
20
21
  import useMergedState from '../_util/hooks/useMergedState';
21
22
  var Switch = /*#__PURE__*/React.forwardRef(function (_a, ref) {
@@ -27,12 +28,13 @@ var Switch = /*#__PURE__*/React.forwardRef(function (_a, ref) {
27
28
  checked = _a.checked,
28
29
  defaultChecked = _a.defaultChecked,
29
30
  disabled = _a.disabled,
30
- loadingIcon = _a.loadingIcon,
31
+ loading = _a.loading,
32
+ customLoadingIcon = _a.loadingIcon,
31
33
  checkedChildren = _a.checkedChildren,
32
34
  unCheckedChildren = _a.unCheckedChildren,
33
35
  onClick = _a.onClick,
34
36
  onChange = _a.onChange,
35
- restProps = __rest(_a, ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange"]);
37
+ restProps = __rest(_a, ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loading", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange"]);
36
38
 
37
39
  var _useMergedState = useMergedState(false, {
38
40
  value: checked,
@@ -42,6 +44,11 @@ var Switch = /*#__PURE__*/React.forwardRef(function (_a, ref) {
42
44
  innerChecked = _useMergedState2[0],
43
45
  setInnerChecked = _useMergedState2[1];
44
46
 
47
+ var loadingIcon = loading && (customLoadingIcon || /*#__PURE__*/React.createElement(OutlinedLoading, {
48
+ className: "".concat(prefixCls, "-loading-icon"),
49
+ animation: "spin"
50
+ }));
51
+
45
52
  function triggerChange(newChecked, event) {
46
53
  var mergedChecked = innerChecked;
47
54
 
@@ -59,7 +66,7 @@ var Switch = /*#__PURE__*/React.forwardRef(function (_a, ref) {
59
66
  onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
60
67
  }
61
68
 
62
- var switchClassName = classNames(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-checked"), innerChecked), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
69
+ var switchClassName = classNames(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-checked"), innerChecked), _defineProperty(_classNames, "".concat(prefixCls, "-loading"), loading), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
63
70
  return /*#__PURE__*/React.createElement("button", _extends({}, restProps, {
64
71
  type: "button",
65
72
  role: "switch",
@@ -73,4 +80,5 @@ var Switch = /*#__PURE__*/React.forwardRef(function (_a, ref) {
73
80
  }, innerChecked ? checkedChildren : unCheckedChildren));
74
81
  });
75
82
  Switch.displayName = 'Switch';
83
+ Switch.__ACUD_SWITCH = true;
76
84
  export default Switch;
@@ -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;