@kdcloudjs/kdesign 1.7.31 → 1.7.33-stable.10

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 (341) hide show
  1. package/CHANGELOG.md +1809 -0
  2. package/dist/kdesign-complete.less +20 -18
  3. package/dist/kdesign.css +10 -11
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +2473 -3114
  6. package/dist/kdesign.js.map +1 -1
  7. package/dist/kdesign.min.css +3 -3
  8. package/dist/kdesign.min.js +7 -7
  9. package/dist/kdesign.min.js.map +1 -1
  10. package/es/_utils/usePopper.d.ts +1 -1
  11. package/es/carousel/slidebar.d.ts +2 -2
  12. package/es/checkbox/checkbox.js +7 -7
  13. package/es/checkbox/style/index.css +0 -4
  14. package/es/checkbox/style/index.less +0 -4
  15. package/es/city-picker/city-picker.js +10 -9
  16. package/es/config-provider/compDefaultProps.d.ts +3 -3
  17. package/es/date-picker/calendar.d.ts +2 -2
  18. package/es/date-picker/date-panel.d.ts +1 -1
  19. package/es/date-picker/panel/date-time/date-time.d.ts +1 -1
  20. package/es/date-picker/panel/header/header.d.ts +1 -1
  21. package/es/date-picker/panel/month/month.d.ts +2 -2
  22. package/es/date-picker/panel/quarter/quarter.d.ts +2 -2
  23. package/es/date-picker/panel/time/time-column.d.ts +1 -1
  24. package/es/date-picker/panel/time/time.d.ts +2 -2
  25. package/es/date-picker/panel/week/week.d.ts +2 -2
  26. package/es/date-picker/panel/year/year.d.ts +2 -2
  27. package/es/date-picker/utils/get-extra-footer.d.ts +1 -1
  28. package/es/date-picker/utils/get-ranges.d.ts +2 -2
  29. package/es/empty/defaultEmptyImg.d.ts +2 -2
  30. package/es/empty/illustrationEmptyImg.d.ts +2 -2
  31. package/es/input/TextArea.js +16 -8
  32. package/es/input/style/index.css +3 -0
  33. package/es/input/style/index.less +9 -5
  34. package/es/input-number/inputNumber.js +47 -20
  35. package/es/input-number/useSelectionRange.d.ts +2 -1
  36. package/es/input-number/useSelectionRange.js +3 -2
  37. package/es/select/select.js +3 -9
  38. package/es/select/style/index.css +6 -6
  39. package/es/select/style/index.less +11 -9
  40. package/es/slider/marks.d.ts +1 -1
  41. package/es/slider/steps.d.ts +1 -1
  42. package/es/slider/track.d.ts +2 -2
  43. package/es/table/feature/useRowDrag.d.ts +3 -0
  44. package/es/table/feature/useRowDrag.js +10 -0
  45. package/es/table/interface.d.ts +3 -1
  46. package/es/table/table.js +4 -1
  47. package/es/transfer/operation.d.ts +1 -1
  48. package/es/tree/tree.d.ts +1 -0
  49. package/es/tree/tree.js +11 -10
  50. package/es/tree/treeHooks.d.ts +2 -2
  51. package/es/tree/treeHooks.js +11 -6
  52. package/es/tree/utils/treeUtils.d.ts +2 -2
  53. package/es/tree/utils/treeUtils.js +5 -6
  54. package/es/tree-select/tree-select.js +5 -2
  55. package/lib/_utils/KeyCode.js +2 -1
  56. package/lib/_utils/arrayUtil.js +5 -3
  57. package/lib/_utils/index.js +3 -2
  58. package/lib/_utils/raf.js +4 -2
  59. package/lib/_utils/reactNode.js +2 -1
  60. package/lib/_utils/resizeObserver.js +2 -1
  61. package/lib/_utils/type.js +5 -3
  62. package/lib/_utils/usePopper.d.ts +1 -1
  63. package/lib/_utils/usePopper.js +6 -3
  64. package/lib/alert/alert.js +6 -3
  65. package/lib/alert/index.js +2 -1
  66. package/lib/anchor/anchor-link.js +2 -1
  67. package/lib/anchor/anchor.js +4 -2
  68. package/lib/anchor/context.js +2 -1
  69. package/lib/anchor/index.js +2 -1
  70. package/lib/avatar/avatar.js +6 -3
  71. package/lib/avatar/index.js +2 -1
  72. package/lib/badge/badge.js +6 -3
  73. package/lib/badge/index.js +2 -1
  74. package/lib/base-data/base-data.js +2 -1
  75. package/lib/base-data/index.js +2 -1
  76. package/lib/base-data/interface.js +2 -1
  77. package/lib/button/button.js +12 -6
  78. package/lib/button/group.js +4 -2
  79. package/lib/button/index.js +2 -1
  80. package/lib/card/card.js +2 -1
  81. package/lib/card/index.js +2 -1
  82. package/lib/carousel/carousel.js +6 -3
  83. package/lib/carousel/displayList.js +3 -2
  84. package/lib/carousel/fadeList.js +3 -2
  85. package/lib/carousel/index.js +2 -1
  86. package/lib/carousel/slideList.js +3 -2
  87. package/lib/carousel/slidebar.d.ts +2 -2
  88. package/lib/carousel/slidebar.js +3 -2
  89. package/lib/cascader/cascader.js +4 -2
  90. package/lib/cascader/index.js +2 -1
  91. package/lib/cascader/util.js +24 -12
  92. package/lib/checkbox/checkbox.js +9 -8
  93. package/lib/checkbox/group.js +8 -7
  94. package/lib/checkbox/index.js +2 -1
  95. package/lib/checkbox/style/index.css +0 -4
  96. package/lib/checkbox/style/index.less +0 -4
  97. package/lib/city-picker/city-picker.js +12 -10
  98. package/lib/city-picker/index.js +2 -1
  99. package/lib/city-picker/interface.js +4 -2
  100. package/lib/city-picker/option.js +2 -1
  101. package/lib/collapse/collapse.js +4 -2
  102. package/lib/collapse/index.js +2 -1
  103. package/lib/collapse/panel.js +2 -1
  104. package/lib/color-picker/color-picker-panel.js +2 -1
  105. package/lib/color-picker/color-picker.js +2 -1
  106. package/lib/color-picker/constant/colorTypes.js +3 -2
  107. package/lib/color-picker/constant/defaultColor.js +2 -1
  108. package/lib/color-picker/constant/systemPresetColor.js +2 -1
  109. package/lib/color-picker/index.js +2 -1
  110. package/lib/color-picker/interface.js +4 -2
  111. package/lib/color-picker/utils/colorFormat.js +13 -7
  112. package/lib/color-picker/utils/hooks/useOnClickOutside.js +2 -1
  113. package/lib/config-provider/ConfigContext.js +2 -1
  114. package/lib/config-provider/SizeContext.js +4 -2
  115. package/lib/config-provider/compDefaultProps.d.ts +3 -3
  116. package/lib/config-provider/compDefaultProps.js +2 -1
  117. package/lib/config-provider/configProvider.js +2 -1
  118. package/lib/config-provider/defaultConfig.js +2 -1
  119. package/lib/config-provider/index.js +2 -1
  120. package/lib/date-picker/calendar.d.ts +2 -2
  121. package/lib/date-picker/calendar.js +2 -1
  122. package/lib/date-picker/context.js +2 -1
  123. package/lib/date-picker/date-panel.d.ts +1 -1
  124. package/lib/date-picker/date-panel.js +2 -1
  125. package/lib/date-picker/date-picker.js +2 -1
  126. package/lib/date-picker/index.js +2 -1
  127. package/lib/date-picker/locale/zh_CN.js +2 -1
  128. package/lib/date-picker/panel/date-time/date-time.d.ts +1 -1
  129. package/lib/date-picker/panel/date-time/date-time.js +2 -1
  130. package/lib/date-picker/panel/header/header.d.ts +1 -1
  131. package/lib/date-picker/panel/header/header.js +2 -1
  132. package/lib/date-picker/panel/month/month.d.ts +2 -2
  133. package/lib/date-picker/panel/month/month.js +2 -1
  134. package/lib/date-picker/panel/quarter/quarter.d.ts +2 -2
  135. package/lib/date-picker/panel/quarter/quarter.js +2 -1
  136. package/lib/date-picker/panel/time/time-column.d.ts +1 -1
  137. package/lib/date-picker/panel/time/time-column.js +8 -8
  138. package/lib/date-picker/panel/time/time.d.ts +2 -2
  139. package/lib/date-picker/panel/time/time.js +2 -1
  140. package/lib/date-picker/panel/week/week.d.ts +2 -2
  141. package/lib/date-picker/panel/week/week.js +2 -1
  142. package/lib/date-picker/panel/year/year.d.ts +2 -2
  143. package/lib/date-picker/panel/year/year.js +2 -1
  144. package/lib/date-picker/popper.js +2 -1
  145. package/lib/date-picker/range/input-range.js +2 -1
  146. package/lib/date-picker/range-picker.js +2 -1
  147. package/lib/date-picker/single/input-date.js +2 -1
  148. package/lib/date-picker/utils/date-fns.js +8 -9
  149. package/lib/date-picker/utils/get-extra-footer.d.ts +1 -1
  150. package/lib/date-picker/utils/get-ranges.d.ts +2 -2
  151. package/lib/date-picker/utils/index.js +7 -4
  152. package/lib/drawer/drawer.js +4 -2
  153. package/lib/drawer/index.js +2 -1
  154. package/lib/dropdown/dropdown.js +2 -1
  155. package/lib/dropdown/index.js +2 -1
  156. package/lib/dropdown/menu.js +4 -2
  157. package/lib/empty/defaultEmptyImg.d.ts +2 -2
  158. package/lib/empty/defaultEmptyImg.js +2 -1
  159. package/lib/empty/empty.js +2 -1
  160. package/lib/empty/illustrationEmptyImg.d.ts +2 -2
  161. package/lib/empty/illustrationEmptyImg.js +2 -1
  162. package/lib/empty/index.js +2 -1
  163. package/lib/filter/condition.js +2 -1
  164. package/lib/filter/filter.js +2 -1
  165. package/lib/filter/index.js +2 -1
  166. package/lib/filter/scheme.js +2 -1
  167. package/lib/form/Field.js +4 -2
  168. package/lib/form/FieldContext.js +2 -1
  169. package/lib/form/FieldLabel.js +2 -1
  170. package/lib/form/FieldWrapper.js +2 -1
  171. package/lib/form/Form.js +2 -1
  172. package/lib/form/FormContext.js +4 -2
  173. package/lib/form/hooks/useForceUpdate.js +2 -1
  174. package/lib/form/hooks/useForm.js +4 -2
  175. package/lib/form/index.js +2 -1
  176. package/lib/grid/col.js +2 -1
  177. package/lib/grid/row.js +4 -2
  178. package/lib/icon/icon.js +2 -1
  179. package/lib/icon/index.js +2 -1
  180. package/lib/icon/interface.js +6 -3
  181. package/lib/image/image.js +2 -1
  182. package/lib/image/index.js +2 -1
  183. package/lib/image/preview-group.js +2 -1
  184. package/lib/image/preview.js +2 -1
  185. package/lib/image-cropper/cropper.js +4 -2
  186. package/lib/image-cropper/image-cropper.js +2 -1
  187. package/lib/image-cropper/index.js +2 -1
  188. package/lib/image-cropper/operation-bar.js +2 -1
  189. package/lib/input/ClearableLabeledInput.js +2 -1
  190. package/lib/input/TextArea.js +18 -9
  191. package/lib/input/index.js +2 -1
  192. package/lib/input/input.js +6 -3
  193. package/lib/input/style/index.css +3 -0
  194. package/lib/input/style/index.less +9 -5
  195. package/lib/input-number/index.js +2 -1
  196. package/lib/input-number/inputNumber.js +49 -21
  197. package/lib/input-number/useSelectionRange.d.ts +2 -1
  198. package/lib/input-number/useSelectionRange.js +3 -2
  199. package/lib/layout/index.js +2 -1
  200. package/lib/layout/layout.js +10 -5
  201. package/lib/layout/sider.js +12 -11
  202. package/lib/link/index.js +2 -1
  203. package/lib/link/link.js +4 -2
  204. package/lib/locale/index.js +2 -1
  205. package/lib/locale/locale.js +7 -4
  206. package/lib/locale/zh-CN.js +2 -1
  207. package/lib/menu/index.js +2 -1
  208. package/lib/menu/menu.js +2 -1
  209. package/lib/menu/menuItem.js +4 -2
  210. package/lib/menu/subMenu.js +2 -1
  211. package/lib/menu/util.js +16 -8
  212. package/lib/message/content.js +2 -1
  213. package/lib/message/index.js +2 -1
  214. package/lib/modal/index.js +2 -1
  215. package/lib/modal/modal.js +6 -3
  216. package/lib/notification/content.js +2 -1
  217. package/lib/notification/index.js +2 -1
  218. package/lib/notification-base/index.js +2 -1
  219. package/lib/notification-base/notice.js +4 -2
  220. package/lib/notification-base/notification.js +2 -1
  221. package/lib/pagination/index.js +2 -1
  222. package/lib/pagination/pagination.js +6 -3
  223. package/lib/popconfirm/index.js +2 -1
  224. package/lib/popconfirm/popconfirm.js +2 -1
  225. package/lib/progress/circle.js +2 -1
  226. package/lib/progress/index.js +2 -1
  227. package/lib/progress/line.js +2 -1
  228. package/lib/progress/progress.js +6 -3
  229. package/lib/progress/utils.js +5 -3
  230. package/lib/radio/context.js +4 -2
  231. package/lib/radio/group.js +2 -1
  232. package/lib/radio/index.js +2 -1
  233. package/lib/radio/radio-button.js +2 -1
  234. package/lib/radio/radio.js +2 -1
  235. package/lib/rate/index.js +2 -1
  236. package/lib/rate/rate.js +4 -2
  237. package/lib/search/index.js +2 -1
  238. package/lib/search/interface.js +6 -3
  239. package/lib/search/option.js +2 -1
  240. package/lib/search/quick-search.js +2 -1
  241. package/lib/search/search-panel.js +2 -1
  242. package/lib/search/search.js +2 -1
  243. package/lib/select/index.js +2 -1
  244. package/lib/select/interface.js +6 -3
  245. package/lib/select/option.js +2 -1
  246. package/lib/select/select.js +5 -10
  247. package/lib/select/style/index.css +6 -6
  248. package/lib/select/style/index.less +11 -9
  249. package/lib/slider/index.js +2 -1
  250. package/lib/slider/marks.d.ts +1 -1
  251. package/lib/slider/marks.js +2 -1
  252. package/lib/slider/slider.js +2 -1
  253. package/lib/slider/sliderTooltip.js +2 -1
  254. package/lib/slider/steps.d.ts +1 -1
  255. package/lib/slider/steps.js +2 -1
  256. package/lib/slider/track.d.ts +2 -2
  257. package/lib/slider/track.js +2 -1
  258. package/lib/space/index.js +2 -1
  259. package/lib/space/space.js +2 -1
  260. package/lib/spin/index.js +2 -1
  261. package/lib/spin/spin.js +4 -2
  262. package/lib/split-panel/index.js +2 -1
  263. package/lib/split-panel/split-panel.js +4 -2
  264. package/lib/split-panel/trigger.js +2 -1
  265. package/lib/stepper/index.js +2 -1
  266. package/lib/stepper/stepper.js +4 -2
  267. package/lib/steps/Step.js +2 -1
  268. package/lib/steps/Steps.js +2 -1
  269. package/lib/steps/index.js +2 -1
  270. package/lib/steps/interface.js +6 -3
  271. package/lib/switch/index.js +2 -1
  272. package/lib/switch/switch.js +4 -2
  273. package/lib/table/feature/autoRowSpan.js +2 -1
  274. package/lib/table/feature/colGroupExtendable.js +2 -1
  275. package/lib/table/feature/columnDrag.js +2 -1
  276. package/lib/table/feature/columnResize.js +2 -1
  277. package/lib/table/feature/contextMenu.js +2 -1
  278. package/lib/table/feature/filter.js +2 -1
  279. package/lib/table/feature/mergeCellHover.js +2 -1
  280. package/lib/table/feature/rowDetail.js +2 -1
  281. package/lib/table/feature/rowSelection.js +2 -1
  282. package/lib/table/feature/sort.js +2 -1
  283. package/lib/table/feature/treeMode.js +2 -1
  284. package/lib/table/feature/useFooterDataSource.js +2 -1
  285. package/lib/table/feature/useRangeSelection.js +2 -1
  286. package/lib/table/feature/useRowDrag.d.ts +3 -0
  287. package/lib/table/feature/useRowDrag.js +18 -0
  288. package/lib/table/index.js +2 -1
  289. package/lib/table/interface.d.ts +3 -1
  290. package/lib/table/table.js +6 -2
  291. package/lib/tabs/active-line.js +2 -1
  292. package/lib/tabs/arrow-button.js +2 -1
  293. package/lib/tabs/context.js +4 -2
  294. package/lib/tabs/index.js +2 -1
  295. package/lib/tabs/tab-pane.js +4 -2
  296. package/lib/tabs/tabs.js +10 -5
  297. package/lib/tag/index.js +2 -1
  298. package/lib/tag/tag.js +8 -4
  299. package/lib/timeline/Timeline.js +2 -1
  300. package/lib/timeline/TimelineItem.js +2 -1
  301. package/lib/timeline/index.js +2 -1
  302. package/lib/tooltip/index.js +2 -1
  303. package/lib/tooltip/tooltip.js +2 -1
  304. package/lib/transfer/index.js +2 -1
  305. package/lib/transfer/list-body.js +4 -2
  306. package/lib/transfer/list-item.js +2 -1
  307. package/lib/transfer/list.js +2 -1
  308. package/lib/transfer/operation.d.ts +1 -1
  309. package/lib/transfer/operation.js +2 -1
  310. package/lib/transfer/search.js +2 -1
  311. package/lib/transfer/transfer.js +2 -1
  312. package/lib/tree/index.js +2 -1
  313. package/lib/tree/tree.d.ts +1 -0
  314. package/lib/tree/tree.js +13 -11
  315. package/lib/tree/treeHooks.d.ts +2 -2
  316. package/lib/tree/treeHooks.js +24 -12
  317. package/lib/tree/treeNode.js +2 -1
  318. package/lib/tree/utils/treeUtils.d.ts +2 -2
  319. package/lib/tree/utils/treeUtils.js +54 -31
  320. package/lib/tree-select/index.js +2 -1
  321. package/lib/tree-select/interface.js +6 -3
  322. package/lib/tree-select/tree-select.js +9 -5
  323. package/lib/typography/base.js +4 -2
  324. package/lib/typography/index.js +2 -1
  325. package/lib/typography/paragraph.js +2 -1
  326. package/lib/typography/text.js +2 -1
  327. package/lib/typography/title.js +4 -2
  328. package/lib/typography/typography.js +2 -1
  329. package/lib/upload/dragger.js +2 -1
  330. package/lib/upload/index.js +2 -1
  331. package/lib/upload/scan-files.js +2 -1
  332. package/lib/upload/upload.js +2 -1
  333. package/lib/upload/verify-file.js +3 -2
  334. package/lib/view-container/context.js +4 -2
  335. package/lib/view-container/index.js +2 -1
  336. package/lib/view-container/view-container.js +2 -1
  337. package/lib/virtual-list/Filler.js +2 -1
  338. package/lib/virtual-list/index.js +2 -1
  339. package/lib/virtual-list/utils/itemUtil.js +2 -1
  340. package/lib/virtual-list/virtual-list.js +2 -1
  341. package/package.json +3 -3
