rsuite 5.0.0 → 5.1.0

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 (365) hide show
  1. package/CHANGELOG.md +67 -6
  2. package/Grid/styles/index.less +1 -2
  3. package/IconButton/styles/index.less +1 -1
  4. package/MaskedInput/package.json +7 -0
  5. package/MultiCascader/styles/index.less +3 -0
  6. package/Navbar/styles/index.less +8 -0
  7. package/Picker/styles/index.less +1 -1
  8. package/Picker/styles/mixin.less +1 -1
  9. package/README.md +16 -10
  10. package/Sidenav/styles/index.less +13 -16
  11. package/Toggle/styles/index.less +20 -0
  12. package/Toggle/styles/mixin.less +12 -0
  13. package/Uploader/styles/index.less +10 -1
  14. package/cjs/@types/common.d.ts +0 -1
  15. package/cjs/Animation/Collapse.js +8 -8
  16. package/cjs/AutoComplete/AutoComplete.js +10 -14
  17. package/cjs/Badge/Badge.js +6 -10
  18. package/cjs/Breadcrumb/Breadcrumb.js +8 -12
  19. package/cjs/Breadcrumb/BreadcrumbItem.js +4 -8
  20. package/cjs/Button/Button.js +6 -10
  21. package/cjs/ButtonGroup/ButtonGroup.js +6 -10
  22. package/cjs/Calendar/Calendar.js +4 -8
  23. package/cjs/Calendar/CalendarPanel.js +6 -10
  24. package/cjs/Calendar/Header.js +4 -8
  25. package/cjs/Calendar/MonthDropdown.js +10 -14
  26. package/cjs/Calendar/MonthDropdownItem.js +6 -10
  27. package/cjs/Calendar/Table.js +6 -10
  28. package/cjs/Calendar/TableHeaderRow.js +4 -7
  29. package/cjs/Calendar/TableRow.js +7 -11
  30. package/cjs/Calendar/TimeDropdown.js +4 -8
  31. package/cjs/Calendar/View.js +4 -8
  32. package/cjs/Carousel/Carousel.js +10 -14
  33. package/cjs/Cascader/Cascader.js +29 -26
  34. package/cjs/Cascader/DropdownMenu.js +19 -21
  35. package/cjs/CheckPicker/CheckPicker.js +33 -29
  36. package/cjs/CheckTreePicker/CheckTreeNode.js +4 -6
  37. package/cjs/CheckTreePicker/CheckTreePicker.js +47 -35
  38. package/cjs/Checkbox/Checkbox.js +8 -13
  39. package/cjs/CheckboxGroup/CheckboxGroup.d.ts +1 -12
  40. package/cjs/CheckboxGroup/CheckboxGroup.js +7 -13
  41. package/cjs/CheckboxGroup/CheckboxGroupContext.d.ts +13 -0
  42. package/cjs/CheckboxGroup/CheckboxGroupContext.js +12 -0
  43. package/cjs/CheckboxGroup/index.d.ts +4 -3
  44. package/cjs/CheckboxGroup/index.js +6 -4
  45. package/cjs/Col/Col.js +3 -2
  46. package/cjs/Container/Container.js +4 -7
  47. package/cjs/DOMHelper/index.d.ts +1 -1
  48. package/cjs/DatePicker/DatePicker.js +27 -22
  49. package/cjs/DatePicker/Toolbar.js +4 -8
  50. package/cjs/DateRangePicker/Calendar.js +12 -14
  51. package/cjs/DateRangePicker/DateRangePicker.js +40 -33
  52. package/cjs/Divider/Divider.js +4 -8
  53. package/cjs/Drawer/Drawer.js +8 -10
  54. package/cjs/Dropdown/Dropdown.js +8 -12
  55. package/cjs/Dropdown/DropdownItem.js +25 -22
  56. package/cjs/Dropdown/DropdownMenu.js +2 -6
  57. package/cjs/Dropdown/DropdownToggle.js +4 -8
  58. package/cjs/FlexboxGrid/FlexboxGrid.js +8 -12
  59. package/cjs/FlexboxGrid/FlexboxGridItem.js +8 -12
  60. package/cjs/Form/Form.js +12 -16
  61. package/cjs/FormControl/FormControl.js +6 -2
  62. package/cjs/IconButton/IconButton.js +4 -8
  63. package/cjs/Input/Input.js +6 -10
  64. package/cjs/InputNumber/InputNumber.js +14 -18
  65. package/cjs/InputPicker/InputAutosize.js +2 -4
  66. package/cjs/InputPicker/InputPicker.js +32 -30
  67. package/cjs/List/List.js +12 -16
  68. package/cjs/List/ListItem.js +6 -10
  69. package/cjs/Loader/Loader.js +6 -10
  70. package/cjs/MaskedInput/MaskedInput.d.ts +43 -0
  71. package/cjs/MaskedInput/MaskedInput.js +80 -0
  72. package/cjs/MaskedInput/adjustCaretPosition.d.ts +11 -0
  73. package/cjs/MaskedInput/adjustCaretPosition.js +218 -0
  74. package/cjs/MaskedInput/conformToMask.d.ts +8 -0
  75. package/cjs/MaskedInput/conformToMask.js +247 -0
  76. package/cjs/MaskedInput/createTextMaskInputElement.d.ts +7 -0
  77. package/cjs/MaskedInput/createTextMaskInputElement.js +226 -0
  78. package/cjs/MaskedInput/index.d.ts +3 -0
  79. package/cjs/MaskedInput/index.js +11 -0
  80. package/cjs/MaskedInput/types.d.ts +10 -0
  81. package/cjs/{@types/icons.js → MaskedInput/types.js} +0 -0
  82. package/cjs/MaskedInput/utilities.d.ts +7 -0
  83. package/cjs/MaskedInput/utilities.js +47 -0
  84. package/cjs/Menu/Menu.d.ts +0 -1
  85. package/cjs/Menu/Menu.js +3 -5
  86. package/cjs/Message/Message.js +8 -12
  87. package/cjs/Modal/Modal.d.ts +1 -10
  88. package/cjs/Modal/Modal.js +35 -27
  89. package/cjs/Modal/ModalBody.js +6 -10
  90. package/cjs/Modal/ModalContext.d.ts +12 -0
  91. package/cjs/Modal/ModalContext.js +12 -0
  92. package/cjs/Modal/ModalDialog.js +8 -8
  93. package/cjs/Modal/ModalHeader.js +8 -12
  94. package/cjs/Modal/ModalTitle.d.ts +3 -2
  95. package/cjs/Modal/ModalTitle.js +43 -4
  96. package/cjs/MultiCascader/DropdownMenu.js +21 -23
  97. package/cjs/MultiCascader/MultiCascader.js +35 -32
  98. package/cjs/Nav/Nav.js +6 -10
  99. package/cjs/Navbar/Navbar.js +6 -9
  100. package/cjs/Notification/Notification.js +6 -10
  101. package/cjs/Overlay/Modal.js +11 -18
  102. package/cjs/Overlay/Overlay.js +2 -5
  103. package/cjs/Overlay/OverlayTrigger.js +9 -9
  104. package/cjs/Overlay/Position.js +4 -8
  105. package/cjs/Overlay/positionUtils.js +1 -1
  106. package/cjs/Pagination/Pagination.js +10 -13
  107. package/cjs/Pagination/PaginationButton.js +4 -8
  108. package/cjs/Pagination/PaginationGroup.js +11 -12
  109. package/cjs/Panel/Panel.js +6 -10
  110. package/cjs/PanelGroup/PanelGroup.js +4 -8
  111. package/cjs/Picker/DropdownMenu.js +2 -3
  112. package/cjs/Picker/DropdownMenuGroup.js +4 -8
  113. package/cjs/Picker/DropdownMenuItem.js +4 -8
  114. package/cjs/Picker/PickerToggle.js +15 -14
  115. package/cjs/Picker/propTypes.d.ts +2 -16
  116. package/cjs/Picker/propTypes.js +4 -17
  117. package/cjs/Picker/utils.js +14 -9
  118. package/cjs/Placeholder/PlaceholderGraph.js +6 -10
  119. package/cjs/Placeholder/PlaceholderGrid.js +12 -16
  120. package/cjs/Placeholder/PlaceholderParagraph.js +10 -14
  121. package/cjs/Popover/Popover.js +4 -8
  122. package/cjs/Progress/ProgressCircle.js +18 -22
  123. package/cjs/Progress/ProgressLine.js +8 -12
  124. package/cjs/Radio/Radio.js +6 -11
  125. package/cjs/RadioGroup/RadioGroup.js +6 -9
  126. package/cjs/RangeSlider/RangeSlider.js +17 -20
  127. package/cjs/Rate/Character.js +4 -7
  128. package/cjs/Rate/Rate.js +14 -18
  129. package/cjs/Ripple/Ripple.js +4 -8
  130. package/cjs/SelectPicker/SelectPicker.js +31 -28
  131. package/cjs/Sidebar/Sidebar.js +6 -10
  132. package/cjs/Sidenav/Sidenav.js +8 -11
  133. package/cjs/Sidenav/SidenavDropdown.d.ts +6 -1
  134. package/cjs/Sidenav/SidenavDropdown.js +19 -19
  135. package/cjs/Sidenav/SidenavDropdownCollapse.js +2 -6
  136. package/cjs/Sidenav/SidenavDropdownItem.js +4 -8
  137. package/cjs/Sidenav/SidenavDropdownMenu.js +4 -8
  138. package/cjs/Sidenav/SidenavToggle.js +4 -8
  139. package/cjs/Slider/Graduated.js +4 -8
  140. package/cjs/Slider/Handle.d.ts +2 -0
  141. package/cjs/Slider/Handle.js +23 -12
  142. package/cjs/Slider/Input.d.ts +3 -0
  143. package/cjs/Slider/Input.js +35 -0
  144. package/cjs/Slider/Mark.js +4 -8
  145. package/cjs/Slider/ProgressBar.js +4 -8
  146. package/cjs/Slider/Slider.d.ts +0 -3
  147. package/cjs/Slider/Slider.js +14 -22
  148. package/cjs/Steps/StepItem.js +4 -7
  149. package/cjs/Steps/Steps.js +8 -12
  150. package/cjs/Table/Table.d.ts +7 -7
  151. package/cjs/Table/Table.js +5 -5
  152. package/cjs/TagInput/index.js +4 -6
  153. package/cjs/TagPicker/index.d.ts +1 -1
  154. package/cjs/TagPicker/index.js +4 -6
  155. package/cjs/Timeline/Timeline.js +6 -11
  156. package/cjs/Timeline/TimelineItem.js +4 -8
  157. package/cjs/Toggle/Toggle.d.ts +2 -0
  158. package/cjs/Toggle/Toggle.js +27 -13
  159. package/cjs/Tooltip/Tooltip.js +4 -8
  160. package/cjs/Tree/Tree.d.ts +6 -0
  161. package/cjs/TreePicker/TreeNode.js +4 -6
  162. package/cjs/TreePicker/TreePicker.js +38 -29
  163. package/cjs/Uploader/UploadFileItem.d.ts +1 -0
  164. package/cjs/Uploader/UploadFileItem.js +42 -33
  165. package/cjs/Uploader/UploadTrigger.js +4 -8
  166. package/cjs/Uploader/Uploader.d.ts +2 -0
  167. package/cjs/Uploader/Uploader.js +28 -29
  168. package/cjs/index.d.ts +2 -0
  169. package/cjs/index.js +5 -1
  170. package/cjs/locales/fa_IR.d.ts +105 -0
  171. package/cjs/locales/fa_IR.js +84 -0
  172. package/cjs/locales/index.d.ts +1 -0
  173. package/cjs/locales/index.js +6 -2
  174. package/cjs/toaster/ToastContainer.js +6 -10
  175. package/cjs/utils/createComponent.d.ts +1 -2
  176. package/cjs/utils/createComponent.js +10 -13
  177. package/cjs/utils/previewFile.d.ts +1 -0
  178. package/cjs/utils/previewFile.js +11 -0
  179. package/cjs/utils/useUniqueId.d.ts +3 -1
  180. package/cjs/utils/useUniqueId.js +4 -2
  181. package/dist/rsuite-rtl.css +115 -44
  182. package/dist/rsuite-rtl.min.css +1 -1
  183. package/dist/rsuite-rtl.min.css.map +1 -1
  184. package/dist/rsuite.css +115 -44
  185. package/dist/rsuite.js +233 -144
  186. package/dist/rsuite.js.map +1 -1
  187. package/dist/rsuite.min.css +1 -1
  188. package/dist/rsuite.min.css.map +1 -1
  189. package/dist/rsuite.min.js +1 -1
  190. package/dist/rsuite.min.js.map +1 -1
  191. package/esm/@types/common.d.ts +0 -1
  192. package/esm/Animation/Collapse.js +8 -8
  193. package/esm/AutoComplete/AutoComplete.js +11 -14
  194. package/esm/Badge/Badge.js +6 -9
  195. package/esm/Breadcrumb/Breadcrumb.js +8 -11
  196. package/esm/Breadcrumb/BreadcrumbItem.js +4 -7
  197. package/esm/Button/Button.js +6 -9
  198. package/esm/ButtonGroup/ButtonGroup.js +6 -9
  199. package/esm/Calendar/Calendar.js +4 -7
  200. package/esm/Calendar/CalendarPanel.js +6 -9
  201. package/esm/Calendar/Header.js +4 -7
  202. package/esm/Calendar/MonthDropdown.js +10 -13
  203. package/esm/Calendar/MonthDropdownItem.js +6 -9
  204. package/esm/Calendar/Table.js +6 -9
  205. package/esm/Calendar/TableHeaderRow.js +4 -7
  206. package/esm/Calendar/TableRow.js +7 -10
  207. package/esm/Calendar/TimeDropdown.js +4 -7
  208. package/esm/Calendar/View.js +4 -7
  209. package/esm/Carousel/Carousel.js +10 -13
  210. package/esm/Cascader/Cascader.js +29 -26
  211. package/esm/Cascader/DropdownMenu.js +19 -21
  212. package/esm/CheckPicker/CheckPicker.js +33 -29
  213. package/esm/CheckTreePicker/CheckTreeNode.js +4 -6
  214. package/esm/CheckTreePicker/CheckTreePicker.js +47 -37
  215. package/esm/Checkbox/Checkbox.js +8 -12
  216. package/esm/CheckboxGroup/CheckboxGroup.d.ts +1 -12
  217. package/esm/CheckboxGroup/CheckboxGroup.js +5 -8
  218. package/esm/CheckboxGroup/CheckboxGroupContext.d.ts +13 -0
  219. package/esm/CheckboxGroup/CheckboxGroupContext.js +2 -0
  220. package/esm/CheckboxGroup/index.d.ts +4 -3
  221. package/esm/CheckboxGroup/index.js +2 -2
  222. package/esm/Col/Col.js +3 -2
  223. package/esm/Container/Container.js +4 -7
  224. package/esm/DOMHelper/index.d.ts +1 -1
  225. package/esm/DatePicker/DatePicker.js +27 -23
  226. package/esm/DatePicker/Toolbar.js +5 -8
  227. package/esm/DateRangePicker/Calendar.js +12 -13
  228. package/esm/DateRangePicker/DateRangePicker.js +40 -34
  229. package/esm/Divider/Divider.js +4 -7
  230. package/esm/Drawer/Drawer.js +8 -9
  231. package/esm/Dropdown/Dropdown.js +9 -12
  232. package/esm/Dropdown/DropdownItem.js +26 -22
  233. package/esm/Dropdown/DropdownMenu.js +3 -6
  234. package/esm/Dropdown/DropdownToggle.js +4 -7
  235. package/esm/FlexboxGrid/FlexboxGrid.js +8 -11
  236. package/esm/FlexboxGrid/FlexboxGridItem.js +8 -11
  237. package/esm/Form/Form.js +12 -15
  238. package/esm/FormControl/FormControl.js +6 -2
  239. package/esm/IconButton/IconButton.js +4 -7
  240. package/esm/Input/Input.js +6 -9
  241. package/esm/InputNumber/InputNumber.js +14 -17
  242. package/esm/InputPicker/InputAutosize.js +2 -4
  243. package/esm/InputPicker/InputPicker.js +32 -30
  244. package/esm/List/List.js +12 -15
  245. package/esm/List/ListItem.js +6 -9
  246. package/esm/Loader/Loader.js +6 -9
  247. package/esm/MaskedInput/MaskedInput.d.ts +43 -0
  248. package/esm/MaskedInput/MaskedInput.js +67 -0
  249. package/esm/MaskedInput/adjustCaretPosition.d.ts +11 -0
  250. package/esm/MaskedInput/adjustCaretPosition.js +213 -0
  251. package/esm/MaskedInput/conformToMask.d.ts +8 -0
  252. package/esm/MaskedInput/conformToMask.js +239 -0
  253. package/esm/MaskedInput/createTextMaskInputElement.d.ts +7 -0
  254. package/esm/MaskedInput/createTextMaskInputElement.js +212 -0
  255. package/esm/MaskedInput/index.d.ts +3 -0
  256. package/esm/MaskedInput/index.js +2 -0
  257. package/esm/MaskedInput/types.d.ts +10 -0
  258. package/esm/{@types/icons.js → MaskedInput/types.js} +0 -0
  259. package/esm/MaskedInput/utilities.d.ts +7 -0
  260. package/esm/MaskedInput/utilities.js +38 -0
  261. package/esm/Menu/Menu.d.ts +0 -1
  262. package/esm/Menu/Menu.js +3 -5
  263. package/esm/Message/Message.js +8 -11
  264. package/esm/Modal/Modal.d.ts +1 -10
  265. package/esm/Modal/Modal.js +31 -21
  266. package/esm/Modal/ModalBody.js +5 -8
  267. package/esm/Modal/ModalContext.d.ts +12 -0
  268. package/esm/Modal/ModalContext.js +2 -0
  269. package/esm/Modal/ModalDialog.js +8 -8
  270. package/esm/Modal/ModalHeader.js +7 -10
  271. package/esm/Modal/ModalTitle.d.ts +3 -2
  272. package/esm/Modal/ModalTitle.js +35 -4
  273. package/esm/MultiCascader/DropdownMenu.js +21 -23
  274. package/esm/MultiCascader/MultiCascader.js +35 -32
  275. package/esm/Nav/Nav.js +6 -9
  276. package/esm/Navbar/Navbar.js +6 -9
  277. package/esm/Notification/Notification.js +6 -9
  278. package/esm/Overlay/Modal.js +11 -18
  279. package/esm/Overlay/Overlay.js +2 -5
  280. package/esm/Overlay/OverlayTrigger.js +9 -9
  281. package/esm/Overlay/Position.js +4 -7
  282. package/esm/Overlay/positionUtils.js +1 -1
  283. package/esm/Pagination/Pagination.js +10 -13
  284. package/esm/Pagination/PaginationButton.js +4 -7
  285. package/esm/Pagination/PaginationGroup.js +10 -11
  286. package/esm/Panel/Panel.js +6 -9
  287. package/esm/PanelGroup/PanelGroup.js +4 -7
  288. package/esm/Picker/DropdownMenu.js +2 -3
  289. package/esm/Picker/DropdownMenuGroup.js +4 -7
  290. package/esm/Picker/DropdownMenuItem.js +4 -7
  291. package/esm/Picker/PickerToggle.js +13 -12
  292. package/esm/Picker/propTypes.d.ts +2 -16
  293. package/esm/Picker/propTypes.js +2 -13
  294. package/esm/Picker/utils.js +14 -9
  295. package/esm/Placeholder/PlaceholderGraph.js +6 -9
  296. package/esm/Placeholder/PlaceholderGrid.js +12 -15
  297. package/esm/Placeholder/PlaceholderParagraph.js +10 -13
  298. package/esm/Popover/Popover.js +4 -7
  299. package/esm/Progress/ProgressCircle.js +18 -21
  300. package/esm/Progress/ProgressLine.js +8 -11
  301. package/esm/Radio/Radio.js +6 -10
  302. package/esm/RadioGroup/RadioGroup.js +6 -9
  303. package/esm/RangeSlider/RangeSlider.js +17 -20
  304. package/esm/Rate/Character.js +4 -7
  305. package/esm/Rate/Rate.js +14 -17
  306. package/esm/Ripple/Ripple.js +4 -7
  307. package/esm/SelectPicker/SelectPicker.js +31 -28
  308. package/esm/Sidebar/Sidebar.js +6 -9
  309. package/esm/Sidenav/Sidenav.js +8 -11
  310. package/esm/Sidenav/SidenavDropdown.d.ts +6 -1
  311. package/esm/Sidenav/SidenavDropdown.js +19 -18
  312. package/esm/Sidenav/SidenavDropdownCollapse.js +2 -5
  313. package/esm/Sidenav/SidenavDropdownItem.js +5 -8
  314. package/esm/Sidenav/SidenavDropdownMenu.js +5 -8
  315. package/esm/Sidenav/SidenavToggle.js +4 -7
  316. package/esm/Slider/Graduated.js +4 -7
  317. package/esm/Slider/Handle.d.ts +2 -0
  318. package/esm/Slider/Handle.js +23 -12
  319. package/esm/Slider/Input.d.ts +3 -0
  320. package/esm/Slider/Input.js +23 -0
  321. package/esm/Slider/Mark.js +4 -7
  322. package/esm/Slider/ProgressBar.js +4 -7
  323. package/esm/Slider/Slider.d.ts +0 -3
  324. package/esm/Slider/Slider.js +14 -22
  325. package/esm/Steps/StepItem.js +4 -7
  326. package/esm/Steps/Steps.js +8 -11
  327. package/esm/Table/Table.d.ts +7 -7
  328. package/esm/Table/Table.js +5 -5
  329. package/esm/TagInput/index.js +4 -6
  330. package/esm/TagPicker/index.d.ts +1 -1
  331. package/esm/TagPicker/index.js +4 -6
  332. package/esm/Timeline/Timeline.js +6 -10
  333. package/esm/Timeline/TimelineItem.js +4 -7
  334. package/esm/Toggle/Toggle.d.ts +2 -0
  335. package/esm/Toggle/Toggle.js +27 -13
  336. package/esm/Tooltip/Tooltip.js +4 -7
  337. package/esm/Tree/Tree.d.ts +6 -0
  338. package/esm/TreePicker/TreeNode.js +4 -6
  339. package/esm/TreePicker/TreePicker.js +38 -31
  340. package/esm/Uploader/UploadFileItem.d.ts +1 -0
  341. package/esm/Uploader/UploadFileItem.js +42 -33
  342. package/esm/Uploader/UploadTrigger.js +4 -7
  343. package/esm/Uploader/Uploader.d.ts +2 -0
  344. package/esm/Uploader/Uploader.js +28 -28
  345. package/esm/index.d.ts +2 -0
  346. package/esm/index.js +1 -0
  347. package/esm/locales/fa_IR.d.ts +105 -0
  348. package/esm/locales/fa_IR.js +74 -0
  349. package/esm/locales/index.d.ts +1 -0
  350. package/esm/locales/index.js +2 -1
  351. package/esm/toaster/ToastContainer.js +6 -9
  352. package/esm/utils/createComponent.d.ts +1 -2
  353. package/esm/utils/createComponent.js +10 -13
  354. package/esm/utils/previewFile.d.ts +1 -0
  355. package/esm/utils/previewFile.js +9 -0
  356. package/esm/utils/useUniqueId.d.ts +3 -1
  357. package/esm/utils/useUniqueId.js +4 -2
  358. package/locales/fa_IR/package.json +7 -0
  359. package/package.json +6 -8
  360. package/styles/color-modes/dark.less +1 -0
  361. package/styles/color-modes/high-contrast.less +1 -0
  362. package/styles/color-modes/light.less +3 -0
  363. package/styles/variables.less +3 -1
  364. package/cjs/@types/icons.d.ts +0 -1
  365. package/esm/@types/icons.d.ts +0 -1
