assui 2.3.3 → 2.3.4

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 (261) hide show
  1. package/es/button-drawer/index.js +1 -1
  2. package/es/button-modal/index.js +1 -1
  3. package/es/copy-to-clipboard/index.js +1 -1
  4. package/es/highlight-textarea/style/index.css +7 -3
  5. package/es/img-crop/index.js +1 -1
  6. package/es/keep-tab/index.js +25 -26
  7. package/es/keep-tab/style/index.css +29 -6
  8. package/es/text-input/style/index.css +7 -3
  9. package/lib/button-drawer/index.js +1 -1
  10. package/lib/button-modal/index.js +1 -1
  11. package/lib/copy-to-clipboard/index.js +1 -1
  12. package/lib/highlight-textarea/style/index.css +7 -3
  13. package/lib/img-crop/index.js +1 -1
  14. package/lib/keep-tab/index.js +25 -27
  15. package/lib/keep-tab/style/index.css +29 -6
  16. package/lib/text-input/style/index.css +7 -3
  17. package/package.json +3 -3
  18. package/es/a-select/index.d.ts +0 -11
  19. package/es/a-select/style/index.d.ts +0 -2
  20. package/es/area-text/index.d.ts +0 -7
  21. package/es/area-text/style/index.d.ts +0 -1
  22. package/es/beautiful-dnd/index.d.ts +0 -2
  23. package/es/beautiful-dnd/style/index.d.ts +0 -1
  24. package/es/button-drawer/index.d.ts +0 -14
  25. package/es/button-drawer/style/index.d.ts +0 -1
  26. package/es/button-modal/index.d.ts +0 -14
  27. package/es/button-modal/style/index.d.ts +0 -1
  28. package/es/color-select/index.d.ts +0 -23
  29. package/es/color-select/style/index.d.ts +0 -2
  30. package/es/condition-input/index.d.ts +0 -17
  31. package/es/condition-input/parse2RegexOption.d.ts +0 -13
  32. package/es/condition-input/style/index.d.ts +0 -1
  33. package/es/config-provider/context.d.ts +0 -4
  34. package/es/config-provider/index.d.ts +0 -8
  35. package/es/config-provider/style/index.d.ts +0 -1
  36. package/es/copy-to-clipboard/index.d.ts +0 -22
  37. package/es/copy-to-clipboard/style/index.d.ts +0 -1
  38. package/es/highlight-textarea/HighlighedContents.d.ts +0 -7
  39. package/es/highlight-textarea/extractSpansOfClasses.d.ts +0 -15
  40. package/es/highlight-textarea/getRanges.d.ts +0 -2
  41. package/es/highlight-textarea/getType.d.ts +0 -2
  42. package/es/highlight-textarea/index.d.ts +0 -12
  43. package/es/highlight-textarea/style/index.d.ts +0 -1
  44. package/es/highlight-textarea/types.d.ts +0 -16
  45. package/es/highlight-words/index.d.ts +0 -3
  46. package/es/highlight-words/style/index.d.ts +0 -1
  47. package/es/img-crop/EasyCrop.d.ts +0 -6
  48. package/es/img-crop/getCroppedImg.d.ts +0 -6
  49. package/es/img-crop/index.d.ts +0 -53
  50. package/es/img-crop/style/index.d.ts +0 -3
  51. package/es/index.d.ts +0 -72
  52. package/es/json-editor/index.d.ts +0 -10
  53. package/es/json-editor/style/index.d.ts +0 -2
  54. package/es/keep-tab/index.d.ts +0 -29
  55. package/es/keep-tab/style/index.d.ts +0 -2
  56. package/es/label-auto-complete/index.d.ts +0 -8
  57. package/es/label-auto-complete/style/index.d.ts +0 -2
  58. package/es/label-condition-input/index.d.ts +0 -16
  59. package/es/label-condition-input/style/index.d.ts +0 -1
  60. package/es/label-customize-range-picker/defaultRadioList.d.ts +0 -25
  61. package/es/label-customize-range-picker/index.d.ts +0 -20
  62. package/es/label-customize-range-picker/style/index.d.ts +0 -5
  63. package/es/label-customize-range-picker/utils/index.d.ts +0 -2
  64. package/es/label-date-picker/index.d.ts +0 -7
  65. package/es/label-date-picker/style/index.d.ts +0 -2
  66. package/es/label-input/index.d.ts +0 -29
  67. package/es/label-input/style/index.d.ts +0 -1
  68. package/es/label-number-input/index.d.ts +0 -12
  69. package/es/label-number-input/style/index.d.ts +0 -1
  70. package/es/label-range-picker/index.d.ts +0 -8
  71. package/es/label-range-picker/style/index.d.ts +0 -2
  72. package/es/label-select/index.d.ts +0 -12
  73. package/es/label-select/style/index.d.ts +0 -2
  74. package/es/label-text-area/index.d.ts +0 -21
  75. package/es/label-text-area/style/index.d.ts +0 -1
  76. package/es/label-tree-select/index.d.ts +0 -11
  77. package/es/label-tree-select/style/index.d.ts +0 -2
  78. package/es/messages/ar_EG.d.ts +0 -26
  79. package/es/messages/bg_BG.d.ts +0 -26
  80. package/es/messages/cs_CZ.d.ts +0 -26
  81. package/es/messages/de_DE.d.ts +0 -26
  82. package/es/messages/en_US.d.ts +0 -26
  83. package/es/messages/es_ES.d.ts +0 -26
  84. package/es/messages/fi_FI.d.ts +0 -26
  85. package/es/messages/fr_FR.d.ts +0 -26
  86. package/es/messages/id_ID.d.ts +0 -26
  87. package/es/messages/index.d.ts +0 -27
  88. package/es/messages/it_IT.d.ts +0 -26
  89. package/es/messages/ja_JP.d.ts +0 -26
  90. package/es/messages/ko_KR.d.ts +0 -26
  91. package/es/messages/nb_NO.d.ts +0 -26
  92. package/es/messages/nl_NL.d.ts +0 -26
  93. package/es/messages/pt_PT.d.ts +0 -26
  94. package/es/messages/ro_RO.d.ts +0 -26
  95. package/es/messages/ru_RU.d.ts +0 -26
  96. package/es/messages/sv_SE.d.ts +0 -26
  97. package/es/messages/th_TH.d.ts +0 -26
  98. package/es/messages/vi_VN.d.ts +0 -26
  99. package/es/messages/zh_CN.d.ts +0 -26
  100. package/es/messages/zh_TW.d.ts +0 -26
  101. package/es/number-format-input/index.d.ts +0 -5
  102. package/es/number-format-input/style/index.d.ts +0 -1
  103. package/es/number-input/const/dataTypeEnum.d.ts +0 -3
  104. package/es/number-input/const/numberType.d.ts +0 -2
  105. package/es/number-input/index.d.ts +0 -42
  106. package/es/number-input/style/index.d.ts +0 -1
  107. package/es/number-input/utils.d.ts +0 -10
  108. package/es/rc-echart/core.d.ts +0 -29
  109. package/es/rc-echart/index.d.ts +0 -19
  110. package/es/rc-echart/style/index.d.ts +0 -1
  111. package/es/rc-motion/index.d.ts +0 -4
  112. package/es/rc-motion/style/index.d.ts +0 -1
  113. package/es/rc-qrcode/index.d.ts +0 -21
  114. package/es/rc-qrcode/style/index.d.ts +0 -1
  115. package/es/rc-qrcode/useQrcode.d.ts +0 -4
  116. package/es/rc-transition-group/index.d.ts +0 -2
  117. package/es/rc-transition-group/style/index.d.ts +0 -1
  118. package/es/resizable/index.d.ts +0 -4
  119. package/es/resizable/style/index.d.ts +0 -1
  120. package/es/rich-text-editor/index.d.ts +0 -37
  121. package/es/rich-text-editor/lang/zh_CN.d.ts +0 -407
  122. package/es/rich-text-editor/plugins/code/index.d.ts +0 -2
  123. package/es/rich-text-editor/style/index.d.ts +0 -1
  124. package/es/single-img-upload/index.d.ts +0 -22
  125. package/es/single-img-upload/style/index.d.ts +0 -3
  126. package/es/sortable-hoc/index.d.ts +0 -2
  127. package/es/sortable-hoc/style/index.d.ts +0 -1
  128. package/es/split-pane/index.d.ts +0 -59
  129. package/es/split-pane/style/index.d.ts +0 -1
  130. package/es/step-number-input/const/countType.d.ts +0 -2
  131. package/es/step-number-input/const/numberType.d.ts +0 -2
  132. package/es/step-number-input/index.d.ts +0 -43
  133. package/es/step-number-input/style/index.d.ts +0 -2
  134. package/es/table-col/index.d.ts +0 -8
  135. package/es/table-col/style/index.d.ts +0 -1
  136. package/es/text-area/index.d.ts +0 -12
  137. package/es/text-area/style/index.d.ts +0 -1
  138. package/es/text-input/index.d.ts +0 -5
  139. package/es/text-input/style/index.d.ts +0 -1
  140. package/lib/a-select/index.d.ts +0 -11
  141. package/lib/a-select/style/index.d.ts +0 -2
  142. package/lib/area-text/index.d.ts +0 -7
  143. package/lib/area-text/style/index.d.ts +0 -1
  144. package/lib/beautiful-dnd/index.d.ts +0 -2
  145. package/lib/beautiful-dnd/style/index.d.ts +0 -1
  146. package/lib/button-drawer/index.d.ts +0 -14
  147. package/lib/button-drawer/style/index.d.ts +0 -1
  148. package/lib/button-modal/index.d.ts +0 -14
  149. package/lib/button-modal/style/index.d.ts +0 -1
  150. package/lib/color-select/index.d.ts +0 -23
  151. package/lib/color-select/style/index.d.ts +0 -2
  152. package/lib/condition-input/index.d.ts +0 -17
  153. package/lib/condition-input/parse2RegexOption.d.ts +0 -13
  154. package/lib/condition-input/style/index.d.ts +0 -1
  155. package/lib/config-provider/context.d.ts +0 -4
  156. package/lib/config-provider/index.d.ts +0 -8
  157. package/lib/config-provider/style/index.d.ts +0 -1
  158. package/lib/copy-to-clipboard/index.d.ts +0 -22
  159. package/lib/copy-to-clipboard/style/index.d.ts +0 -1
  160. package/lib/highlight-textarea/HighlighedContents.d.ts +0 -7
  161. package/lib/highlight-textarea/extractSpansOfClasses.d.ts +0 -15
  162. package/lib/highlight-textarea/getRanges.d.ts +0 -2
  163. package/lib/highlight-textarea/getType.d.ts +0 -2
  164. package/lib/highlight-textarea/index.d.ts +0 -12
  165. package/lib/highlight-textarea/style/index.d.ts +0 -1
  166. package/lib/highlight-textarea/types.d.ts +0 -16
  167. package/lib/highlight-words/index.d.ts +0 -3
  168. package/lib/highlight-words/style/index.d.ts +0 -1
  169. package/lib/img-crop/EasyCrop.d.ts +0 -6
  170. package/lib/img-crop/getCroppedImg.d.ts +0 -6
  171. package/lib/img-crop/index.d.ts +0 -53
  172. package/lib/img-crop/style/index.d.ts +0 -3
  173. package/lib/index.d.ts +0 -72
  174. package/lib/json-editor/index.d.ts +0 -10
  175. package/lib/json-editor/style/index.d.ts +0 -2
  176. package/lib/keep-tab/index.d.ts +0 -29
  177. package/lib/keep-tab/style/index.d.ts +0 -2
  178. package/lib/label-auto-complete/index.d.ts +0 -8
  179. package/lib/label-auto-complete/style/index.d.ts +0 -2
  180. package/lib/label-condition-input/index.d.ts +0 -16
  181. package/lib/label-condition-input/style/index.d.ts +0 -1
  182. package/lib/label-customize-range-picker/defaultRadioList.d.ts +0 -25
  183. package/lib/label-customize-range-picker/index.d.ts +0 -20
  184. package/lib/label-customize-range-picker/style/index.d.ts +0 -5
  185. package/lib/label-customize-range-picker/utils/index.d.ts +0 -2
  186. package/lib/label-date-picker/index.d.ts +0 -7
  187. package/lib/label-date-picker/style/index.d.ts +0 -2
  188. package/lib/label-input/index.d.ts +0 -29
  189. package/lib/label-input/style/index.d.ts +0 -1
  190. package/lib/label-number-input/index.d.ts +0 -12
  191. package/lib/label-number-input/style/index.d.ts +0 -1
  192. package/lib/label-range-picker/index.d.ts +0 -8
  193. package/lib/label-range-picker/style/index.d.ts +0 -2
  194. package/lib/label-select/index.d.ts +0 -12
  195. package/lib/label-select/style/index.d.ts +0 -2
  196. package/lib/label-text-area/index.d.ts +0 -21
  197. package/lib/label-text-area/style/index.d.ts +0 -1
  198. package/lib/label-tree-select/index.d.ts +0 -11
  199. package/lib/label-tree-select/style/index.d.ts +0 -2
  200. package/lib/messages/ar_EG.d.ts +0 -26
  201. package/lib/messages/bg_BG.d.ts +0 -26
  202. package/lib/messages/cs_CZ.d.ts +0 -26
  203. package/lib/messages/de_DE.d.ts +0 -26
  204. package/lib/messages/en_US.d.ts +0 -26
  205. package/lib/messages/es_ES.d.ts +0 -26
  206. package/lib/messages/fi_FI.d.ts +0 -26
  207. package/lib/messages/fr_FR.d.ts +0 -26
  208. package/lib/messages/id_ID.d.ts +0 -26
  209. package/lib/messages/index.d.ts +0 -27
  210. package/lib/messages/it_IT.d.ts +0 -26
  211. package/lib/messages/ja_JP.d.ts +0 -26
  212. package/lib/messages/ko_KR.d.ts +0 -26
  213. package/lib/messages/nb_NO.d.ts +0 -26
  214. package/lib/messages/nl_NL.d.ts +0 -26
  215. package/lib/messages/pt_PT.d.ts +0 -26
  216. package/lib/messages/ro_RO.d.ts +0 -26
  217. package/lib/messages/ru_RU.d.ts +0 -26
  218. package/lib/messages/sv_SE.d.ts +0 -26
  219. package/lib/messages/th_TH.d.ts +0 -26
  220. package/lib/messages/vi_VN.d.ts +0 -26
  221. package/lib/messages/zh_CN.d.ts +0 -26
  222. package/lib/messages/zh_TW.d.ts +0 -26
  223. package/lib/number-format-input/index.d.ts +0 -5
  224. package/lib/number-format-input/style/index.d.ts +0 -1
  225. package/lib/number-input/const/dataTypeEnum.d.ts +0 -3
  226. package/lib/number-input/const/numberType.d.ts +0 -2
  227. package/lib/number-input/index.d.ts +0 -42
  228. package/lib/number-input/style/index.d.ts +0 -1
  229. package/lib/number-input/utils.d.ts +0 -10
  230. package/lib/rc-echart/core.d.ts +0 -29
  231. package/lib/rc-echart/index.d.ts +0 -19
  232. package/lib/rc-echart/style/index.d.ts +0 -1
  233. package/lib/rc-motion/index.d.ts +0 -4
  234. package/lib/rc-motion/style/index.d.ts +0 -1
  235. package/lib/rc-qrcode/index.d.ts +0 -21
  236. package/lib/rc-qrcode/style/index.d.ts +0 -1
  237. package/lib/rc-qrcode/useQrcode.d.ts +0 -4
  238. package/lib/rc-transition-group/index.d.ts +0 -2
  239. package/lib/rc-transition-group/style/index.d.ts +0 -1
  240. package/lib/resizable/index.d.ts +0 -4
  241. package/lib/resizable/style/index.d.ts +0 -1
  242. package/lib/rich-text-editor/index.d.ts +0 -37
  243. package/lib/rich-text-editor/lang/zh_CN.d.ts +0 -407
  244. package/lib/rich-text-editor/plugins/code/index.d.ts +0 -2
  245. package/lib/rich-text-editor/style/index.d.ts +0 -1
  246. package/lib/single-img-upload/index.d.ts +0 -22
  247. package/lib/single-img-upload/style/index.d.ts +0 -3
  248. package/lib/sortable-hoc/index.d.ts +0 -2
  249. package/lib/sortable-hoc/style/index.d.ts +0 -1
  250. package/lib/split-pane/index.d.ts +0 -59
  251. package/lib/split-pane/style/index.d.ts +0 -1
  252. package/lib/step-number-input/const/countType.d.ts +0 -2
  253. package/lib/step-number-input/const/numberType.d.ts +0 -2
  254. package/lib/step-number-input/index.d.ts +0 -43
  255. package/lib/step-number-input/style/index.d.ts +0 -2
  256. package/lib/table-col/index.d.ts +0 -8
  257. package/lib/table-col/style/index.d.ts +0 -1
  258. package/lib/text-area/index.d.ts +0 -12
  259. package/lib/text-area/style/index.d.ts +0 -1
  260. package/lib/text-input/index.d.ts +0 -5
  261. package/lib/text-input/style/index.d.ts +0 -1