@@ -27,5 +27,5 @@ export interface PopperProps {
27
27
  getPopupContainer?: (locatorNode: HTMLElement) => HTMLElement;
28
28
  onTransitionEnd?: (e: React.TransitionEvent) => void;
29
29
  }
30
- declare function usePopper(locatorElement: React.ReactElement, popperElement: React.ReactElement, props: PopperProps): React.JSX.Element;
30
+ declare function usePopper(locatorElement: React.ReactElement, popperElement: React.ReactElement, props: PopperProps): JSX.Element;
31
31
  export default usePopper;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export interface slideProps {
3
3
  currentIndex: number;
4
4
  dotPosition?: string;
@@ -10,4 +10,4 @@ export interface slideProps {
10
10
  parentPrefixCls?: string;
11
11
  onClick: (index: number) => void;
12
12
  }
13
- export declare const Slidebar: (props: slideProps) => React.JSX.Element;
13
+ export declare const Slidebar: (props: slideProps) => JSX.Element;
@@ -20,7 +20,7 @@ import isBoolean from 'lodash/isBoolean';
20
20
  import Icon from '../icon';
21
21
  import devWarning from '../_utils/devwarning';
22
22
  var InternalCheckbox = function InternalCheckbox(props, ref) {
23
- var _context, _context2, _context3, _classNames, _context4, _context5, _context6, _context7, _classNames2, _context8, _context9, _context10, _context11, _context12, _context13, _context14, _context15, _classNames4, _context16, _context17, _context18, _classNames5, _context19;
23
+ var _context, _context2, _context3, _classNames, _context4, _context5, _context6, _context7, _classNames2, _context8, _context9, _context10, _context11, _context12, _context13, _context14, _classNames4, _context15, _context16, _context17, _classNames5, _context18;
24
24
  var _useContext = useContext(ConfigContext),
25
25
  getPrefixCls = _useContext.getPrefixCls,
26
26
  prefixCls = _useContext.prefixCls,
@@ -67,9 +67,9 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
67
67
  var getSquareClassName = classNames(className, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(checkboxPrefixCls), true), _defineProperty(_classNames2, _concatInstanceProperty(_context4 = "".concat(checkboxPrefixCls, "-")).call(_context4, mergedCheckboxType), true), _defineProperty(_classNames2, _concatInstanceProperty(_context5 = "".concat(checkboxPrefixCls, "-")).call(_context5, mergedSize), !!children), _defineProperty(_classNames2, _concatInstanceProperty(_context6 = "".concat(checkboxPrefixCls, "-")).call(_context6, mergedCheckboxType, "-disabled"), mergedDisabled), _defineProperty(_classNames2, _concatInstanceProperty(_context7 = "".concat(checkboxPrefixCls, "-")).call(_context7, mergedCheckboxType, "-checked"), selected && !mergedDisabled), _defineProperty(_classNames2, "checked", selected), _classNames2));