@@ -7,16 +7,13 @@ import AngleDownIcon from '@rsuite/icons/legacy/AngleDown';
7
7
  import Collapse from '../Animation/Collapse';
8
8
  import { useClassNames, useControlled } from '../utils';
9
9
  import { PanelGroupContext } from '../PanelGroup';
10
- var defaultProps = {
11
- classPrefix: 'panel',
12
- panelRole: 'region',
13
- as: 'div'
14
- };
15
10
  var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
16
- var Component = props.as,
11
+ var _props$as = props.as,
12
+ Component = _props$as === void 0 ? 'div' : _props$as,
17
13
  children = props.children,
18
14
  className = props.className,
19
- classPrefix = props.classPrefix,
15
+ _props$classPrefix = props.classPrefix,
16
+ classPrefix = _props$classPrefix === void 0 ? 'panel' : _props$classPrefix,
20
17
  bodyFill = props.bodyFill,
21
18
  bordered = props.bordered,
22
19
  collapsibleProp = props.collapsible,
@@ -25,7 +22,8 @@ var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
25
22
  expandedProp = props.expanded,
26
23
  header = props.header,
27
24
  headerRoleProp = props.headerRole,
28
- panelRole = props.panelRole,
25
+ _props$panelRole = props.panelRole,
26
+ panelRole = _props$panelRole === void 0 ? 'region' : _props$panelRole,
29
27
  shaded = props.shaded,
