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
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { BaseDropdownProps } from '../dropdown/dropdown';
3
3
  export interface BreadcrumbItemProps {
4
4
  prefixCls?: string;
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
3
 
3
4
  var __rest = this && this.__rest || function (s, e) {
4
5
  var t = {};
@@ -13,8 +14,8 @@ var __rest = this && this.__rest || function (s, e) {
13
14
  return t;
14
15
  };
15
16
 
16
- import * as React from 'react';
17
- import { OutlinedDown } from 'acud-icon';
17
+ import React, { useCallback, useState } from 'react';
18
+ import { OutlinedDown, OutlinedUp } from 'acud-icon';
18
19
  import DropDown from '../dropdown/dropdown';
19
20
  import { ConfigContext } from '../config-provider';
20
21
 
@@ -27,21 +28,32 @@ var BreadcrumbItem = function BreadcrumbItem(_a) {
27
28
  dropdownProps = _a.dropdownProps,
28
29
  restProps = __rest(_a, ["prefixCls", "separator", "children", "overlay", "dropdownProps"]);
29
30
 
31
+ var _useState = useState(false),
32
+ _useState2 = _slicedToArray(_useState, 2),
33
+ visible = _useState2[0],
34
+ setVisible = _useState2[1];
35
+
30
36
  var _React$useContext = React.useContext(ConfigContext),
31
37
  getPrefixCls = _React$useContext.getPrefixCls;
32
38
 
33
39
  var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
40
+ var handleVisibleChange = useCallback(function (visible) {
41
+ setVisible(visible);
42
+ }, []);
34
43
  /** If overlay is have Wrap a DropDown */
35
44
 
36
45
  var renderBreadcrumbNode = function renderBreadcrumbNode(breadcrumbItem) {
37
46
  if (overlay) {
38
47
  return /*#__PURE__*/React.createElement(DropDown, _extends({
39
48
  overlay: overlay,
49
+ visible: visible,
40
50
  placement: "bottomCenter",
41
51
  overlayClassName: "".concat(prefixCls, "-dropdown")
42
- }, dropdownProps), /*#__PURE__*/React.createElement("span", {
52
+ }, dropdownProps, {
53
+ onVisibleChange: handleVisibleChange
54
+ }), /*#__PURE__*/React.createElement("span", {
43
55
  className: "".concat(prefixCls, "-overlay-link")
44
- }, breadcrumbItem, /*#__PURE__*/React.createElement(OutlinedDown, null)));
56
+ }, breadcrumbItem, visible ? /*#__PURE__*/React.createElement(OutlinedUp, null) : /*#__PURE__*/React.createElement(OutlinedDown, null)));
45
57
  }
46
58
 
47
59
  return breadcrumbItem;
@@ -31,6 +31,7 @@ export declare type NativeButtonProps = {
31
31
  export declare type ButtonProps = Partial<NativeButtonProps>;
32
32
  interface CompoundedComponent extends React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>> {
33
33
  Group: typeof ButtonGroup;
34
+ __ACUD_BUTTON: boolean;
34
35
  }
35
36
  declare const Button: CompoundedComponent;
36
37
  export default Button;
@@ -110,4 +110,5 @@ var InternalButton = function InternalButton(props, ref) {
110
110
  var Button = /*#__PURE__*/React.forwardRef(InternalButton);
111
111
  Button.displayName = 'Button';
112
112
  Button.Group = ButtonGroup;
113
+ Button.__ACUD_BUTTON = true;
113
114
  export default Button;
@@ -30,11 +30,11 @@ import arrayTreeFilter from 'array-tree-filter';
30
30
  import OutlinedLeft from "acud-icon/es/icons/OutlinedLeft";
31
31
  import OutlinedRight from "acud-icon/es/icons/OutlinedRight";
32
32
  import OutlinedRefresh from "acud-icon/es/icons/OutlinedRefresh";
33
- import OutlinedClose from "acud-icon/es/icons/OutlinedClose";
34
33
  import OutlinedDown from "acud-icon/es/icons/OutlinedDown";
35
34
  import Input from '../input';
36
35
  import Tag from '../tag';
37
36
  import Tooltip from '../tooltip';
37
+ import Clear from '../clear';
38
38
  import RcCascader from './Cascader';
39
39
  import renderEmpty from './renderEmpty';
40
40
  import { ConfigConsumer } from '../config-provider';
@@ -131,6 +131,7 @@ var Cascader = function Cascader(props, ref) {
131
131
  var cachedRef = useRef({});
132
132
  var measureRef = useRef();
133
133
  var pickerRef = useRef();
134
+ var pickerLabelRef = useRef();
134
135
  var tagsRef = useRef();
135
136
 
136
137
  var _useState = useState(props.value || props.defaultValue || []),
@@ -158,6 +159,11 @@ var Cascader = function Cascader(props, ref) {
158
159
  popupVisible = _useState10[0],
159
160
  setPopupVisible = _useState10[1];
160
161
 
162
+ var _useState11 = useState(false),
163
+ _useState12 = _slicedToArray(_useState11, 2),
164
+ pickerLabelOverflow = _useState12[0],
165
+ setPickerLabelOverflow = _useState12[1];
166
+
161
167
  var isMulti = mode === 'multiple';
162
168
  var flattenOptions = useMemo(function () {
163
169
  var showSearch = props.showSearch,
@@ -270,6 +276,11 @@ var Cascader = function Cascader(props, ref) {
270
276
  e.preventDefault();
271
277
  }
272
278
  }, []);
279
+ var handlePickerLabelHover = useCallback(function () {
280
+ var ele = pickerLabelRef.current;
281
+ var overflow = (ele === null || ele === void 0 ? void 0 : ele.scrollWidth) > (ele === null || ele === void 0 ? void 0 : ele.clientWidth);
282
+ setPickerLabelOverflow(overflow);
283
+ }, []);
273
284
  var handleClick = useCallback(function (e) {
274
285
  if (e.target !== inputRef.current) {
275
286
  var isIE = document.body.style.msTouchAction !== undefined;
@@ -485,7 +496,7 @@ var Cascader = function Cascader(props, ref) {
485
496
  }, /*#__PURE__*/React.createElement(OutlinedRefresh, {
486
497
  animation: "spin"
487
498
  }));
488
- var clearIcon = allowClear && !disabled && value.length > 0 || inputValue ? /*#__PURE__*/React.createElement(OutlinedClose, {
499
+ var clearIcon = allowClear && !disabled && value.length > 0 || inputValue ? /*#__PURE__*/React.createElement(Clear, {
489
500
  className: "".concat(prefixCls, "-picker-clear"),
490
501
  onClick: handleSelectionClear
491
502
  }) : null;
@@ -614,10 +625,14 @@ var Cascader = function Cascader(props, ref) {
614
625
  style: style,
615
626
  className: pickerCls,
616
627
  disabled: disabled
628
+ }, /*#__PURE__*/React.createElement(Tooltip, {
629
+ title: pickerLabelOverflow ? label : undefined
617
630
  }, /*#__PURE__*/React.createElement("span", {
631
+ ref: pickerLabelRef,
618
632
  className: "".concat(prefixCls, "-picker-label"),
619
- disabled: disabled
620
- }, label), /*#__PURE__*/React.createElement(Input, _extends({}, inputProps, {
633
+ disabled: disabled,
634
+ onMouseOver: handlePickerLabelHover
635
+ }, label)), /*#__PURE__*/React.createElement(Input, _extends({}, inputProps, {
621
636
  tabIndex: -1,
622
637
  ref: inputRef,
623
638
  prefixCls: inputPrefixCls,
@@ -659,7 +674,7 @@ var Cascader = function Cascader(props, ref) {
659
674
  onPopupVisibleChange: handlePopupVisibleChange,
660
675
  onChange: handleValueChange
661
676
  }), input);
662
- }, [props, isMulti, label, value, disabledValue, inputValue, inputWidth, inputFocused, popupVisible, blur, focus, getPopupPlacement, generateFilteredOptions, handleClick, handleMouseDown, handleInputClick, handleInputBlur, handleInputFocus, handleInputKeyDown, handleInputChange, handleSelectionClear, handleSelectionItemClear, handleValueChange, handlePopupVisibleChange]);
677
+ }, [props, isMulti, label, value, disabledValue, pickerLabelOverflow, inputValue, inputWidth, inputFocused, popupVisible, blur, focus, getPopupPlacement, generateFilteredOptions, handleClick, handleMouseDown, handlePickerLabelHover, handleInputClick, handleInputBlur, handleInputFocus, handleInputKeyDown, handleInputChange, handleSelectionClear, handleSelectionItemClear, handleValueChange, handlePopupVisibleChange]);
663
678
  useImperativeHandle(ref, function () {
664
679
  return {
665
680
  focus: focus,
@@ -150,64 +150,9 @@
150
150
  .acud-cascader-picker-clear {
151
151
  position: absolute;
152
152
  top: 50%;
153
- right: 32px;
153
+ right: 30px;
154
154
  z-index: 2;
155
- width: 12px;
156
- height: 12px;
157
- margin-top: -6px;
158
- line-height: 12px;
159
- cursor: pointer;
160
- border-radius: 50%;
161
- text-align: center;
162
- transition: color 0.3s ease, opacity 0.15s ease;
163
- }
164
- .acud-cascader-picker-clear.acuicon {
165
- display: flex;
166
- color: #FFFFFF;
167
- background-color: #D4D6D9;
168
- border-color: transparent;
169
- }
170
- .acud-cascader-picker-clear.acuicon:hover {
171
- color: #FFFFFF;
172
- }
173
- .acud-cascader-picker-clear.acuicon:focus,
174
- .acud-cascader-picker-clear.acuicon:active {
175
- color: #FFFFFF;
176
- }
177
- .acud-cascader-picker-clear.acuicon[disabled],
178
- .acud-cascader-picker-clear.acuicon[disabled]:hover,
179
- .acud-cascader-picker-clear.acuicon[disabled]:focus,
180
- .acud-cascader-picker-clear.acuicon[disabled]:active {
181
- color: #FFFFFF;
182
- }
183
- .acud-cascader-picker-clear.acuicon:hover {
184
- background-color: #5C5F66;
185
- }
186
- .acud-cascader-picker-clear.acuicon:focus,
187
- .acud-cascader-picker-clear.acuicon:active {
188
- background-color: #303540;
189
- }
190
- .acud-cascader-picker-clear.acuicon[disabled],
191
- .acud-cascader-picker-clear.acuicon[disabled]:hover,
192
- .acud-cascader-picker-clear.acuicon[disabled]:focus,
193
- .acud-cascader-picker-clear.acuicon[disabled]:active {
194
- background-color: #F2F2F4;
195
- }
196
- .acud-cascader-picker-clear.acuicon:hover {
197
- border-color: transparent;
198
- }
199
- .acud-cascader-picker-clear.acuicon:focus,
200
- .acud-cascader-picker-clear.acuicon:active {
201
- border-color: transparent;
202
- }
203
- .acud-cascader-picker-clear.acuicon[disabled],
204
- .acud-cascader-picker-clear.acuicon[disabled]:hover,
205
- .acud-cascader-picker-clear.acuicon[disabled]:focus,
206
- .acud-cascader-picker-clear.acuicon[disabled]:active {
207
- border-color: transparent;
208
- }
209
- .acud-cascader-picker-clear > svg {
210
- transform: scale(0.6);
155
+ margin-top: -8px;
211
156
  }
212
157
  .acud-cascader-picker-arrow {
213
158
  position: absolute;
@@ -96,26 +96,11 @@
96
96
  }
97
97
 
98
98
  &-clear {
99
- &.acuicon {
100
- display: flex;
101
- .basic-config(@cascader-picker-clear-tp, @cascader-picker-clear-p);
102
- }
103
99
  position: absolute;
104
100
  top: 50%;
105
- right: 8 * @P;
101
+ right: 7.5 * @P;
106
102
  z-index: 2;
107
- width: 3 * @P;
108
- height: 3 * @P;
109
- margin-top: -1.5 * @P;
110
- line-height: 12px;
111
- cursor: pointer;
112
- border-radius: 50%;
113
- text-align: center;
114
- transition: color .3s ease, opacity .15s ease;
115
-
116
- & > svg {
117
- transform: scale(.6);
118
- }
103
+ margin-top: -2 * @P;
119
104
  }
120
105
 
121
106
  // arrow
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @file clear
3
+ * @author xuemin02
4
+ */
5
+ import { IconProps } from 'acud-icon/lib/components/interface';
6
+ import './style';
7
+ export interface ClearProps extends IconProps {
8
+ ref?: any;
9
+ prefixCls?: string;
10
+ }
11
+ declare const Clear: (props: ClearProps) => JSX.Element;
12
+ export default Clear;
@@ -0,0 +1,41 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+
3
+ /**
4
+ * @file clear
5
+ * @author xuemin02
6
+ */
7
+ var __rest = this && this.__rest || function (s, e) {
8
+ var t = {};
9
+
10
+ for (var p in s) {
11
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
12
+ }
13
+
14
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
15
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
16
+ }
17
+ return t;
18
+ };
19
+
20
+ import React from 'react';
21
+ import classnames from 'classnames';
22
+ import OutlinedCloseBold from "acud-icon/es/icons/OutlinedCloseBold";
23
+ import { ConfigContext } from '../config-provider';
24
+ import './style';
25
+
26
+ var Clear = function Clear(props) {
27
+ var customizePrefixCls = props.prefixCls,
28
+ className = props.className,
29
+ otherProps = __rest(props, ["prefixCls", "className"]);
30
+
31
+ var _React$useContext = React.useContext(ConfigContext),
32
+ getPrefixCls = _React$useContext.getPrefixCls;
33
+
34
+ var prefixCls = getPrefixCls('clear', customizePrefixCls);
35
+ var clearCls = classnames(prefixCls, className);
36
+ return /*#__PURE__*/React.createElement(OutlinedCloseBold, _extends({
37
+ className: clearCls
38
+ }, otherProps));
39
+ };
40
+
41
+ export default Clear;
@@ -0,0 +1,2 @@
1
+ import '../../style/index.css';
2
+ import './index.css';
@@ -0,0 +1,63 @@
1
+ /* color */
2
+ /* 默认颜色 */
3
+ /* 通用-icon */
4
+ /* 标签 */
5
+ /* 默认颜色 */
6
+ /* 其他颜色 */
7
+ /* 通用 */
8
+ /* 水平 */
9
+ /* 垂直 */
10
+ /* 序号水平 */
11
+ /* 序号垂直 */
12
+ .acud-clear.acudicon {
13
+ color: #FFFFFF;
14
+ background-color: #D4D6D9;
15
+ border-color: transparent;
16
+ padding: 2px;
17
+ background-clip: content-box;
18
+ border-radius: 50%;
19
+ font-size: 12px;
20
+ transition: color 0.3s ease, opacity 0.15s ease;
21
+ }
22
+ .acud-clear.acudicon:hover {
23
+ color: #FFFFFF;
24
+ }
25
+ .acud-clear.acudicon:focus,
26
+ .acud-clear.acudicon:active {
27
+ color: #FFFFFF;
28
+ }
29
+ .acud-clear.acudicon[disabled],
30
+ .acud-clear.acudicon[disabled]:hover,
31
+ .acud-clear.acudicon[disabled]:focus,
32
+ .acud-clear.acudicon[disabled]:active {
33
+ color: #FFFFFF;
34
+ }
35
+ .acud-clear.acudicon:hover {
36
+ background-color: #5C5F66;
37
+ }
38
+ .acud-clear.acudicon:focus,
39
+ .acud-clear.acudicon:active {
40
+ background-color: #303540;
41
+ }
42
+ .acud-clear.acudicon[disabled],
43
+ .acud-clear.acudicon[disabled]:hover,
44
+ .acud-clear.acudicon[disabled]:focus,
45
+ .acud-clear.acudicon[disabled]:active {
46
+ background-color: #F2F2F4;
47
+ }
48
+ .acud-clear.acudicon:hover {
49
+ border-color: transparent;
50
+ }
51
+ .acud-clear.acudicon:focus,
52
+ .acud-clear.acudicon:active {
53
+ border-color: transparent;
54
+ }
55
+ .acud-clear.acudicon[disabled],
56
+ .acud-clear.acudicon[disabled]:hover,
57
+ .acud-clear.acudicon[disabled]:focus,
58
+ .acud-clear.acudicon[disabled]:active {
59
+ border-color: transparent;
60
+ }
61
+ .acud-clear.acudicon > svg {
62
+ transform: scale(0.66666);
63
+ }
@@ -0,0 +1,2 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -0,0 +1,18 @@
1
+ @import '../../style/themes/index';
2
+ @import '../../style/mixins/index';
3
+
4
+ @clear-prefix-cls: ~'@{acud-prefix}-clear';
5
+
6
+ .@{clear-prefix-cls}.acudicon {
7
+ .basic-config(@clear-tp, @clear-p);
8
+
9
+ padding: .5 * @P;
10
+ background-clip: content-box;
11
+ border-radius: 50%;
12
+ font-size: 12px;
13
+ transition: color .3s ease, opacity .15s ease;
14
+
15
+ & > svg {
16
+ transform: scale(.66666);
17
+ }
18
+ }
@@ -22,7 +22,6 @@ import * as React from 'react';
22
22
  import classNames from 'classnames';
23
23
  import OutlinedCalendar from "acud-icon/es/icons/OutlinedCalendar";
24
24
  import MultiToneClear from "acud-icon/es/icons/MultiToneClear";
25
- import FilledError from "acud-icon/es/icons/FilledError";
26
25
  import OutlinedTime from "acud-icon/es/icons/OutlinedTime";
27
26
  import OutlinedMinus from "acud-icon/es/icons/OutlinedMinus";
28
27
  import OutlinedLeft from "acud-icon/es/icons/OutlinedLeft";
@@ -35,6 +34,7 @@ import { ConfigContext } from '../../config-provider';
35
34
  import SizeContext from '../../config-provider/SizeContext';
36
35
  import LocaleReceiver from '../../locale-provider/LocaleReceiver';
37
36
  import { getRangePlaceholder } from '../util';
37
+ import Clear from '../../clear';
38
38
  import { getTimeProps, Components } from '.';
39
39
  export default function generateRangePicker(generateConfig) {
40
40
  var RangePicker = /*#__PURE__*/function (_React$Component) {
@@ -107,7 +107,7 @@ export default function generateRangePicker(generateConfig) {
107
107
  ref: _this.pickerRef,
108
108
  placeholder: getRangePlaceholder(picker, locale, placeholder),
109
109
  suffixIcon: picker === 'time' ? /*#__PURE__*/React.createElement(OutlinedTime, null) : /*#__PURE__*/React.createElement(OutlinedCalendar, null),
110
- clearIcon: picker === 'time' ? /*#__PURE__*/React.createElement(FilledError, null) : /*#__PURE__*/React.createElement(MultiToneClear, null),
110
+ clearIcon: picker === 'time' ? /*#__PURE__*/React.createElement(Clear, null) : /*#__PURE__*/React.createElement(MultiToneClear, null),
111
111
  allowClear: true,
112
112
  transitionName: "".concat(rootPrefixCls, "-slide-up")
113
113
  }, restProps, additionalOverrideProps, {
@@ -23,7 +23,6 @@ import classNames from 'classnames';
23
23
  import OutlinedCalendar from "acud-icon/es/icons/OutlinedCalendar";
24
24
  import OutlinedTime from "acud-icon/es/icons/OutlinedTime";
25
25
  import MultiToneClear from "acud-icon/es/icons/MultiToneClear";
26
- import FilledError from "acud-icon/es/icons/FilledError";
27
26
  import OutlinedLeft from "acud-icon/es/icons/OutlinedLeft";
28
27
  import OutlinedRight from "acud-icon/es/icons/OutlinedRight";
29
28
  import OutlinedLeftDouble from "acud-icon/es/icons/OutlinedLeftDouble";
@@ -35,6 +34,7 @@ import devWarning from '../../_util/devWarning';
35
34
  import { ConfigContext } from '../../config-provider';
36
35
  import LocaleReceiver from '../../locale-provider/LocaleReceiver';
37
36
  import SizeContext from '../../config-provider/SizeContext';
37
+ import Clear from '../../clear';
38
38
  import { getTimeProps, Components } from '.';
39
39
  export default function generatePicker(generateConfig) {
40
40
  function getPicker(picker, displayName) {
@@ -110,7 +110,7 @@ export default function generatePicker(generateConfig) {
110
110
  ref: _this.pickerRef,
111
111
  placeholder: getPlaceholder(mergedPicker, locale, placeholder),
112
112
  suffixIcon: mergedPicker === 'time' ? /*#__PURE__*/React.createElement(OutlinedTime, null) : /*#__PURE__*/React.createElement(OutlinedCalendar, null),
113
- clearIcon: mergedPicker === 'time' ? /*#__PURE__*/React.createElement(FilledError, null) : /*#__PURE__*/React.createElement(MultiToneClear, null),
113
+ clearIcon: mergedPicker === 'time' ? /*#__PURE__*/React.createElement(Clear, null) : /*#__PURE__*/React.createElement(MultiToneClear, null),
114
114
  allowClear: true,
115
115
  transitionName: "".concat(rootPrefixCls, "-slide-up")
116
116
  }, additionalProps, restProps, additionalOverrideProps, {
@@ -90,6 +90,7 @@ function PickerPanel(props) {
90
90
  defaultOpenValue = panelContext.defaultOpenValue;
91
91
 
92
92
  var _React$useContext = React.useContext(RangeContext),
93
+ inRange = _React$useContext.inRange,
93
94
  panelPosition = _React$useContext.panelPosition,
94
95
  rangedValue = _React$useContext.rangedValue,
95
96
  hoverRangedValue = _React$useContext.hoverRangedValue;
@@ -409,7 +410,9 @@ function PickerPanel(props) {
409
410
  return /*#__PURE__*/React.createElement(PanelContext.Provider, {
410
411
  value: _extends(_extends({}, panelContext), {
411
412
  mode: mergedMode,
412
- hideHeader: 'hideHeader' in props ? hideHeader : panelContext.hideHeader
413
+ hideHeader: 'hideHeader' in props ? hideHeader : panelContext.hideHeader,
414
+ hidePrevBtn: inRange && panelPosition === 'right',
415
+ hideNextBtn: inRange && panelPosition === 'left'
413
416
  })
414
417
  }, /*#__PURE__*/React.createElement("div", {
415
418
  tabIndex: tabIndex,
@@ -153,15 +153,15 @@ export function getDefaultFormat(format, picker, showTime, use12Hours) {
153
153
  break;
154
154
 
155
155
  case "week":
156
- mergedFormat = "gggg.wo";
156
+ mergedFormat = "gggg-wo";
157
157
  break;
158
158
 
159
159
  case "month":
160
- mergedFormat = "YYYY.MM";
160
+ mergedFormat = "YYYY-MM";
161
161
  break;
162
162
 
163
163
  case "quarter":
164
- mergedFormat = "YYYY.[Q]Q";
164
+ mergedFormat = "YYYY-[Q]Q";
165
165
  break;
166
166
 
167
167
  case "year":
@@ -169,7 +169,7 @@ export function getDefaultFormat(format, picker, showTime, use12Hours) {
169
169
  break;
170
170
 
171
171
  default:
172
- mergedFormat = showTime ? "YYYY.MM.DD HH:mm:ss" : "YYYY.MM.DD";
172
+ mergedFormat = showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
173
173
  }
174
174
  }
175
175