68
68
  var getRootClassName = isDefaultType() ? getDefaultClassName : getSquareClassName;
69
69
  var inputClassName = classNames(_defineProperty({}, "".concat(checkboxPrefixCls, "-input"), true));
70
- var checkedWrapperClassName = classNames((_classNames4 = {}, _defineProperty(_classNames4, _concatInstanceProperty(_context8 = "".concat(checkboxPrefixCls, "-")).call(_context8, mergedCheckboxType, "-no-child"), !children), _defineProperty(_classNames4, _concatInstanceProperty(_context9 = "".concat(checkboxPrefixCls, "-")).call(_context9, mergedCheckboxType, "-wrapper"), true), _defineProperty(_classNames4, _concatInstanceProperty(_context10 = "".concat(checkboxPrefixCls, "-")).call(_context10, mergedCheckboxType, "-wrapper-size"), !!children), _defineProperty(_classNames4, _concatInstanceProperty(_context11 = "".concat(checkboxPrefixCls, "-")).call(_context11, mergedCheckboxType, "-margin"), !!children), _defineProperty(_classNames4, _concatInstanceProperty(_context12 = "".concat(checkboxPrefixCls, "-")).call(_context12, mergedCheckboxType, "-checked"), selected), _defineProperty(_classNames4, _concatInstanceProperty(_context13 = "".concat(checkboxPrefixCls, "-")).call(_context13, mergedCheckboxType, "-indeterminate"), getIndeterminate()), _defineProperty(_classNames4, _concatInstanceProperty(_context14 = "".concat(checkboxPrefixCls, "-")).call(_context14, mergedCheckboxType, "-disabled"), mergedDisabled && !selected), _defineProperty(_classNames4, _concatInstanceProperty(_context15 = "".concat(checkboxPrefixCls, "-")).call(_context15, mergedCheckboxType, "-checked-disabled"), mergedDisabled && selected), _classNames4));
71
- var triangleClassName = classNames((_classNames5 = {}, _defineProperty(_classNames5, _concatInstanceProperty(_context16 = "".concat(checkboxPrefixCls, "-")).call(_context16, mergedCheckboxType, "-triangle"), !selected), _defineProperty(_classNames5, _concatInstanceProperty(_context17 = "".concat(checkboxPrefixCls, "-")).call(_context17, mergedCheckboxType, "-triangle-checked"), selected), _defineProperty(_classNames5, _concatInstanceProperty(_context18 = "".concat(checkboxPrefixCls, "-")).call(_context18, mergedCheckboxType, "-triangle-disabled"), mergedDisabled), _classNames5));
72
- var innerIconClassName = classNames(_defineProperty({}, _concatInstanceProperty(_context19 = "".concat(checkboxPrefixCls, "-")).call(_context19, mergedCheckboxType, "-inner"), true));
70
+ var checkedWrapperClassName = classNames((_classNames4 = {}, _defineProperty(_classNames4, _concatInstanceProperty(_context8 = "".concat(checkboxPrefixCls, "-")).call(_context8, mergedCheckboxType, "-wrapper"), true), _defineProperty(_classNames4, _concatInstanceProperty(_context9 = "".concat(checkboxPrefixCls, "-")).call(_context9, mergedCheckboxType, "-wrapper-size"), true), _defineProperty(_classNames4, _concatInstanceProperty(_context10 = "".concat(checkboxPrefixCls, "-")).call(_context10, mergedCheckboxType, "-margin"), !!children), _defineProperty(_classNames4, _concatInstanceProperty(_context11 = "".concat(checkboxPrefixCls, "-")).call(_context11, mergedCheckboxType, "-checked"), selected), _defineProperty(_classNames4, _concatInstanceProperty(_context12 = "".concat(checkboxPrefixCls, "-")).call(_context12, mergedCheckboxType, "-indeterminate"), getIndeterminate()), _defineProperty(_classNames4, _concatInstanceProperty(_context13 = "".concat(checkboxPrefixCls, "-")).call(_context13, mergedCheckboxType, "-disabled"), mergedDisabled && !selected), _defineProperty(_classNames4, _concatInstanceProperty(_context14 = "".concat(checkboxPrefixCls, "-")).call(_context14, mergedCheckboxType, "-checked-disabled"), mergedDisabled && selected), _classNames4));
71
+ var triangleClassName = classNames((_classNames5 = {}, _defineProperty(_classNames5, _concatInstanceProperty(_context15 = "".concat(checkboxPrefixCls, "-")).call(_context15, mergedCheckboxType, "-triangle"), !selected), _defineProperty(_classNames5, _concatInstanceProperty(_context16 = "".concat(checkboxPrefixCls, "-")).call(_context16, mergedCheckboxType, "-triangle-checked"), selected), _defineProperty(_classNames5, _concatInstanceProperty(_context17 = "".concat(checkboxPrefixCls, "-")).call(_context17, mergedCheckboxType, "-triangle-disabled"), mergedDisabled), _classNames5));
72
+ var innerIconClassName = classNames(_defineProperty({}, _concatInstanceProperty(_context18 = "".concat(checkboxPrefixCls, "-")).call(_context18, mergedCheckboxType, "-inner"), true));
73
73
  var handleChange = function handleChange(e) {
74
74
  onChange && onChange(e);
75
75
  (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange) && (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange(value, e.target.checked, e));
@@ -96,7 +96,7 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
96
96
  };