30
28
  id = props.id,
31
29
  onEnter = props.onEnter,
@@ -145,7 +143,6 @@ var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
145
143
  }), renderHeading(), collapsible ? renderCollapsibleBody() : renderBody());
146
144
  });
147
145
  Panel.displayName = 'Panel';
148
- Panel.defaultProps = defaultProps;
149
146
  Panel.propTypes = {
150
147
  collapsible: PropTypes.bool,
151
148
  bordered: PropTypes.bool,
@@ -3,18 +3,16 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  import React, { useCallback } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { useClassNames, useControlled } from '../utils';
6
- var defaultProps = {
7
- as: 'div',
8
- classPrefix: 'panel-group'
9
- };
10
6
  export var PanelGroupContext = /*#__PURE__*/React.createContext({});
11
7
  var PanelGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
12
- var Component = props.as,
8
+ var _props$as = props.as,
9
+ Component = _props$as === void 0 ? 'div' : _props$as,
13
10
  accordion = props.accordion,
14
11
  defaultActiveKey = props.defaultActiveKey,
15
12
  bordered = props.bordered,
16
13
  className = props.className,
17
- classPrefix = props.classPrefix,
14
+ _props$classPrefix = props.classPrefix,
15
+ classPrefix = _props$classPrefix === void 0 ? 'panel-group' : _props$classPrefix,
18
16
  children = props.children,
19
17
  activeProp = props.activeKey,
20
18
  onSelect = props.onSelect,
@@ -49,7 +47,6 @@ var PanelGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
49
47
  }, children));