@@ -107,7 +107,7 @@ var ButtonDrawer = function ButtonDrawer(props, ref) {
107
107
  className: classNames('button-drawer', className),
108
108
  title: title,
109
109
  onClose: closeDrawer,
110
- visible: drawerVisible
110
+ open: drawerVisible
111
111
  }, restProps), isFunction(children) ? children(actionRef.current) : /*#__PURE__*/React.cloneElement(children, {
112
112
  drawerAction: actionRef.current
113
113
  })));
@@ -110,7 +110,7 @@ var ButtonModal = function ButtonModal(props, ref) {
110
110
  onClick: openModal
111
111
  });
112
112
  return /*#__PURE__*/React.createElement(React.Fragment, null, buttonNode, /*#__PURE__*/React.createElement(Modal, __assign({
113
- visible: visible,
113
+ open: visible,
114
114
  onOk: handleModalOk,
115
115
  onCancel: handleModalCancel,
116
116
  centered: true,
@@ -83,7 +83,7 @@ var CopyToClipboard = function CopyToClipboard(props) {
83
83
 
84
84
  return tooltipTitle ? /*#__PURE__*/React.createElement(Tooltip, __assign({
85
85
  placement: "topLeft",
86
- visible: tooltipVisible,
86
+ open: tooltipVisible,
87
87
  title: tooltipTitle
88
88
  }, tooltipProps), /*#__PURE__*/React.cloneElement(children, {
89
89
  onClick: onClick
@@ -137,6 +137,7 @@ textarea.ant-input-affix-wrapper {
137
137
  }
138
138
  .ant-input-affix-wrapper > input.ant-input {
139
139
  padding: 0;
140
+ font-size: inherit;
140
141
  border: none;
141
142
  outline: none;
142
143
  }
@@ -835,18 +836,21 @@ textarea.ant-input {
835
836
  }
836
837
  .ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),
837
838
  .ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary) {
838
- border-right-color: #40a9ff;
839
839
  border-left-color: #d9d9d9;
840
840
  }
841
+ .ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover,
842
+ .ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover {
843
+ border-left-color: #40a9ff;
844
+ }
841
845
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper:hover,
842
846
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper-focused {
843
847
  border-right-color: #40a9ff;
844
848
  }
845
- .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon {
849
+ .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child {
846
850
  right: -1px;
847
851
  left: auto;
848
852
  }
849
- .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon .ant-input-search-button {
853
+ .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child .ant-input-search-button {
850
854
  border-radius: 2px 0 0 2px;
851
855
  }
852
856
  @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@@ -453,7 +453,7 @@ var ImgCrop = function ImgCrop(props) {
453
453
 
454
454
  var renderComponent = function renderComponent(titleOfModal) {
455
455
  return /*#__PURE__*/React.createElement(React.Fragment, null, renderUpload(), src && /*#__PURE__*/React.createElement(Modal, __assign({
456
- visible: true,
456
+ open: true,
457
457
  wrapClassName: "".concat(pkg, "-modal"),
458
458
  title: titleOfModal,
459
459
  onOk: onOk,
@@ -61,46 +61,45 @@ import Badge from "antd/es/badge";
61
61
  import Tabs from "antd/es/tabs";
62
62
  import useUrlState from '@ahooksjs/use-url-state';
63
63
  import useControllableValue from "ahooks/es/useControllableValue";
64
- import toArray from "rc-util/es/Children/toArray";
65
64
  var TabPane = Tabs.TabPane;
66
65
  var defaultBadgeProps = {};
67
66
 
68
67
  var KeepTab = function KeepTab(props) {
69
68
  var _a;
70
69
 
71
- var children = props.children,
70
+ var _b = props.items,
71
+ items = _b === void 0 ? [] : _b,
72
72
  defaultActiveKey = props.defaultActiveKey,
73
73
  saveActiveKeyName = props.saveActiveKeyName,
74
74
  onChange = props.onChange,
75
- _b = props.badgeProps,
76
- badgeProps = _b === void 0 ? defaultBadgeProps : _b,
77
- restProps = __rest(props, ["children", "defaultActiveKey", "saveActiveKeyName", "onChange", "badgeProps"]);
75
+ _c = props.badgeProps,
76
+ badgeProps = _c === void 0 ? defaultBadgeProps : _c,
77
+ restProps = __rest(props, ["items", "defaultActiveKey", "saveActiveKeyName", "onChange", "badgeProps"]);
78
78
 
79
79
  var defaultUrlParams = qsHelp.getQueryObject();
80
80
 
81
- var _c = __read(useUrlState((_a = {}, _a[saveActiveKeyName] = defaultUrlParams[saveActiveKeyName] || defaultActiveKey, _a)), 2),
82
- urlParams = _c[0],
83
- setUrlParams = _c[1];
81
+ var _d = __read(useUrlState((_a = {}, _a[saveActiveKeyName] = defaultUrlParams[saveActiveKeyName] || defaultActiveKey, _a)), 2),
82
+ urlParams = _d[0],
83
+ setUrlParams = _d[1];
84
84
 
85
- var _d = __read(useControllableValue(props, {
85
+ var _e = __read(useControllableValue(props, {
86
86
  valuePropName: 'activeKey',
87
87
  defaultValue: defaultUrlParams[saveActiveKeyName] || defaultActiveKey
88
88
  }), 2),
89
- tabActiveKey = _d[0],
90
- setTabActiveKey = _d[1];
89
+ tabActiveKey = _e[0],
90
+ setTabActiveKey = _e[1];
91
91
 
92
- var arrayChildren = toArray(children);
93
92
  React.useEffect(function () {
94
93
  var _a;
95
94
 
96
- if (!('activeKey' in props)) {
97
- var resultActiveTab = find(arrayChildren, {
95
+ if (!('activeKey' in props) && items) {
96
+ var resultActiveTab = find(items, {
98
97
  key: urlParams[saveActiveKeyName]
99
98
  });
100
99
 
101
- if (!resultActiveTab || resultActiveTab.props.disabled) {
102
- setUrlParams((_a = {}, _a[saveActiveKeyName] = arrayChildren[0].key, _a));
103
- setTabActiveKey(arrayChildren[0].key);
100
+ if (!resultActiveTab || resultActiveTab.disabled) {
101
+ setUrlParams((_a = {}, _a[saveActiveKeyName] = items[0].key, _a));
102
+ setTabActiveKey(items[0].key);
104
103
  }
105
104
  }
106
105
  }, [tabActiveKey]);
@@ -112,29 +111,29 @@ var KeepTab = function KeepTab(props) {
112
111
  setTabActiveKey(nextActiveKey);
113
112
  };
114
113
 
115
- var resultChildren = arrayChildren.map(function (childItem) {
116
- var _a;
117
-
118
- var count = (_a = childItem === null || childItem === void 0 ? void 0 : childItem.props) === null || _a === void 0 ? void 0 : _a.count;
114
+ var resultItems = items.map(function (item) {
115
+ var count = item === null || item === void 0 ? void 0 : item.count;
119
116
 
120
117
  if (count) {
121
- return /*#__PURE__*/React.cloneElement(childItem, {
122
- tab: /*#__PURE__*/React.createElement(Badge, __assign({
118
+ return __assign(__assign({}, item), {
119
+ label: /*#__PURE__*/React.createElement(Badge, __assign({
123
120
  className: "tab-badge",
124
121
  count: count,
125
122
  offset: [16, -9]
126
- }, badgeProps), /*#__PURE__*/React.createElement("span", null, childItem.props.tab))
123
+ }, badgeProps), /*#__PURE__*/React.createElement("span", null, item.label))
127
124
  });
128
125
  }
129
126
 
130
- return childItem;
127
+ return item;
131
128
  });
132
129
  return /*#__PURE__*/React.createElement(Tabs, __assign({
133
130
  animated: false,
134
131
  onChange: handleTabChange,
135
132
  destroyInactiveTabPane: true,
136
133
  activeKey: tabActiveKey
137
- }, restProps), resultChildren);
134
+ }, restProps, {
135
+ items: resultItems
136
+ }));
138
137
  };
139
138
 
140
139
  KeepTab.defaultProps = {
@@ -589,7 +589,7 @@
589
589
  margin: 0 0 0 32px;
590
590
  }
591
591
  .ant-tabs-content {
592
- display: flex;
592
+ position: relative;
593
593
  width: 100%;
594
594
  }
595
595
  .ant-tabs-content-holder {
@@ -597,14 +597,37 @@
597
597
  min-width: 0;
598
598
  min-height: 0;
599
599
  }
600
- .ant-tabs-content-animated {
601
- transition: margin 0.3s;
602
- }
603
600
  .ant-tabs-tabpane {
604
- flex: none;
605
- width: 100%;
606
601
  outline: none;
607
602
  }
603
+ .ant-tabs-tabpane-hidden {
604
+ display: none;
605
+ }
606
+ .ant-tabs-switch-appear,
607
+ .ant-tabs-switch-enter {
608
+ transition: none;
609
+ }
610
+ .ant-tabs-switch-appear-start,
611
+ .ant-tabs-switch-enter-start {
612
+ opacity: 0;
613
+ }
614
+ .ant-tabs-switch-appear-active,
615
+ .ant-tabs-switch-enter-active {
616
+ opacity: 1;
617
+ transition: opacity 0.3s;
618
+ }
619
+ .ant-tabs-switch-leave {
620
+ position: absolute;
621
+ transition: none;
622
+ inset: 0;
623
+ }
624
+ .ant-tabs-switch-leave-start {
625
+ opacity: 1;
626
+ }
627
+ .ant-tabs-switch-leave-active {
628
+ opacity: 0;
629
+ transition: opacity 0.3s;
630
+ }
608
631
  .ant-badge {
609
632
  box-sizing: border-box;
610
633
  margin: 0;
@@ -137,6 +137,7 @@ textarea.ant-input-affix-wrapper {
137
137
  }
138
138
  .ant-input-affix-wrapper > input.ant-input {
139
139
  padding: 0;
140
+ font-size: inherit;
140
141
  border: none;
141
142
  outline: none;
142
143
  }
@@ -835,18 +836,21 @@ textarea.ant-input {
835
836
  }
836
837
  .ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),
837
838
  .ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary) {
838
- border-right-color: #40a9ff;
839
839
  border-left-color: #d9d9d9;
840
840
  }
841
+ .ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover,
842
+ .ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover {
843
+ border-left-color: #40a9ff;
844
+ }
841
845
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper:hover,
842
846
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper-focused {
843
847
  border-right-color: #40a9ff;
844
848
  }
845
- .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon {
849
+ .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child {
846
850
  right: -1px;
847
851
  left: auto;
848
852
  }
849
- .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon .ant-input-search-button {
853
+ .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child .ant-input-search-button {
850
854
  border-radius: 2px 0 0 2px;
851
855
  }
852
856
  @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@@ -162,7 +162,7 @@ var ButtonDrawer = function ButtonDrawer(props, ref) {
162
162
  className: (0, classnames_1["default"])('button-drawer', className),
163
163
  title: title,
164
164
  onClose: closeDrawer,
165
- visible: drawerVisible
165
+ open: drawerVisible
166
166
  }, restProps), (0, isFunction_1["default"])(children) ? children(actionRef.current) : react_1["default"].cloneElement(children, {
167
167
  drawerAction: actionRef.current
168
168
  })));
@@ -164,7 +164,7 @@ var ButtonModal = function ButtonModal(props, ref) {
164
164
  onClick: openModal
165
165
  });
166
166
  return React.createElement(React.Fragment, null, buttonNode, React.createElement(modal_1["default"], __assign({
167
- visible: visible,
167
+ open: visible,
168
168
  onOk: handleModalOk,
169
169
  onCancel: handleModalCancel,
170
170
  centered: true,
@@ -137,7 +137,7 @@ var CopyToClipboard = function CopyToClipboard(props) {
137
137
 
138
138
  return tooltipTitle ? react_1["default"].createElement(tooltip_1["default"], __assign({
139
139
  placement: "topLeft",
140
- visible: tooltipVisible,
140
+ open: tooltipVisible,
141
141
  title: tooltipTitle
142
142
  }, tooltipProps), react_1["default"].cloneElement(children, {
143
143
  onClick: onClick
@@ -137,6 +137,7 @@ textarea.ant-input-affix-wrapper {
137
137
  }
138
138
  .ant-input-affix-wrapper > input.ant-input {
139
139
  padding: 0;
140
+ font-size: inherit;
140
141
  border: none;
141
142
  outline: none;
142
143
  }
@@ -835,18 +836,21 @@ textarea.ant-input {
835
836
  }
836
837
  .ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),
837
838
  .ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary) {
838
- border-right-color: #40a9ff;
839
839
  border-left-color: #d9d9d9;
840
840
  }
841
+ .ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover,
842
+ .ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover {
843
+ border-left-color: #40a9ff;
844
+ }
841
845
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper:hover,
842
846
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper-focused {
843
847
  border-right-color: #40a9ff;
844
848
  }
845
- .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon {
849
+ .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child {
846
850
  right: -1px;
847
851
  left: auto;
848
852
  }
849
- .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon .ant-input-search-button {
853
+ .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child .ant-input-search-button {
850
854
  border-radius: 2px 0 0 2px;
851
855
  }
852
856
  @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@@ -510,7 +510,7 @@ var ImgCrop = function ImgCrop(props) {
510
510
 
511
511
  var renderComponent = function renderComponent(titleOfModal) {
512
512
  return React.createElement(React.Fragment, null, renderUpload(), src && React.createElement(modal_1["default"], __assign({
513
- visible: true,
513
+ open: true,
514
514
  wrapClassName: "".concat(pkg, "-modal"),
515
515
  title: titleOfModal,
516
516
  onOk: onOk,
@@ -120,47 +120,45 @@ var use_url_state_1 = __importDefault(require("@ahooksjs/use-url-state"));
120
120
 
121
121
  var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
122
122
 
123
- var toArray_1 = __importDefault(require("rc-util/lib/Children/toArray"));
124
-
125
123
  var TabPane = tabs_1["default"].TabPane;
126
124
  var defaultBadgeProps = {};
127
125
 
128
126
  var KeepTab = function KeepTab(props) {
129
127
  var _a;
130
128
 
131
- var children = props.children,
129
+ var _b = props.items,
130
+ items = _b === void 0 ? [] : _b,
132
131
  defaultActiveKey = props.defaultActiveKey,
133
132
  saveActiveKeyName = props.saveActiveKeyName,
134
133
  onChange = props.onChange,
135
- _b = props.badgeProps,
136
- badgeProps = _b === void 0 ? defaultBadgeProps : _b,
137
- restProps = __rest(props, ["children", "defaultActiveKey", "saveActiveKeyName", "onChange", "badgeProps"]);
134
+ _c = props.badgeProps,
135
+ badgeProps = _c === void 0 ? defaultBadgeProps : _c,
136
+ restProps = __rest(props, ["items", "defaultActiveKey", "saveActiveKeyName", "onChange", "badgeProps"]);
138
137
 
139
138
  var defaultUrlParams = qsHelp_1["default"].getQueryObject();
140
139
 
141
- var _c = __read((0, use_url_state_1["default"])((_a = {}, _a[saveActiveKeyName] = defaultUrlParams[saveActiveKeyName] || defaultActiveKey, _a)), 2),
142
- urlParams = _c[0],
143
- setUrlParams = _c[1];
140
+ var _d = __read((0, use_url_state_1["default"])((_a = {}, _a[saveActiveKeyName] = defaultUrlParams[saveActiveKeyName] || defaultActiveKey, _a)), 2),
141
+ urlParams = _d[0],
142
+ setUrlParams = _d[1];
144
143
 
145
- var _d = __read((0, useControllableValue_1["default"])(props, {
144
+ var _e = __read((0, useControllableValue_1["default"])(props, {
146
145
  valuePropName: 'activeKey',
147
146
  defaultValue: defaultUrlParams[saveActiveKeyName] || defaultActiveKey
148
147
  }), 2),
149
- tabActiveKey = _d[0],
150
- setTabActiveKey = _d[1];
148
+ tabActiveKey = _e[0],
149
+ setTabActiveKey = _e[1];
151
150
 
152
- var arrayChildren = (0, toArray_1["default"])(children);
153
151
  React.useEffect(function () {
154
152
  var _a;
155
153
 
156
- if (!('activeKey' in props)) {
157
- var resultActiveTab = (0, find_1["default"])(arrayChildren, {
154
+ if (!('activeKey' in props) && items) {
155
+ var resultActiveTab = (0, find_1["default"])(items, {
158
156
  key: urlParams[saveActiveKeyName]
159
157
  });
160
158
 
161
- if (!resultActiveTab || resultActiveTab.props.disabled) {
162
- setUrlParams((_a = {}, _a[saveActiveKeyName] = arrayChildren[0].key, _a));
163
- setTabActiveKey(arrayChildren[0].key);
159
+ if (!resultActiveTab || resultActiveTab.disabled) {
160
+ setUrlParams((_a = {}, _a[saveActiveKeyName] = items[0].key, _a));
161
+ setTabActiveKey(items[0].key);
164
162
  }
165
163
  }
166
164
  }, [tabActiveKey]);
@@ -172,29 +170,29 @@ var KeepTab = function KeepTab(props) {
172
170
  setTabActiveKey(nextActiveKey);
173
171
  };
174
172
 
175
- var resultChildren = arrayChildren.map(function (childItem) {
176
- var _a;
177
-
178
- var count = (_a = childItem === null || childItem === void 0 ? void 0 : childItem.props) === null || _a === void 0 ? void 0 : _a.count;
173
+ var resultItems = items.map(function (item) {
174
+ var count = item === null || item === void 0 ? void 0 : item.count;
179
175
 
180
176
  if (count) {
181
- return React.cloneElement(childItem, {
182
- tab: React.createElement(badge_1["default"], __assign({
177
+ return __assign(__assign({}, item), {
178
+ label: React.createElement(badge_1["default"], __assign({
183
179
  className: "tab-badge",
184
180
  count: count,
185
181
  offset: [16, -9]
186
- }, badgeProps), React.createElement("span", null, childItem.props.tab))
182
+ }, badgeProps), React.createElement("span", null, item.label))
187
183
  });
188
184
  }
189
185
 
190
- return childItem;
186
+ return item;
191
187
  });
192
188
  return React.createElement(tabs_1["default"], __assign({
193
189
  animated: false,
194
190
  onChange: handleTabChange,
195
191
  destroyInactiveTabPane: true,
196
192
  activeKey: tabActiveKey
197
- }, restProps), resultChildren);
193
+ }, restProps, {
194
+ items: resultItems
195
+ }));
198
196
  };
199
197
 
200
198
  KeepTab.defaultProps = {
@@ -589,7 +589,7 @@
589
589
  margin: 0 0 0 32px;
590
590
  }
591
591
  .ant-tabs-content {
592
- display: flex;
592
+ position: relative;
593
593
  width: 100%;
594
594
  }
595
595
  .ant-tabs-content-holder {
@@ -597,14 +597,37 @@
597
597
  min-width: 0;
598
598
  min-height: 0;
599
599
  }
600
- .ant-tabs-content-animated {
601
- transition: margin 0.3s;
602
- }
603
600
  .ant-tabs-tabpane {
604
- flex: none;
605
- width: 100%;
606
601
  outline: none;
607
602
  }
603
+ .ant-tabs-tabpane-hidden {
604
+ display: none;
605
+ }
606
+ .ant-tabs-switch-appear,
607
+ .ant-tabs-switch-enter {
608
+ transition: none;
609
+ }
610
+ .ant-tabs-switch-appear-start,
611
+ .ant-tabs-switch-enter-start {
612
+ opacity: 0;
613
+ }
614
+ .ant-tabs-switch-appear-active,
615
+ .ant-tabs-switch-enter-active {
616
+ opacity: 1;
617
+ transition: opacity 0.3s;
618
+ }
619
+ .ant-tabs-switch-leave {
620
+ position: absolute;
621
+ transition: none;
622
+ inset: 0;
623
+ }
624
+ .ant-tabs-switch-leave-start {
625
+ opacity: 1;
626
+ }
627
+ .ant-tabs-switch-leave-active {
628
+ opacity: 0;
629
+ transition: opacity 0.3s;
630
+ }
608
631
  .ant-badge {
609
632
  box-sizing: border-box;
610
633
  margin: 0;
@@ -137,6 +137,7 @@ textarea.ant-input-affix-wrapper {
137
137
  }
138
138
  .ant-input-affix-wrapper > input.ant-input {
139
139
  padding: 0;
140
+ font-size: inherit;
140
141
  border: none;
141
142
  outline: none;
142
143
  }
@@ -835,18 +836,21 @@ textarea.ant-input {
835
836
  }
836
837
  .ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),
837
838
  .ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary) {
838
- border-right-color: #40a9ff;
839
839
  border-left-color: #d9d9d9;
840
840
  }
841
+ .ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover,
842
+ .ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover {
843
+ border-left-color: #40a9ff;
844
+ }
841
845
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper:hover,
842
846
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper-focused {
843
847
  border-right-color: #40a9ff;
844
848
  }
845
- .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon {
849
+ .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child {
846
850
  right: -1px;
847
851
  left: auto;
848
852
  }
849
- .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon .ant-input-search-button {
853
+ .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child .ant-input-search-button {
850
854
  border-radius: 2px 0 0 2px;
851
855
  }
852
856
  @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -36,7 +36,7 @@
36
36
  "@types/react-color": "^3.0.6",
37
37
  "@types/react-resizable": "^3.0.0",
38
38
  "a-icons": "^1.0.85",
39
- "aa-utils": "^2.1.1",
39
+ "aa-utils": "^2.1.2",
40
40
  "ahooks": "^3.0.8",
41
41
  "bignumber.js": "^9.0.1",
42
42
  "copy-to-clipboard": "^3.3.1",
@@ -80,5 +80,5 @@
80
80
  "node": ">=10.0.0"
81
81
  },
82
82
  "license": "MIT",
83
- "gitHead": "f03afb181ccccb9771f5f66a9ea5b3f6126af144"
83
+ "gitHead": "2ce6eb6963fe4e76339db39c5be66460b5e93c9a"
84
84
  }
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import type { SelectProps } from 'antd/lib/select';
3
- export interface ASelectProps extends SelectProps {
4
- className?: string;
5
- valueRender?: (value: any) => React.ReactNode;
6
- }
7
- declare const ASelect: {
8
- (props: ASelectProps): JSX.Element;
9
- Option: import("rc-select/lib/Option").OptionFC;
10
- };
11
- export default ASelect;
@@ -1,2 +0,0 @@
1
- import 'antd/lib/select/style';
2
- import './index.less';
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export declare type AreaTextProps = {
3
- className?: string;
4
- value?: string;
5
- };
6
- declare const AreaText: React.FC<AreaTextProps>;
7
- export default AreaText;
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,2 +0,0 @@
1
- import * as beautifulDnd from 'react-beautiful-dnd';
2
- export default beautifulDnd;
@@ -1 +0,0 @@
1
-
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import type { DrawerProps } from 'antd/lib/drawer';
3
- export declare type DrawerAction = {
4
- close: () => void;
5
- open: () => void;
6
- };
7
- export interface ButtonDrawerProps extends Omit<DrawerProps, 'children'> {
8
- onClose?: () => void;
9
- onOpen?: () => void;
10
- trigger: React.ReactElement;
11
- children: ((v: DrawerAction) => React.ReactElement) | React.ReactElement;
12
- }
13
- declare const ForwardRefButtonDrawer: React.ForwardRefExoticComponent<ButtonDrawerProps & React.RefAttributes<unknown>>;
14
- export default ForwardRefButtonDrawer;
@@ -1 +0,0 @@
1
- import 'antd/lib/drawer/style';
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import type { ModalProps } from 'antd/lib/modal';
3
- export interface ModalAction {
4
- open: () => void;
5
- close: () => void;
6
- }
7
- export interface ButtonModalProps extends Omit<ModalProps, 'children'> {
8
- onClose?: () => void;
9
- onOpen?: () => void;
10
- trigger?: React.ReactElement;
11
- children: ((v: ModalAction) => React.ReactElement) | React.ReactElement;
12
- }
13
- declare const ForwardRefButtonModal: React.ForwardRefExoticComponent<ButtonModalProps & React.RefAttributes<unknown>>;
14
- export default ForwardRefButtonModal;
@@ -1 +0,0 @@
1
- import 'antd/lib/modal/style';
@@ -1,23 +0,0 @@
1
- import type { SketchPickerProps } from 'react-color';
2
- import React from 'react';
3
- import type { TriggerProps } from 'rc-trigger';
4
- export declare type ColorSelectProps = {
5
- value?: {
6
- hex?: string;
7
- rgb?: string;
8
- };
9
- /** 自定义总容器 class */
10
- classNameWrap?: string;
11
- /** 自定义其余描述展示 */
12
- renderExtra?: (value: ColorSelectProps['value']) => React.ReactElement;
13
- /** 自定义value class */
14
- className?: string;
15
- /** 组件react-color的props */
16
- reactColorProps?: Omit<SketchPickerProps, 'onChange'>;
17
- /** 组件rc-trigger */
18
- RcTriggerProps?: Omit<TriggerProps, 'popup'>;
19
- /** 自定义value的展示 */
20
- renderValueNode?: (value: ColorSelectProps['value']) => React.ReactElement;
21
- };
22
- declare const ColorSelect: React.FC<ColorSelectProps>;
23
- export default ColorSelect;
@@ -1,2 +0,0 @@
1
- import 'rc-trigger/assets/index.css';
2
- import './index.less';