97
97
  }, []);
98
98
  var getDefaultCheckbox = function getDefaultCheckbox() {
99
- var _context20, _context21;
99
+ var _context19, _context20;
100
100
  var inputProps = {
101
101
  type: 'checkbox',
102
102
  className: inputClassName,
@@ -121,7 +121,7 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
121
121
  className: innerIconClassName
122
122
  }, /*#__PURE__*/React.createElement(Icon, {
123
123
  type: "right-bold",
124
- className: _concatInstanceProperty(_context20 = "".concat(checkboxPrefixCls, "-")).call(_context20, mergedCheckboxType, "-inner-icon")
124
+ className: _concatInstanceProperty(_context19 = "".concat(checkboxPrefixCls, "-")).call(_context19, mergedCheckboxType, "-inner-icon")
125
125
  })) : null, /*#__PURE__*/React.createElement("input", _extends({
126
126
  type: "checkbox",
127
127
  ref: ref
@@ -133,7 +133,7 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
133
133
  className: innerIconClassName
134
134
  }, /*#__PURE__*/React.createElement(Icon, {
135
135
  type: "right-bold",
136
- className: _concatInstanceProperty(_context21 = "".concat(checkboxPrefixCls, "-")).call(_context21, mergedCheckboxType, "-inner-icon")
136
+ className: _concatInstanceProperty(_context20 = "".concat(checkboxPrefixCls, "-")).call(_context20, mergedCheckboxType, "-inner-icon")
137
137
  }))) : null)