50
48
  });
51
49
  PanelGroup.displayName = 'PanelGroup';
52
- PanelGroup.defaultProps = defaultProps;
53
50
  PanelGroup.propTypes = {
54
51
  accordion: PropTypes.bool,
55
52
  activeKey: PropTypes.any,
@@ -201,8 +201,7 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
201
201
  return /*#__PURE__*/React.createElement(List, _extends({
202
202
  role: "listbox",
203
203
  containerRole: '',
204
- "aria-readonly": null
205
- }, listProps, {
204
+ "aria-readonly": null,
206
205
  width: width,
207
206
  height: height || maxHeight,
208
207
  scrollToIndex: findIndex(data, function (item) {
@@ -211,7 +210,7 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
211
210
  rowCount: rowCount,
212
211
  rowHeight: getRowHeight.bind(_this, filteredItems),
213
212
  rowRenderer: renderItem.bind(null, filteredItems)
214
- }));
213
+ }, listProps));
215
214
  }) : filteredItems.map(function (_item, index) {
216
215
  return renderItem(filteredItems, {
217
216
  index: index
@@ -8,13 +8,11 @@ import React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import { useClassNames } from '../utils';
10
10
  import ArrowDown from '@rsuite/icons/legacy/ArrowDown';
11
- var defaultProps = {
12
- as: 'div',
13
- classPrefix: 'dropdown-menu-group'
14
- };
15
11
  var DropdownMenuGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
16
- var Component = props.as,
17
- classPrefix = props.classPrefix,
12
+ var _props$as = props.as,
13
+ Component = _props$as === void 0 ? 'div' : _props$as,
14
+ _props$classPrefix = props.classPrefix,
15
+ classPrefix = _props$classPrefix === void 0 ? 'dropdown-menu-group' : _props$classPrefix,
18
16
  children = props.children,
19
17
  className = props.className,
20
18
  rest = _objectWithoutPropertiesLoose(props, ["as", "classPrefix", "children", "className"]);
@@ -39,7 +37,6 @@ var DropdownMenuGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
39
37
  })));