138
138
  );
139
139
  };
@@ -334,10 +334,6 @@
334
334
  .kd-checkbox-default-margin {
335
335
  margin-right: var(--kd-c-checkbox-default-input-spacing-margin-right, 4px);
336
336
  }
337
- .kd-checkbox-default-no-child {
338
- height: 100%;
339
- width: 100%;
340
- }
341
337
  .kd-checkbox-default-checked-disabled {
342
338
  background-color: var(--kd-c-checkbox-default-color-background-disabled, #e5e5e5) !important;
343
339
  border-color: var(--kd-c-checkbox-default-color-background-disabled, #d9d9d9) !important;
@@ -200,10 +200,6 @@
200
200
  &-margin {
201
201
  margin-right: @checkbox-default-input-margin-right;
202
202
  }
203
- &-no-child {
204
- height: 100%;
205
- width: 100%;
206
- }
207
203
  &-checked-disabled {
208
204
  background-color: @checkbox-default-disabled-color-bg !important;
209
205
  border-color: @checkbox-default-disabled-color-border !important;
@@ -5,6 +5,7 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
5
5
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
6
6
  import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
7
7
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
8
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
8
9
  import React, { useContext, useRef, useEffect, useState, useCallback, useMemo } from 'react';
9
10
  import { useMergedState } from '../_utils/hooks';
10
11
  import classNames from 'classnames';
@@ -302,22 +303,22 @@ var InternalSelect = function InternalSelect(props, ref) {
302
303
  var symbol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ', ';
303
304
  if (!data) return null;
304
305
  if (isDomestic(type)) {
305
- var _context5;
306
+ var _context6, _context7;
306
307
  if (isCommon) {
307
308
  var _context3;
308
- var _curVal = (data === null || data === void 0 ? void 0 : data.province) ? data === null || data === void 0 ? void 0 : data.province : data === null || data === void 0 ? void 0 : data.country;
309
+ var _curVal = (data === null || data === void 0 ? void 0 : data.province) ? data === null || data === void 0 ? void 0 : data.province : (data === null || data === void 0 ? void 0 : data.country) || '';
309
310
  return _concatInstanceProperty(_context3 = "".concat(flag && _curVal ? symbol : '')).call(_context3, _curVal);
310
311
  }
311
312
  if (data === null || data === void 0 ? void 0 : data.type) {
312
- var _context4;
313
- var _curVal2 = data.type === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : data === null || data === void 0 ? void 0 : data.country;
314
- return _concatInstanceProperty(_context4 = "".concat(flag && _curVal2 ? symbol : '')).call(_context4, _curVal2);
313
+ var _context4, _context5;
314
+ var _curVal2 = (data.type === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : _filterInstanceProperty(_context4 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context4, Boolean).join(symbol)) || '';
315
+ return _concatInstanceProperty(_context5 = "".concat(flag && _curVal2 ? symbol : '')).call(_context5, _curVal2);
315
316
  }
316
- var curVal = tabsValue === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : data === null || data === void 0 ? void 0 : data.country;
317
- return _concatInstanceProperty(_context5 = "".concat(flag && curVal ? symbol : '')).call(_context5, curVal);
317
+ var curVal = tabsValue === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) || '' : _filterInstanceProperty(_context6 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context6, Boolean).join(symbol);
318
+ return _concatInstanceProperty(_context7 = "".concat(flag && curVal ? symbol : '')).call(_context7, curVal);
318
319
  } else {
319
- var _context6, _context7, _context8;
320
- return _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = _concatInstanceProperty(_context8 = "".concat(flag && ((data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country)) ? symbol : '')).call(_context8, data === null || data === void 0 ? void 0 : data.province)).call(_context7, (data === null || data === void 0 ? void 0 : data.country) && (data === null || data === void 0 ? void 0 : data.province) ? symbol : '')).call(_context6, data === null || data === void 0 ? void 0 : data.country);
320
+ var _context8, _context9;
321
+ return _concatInstanceProperty(_context8 = "".concat(flag && ((data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country)) ? symbol : '')).call(_context8, _filterInstanceProperty(_context9 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context9, Boolean).join(symbol));
321
322
  }
322
323
  }, [type, tabsValue]);