40
38
  });
41
39
  DropdownMenuGroup.displayName = 'DropdownMenuGroup';
42
- DropdownMenuGroup.defaultProps = defaultProps;
43
40
  DropdownMenuGroup.propTypes = {
44
41
  classPrefix: PropTypes.string,
45
42
  className: PropTypes.string,
@@ -3,14 +3,12 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  import React, { useCallback } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { useClassNames } from '../utils';
6
- var defaultProps = {
7
- as: 'div',
8
- classPrefix: 'dropdown-menu-item'
9
- };
10
6
  var DropdownMenuItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
- var Component = props.as,
7
+ var _props$as = props.as,
8
+ Component = _props$as === void 0 ? 'div' : _props$as,
12
9
  active = props.active,
13
- classPrefix = props.classPrefix,
10
+ _props$classPrefix = props.classPrefix,
11
+ classPrefix = _props$classPrefix === void 0 ? 'dropdown-menu-item' : _props$classPrefix,
14
12
  children = props.children,
15
13
  className = props.className,
16
14
  disabled = props.disabled,
@@ -53,7 +51,6 @@ var DropdownMenuItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
53
51
  }, renderItem ? renderItem(value) : children));
54
52
  });
55
53
  DropdownMenuItem.displayName = 'DropdownMenuItem';
56
- DropdownMenuItem.defaultProps = defaultProps;
57
54
  DropdownMenuItem.propTypes = {
58
55
  classPrefix: PropTypes.string,
59
56
  active: PropTypes.bool,
@@ -7,21 +7,19 @@ var _templateObject, _templateObject2;
7
7
  import React, { useState, useCallback, useEffect, useRef } from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import debounce from 'lodash/debounce';
10
- import MaskedInput from 'react-text-mask';
11
10
  import ToggleButton from './ToggleButton';
12
11
  import CloseButton from '../CloseButton';
13
12
  import { useClassNames, KEY_VALUES, mergeRefs } from '../utils';
14
13
  import Plaintext from '../Plaintext';
15
14
  import useToggleCaret from '../utils/useToggleCaret';
16
- var defaultProps = {
17
- as: ToggleButton,
18
- classPrefix: 'picker-toggle',
19
- inputMask: []
20
- };
15
+ import MaskedInput from '../MaskedInput';
16
+ var defaultInputMask = [];
21
17
  var PickerToggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
22
18
  var activeProp = props.active,
23
- Component = props.as,
24
- classPrefix = props.classPrefix,
19
+ _props$as = props.as,
20
+ Component = _props$as === void 0 ? ToggleButton : _props$as,
21
+ _props$classPrefix = props.classPrefix,
22
+ classPrefix = _props$classPrefix === void 0 ? 'picker-toggle' : _props$classPrefix,
25
23
  children = props.children,
26
24
  _props$caret = props.caret,
27
25
  caret = _props$caret === void 0 ? true : _props$caret,
@@ -38,7 +36,8 @@ var PickerToggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
38
36
  input = props.input,
39
37
  inputPlaceholder = props.inputPlaceholder,
40
38
  inputValueProp = props.inputValue,
41
- inputMask = props.inputMask,
39
+ _props$inputMask = props.inputMask,
40
+ inputMask = _props$inputMask === void 0 ? defaultInputMask : _props$inputMask,
42
41
  onInputChange = props.onInputChange,
43
42
  onInputPressEnter = props.onInputPressEnter,
44
43
  onInputBlur = props.onInputBlur,
@@ -127,7 +126,7 @@ var PickerToggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
127
126
  }, hasValue ? children : null);
128
127
  }
129
128
 
130
- var cleanable = cleanableProp && hasValue && !readOnly; // When the component is read-only or disabled, the input is not interactive.
129
+ var showCleanButton = cleanableProp && hasValue && !readOnly; // When the component is read-only or disabled, the input is not interactive.
131
130
 
132
131
  var inputFocused = readOnly || disabled ? false : input && activeState;
133
132
  return /*#__PURE__*/React.createElement(Component, _extends({
@@ -169,16 +168,18 @@ var PickerToggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
169
168
  }), children ? /*#__PURE__*/React.createElement("span", {
170
169
  className: prefix(hasValue ? 'value' : 'placeholder'),
171
170
  "aria-placeholder": typeof children === 'string' ? children : null
172
- }, children) : null, cleanable && /*#__PURE__*/React.createElement(CloseButton, {
171
+ }, children) : null, showCleanButton && /*#__PURE__*/React.createElement(CloseButton, {
173
172
  className: prefix(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["clean"]))),
174
173
  tabIndex: -1,
174
+ locale: {
175
+ closeLabel: 'Clear'
176
+ },
175
177
  onClick: handleClean
176
178
  }), caret && /*#__PURE__*/React.createElement(Caret, {
177
179
  className: prefix(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["caret"])))
178
180
  }));
179
181
  });
180
182
  PickerToggle.displayName = 'PickerToggle';