323
324
  var renderSingle = function renderSingle() {
@@ -245,7 +245,7 @@ declare const compDefaultProps: {
245
245
  RadioGroup: {};
246
246
  Rate: {
247
247
  allowHalf: boolean;
248
- icon: () => React.JSX.Element;
248
+ icon: () => JSX.Element;
249
249
  count: number;
250
250
  defaultValue: number;
251
251
  disabled: boolean;
@@ -333,7 +333,7 @@ declare const compDefaultProps: {
333
333
  disabled: boolean;
334
334
  draggable: boolean;
335
335
  virtual: boolean;
336
- switcherIcon: () => React.JSX.Element;
336
+ switcherIcon: () => JSX.Element;
337
337
  estimatedItemSize: number;
338
338
  expandOnClickNode: boolean;
339
339
  };
@@ -444,7 +444,7 @@ declare const compDefaultProps: {
444
444
  treeExpandOnClickNode: boolean;
445
445
  onlyExpandOnClickIcon: boolean;
446
446
  showSearch: boolean;
447
- switcherIcon: () => React.JSX.Element;
447
+ switcherIcon: () => JSX.Element;
448
448
  expandOnClickNode: boolean;
449
449
  listHeight: number;
450
450
  virtual: boolean;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { DateType, PickerMode, SharedTimeProps } from './interface';
3
3
  import { RangeShowTimeObject } from './range-picker';
4
4
  export interface CalendarProps {
@@ -9,5 +9,5 @@ export interface CalendarProps {
9
9
  showTime?: boolean | SharedTimeProps | RangeShowTimeObject;
10
10
  disabledDate?: (date: DateType) => boolean;
11
11
  }
12
- declare function Calendar(props: CalendarProps): React.JSX.Element;
12
+ declare function Calendar(props: CalendarProps): JSX.Element;
13
13
  export default Calendar;
@@ -49,5 +49,5 @@ declare type OmitType = Omit<PickerPanelBaseProps, 'picker'> & Omit<PickerPanelD
49
49
  interface MergedPickerPanelProps extends OmitType {
50
50
  picker?: PickerMode;
51
51
  }
52
- declare function Panel(props: MergedPickerPanelProps): React.JSX.Element;
52
+ declare function Panel(props: MergedPickerPanelProps): JSX.Element;
53
53
  export default Panel;
@@ -8,5 +8,5 @@ export interface DatetimePanelProps extends PanelSharedProps, Omit<CalendarProps
8
8
  showTime?: boolean | SharedTimeProps;
9
9
  defaultValue?: DateType;
10
10
  }
11
- declare function DatetimePanel(props: DatetimePanelProps): React.JSX.Element;
11
+ declare function DatetimePanel(props: DatetimePanelProps): JSX.Element;
12
12
  export default DatetimePanel;
@@ -11,5 +11,5 @@ export interface HeaderProps {
11
11
  onSuperPrev?: () => void;
12
12
  onSuperNext?: () => void;
13
13
  }
14
- declare function Header(props: HeaderProps): React.JSX.Element;
14
+ declare function Header(props: HeaderProps): JSX.Element;
15
15
  export default Header;
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { DateType } from '../../interface';
3
3
  export interface MonthProps {
4
4
  showFullMonth?: boolean;
5
5
  disabledDate?(date: DateType): boolean;
6
6
  }
7
- declare function Month(props: MonthProps): React.JSX.Element;
7
+ declare function Month(props: MonthProps): JSX.Element;
8
8
  export default Month;
@@ -1,7 +1,7 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { DateType } from '../../interface';
3
3
  interface QuarterProps {
4
4
  disabledDate?: (date: DateType) => boolean;
5
5
  }
6
- declare function Quarter(props: QuarterProps): React.JSX.Element;
6
+ declare function Quarter(props: QuarterProps): JSX.Element;
7
7
  export default Quarter;
@@ -13,5 +13,5 @@ export interface TimeUnitColumnProps {
13
13
  hideDisabledOptions?: boolean;
14
14
  onSelect?: (value: number) => void;
15
15
  }
16
- declare function TimeUnitColumn(props: TimeUnitColumnProps): React.JSX.Element;
16
+ declare function TimeUnitColumn(props: TimeUnitColumnProps): JSX.Element;
17
17
  export default TimeUnitColumn;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import { DateType, DisabledTimes, PanelSharedProps, PickerMode } from '../../interface';
3
3
  export interface SharedTimeProps extends DisabledTimes {
4
4
  format?: string;
@@ -17,5 +17,5 @@ export interface TimePanelProps extends PanelSharedProps, SharedTimeProps {
17
17
  format?: string;
18
18
  picker?: PickerMode;
19
19
  }
20
- declare function TimePanel(props: TimePanelProps): React.JSX.Element;
20
+ declare function TimePanel(props: TimePanelProps): JSX.Element;
21
21
  export default TimePanel;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { DateType, PickerMode } from '../../interface';
3
3
  export interface WeekProps {
4
4
  day: DateType;
@@ -7,5 +7,5 @@ export interface WeekProps {
7
7
  showTime?: boolean;
8
8
  disabledDate?: (date: DateType) => boolean;
9
9
  }
10
- declare function Week(props: WeekProps): React.JSX.Element;
10
+ declare function Week(props: WeekProps): JSX.Element;
11
11
  export default Week;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { DateType, PickerMode } from '../../interface';
3
3
  export interface YearProps {
4
4
  yearItemNumber: number;
@@ -7,5 +7,5 @@ export interface YearProps {
7
7
  disabledDate?: (date: DateType) => boolean;
8
8
  picker?: PickerMode;
9
9
  }
10
- declare function Year(props: YearProps): React.JSX.Element;
10
+ declare function Year(props: YearProps): JSX.Element;
11
11
  export default Year;
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  import { PanelMode } from '../interface';
3
- export default function getExtraFooter(prefixCls: string, mode: PanelMode, renderExtraFooter?: (mode: PanelMode) => React.ReactNode): React.JSX.Element | null;
3
+ export default function getExtraFooter(prefixCls: string, mode: PanelMode, renderExtraFooter?: (mode: PanelMode) => React.ReactNode): JSX.Element | null;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { Components, RangeList, InnerLocale } from '../interface';
3
3
  export interface RangesProps {
4
4
  prefixCls: string;
@@ -11,4 +11,4 @@ export interface RangesProps {
11
11
  showNow?: boolean;
12
12
  locale: InnerLocale;
13
13
  }
14
- export default function getRanges({ prefixCls, rangeList, components, needConfirmButton, onNow, onOk, okDisabled, showNow, locale, }: RangesProps): React.JSX.Element | null;
14
+ export default function getRanges({ prefixCls, rangeList, components, needConfirmButton, onNow, onOk, okDisabled, showNow, locale, }: RangesProps): JSX.Element | null;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- declare function DefaultEmptyImg(props: any): React.JSX.Element;
1
+ /// <reference types="react" />
2
+ declare function DefaultEmptyImg(props: any): JSX.Element;
3
3
  export default DefaultEmptyImg;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- declare function IllustrationEmptyImg(props: any): React.JSX.Element;
1
+ /// <reference types="react" />
2
+ declare function IllustrationEmptyImg(props: any): JSX.Element;
3
3
  export default IllustrationEmptyImg;
@@ -70,6 +70,10 @@ var InternalTextarea = function InternalTextarea(props, ref) {
70
70
  _useState6 = _slicedToArray(_useState5, 2),
71
71
  showNumberMark = _useState6[0],
72
72
  setShowNumberMark = _useState6[1];
73
+ var _useState7 = useState(false),
74
+ _useState8 = _slicedToArray(_useState7, 2),
75
+ numberMarkError = _useState8[0],
76
+ setNumberMarkError = _useState8[1];
73
77
  var resizeTextarea = useCallback(function () {
74
78
  if (!autoSize || !textareaRef.current) {
75
79
  return;
@@ -117,21 +121,25 @@ var InternalTextarea = function InternalTextarea(props, ref) {
117
121
  onChange && onChange(event);
118
122
  };
119
123
  var renderNumberMark = function renderNumberMark() {
120
- var enteredLength = value ? value.length : 0;
121
- if (enteredLength >= maxLength) {
122
- enteredLength = maxLength;
123
- }
124
- if (count && showNumberMark && !disabled && maxLength !== '' && maxLength >= 0) {
125
- var countClass = classNames("".concat(textAreaPrefixCls, "-textarea-mark"), _defineProperty({}, "".concat(textAreaPrefixCls, "-textarea-mark-inner"), countPosition === 'inner'));
124
+ if (count && (showNumberMark || numberMarkError) && !disabled && maxLength !== '' && maxLength >= 0) {
125
+ var _classNames;
126
+ var countClass = classNames("".concat(textAreaPrefixCls, "-textarea-mark"), (_classNames = {}, _defineProperty(_classNames, "".concat(textAreaPrefixCls, "-textarea-mark-inner"), countPosition === 'inner'), _defineProperty(_classNames, "".concat(textAreaPrefixCls, "-textarea-mark-error"), numberMarkError), _classNames));
126
127
  return /*#__PURE__*/React.createElement("div", {
127
128
  className: countClass
128
- }, enteredLength, "/", maxLength);
129
+ }, value ? value.length : 0, "/", maxLength);
129
130
  }
130
131
  return null;
131
132
  };
132
133
  useEffect(function () {
133
134
  resizeTextarea();
134
135
  }, [value, resizeTextarea]);
136
+ useEffect(function () {
137
+ if (value && maxLength && value.length > maxLength) {
138
+ setNumberMarkError(true);
139
+ } else {
140
+ setNumberMarkError(false);
141
+ }
142
+ }, [value]);
135
143
  useEffect(function () {
136
144
  if (propsValue !== undefined) {
137
145
  setValue(propsValue);
@@ -173,7 +181,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
173
181
  ref: textareaRef,
174
182
  disabled: disabled,
175
183
  style: _extends({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
176
- className: classNames("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _defineProperty(_classNames2, "".concat(prefixCls, "-error"), status === 'error'), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2), _defineProperty({}, className, className && !allowClear && !hadCount)),
184
+ className: classNames("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _defineProperty(_classNames2, "".concat(prefixCls, "-error"), status === 'error' || numberMarkError), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2), _defineProperty({}, className, className && !allowClear && !hadCount)),
177
185
  onChange: handleChange,
178
186
  onFocus: !disabled ? handleFocus : undefined,
179
187
  onBlur: !disabled ? handleBlur : undefined,
@@ -215,6 +215,9 @@ textarea {
215
215
  bottom: 5px;
216
216
  right: 8px;
217
217
  }
218
+ .kd-input-textarea-mark-error {
219
+ color: var(--kd-c-input-color-error, var(--kd-g-color-error, #fb2323));
220
+ }
218
221
  .kd-input-no-resize {
219
222
  resize: none;
220
223
  }
@@ -43,12 +43,16 @@ textarea {
43
43
  font-size: @input-small-font-size-inner;
44
44
  line-height: 18px;
45
45
  background-color: #fff;
46
- }
47
46
 
48
- &-mark-inner {
49
- top: auto;
50
- bottom: 5px;
51
- right: 8px;
47
+ &-inner {
48
+ top: auto;
49
+ bottom: 5px;
50
+ right: 8px;
51
+ }
52
+
53
+ &-error {
54
+ color: @input-error-color;
55
+ }
52
56
  }
53
57
  }
54
58
 
@@ -58,6 +58,14 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
58
58
  _useState2 = _slicedToArray(_useState, 2),
59
59
  inputValue = _useState2[0],
60
60
  setInputValue = _useState2[1];
61
+ var _useState3 = useState(1),
62
+ _useState4 = _slicedToArray(_useState3, 2),
63
+ forceUpdate = _useState4[0],
64
+ setForceUpdate = _useState4[1];
65
+ var _useState5 = useState(''),
66
+ _useState6 = _slicedToArray(_useState5, 2),
67
+ compositionValue = _useState6[0],
68
+ setCompositionValue = _useState6[1];
61
69
  var inputStatus = useRef({
62
70
  isHandleChange: false,
63
71
  inputFocused: false
@@ -67,6 +75,7 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
67
75
  var inputNumberRef = ref || thisInputNumberRef;
68
76
  var stepMouseDownDelayTimer = useRef(null);
69
77
  var stepMouseDownIntervalTimer = useRef(null);
78
+ var refIszComposition = useRef(false);
70
79
  var isScopeValid = function isScopeValid(value) {
71
80
  if (value === '') return true;
72
81
  var numberValue = parseFloat(value) || 0;
@@ -108,13 +117,20 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
108
117
  };
109
118
  var handleChange = function handleChange(event) {
110
119
  inputStatus.current.isHandleChange = true;
111
- var legalNumber = verifiValue(event.target.value);
112
- if (legalNumber === false) {
113
- return false;
120
+ var newValue = event.target.value;
121
+ if (!refIszComposition.current) {
122
+ compositionValue && setCompositionValue('');
123
+ var legalNumber = verifiValue(newValue);
124
+ if (legalNumber === false) {
125
+ setForceUpdate(forceUpdate + 1);
126
+ return false;
127
+ }
128
+ value === undefined && setInputValue(legalNumber);
129
+ onChange && onChange(handleEventAttachValue(event, numberMode ? Number(legalNumber) : legalNumber));
130
+ updateSelectionRangePosition(event);
131
+ } else {
132
+ setCompositionValue(newValue);
114
133
  }
115
- updateSelectionRangePosition(event);
116
- value === undefined && setInputValue(legalNumber);
117
- onChange && onChange(handleEventAttachValue(event, numberMode ? Number(legalNumber) : legalNumber));
118
134
  };
119
135
  var handleFocus = function handleFocus(event) {
120
136
  inputStatus.current.inputFocused = true;
@@ -151,23 +167,23 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
151
167
  if (decimalValueLength <= decimalLength && integerValueLength <= digitLength - decimalLength) {
152
168
  resultNumerical = numerical;
153
169
  } else if (integerValueLength > digitLength - decimalLength) {
154
- var _context;
155
- resultNumerical = _concatInstanceProperty(_context = "".concat(sign)).call(_context, integerValue.substr(0, digitLength - decimalLength));
170
+ var _context, _context2;
171
+ resultNumerical = mustInPrecisionScope ? inputValue : _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = "".concat(sign)).call(_context2, integerValue.substr(0, digitLength - decimalLength))).call(_context, decimalValue ? '.' + decimalValue : '');
156
172
  } else if (decimalValueLength > decimalLength) {
157
- var _context2, _context3;
158
- resultNumerical = _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "".concat(sign)).call(_context3, integerValue, ".")).call(_context2, decimalValue.substr(0, decimalLength));
173
+ var _context3, _context4;
174
+ resultNumerical = mustInPrecisionScope ? inputValue : _concatInstanceProperty(_context3 = _concatInstanceProperty(_context4 = "".concat(sign)).call(_context4, integerValue, ".")).call(_context3, decimalValue.substr(0, decimalLength));
159
175
  }
160
176
  } else if (typeof decimalLength !== 'number' && typeof digitLength === 'number') {
161
177
  if (integerValueLength >= digitLength) {
162
- var _context4;
163
- resultNumerical = _concatInstanceProperty(_context4 = "".concat(sign)).call(_context4, integerValue.substr(0, digitLength));
178
+ var _context5;
179
+ resultNumerical = _concatInstanceProperty(_context5 = "".concat(sign)).call(_context5, integerValue.substr(0, digitLength));
164
180
  } else {
165
- var _context5, _context6, _context7;
166
- resultNumerical = decimalValueLength ? _concatInstanceProperty(_context5 = _concatInstanceProperty(_context6 = "".concat(sign)).call(_context6, integerValue, ".")).call(_context5, decimalValue.substr(0, digitLength - integerValueLength)) : _concatInstanceProperty(_context7 = "".concat(sign)).call(_context7, integerValue);
181
+ var _context6, _context7, _context8;
182
+ resultNumerical = decimalValueLength ? _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = "".concat(sign)).call(_context7, integerValue, ".")).call(_context6, decimalValue.substr(0, digitLength - integerValueLength)) : _concatInstanceProperty(_context8 = "".concat(sign)).call(_context8, integerValue);
167
183
  }
168
184
  } else if (typeof decimalLength === 'number' && typeof digitLength !== 'number') {
169
- var _context8, _context9, _context10;
170
- resultNumerical = decimalValueLength ? _concatInstanceProperty(_context8 = _concatInstanceProperty(_context9 = "".concat(sign)).call(_context9, integerValue, ".")).call(_context8, decimalValue.substr(0, decimalLength)) : _concatInstanceProperty(_context10 = "".concat(sign)).call(_context10, integerValue);
185
+ var _context9, _context10, _context11;
186
+ resultNumerical = decimalValueLength ? _concatInstanceProperty(_context9 = _concatInstanceProperty(_context10 = "".concat(sign)).call(_context10, integerValue, ".")).call(_context9, decimalValue.substr(0, decimalLength)) : _concatInstanceProperty(_context11 = "".concat(sign)).call(_context11, integerValue);
171
187
  } else {
172
188
  resultNumerical = numerical;
173
189
  }
@@ -197,13 +213,13 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
197
213
  });
198
214
  };
199
215
  var handleKeyDown = function handleKeyDown(event) {
200
- var _context11;
216
+ var _context12;
201
217
  onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
202
218
  if (!stepOption || props.disabled || props.readOnly) {
203
219
  return;
204
220
  }
205
221
  var keyCode = event.keyCode;
206
- if (_includesInstanceProperty(_context11 = [38, 40]).call(_context11, keyCode)) {
222
+ if (_includesInstanceProperty(_context12 = [38, 40]).call(_context12, keyCode)) {
207
223
  event.preventDefault();
208
224
  handleStepChang(keyCode === 38 ? 'plus' : 'minus');
209
225
  }
@@ -310,11 +326,22 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
310
326
  }, [inputValue, formatter]);
311
327
  var updateSelectionRangePosition = useSelectionRange({
312
328
  inputElement: (_a = inputNumberRef.current) === null || _a === void 0 ? void 0 : _a.input,
313
- inputValue: displayedInputValue
329
+ inputValue: displayedInputValue,
330
+ forceUpdate: forceUpdate
314
331
  });
332
+ var handleComposition = function handleComposition(e) {
333
+ refIszComposition.current = e.type !== 'compositionend';
334
+ if (!refIszComposition.current) {
335
+ setCompositionValue('');
336
+ handleChange(e);
337
+ }
338
+ };
315
339
  return /*#__PURE__*/React.createElement(Input, _extends({}, others, {
340
+ onCompositionStart: handleComposition,
341
+ onCompositionUpdate: handleComposition,
342
+ onCompositionEnd: handleComposition,
316
343
  ref: inputNumberRef,
317
- value: displayedInputValue,
344
+ value: compositionValue || displayedInputValue,
318
345
  prefix: prefix,
319
346
  suffix: suffix,
320
347
  onChange: handleChange,
@@ -1,4 +1,5 @@
1
- export default function useSelectionRange({ inputElement, inputValue, }: {
1
+ export default function useSelectionRange({ inputElement, inputValue, forceUpdate, }: {
2
2
  inputElement: HTMLInputElement;
3
3
  inputValue: string;
4
+ forceUpdate: number;
4
5
  }): (event: any) => void;
@@ -2,7 +2,8 @@ import { useRef, useLayoutEffect } from 'react';
2
2
  import isNumber from 'lodash/isNumber';
3
3
  export default function useSelectionRange(_ref) {
4
4
  var inputElement = _ref.inputElement,
5
- inputValue = _ref.inputValue;
5
+ inputValue = _ref.inputValue,
6
+ forceUpdate = _ref.forceUpdate;
6
7
  var refSelectionPosition = useRef();
7
8
  useLayoutEffect(function () {
8
9
  var position = refSelectionPosition.current;
@@ -10,7 +11,7 @@ export default function useSelectionRange(_ref) {
10
11
  var start = Math.max(0, inputValue.length - position);
11
12
  inputElement.setSelectionRange(start, start);
12
13
  }
13
- }, [inputValue]);
14
+ }, [inputValue, forceUpdate]);
14
15
  return function (event) {
15
16
  var _event$target = event.target,
16
17
  end = _event$target.selectionEnd,
@@ -563,7 +563,7 @@ var InternalSelect = function InternalSelect(props, ref) {
563
563
  background: 'none'
564
564
  };
565
565
  var indeterminate = mulOptions.length > 0 && mulOptions.length < filledOptions.length;
566
- var checked = mulOptions.length === filledOptions.length;
566
+ var checked = mulOptions.length > 0 && mulOptions.length === filledOptions.length;
567
567
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
568
568
  className: dropDownCls,
569
569
  style: dropdownStyle,
@@ -577,7 +577,7 @@ var InternalSelect = function InternalSelect(props, ref) {
577
577
  onChange: handleSelectAll
578
578
  }, "\u5168\u9009"), /*#__PURE__*/React.createElement("span", {
579
579
  className: "".concat(selectPrefixCls, "-multiple-footer-hadSelected")
580
- }, "\u5DF2\u9009", /*#__PURE__*/React.createElement("span", null, selectedVal.length), "\u9879")) : null));
580
+ }, "\u5DF2\u9009", /*#__PURE__*/React.createElement("span", null, selectedVal === null || selectedVal === void 0 ? void 0 : selectedVal.length), "\u9879")) : null));
581
581
  };
582
582
  // 处理多选tag
583
583
  var handleMaxTagHolder = useCallback(function () {
@@ -773,17 +773,11 @@ var InternalSelect = function InternalSelect(props, ref) {
773
773
  selectedVal = _multipleRef$current5.selectedVal,
774
774
  selectMulOpts = _multipleRef$current5.selectMulOpts;
775
775
  // isMultiple
776
- if (which === KeyCode.BACKSPACE && !searchValue && isMultiple && selectedVal.length && selectMulOpts.length) {
776
+ if (which === KeyCode.BACKSPACE && !searchValue && isMultiple && (selectedVal === null || selectedVal === void 0 ? void 0 : selectedVal.length) && selectMulOpts.length) {
777
777
  _spliceInstanceProperty(selectedVal).call(selectedVal, -1, 1);
778
778
  _spliceInstanceProperty(selectMulOpts).call(selectMulOpts, -1, 1);
779
779
  setMulOptions(_toConsumableArray(selectMulOpts));
780
780
  onChange && onChange(labelInValue ? selectMulOpts : selectedVal, selectMulOpts);
781
- // !isMultiple
782
- } else if (which === KeyCode.BACKSPACE && allowClear && !isMultiple) {
783
- setInitValue('');
784
- onClear && onClear('');
785
- setSearchValue('');
786
- onChange && onChange(undefined);
787
781
  }
788
782
  // optionsList: up、down、enter
789
783
  if (optionShow) {
@@ -689,7 +689,7 @@
689
689
  width: 100%;
690
690
  padding: 0 12px;
691
691
  height: 40px;
692
- line-height: 40px;
692
+ line-height: 30px;
693
693
  border-top: 1px solid #d9d9d9;
694
694
  -webkit-box-sizing: border-box;
695
695
  box-sizing: border-box;
@@ -698,14 +698,14 @@
698
698
  color: #999999;
699
699
  padding-left: 12px;
700
700
  }
701
- .kd-select-multiple-footer-hadSelected-number {
701
+ .kd-select-multiple-footer-hadSelected > span {
702
702
  color: var(--kd-c-select-footer-color-text-selected, #0e5fd8);
703
703
  padding: 0 2px;
704
704
  }
705
- .kd-select.topLeft.hidden,
706
- .kd-select.bottomLeft.hidden,
707
- .kd-select.topRight.hidden,
708
- .kd-select.bottomRight.hidden {
705
+ .kd-select-dropdown-panel.topLeft.hidden,
706
+ .kd-select-dropdown-panel.bottomLeft.hidden,
707
+ .kd-select-dropdown-panel.topRight.hidden,
708
+ .kd-select-dropdown-panel.bottomRight.hidden {
709
709
  opacity: 0;
710
710
  visibility: hidden;
711
711
  -webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);