181
- PickerToggle.defaultProps = defaultProps;
182
183
  PickerToggle.propTypes = {
183
184
  classPrefix: PropTypes.string,
184
185
  hasValue: PropTypes.bool,
@@ -1,5 +1,4 @@
1
1
  import PropTypes from 'prop-types';
2
- import { PickerAppearance, TypeAttributes } from '../@types/common';
3
2
  export declare const pickerPropTypes: {
4
3
  classPrefix: PropTypes.Requireable<string>;
5
4
  className: PropTypes.Requireable<string>;
@@ -27,6 +26,7 @@ export declare const pickerPropTypes: {
27
26
  onOpen: PropTypes.Requireable<(...args: any[]) => any>;
28
27
  onClose: PropTypes.Requireable<(...args: any[]) => any>;
29
28
  onClean: PropTypes.Requireable<(...args: any[]) => any>;
29
+ listProps: PropTypes.Requireable<object>;
30
30
  onEnter: PropTypes.Requireable<(...args: any[]) => any>;
31
31
  onEntering: PropTypes.Requireable<(...args: any[]) => any>;
32
32
  onEntered: PropTypes.Requireable<(...args: any[]) => any>;
@@ -69,6 +69,7 @@ export declare const listPickerPropTypes: {
69
69
  onOpen: PropTypes.Requireable<(...args: any[]) => any>;
70
70
  onClose: PropTypes.Requireable<(...args: any[]) => any>;
71
71
  onClean: PropTypes.Requireable<(...args: any[]) => any>;
72
+ listProps: PropTypes.Requireable<object>;
72
73
  onEnter: PropTypes.Requireable<(...args: any[]) => any>;
73
74
  onEntering: PropTypes.Requireable<(...args: any[]) => any>;
74
75
  onEntered: PropTypes.Requireable<(...args: any[]) => any>;
@@ -76,18 +77,3 @@ export declare const listPickerPropTypes: {
76
77
  onExiting: PropTypes.Requireable<(...args: any[]) => any>;
77
78
  onExited: PropTypes.Requireable<(...args: any[]) => any>;
78
79
  };
79
- export declare const pickerDefaultProps: {
80
- cleanable: boolean;
81
- placement: TypeAttributes.Placement;
82
- appearance: PickerAppearance;
83
- };
84
- export declare const listPickerDefaultProps: {
85
- data: any[];
86
- disabledItemValues: any[];
87
- childrenKey: string;
88
- valueKey: string;
89
- labelKey: string;
90
- cleanable: boolean;
91
- placement: TypeAttributes.Placement;
92
- appearance: PickerAppearance;
93
- };
@@ -29,7 +29,8 @@ export var pickerPropTypes = _extends({}, animationPropTypes, {
29
29
  renderValue: PropTypes.func,
30
30
  onOpen: PropTypes.func,
31
31
  onClose: PropTypes.func,
32
- onClean: PropTypes.func
32
+ onClean: PropTypes.func,
33
+ listProps: PropTypes.object
33
34
  });
34
35
  export var listPickerPropTypes = _extends({}, pickerPropTypes, {
35
36
  data: PropTypes.array,
@@ -40,16 +41,4 @@ export var listPickerPropTypes = _extends({}, pickerPropTypes, {
40
41
  value: PropTypes.any,
41
42
  defaultValue: PropTypes.any,
42
43
  onChange: PropTypes.func
43
- });
44
- export var pickerDefaultProps = {
45
- cleanable: true,
46
- placement: 'bottomStart',
47
- appearance: 'default'
48
- };
49
- export var listPickerDefaultProps = _extends({}, pickerDefaultProps, {
50
- data: [],
51
- disabledItemValues: [],
52
- childrenKey: 'children',
53
- valueKey: 'value',
54
- labelKey: 'label'
55
44
  });
@@ -72,7 +72,7 @@ export function usePickerClassName(props) {
72
72
  withClassPrefix = _useClassNames.withClassPrefix,
73
73
  merge = _useClassNames.merge;
74
74
 
75
- var classes = merge(className, withClassPrefix(name, appearance, 'toggle-wrapper', (_withClassPrefix = {}, _withClassPrefix["placement-" + kebabCase(placementPolyfill(placement))] = placement, _withClassPrefix['read-only'] = readOnly, _withClassPrefix['has-value'] = hasValue, _withClassPrefix.cleanable = hasValue && cleanable, _withClassPrefix.block = block, _withClassPrefix.disabled = disabled, _withClassPrefix.countable = countable, _withClassPrefix.plaintext = plaintext, _withClassPrefix)));
75
+ var classes = merge(className, withClassPrefix(name, appearance, 'toggle-wrapper', (_withClassPrefix = {}, _withClassPrefix["placement-" + kebabCase(placementPolyfill(placement))] = placement, _withClassPrefix['read-only'] = readOnly, _withClassPrefix['has-value'] = hasValue, _withClassPrefix.cleanable = cleanable, _withClassPrefix.block = block, _withClassPrefix.disabled = disabled, _withClassPrefix.countable = countable, _withClassPrefix.plaintext = plaintext, _withClassPrefix)));
76
76
  var usedClassNamePropKeys = Object.keys(omit(props, [].concat(Object.keys(rest || {}), ['disabled', 'readOnly', 'plaintext'])));
77
77
  return [classes, usedClassNamePropKeys];
78
78
  }
@@ -357,13 +357,6 @@ export var useToggleKeyDownEvent = function useToggleKeyDownEvent(props) {
357
357
  }
358
358
  }
359
359
 
360
- if (event.key === KEY_VALUES.ESC || event.key === KEY_VALUES.TAB) {
361
- handleClose();
362
- } // Native event callback
363
-
364
-
365
- onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
366
-
367
360
  if (overlayRef !== null && overlayRef !== void 0 && overlayRef.current) {
368
361
  // The keyboard operation callback on the menu.
369
362
  onMenuKeyDown === null || onMenuKeyDown === void 0 ? void 0 : onMenuKeyDown(event);
@@ -371,8 +364,13 @@ export var useToggleKeyDownEvent = function useToggleKeyDownEvent(props) {
371
364
  if (event.key === KEY_VALUES.ENTER) {
372
365
  onMenuPressEnter === null || onMenuPressEnter === void 0 ? void 0 : onMenuPressEnter(event);
373
366
  }
367
+ /**
368
+ * There is no callback when typing the Backspace key in the search box.
369
+ * The default is to remove search keywords
370
+ */
374
371
 
375
- if (event.key === KEY_VALUES.BACKSPACE) {
372
+
373
+ if (event.key === KEY_VALUES.BACKSPACE && event.target !== (searchInputRef === null || searchInputRef === void 0 ? void 0 : searchInputRef.current)) {
376
374
  onMenuPressBackspace === null || onMenuPressBackspace === void 0 ? void 0 : onMenuPressBackspace(event);
377
375
  } // The search box gets focus when typing characters and numbers.
378
376
 
@@ -383,6 +381,13 @@ export var useToggleKeyDownEvent = function useToggleKeyDownEvent(props) {
383
381
  searchInputRef === null || searchInputRef === void 0 ? void 0 : (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.focus();
384
382
  }
385
383
  }
384
+
385
+ if (event.key === KEY_VALUES.ESC || event.key === KEY_VALUES.TAB) {
386
+ handleClose();
387
+ } // Native event callback
388
+
389
+
390
+ onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
386
391
  }, [handleClose, handleToggleDropdown, overlayRef, onExit, onKeyDown, onMenuKeyDown, onMenuPressBackspace, onMenuPressEnter, toggle, targetRef, searchInputRef]);
387
392
  return onToggle;
388
393
  };
@@ -3,19 +3,17 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { useClassNames } from '../utils';
6
- var defaultProps = {
7
- as: 'div',
8
- classPrefix: 'placeholder',
9
- height: 200
10
- };
11
6
  var PlaceholderGraph = /*#__PURE__*/React.forwardRef(function (props, ref) {
12
- var Component = props.as,
7
+ var _props$as = props.as,
8
+ Component = _props$as === void 0 ? 'div' : _props$as,
13
9
  className = props.className,
14
10
  width = props.width,
15
- height = props.height,
11
+ _props$height = props.height,
12
+ height = _props$height === void 0 ? 200 : _props$height,
16
13
  style = props.style,
17
14
  active = props.active,
18
- classPrefix = props.classPrefix,
15
+ _props$classPrefix = props.classPrefix,
16
+ classPrefix = _props$classPrefix === void 0 ? 'placeholder' : _props$classPrefix,
19
17
  rest = _objectWithoutPropertiesLoose(props, ["as", "className", "width", "height", "style", "active", "classPrefix"]);
20
18
 
21
19
  var _useClassNames = useClassNames(classPrefix),
@@ -46,5 +44,4 @@ PlaceholderGraph.propTypes = {
46
44
  height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
47
45
  active: PropTypes.bool
48
46
  };
49
- PlaceholderGraph.defaultProps = defaultProps;
50
47
  export default PlaceholderGraph;
@@ -4,22 +4,20 @@ import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  import { useClassNames } from '../utils';
7
- var defaultProps = {
8
- as: 'div',
9
- classPrefix: 'placeholder',
10
- rows: 5,
11
- columns: 5,
12
- rowHeight: 10,
13
- rowMargin: 20
14
- };
15
7
  var PlaceholderGrid = /*#__PURE__*/React.forwardRef(function (props, ref) {
16
- var Component = props.as,
8
+ var _props$as = props.as,
9
+ Component = _props$as === void 0 ? 'div' : _props$as,
17
10
  className = props.className,
18
- classPrefix = props.classPrefix,
19
- rows = props.rows,
20
- columns = props.columns,
21
- rowHeight = props.rowHeight,
22
- rowMargin = props.rowMargin,
11
+ _props$classPrefix = props.classPrefix,
12
+ classPrefix = _props$classPrefix === void 0 ? 'placeholder' : _props$classPrefix,
13
+ _props$rows = props.rows,
14
+ rows = _props$rows === void 0 ? 5 : _props$rows,
15
+ _props$columns = props.columns,
16
+ columns = _props$columns === void 0 ? 5 : _props$columns,
17
+ _props$rowHeight = props.rowHeight,
18
+ rowHeight = _props$rowHeight === void 0 ? 10 : _props$rowHeight,
19
+ _props$rowMargin = props.rowMargin,
20
+ rowMargin = _props$rowMargin === void 0 ? 20 : _props$rowMargin,
23
21
  active = props.active,
24
22
  rest = _objectWithoutPropertiesLoose(props, ["as", "className", "classPrefix", "rows", "columns", "rowHeight", "rowMargin", "active"]);
25
23
 
@@ -68,7 +66,6 @@ var PlaceholderGrid = /*#__PURE__*/React.forwardRef(function (props, ref) {
68
66
  }), colItems);
69
67
  });
70
68
  PlaceholderGrid.displayName = 'PlaceholderGrid';
71
- PlaceholderGrid.defaultProps = defaultProps;
72
69
  PlaceholderGrid.propTypes = {
73
70
  className: PropTypes.string,
74
71
  classPrefix: PropTypes.string,
@@ -3,22 +3,20 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  import React, { useMemo } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { useClassNames } from '../utils';
6
- var defaultProps = {
7
- as: 'div',
8
- classPrefix: 'placeholder',
9
- rows: 2,
10
- rowHeight: 10,
11
- rowMargin: 20
12
- };
13
6
  var PlaceholderParagraph = /*#__PURE__*/React.forwardRef(function (props, ref) {
14
- var Component = props.as,
7
+ var _props$as = props.as,
8
+ Component = _props$as === void 0 ? 'div' : _props$as,
15
9
  className = props.className,
16
- rows = props.rows,
17
- rowHeight = props.rowHeight,
18
- rowMargin = props.rowMargin,
10
+ _props$rows = props.rows,
11
+ rows = _props$rows === void 0 ? 2 : _props$rows,
12
+ _props$rowHeight = props.rowHeight,
13
+ rowHeight = _props$rowHeight === void 0 ? 10 : _props$rowHeight,
14
+ _props$rowMargin = props.rowMargin,
15
+ rowMargin = _props$rowMargin === void 0 ? 20 : _props$rowMargin,
19
16
  graph = props.graph,
20
17
  active = props.active,
21
- classPrefix = props.classPrefix,
18
+ _props$classPrefix = props.classPrefix,
19
+ classPrefix = _props$classPrefix === void 0 ? 'placeholder' : _props$classPrefix,
22
20
  rest = _objectWithoutPropertiesLoose(props, ["as", "className", "rows", "rowHeight", "rowMargin", "graph", "active", "classPrefix"]);
23
21
 
24
22
  var _useClassNames = useClassNames(classPrefix),
@@ -60,7 +58,6 @@ var PlaceholderParagraph = /*#__PURE__*/React.forwardRef(function (props, ref) {
60
58
  }, rowElements));
61
59
  });
62
60
  PlaceholderParagraph.displayName = 'PlaceholderParagraph';
63
- PlaceholderParagraph.defaultProps = defaultProps;
64
61
  PlaceholderParagraph.propTypes = {
65
62
  className: PropTypes.string,
66
63
  classPrefix: PropTypes.string,
@@ -7,13 +7,11 @@ var _templateObject, _templateObject2, _templateObject3;
7
7
  import React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import { useClassNames } from '../utils';
10
- var defaultProps = {
11
- as: 'div',
12
- classPrefix: 'popover'
13
- };
14
10
  var Popover = /*#__PURE__*/React.forwardRef(function (props, ref) {
15
- var Component = props.as,
16
- classPrefix = props.classPrefix,
11
+ var _props$as = props.as,
12
+ Component = _props$as === void 0 ? 'div' : _props$as,
13
+ _props$classPrefix = props.classPrefix,
14
+ classPrefix = _props$classPrefix === void 0 ? 'popover' : _props$classPrefix,
17
15
  title = props.title,
18
16
  children = props.children,
19
17
  style = props.style,
@@ -52,7 +50,6 @@ var Popover = /*#__PURE__*/React.forwardRef(function (props, ref) {
52
50
  }, children));
53
51
  });
54
52
  Popover.displayName = 'Popover';
55
- Popover.defaultProps = defaultProps;
56
53
  Popover.propTypes = {
57
54
  as: PropTypes.elementType,
58
55
  classPrefix: PropTypes.string,
@@ -3,32 +3,30 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  import React, { useCallback } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { useClassNames, PROGRESS_STATUS_ICON } from '../utils';
6
- var defaultProps = {
7
- as: 'div',
8
- classPrefix: 'progress',
9
- percent: 0,
10
- strokeWidth: 6,
11
- trailWidth: 6,
12
- gapDegree: 0,
13
- showInfo: true,
14
- strokeLinecap: 'round',
15
- gapPosition: 'top'
16
- };
17
6
  var ProgressCircle = /*#__PURE__*/React.forwardRef(function (props, ref) {
18
7
  var _withClassPrefix;
19
8
 
20
- var Component = props.as,
21
- strokeWidth = props.strokeWidth,
22
- trailWidth = props.trailWidth,
23
- percent = props.percent,
24
- strokeLinecap = props.strokeLinecap,
9
+ var _props$as = props.as,
10
+ Component = _props$as === void 0 ? 'div' : _props$as,
11
+ _props$strokeWidth = props.strokeWidth,
12
+ strokeWidth = _props$strokeWidth === void 0 ? 6 : _props$strokeWidth,
13
+ _props$trailWidth = props.trailWidth,
14
+ trailWidth = _props$trailWidth === void 0 ? 6 : _props$trailWidth,
15
+ _props$percent = props.percent,
16
+ percent = _props$percent === void 0 ? 0 : _props$percent,
17
+ _props$strokeLinecap = props.strokeLinecap,
18
+ strokeLinecap = _props$strokeLinecap === void 0 ? 'round' : _props$strokeLinecap,
25
19
  className = props.className,
26
- showInfo = props.showInfo,
20
+ _props$showInfo = props.showInfo,
21
+ showInfo = _props$showInfo === void 0 ? true : _props$showInfo,
27
22
  status = props.status,
28
- classPrefix = props.classPrefix,
23
+ _props$classPrefix = props.classPrefix,
24
+ classPrefix = _props$classPrefix === void 0 ? 'progress' : _props$classPrefix,
29
25
  style = props.style,
30
- gapDegree = props.gapDegree,
31
- gapPosition = props.gapPosition,
26
+ _props$gapDegree = props.gapDegree,
27
+ gapDegree = _props$gapDegree === void 0 ? 0 : _props$gapDegree,
28
+ _props$gapPosition = props.gapPosition,
29
+ gapPosition = _props$gapPosition === void 0 ? 'top' : _props$gapPosition,
32
30
  trailColor = props.trailColor,
33
31
  strokeColor = props.strokeColor,
34
32
  rest = _objectWithoutPropertiesLoose(props, ["as", "strokeWidth", "trailWidth", "percent", "strokeLinecap", "className", "showInfo", "status", "classPrefix", "style", "gapDegree", "gapPosition", "trailColor", "strokeColor"]);
@@ -128,7 +126,6 @@ var ProgressCircle = /*#__PURE__*/React.forwardRef(function (props, ref) {
128
126
  })));
129
127
  });
130
128
  ProgressCircle.displayName = 'ProgressCircle';
131
- ProgressCircle.defaultProps = defaultProps;
132
129
  ProgressCircle.propTypes = {
133
130
  className: PropTypes.string,
134
131
  strokeColor: PropTypes.string,
@@ -3,25 +3,23 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { useClassNames, PROGRESS_STATUS_ICON } from '../utils';
6
- var defaultProps = {
7
- as: 'div',
8
- classPrefix: 'progress',
9
- showInfo: true,
10
- percent: 0
11
- };
12
6
  var ProgressLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
13
7
  var _lineInnerStyle, _percentStyle, _withClassPrefix;
14
8
 
15
- var Component = props.as,
9
+ var _props$as = props.as,
10
+ Component = _props$as === void 0 ? 'div' : _props$as,
16
11
  className = props.className,
17
- percent = props.percent,
12
+ _props$percent = props.percent,
13
+ percent = _props$percent === void 0 ? 0 : _props$percent,
18
14
  strokeColor = props.strokeColor,
19
15
  strokeWidth = props.strokeWidth,
20
16
  trailColor = props.trailColor,
21
17
  trailWidth = props.trailWidth,
22
18
  status = props.status,
23
- showInfo = props.showInfo,
24
- classPrefix = props.classPrefix,
19
+ _props$showInfo = props.showInfo,
20
+ showInfo = _props$showInfo === void 0 ? true : _props$showInfo,
21
+ _props$classPrefix = props.classPrefix,
22
+ classPrefix = _props$classPrefix === void 0 ? 'progress' : _props$classPrefix,
25
23
  vertical = props.vertical,
26
24
  rest = _objectWithoutPropertiesLoose(props, ["as", "className", "percent", "strokeColor", "strokeWidth", "trailColor", "trailWidth", "status", "showInfo", "classPrefix", "vertical"]);
27
25
 
@@ -64,7 +62,6 @@ var ProgressLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
64
62
  }, info) : null);
65
63
  });
66
64
  ProgressLine.displayName = 'ProgressLine';
67
- ProgressLine.defaultProps = defaultProps;
68
65
  ProgressLine.propTypes = {
69
66
  className: PropTypes.string,
70
67
  classPrefix: PropTypes.string,
@@ -4,12 +4,6 @@ import React, { useCallback, useContext } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { RadioContext } from '../RadioGroup/RadioGroup';
6
6
  import { useClassNames, useControlled, partitionHTMLProps, TypeChecker } from '../utils';
7
- var defaultProps = {
8
- as: 'div',
9
- classPrefix: 'radio',
10
- tabIndex: 0,
11
- inputProps: {}
12
- };
13
7
  var Radio = /*#__PURE__*/React.forwardRef(function (props, ref) {
14
8
  var _useContext = useContext(RadioContext),
15
9
  groupValue = _useContext.value,
@@ -21,14 +15,17 @@ var Radio = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
15
  plaintextContext = _useContext.plaintext,
22
16
  onGroupChange = _useContext.onChange;
23
17
 
24
- var Component = props.as,
18
+ var _props$as = props.as,
19
+ Component = _props$as === void 0 ? 'div' : _props$as,
25
20
  title = props.title,
26
21
  className = props.className,
27
22
  children = props.children,
28
23
  checkedProp = props.checked,
29
24
  defaultChecked = props.defaultChecked,
30
- classPrefix = props.classPrefix,
31
- tabIndex = props.tabIndex,
25
+ _props$classPrefix = props.classPrefix,
26
+ classPrefix = _props$classPrefix === void 0 ? 'radio' : _props$classPrefix,
27
+ _props$tabIndex = props.tabIndex,
28
+ tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
32
29
  inputRef = props.inputRef,
33
30
  inputProps = props.inputProps,
34
31
  _props$disabled = props.disabled,
@@ -118,7 +115,6 @@ var Radio = /*#__PURE__*/React.forwardRef(function (props, ref) {
118
115
  }, input, children) : input));
119
116
  });
120
117
  Radio.displayName = 'Radio';
121
- Radio.defaultProps = defaultProps;
122
118
  Radio.propTypes = {
123
119
  id: PropTypes.string,
124
120
  name: PropTypes.string,
@@ -6,14 +6,17 @@ import { useClassNames, useControlled } from '../utils';
6
6
  import Plaintext from '../Plaintext';
7
7
  export var RadioContext = /*#__PURE__*/React.createContext({});
8
8
  var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
9
- var Component = props.as,
9
+ var _props$as = props.as,
10
+ Component = _props$as === void 0 ? 'div' : _props$as,
10
11
  className = props.className,
11
12
  inline = props.inline,
12
13
  children = props.children,
13
- classPrefix = props.classPrefix,
14
+ _props$classPrefix = props.classPrefix,
15
+ classPrefix = _props$classPrefix === void 0 ? 'radio-group' : _props$classPrefix,
14
16
  valueProp = props.value,
15
17
  defaultValue = props.defaultValue,
16
- appearance = props.appearance,
18
+ _props$appearance = props.appearance,
19
+ appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
17
20
  name = props.name,
18
21
  plaintext = props.plaintext,
19
22
  disabled = props.disabled,
@@ -62,13 +65,7 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
62
65
  className: classes
63
66
  }), children));
64
67
  });
65
- var defaultProps = {
66
- as: 'div',
67
- appearance: 'default',
68
- classPrefix: 'radio-group'
69
- };
70
68
  RadioGroup.displayName = 'RadioGroup';
71
- RadioGroup.defaultProps = defaultProps;
72
69
  RadioGroup.propTypes = {
73
70
  appearance: PropTypes.oneOf(['default', 'picker']),
74
71
  name: PropTypes.string,