rsuite 6.0.0-canary-20250416 → 6.0.0-canary-20250424

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 (520) hide show
  1. package/AutoComplete/styles/index.css +32 -71
  2. package/Button/styles/index.css +4 -6
  3. package/CHANGELOG.md +15 -0
  4. package/Calendar/styles/index.css +8 -16
  5. package/CascadeTree/styles/index.css +8 -16
  6. package/Cascader/styles/index.css +36 -79
  7. package/CheckPicker/styles/index.css +32 -66
  8. package/CheckTree/styles/index.css +34 -70
  9. package/CheckTreePicker/styles/index.css +34 -70
  10. package/Checkbox/styles/index.css +7 -9
  11. package/Checkbox/styles/index.less +1 -1
  12. package/DateInput/styles/index.css +6 -9
  13. package/DatePicker/styles/index.css +38 -81
  14. package/DateRangeInput/styles/index.css +6 -9
  15. package/DateRangePicker/styles/index.css +38 -81
  16. package/Dropdown/styles/index.css +6 -10
  17. package/FormControl/styles/index.css +2 -2
  18. package/FormControl/styles/index.less +2 -2
  19. package/IconButton/styles/index.css +4 -6
  20. package/Input/styles/index.css +6 -9
  21. package/Input/styles/mixin.less +2 -3
  22. package/InputGroup/styles/index.css +7 -13
  23. package/InputGroup/styles/index.less +3 -4
  24. package/InputNumber/styles/index.css +36 -35
  25. package/InputNumber/styles/index.less +1 -67
  26. package/InputPicker/styles/index.css +32 -71
  27. package/Message/styles/index.css +5 -15
  28. package/Message/styles/index.less +4 -3
  29. package/MultiCascadeTree/styles/index.css +38 -80
  30. package/MultiCascader/styles/index.css +38 -80
  31. package/Nav/styles/index.css +8 -14
  32. package/Navbar/styles/index.css +16 -40
  33. package/NumberInput/package.json +7 -0
  34. package/NumberInput/styles/index.css +1402 -0
  35. package/NumberInput/styles/index.less +74 -0
  36. package/{InputNumber → NumberInput}/styles/mixin.less +0 -0
  37. package/Pagination/styles/index.css +34 -75
  38. package/PasswordInput/styles/index.css +6 -9
  39. package/PinInput/package.json +7 -0
  40. package/PinInput/styles/index.css +212 -0
  41. package/PinInput/styles/index.less +66 -0
  42. package/Radio/styles/index.css +7 -9
  43. package/Radio/styles/index.less +1 -1
  44. package/RangeSlider/styles/index.css +2 -0
  45. package/SelectPicker/styles/index.css +32 -71
  46. package/Sidenav/styles/index.css +30 -67
  47. package/Slider/styles/index.css +2 -0
  48. package/Slider/styles/index.less +2 -0
  49. package/Stat/styles/index.css +4 -6
  50. package/Tabs/styles/index.css +8 -14
  51. package/Tag/styles/index.css +0 -15
  52. package/TagInput/styles/index.css +34 -72
  53. package/TagPicker/styles/index.css +34 -72
  54. package/TimePicker/styles/index.css +38 -81
  55. package/TimeRangePicker/styles/index.css +38 -81
  56. package/Toggle/styles/index.css +9 -13
  57. package/Toggle/styles/index.less +3 -4
  58. package/Tree/styles/index.css +34 -75
  59. package/TreePicker/styles/index.css +34 -75
  60. package/Uploader/styles/index.css +6 -10
  61. package/cjs/Accordion/Accordion.js +2 -2
  62. package/cjs/Affix/Affix.js +1 -2
  63. package/cjs/Animation/Bounce.js +1 -2
  64. package/cjs/Animation/Collapse.js +1 -2
  65. package/cjs/Animation/Fade.js +1 -2
  66. package/cjs/Animation/Slide.js +1 -2
  67. package/cjs/AutoComplete/AutoComplete.d.ts +2 -2
  68. package/cjs/AutoComplete/AutoComplete.js +1 -2
  69. package/cjs/Avatar/Avatar.js +1 -2
  70. package/cjs/AvatarGroup/AvatarGroup.js +1 -2
  71. package/cjs/Badge/Badge.js +1 -2
  72. package/cjs/Breadcrumb/Breadcrumb.js +1 -2
  73. package/cjs/Button/Button.d.ts +2 -2
  74. package/cjs/Button/Button.js +1 -2
  75. package/cjs/ButtonGroup/ButtonGroup.d.ts +2 -2
  76. package/cjs/ButtonGroup/ButtonGroup.js +1 -2
  77. package/cjs/ButtonToolbar/ButtonToolbar.js +1 -2
  78. package/cjs/Calendar/Calendar.js +4 -4
  79. package/cjs/Calendar/CalendarBody.js +1 -4
  80. package/cjs/Calendar/CalendarContainer.js +1 -1
  81. package/cjs/Calendar/CalendarHeader.js +3 -3
  82. package/cjs/Calendar/CalendarProvider.d.ts +1 -1
  83. package/cjs/Calendar/Grid/GridCell.js +1 -2
  84. package/cjs/Calendar/Grid/GridHeaderRow.js +1 -2
  85. package/cjs/Calendar/Grid/GridRow.d.ts +2 -0
  86. package/cjs/Calendar/Grid/GridRow.js +5 -4
  87. package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +1 -2
  88. package/cjs/Calendar/hooks/useCalendar.d.ts +24 -2
  89. package/cjs/Calendar/hooks/useCalendar.js +34 -1
  90. package/cjs/Card/Card.js +1 -2
  91. package/cjs/CardGroup/CardGroup.js +1 -2
  92. package/cjs/Carousel/Carousel.js +1 -2
  93. package/cjs/CascadeTree/CascadeTree.js +1 -2
  94. package/cjs/CascadeTree/SearchView.js +1 -2
  95. package/cjs/CascadeTree/TreeView.js +1 -2
  96. package/cjs/Cascader/Cascader.js +1 -2
  97. package/cjs/CheckPicker/CheckPicker.js +1 -2
  98. package/cjs/CheckTree/CheckTree.js +1 -2
  99. package/cjs/CheckTree/CheckTreeNode.js +1 -2
  100. package/cjs/CheckTree/CheckTreeView.js +1 -2
  101. package/cjs/CheckTreePicker/CheckTreePicker.js +1 -2
  102. package/cjs/Checkbox/Checkbox.js +1 -2
  103. package/cjs/CheckboxGroup/CheckboxGroup.js +1 -2
  104. package/cjs/Container/Container.js +1 -2
  105. package/cjs/CustomProvider/CustomProvider.d.ts +1 -271
  106. package/cjs/CustomProvider/CustomProvider.js +2 -3
  107. package/cjs/CustomProvider/index.d.ts +1 -6
  108. package/cjs/CustomProvider/index.js +3 -12
  109. package/cjs/DateInput/DateInput.js +1 -2
  110. package/cjs/DateInput/hooks/useDateInputState.js +2 -2
  111. package/cjs/DatePicker/DatePicker.js +2 -3
  112. package/cjs/DatePicker/hooks/useFocus.js +1 -2
  113. package/cjs/DateRangeInput/DateRangeInput.js +1 -2
  114. package/cjs/DateRangePicker/DateRangePicker.js +2 -3
  115. package/cjs/DateRangePicker/Header.js +3 -3
  116. package/cjs/DateRangePicker/utils.d.ts +1 -1
  117. package/cjs/DateRangePicker/utils.js +1 -1
  118. package/cjs/Divider/Divider.js +1 -2
  119. package/cjs/Drawer/Drawer.js +1 -2
  120. package/cjs/Dropdown/Dropdown.js +1 -2
  121. package/cjs/Dropdown/DropdownMenu.js +1 -2
  122. package/cjs/FlexboxGrid/FlexboxGrid.js +1 -2
  123. package/cjs/Form/Form.js +1 -2
  124. package/cjs/FormControl/FormControl.js +1 -2
  125. package/cjs/FormControlLabel/FormControlLabel.js +1 -2
  126. package/cjs/FormErrorMessage/FormErrorMessage.js +1 -2
  127. package/cjs/FormGroup/FormGroup.js +1 -2
  128. package/cjs/FormHelpText/FormHelpText.js +1 -2
  129. package/cjs/FormStack/FormStack.js +1 -2
  130. package/cjs/Grid/Col.js +1 -2
  131. package/cjs/Grid/Grid.js +1 -2
  132. package/cjs/Grid/Row.js +1 -2
  133. package/cjs/Heading/Heading.js +1 -2
  134. package/cjs/Highlight/Highlight.js +2 -3
  135. package/cjs/IconButton/IconButton.js +1 -2
  136. package/cjs/Image/Image.js +2 -3
  137. package/cjs/InlineEdit/InlineEdit.js +1 -2
  138. package/cjs/Input/Input.js +3 -3
  139. package/cjs/InputGroup/InputGroup.js +1 -2
  140. package/cjs/InputNumber/index.d.ts +12 -2
  141. package/cjs/InputNumber/index.js +11 -4
  142. package/cjs/InputPicker/InputPicker.js +1 -2
  143. package/cjs/InputPicker/utils.d.ts +1 -1
  144. package/cjs/Kbd/Kbd.js +1 -2
  145. package/cjs/Link/Link.js +1 -2
  146. package/cjs/List/List.js +1 -2
  147. package/cjs/Loader/Loader.js +1 -2
  148. package/cjs/MaskedInput/MaskedInput.js +2 -2
  149. package/cjs/Message/Message.js +1 -2
  150. package/cjs/Modal/Modal.js +1 -2
  151. package/cjs/Modal/ModalHeader.js +1 -2
  152. package/cjs/MultiCascadeTree/MultiCascadeTree.js +1 -2
  153. package/cjs/MultiCascadeTree/SearchView.js +1 -2
  154. package/cjs/MultiCascadeTree/TreeView.js +1 -2
  155. package/cjs/MultiCascader/MultiCascader.js +1 -2
  156. package/cjs/Nav/Nav.js +1 -2
  157. package/cjs/Nav/NavDropdownMenu.js +1 -2
  158. package/cjs/Navbar/Navbar.d.ts +1 -1
  159. package/cjs/Navbar/Navbar.js +1 -2
  160. package/cjs/Navbar/NavbarDropdownMenu.js +1 -2
  161. package/cjs/Navbar/NavbarToggle.d.ts +8 -3
  162. package/cjs/Navbar/NavbarToggle.js +9 -14
  163. package/cjs/Notification/Notification.js +1 -2
  164. package/cjs/{InputNumber/InputNumber.d.ts → NumberInput/NumberInput.d.ts} +20 -8
  165. package/cjs/NumberInput/NumberInput.js +162 -0
  166. package/cjs/NumberInput/hooks/useEvents.d.ts +22 -0
  167. package/cjs/NumberInput/hooks/useEvents.js +114 -0
  168. package/cjs/NumberInput/hooks/useNumberInputValue.d.ts +7 -0
  169. package/cjs/NumberInput/hooks/useNumberInputValue.js +34 -0
  170. package/cjs/NumberInput/hooks/useWheelHandler.d.ts +5 -0
  171. package/cjs/NumberInput/hooks/useWheelHandler.js +25 -0
  172. package/cjs/NumberInput/index.d.ts +4 -0
  173. package/cjs/NumberInput/index.js +11 -0
  174. package/cjs/NumberInput/utils/number.d.ts +17 -0
  175. package/cjs/NumberInput/utils/number.js +67 -0
  176. package/cjs/Pagination/LimitPicker.d.ts +2 -2
  177. package/cjs/Pagination/Pagination.d.ts +2 -2
  178. package/cjs/Pagination/Pagination.js +1 -2
  179. package/cjs/Pagination/PaginationGroup.js +1 -2
  180. package/cjs/Panel/Panel.js +1 -2
  181. package/cjs/PanelGroup/PanelGroup.js +1 -2
  182. package/cjs/PasswordInput/PasswordInput.d.ts +4 -0
  183. package/cjs/PasswordInput/PasswordInput.js +5 -4
  184. package/cjs/PasswordStrengthMeter/PasswordStrengthMeter.js +1 -2
  185. package/cjs/PinInput/PinInput.d.ts +36 -0
  186. package/cjs/PinInput/PinInput.js +224 -0
  187. package/cjs/PinInput/hooks/usePinInputRefs.d.ts +12 -0
  188. package/cjs/PinInput/hooks/usePinInputRefs.js +62 -0
  189. package/cjs/PinInput/hooks/usePinValue.d.ts +14 -0
  190. package/cjs/PinInput/hooks/usePinValue.js +73 -0
  191. package/cjs/PinInput/index.d.ts +4 -0
  192. package/cjs/PinInput/index.js +9 -0
  193. package/cjs/Placeholder/PlaceholderGraph.js +1 -2
  194. package/cjs/Placeholder/PlaceholderGrid.js +1 -2
  195. package/cjs/Placeholder/PlaceholderParagraph.js +1 -2
  196. package/cjs/Popover/Popover.js +1 -2
  197. package/cjs/Progress/ProgressCircle.js +1 -2
  198. package/cjs/Progress/ProgressLine.js +1 -2
  199. package/cjs/Radio/Radio.js +1 -2
  200. package/cjs/RadioGroup/RadioGroup.js +1 -2
  201. package/cjs/RadioTile/RadioTile.js +1 -2
  202. package/cjs/RadioTileGroup/RadioTileGroup.js +1 -2
  203. package/cjs/RangeSlider/RangeSlider.js +2 -3
  204. package/cjs/Rate/Rate.js +1 -2
  205. package/cjs/SelectPicker/SelectPicker.js +1 -2
  206. package/cjs/Sidebar/Sidebar.js +1 -2
  207. package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +1 -2
  208. package/cjs/Sidenav/Sidenav.js +1 -2
  209. package/cjs/Sidenav/SidenavDropdownMenu.js +1 -2
  210. package/cjs/Slider/Slider.d.ts +5 -1
  211. package/cjs/Slider/Slider.js +13 -14
  212. package/cjs/Stack/Stack.js +1 -2
  213. package/cjs/Stat/Stat.js +1 -2
  214. package/cjs/Stat/StatValue.js +2 -2
  215. package/cjs/StatGroup/StatGroup.js +1 -2
  216. package/cjs/Steps/Steps.js +1 -2
  217. package/cjs/Table/Table.js +2 -2
  218. package/cjs/Tabs/Tabs.js +1 -2
  219. package/cjs/Tag/Tag.js +1 -2
  220. package/cjs/TagInput/TagInput.js +2 -2
  221. package/cjs/TagPicker/TagPicker.js +2 -2
  222. package/cjs/Text/Text.js +1 -2
  223. package/cjs/Textarea/Textarea.js +1 -2
  224. package/cjs/TimePicker/TimePicker.d.ts +1 -2
  225. package/cjs/TimePicker/TimePicker.js +2 -2
  226. package/cjs/TimeRangePicker/TimeRangePicker.js +2 -2
  227. package/cjs/Timeline/Timeline.js +1 -2
  228. package/cjs/Toggle/Toggle.js +1 -2
  229. package/cjs/Tooltip/Tooltip.js +1 -2
  230. package/cjs/Tree/Tree.js +1 -2
  231. package/cjs/Tree/TreeNode.js +1 -2
  232. package/cjs/Tree/TreeNodeToggle.js +1 -2
  233. package/cjs/Tree/TreeView.js +1 -2
  234. package/cjs/Tree/hooks/useFocusTree.js +1 -2
  235. package/cjs/TreePicker/TreePicker.js +1 -2
  236. package/cjs/Uploader/Uploader.js +1 -2
  237. package/cjs/Whisper/Whisper.js +2 -2
  238. package/cjs/index.d.ts +2 -0
  239. package/cjs/index.js +12 -0
  240. package/cjs/internals/Box/index.d.ts +1 -0
  241. package/cjs/internals/Box/index.js +1 -0
  242. package/cjs/internals/Burger/Burger.d.ts +16 -0
  243. package/cjs/internals/Burger/Burger.js +46 -0
  244. package/cjs/internals/Burger/index.d.ts +4 -0
  245. package/cjs/internals/Burger/index.js +11 -0
  246. package/cjs/internals/CloseButton/CloseButton.js +1 -2
  247. package/cjs/internals/Menu/Menu.js +1 -2
  248. package/cjs/internals/Menu/Menubar.js +2 -2
  249. package/cjs/internals/Picker/PickerIndicator.js +1 -2
  250. package/cjs/internals/Picker/hooks/useCombobox.d.ts +1 -1
  251. package/cjs/internals/Plaintext/Plaintext.js +1 -2
  252. package/cjs/internals/Provider/CustomContext.d.ts +253 -0
  253. package/cjs/internals/Provider/CustomContext.js +8 -0
  254. package/cjs/internals/Provider/types.d.ts +236 -0
  255. package/cjs/internals/Ripple/Ripple.js +1 -2
  256. package/cjs/internals/SafeAnchor/SafeAnchor.js +2 -2
  257. package/cjs/internals/Windowing/List.js +2 -2
  258. package/cjs/internals/hooks/index.d.ts +1 -0
  259. package/cjs/internals/hooks/index.js +3 -1
  260. package/cjs/{CustomProvider → internals/hooks}/useCustom.d.ts +4 -4
  261. package/cjs/{CustomProvider → internals/hooks}/useCustom.js +5 -5
  262. package/cjs/internals/hooks/useStyles.js +2 -2
  263. package/cjs/internals/hooks/useToggleCaret.js +2 -2
  264. package/cjs/{CustomProvider → internals/intl}/FormattedDate.js +2 -2
  265. package/cjs/{CustomProvider → internals/intl}/FormattedNumber.js +2 -2
  266. package/cjs/internals/types/picker.d.ts +2 -2
  267. package/cjs/internals/types/sizes.d.ts +2 -0
  268. package/cjs/internals/types/sizes.js +2 -1
  269. package/cjs/internals/utils/date/getWeekStartDates.d.ts +0 -1
  270. package/cjs/internals/utils/date/getWeekStartDates.js +2 -4
  271. package/cjs/internals/utils/react/createComponent.js +15 -4
  272. package/cjs/useToaster/useToaster.js +2 -5
  273. package/dist/rsuite-no-reset-rtl.css +246 -265
  274. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  275. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  276. package/dist/rsuite-no-reset.css +246 -265
  277. package/dist/rsuite-no-reset.min.css +1 -1
  278. package/dist/rsuite-no-reset.min.css.map +1 -1
  279. package/dist/rsuite-rtl.css +246 -265
  280. package/dist/rsuite-rtl.min.css +1 -1
  281. package/dist/rsuite-rtl.min.css.map +1 -1
  282. package/dist/rsuite.css +246 -265
  283. package/dist/rsuite.js +333 -223
  284. package/dist/rsuite.js.map +1 -1
  285. package/dist/rsuite.min.css +1 -1
  286. package/dist/rsuite.min.css.map +1 -1
  287. package/dist/rsuite.min.js +1 -1
  288. package/dist/rsuite.min.js.map +1 -1
  289. package/esm/Accordion/Accordion.js +1 -1
  290. package/esm/Affix/Affix.js +1 -2
  291. package/esm/Animation/Bounce.js +1 -2
  292. package/esm/Animation/Collapse.js +1 -2
  293. package/esm/Animation/Fade.js +1 -2
  294. package/esm/Animation/Slide.js +1 -2
  295. package/esm/AutoComplete/AutoComplete.d.ts +2 -2
  296. package/esm/AutoComplete/AutoComplete.js +1 -2
  297. package/esm/Avatar/Avatar.js +1 -2
  298. package/esm/AvatarGroup/AvatarGroup.js +1 -2
  299. package/esm/Badge/Badge.js +1 -2
  300. package/esm/Breadcrumb/Breadcrumb.js +1 -2
  301. package/esm/Button/Button.d.ts +2 -2
  302. package/esm/Button/Button.js +1 -2
  303. package/esm/ButtonGroup/ButtonGroup.d.ts +2 -2
  304. package/esm/ButtonGroup/ButtonGroup.js +1 -2
  305. package/esm/ButtonToolbar/ButtonToolbar.js +1 -2
  306. package/esm/Calendar/Calendar.js +3 -4
  307. package/esm/Calendar/CalendarBody.js +1 -4
  308. package/esm/Calendar/CalendarContainer.js +1 -1
  309. package/esm/Calendar/CalendarHeader.js +1 -1
  310. package/esm/Calendar/CalendarProvider.d.ts +1 -1
  311. package/esm/Calendar/Grid/GridCell.js +1 -2
  312. package/esm/Calendar/Grid/GridHeaderRow.js +1 -2
  313. package/esm/Calendar/Grid/GridRow.d.ts +2 -0
  314. package/esm/Calendar/Grid/GridRow.js +5 -4
  315. package/esm/Calendar/MonthDropdown/MonthDropdownItem.js +1 -2
  316. package/esm/Calendar/hooks/useCalendar.d.ts +24 -2
  317. package/esm/Calendar/hooks/useCalendar.js +35 -2
  318. package/esm/Card/Card.js +1 -2
  319. package/esm/CardGroup/CardGroup.js +1 -2
  320. package/esm/Carousel/Carousel.js +1 -2
  321. package/esm/CascadeTree/CascadeTree.js +1 -2
  322. package/esm/CascadeTree/SearchView.js +1 -2
  323. package/esm/CascadeTree/TreeView.js +1 -2
  324. package/esm/Cascader/Cascader.js +1 -2
  325. package/esm/CheckPicker/CheckPicker.js +1 -2
  326. package/esm/CheckTree/CheckTree.js +1 -2
  327. package/esm/CheckTree/CheckTreeNode.js +1 -2
  328. package/esm/CheckTree/CheckTreeView.js +1 -2
  329. package/esm/CheckTreePicker/CheckTreePicker.js +1 -2
  330. package/esm/Checkbox/Checkbox.js +1 -2
  331. package/esm/CheckboxGroup/CheckboxGroup.js +1 -2
  332. package/esm/Container/Container.js +1 -2
  333. package/esm/CustomProvider/CustomProvider.d.ts +1 -271
  334. package/esm/CustomProvider/CustomProvider.js +1 -1
  335. package/esm/CustomProvider/index.d.ts +1 -6
  336. package/esm/CustomProvider/index.js +0 -6
  337. package/esm/DateInput/DateInput.js +1 -2
  338. package/esm/DateInput/hooks/useDateInputState.js +1 -1
  339. package/esm/DatePicker/DatePicker.js +2 -3
  340. package/esm/DatePicker/hooks/useFocus.js +1 -2
  341. package/esm/DateRangeInput/DateRangeInput.js +1 -2
  342. package/esm/DateRangePicker/DateRangePicker.js +2 -3
  343. package/esm/DateRangePicker/Header.js +1 -1
  344. package/esm/DateRangePicker/utils.d.ts +1 -1
  345. package/esm/DateRangePicker/utils.js +1 -1
  346. package/esm/Divider/Divider.js +1 -2
  347. package/esm/Drawer/Drawer.js +1 -2
  348. package/esm/Dropdown/Dropdown.js +1 -2
  349. package/esm/Dropdown/DropdownMenu.js +1 -2
  350. package/esm/FlexboxGrid/FlexboxGrid.js +1 -2
  351. package/esm/Form/Form.js +1 -2
  352. package/esm/FormControl/FormControl.js +1 -2
  353. package/esm/FormControlLabel/FormControlLabel.js +1 -2
  354. package/esm/FormErrorMessage/FormErrorMessage.js +1 -2
  355. package/esm/FormGroup/FormGroup.js +1 -2
  356. package/esm/FormHelpText/FormHelpText.js +1 -2
  357. package/esm/FormStack/FormStack.js +1 -2
  358. package/esm/Grid/Col.js +1 -2
  359. package/esm/Grid/Grid.js +1 -2
  360. package/esm/Grid/Row.js +1 -2
  361. package/esm/Heading/Heading.js +1 -2
  362. package/esm/Highlight/Highlight.js +2 -3
  363. package/esm/IconButton/IconButton.js +1 -2
  364. package/esm/Image/Image.js +2 -3
  365. package/esm/InlineEdit/InlineEdit.js +1 -2
  366. package/esm/Input/Input.js +2 -2
  367. package/esm/InputGroup/InputGroup.js +1 -2
  368. package/esm/InputNumber/index.d.ts +12 -2
  369. package/esm/InputNumber/index.js +8 -1
  370. package/esm/InputPicker/InputPicker.js +1 -2
  371. package/esm/InputPicker/utils.d.ts +1 -1
  372. package/esm/Kbd/Kbd.js +1 -2
  373. package/esm/Link/Link.js +1 -2
  374. package/esm/List/List.js +1 -2
  375. package/esm/Loader/Loader.js +1 -2
  376. package/esm/MaskedInput/MaskedInput.js +1 -1
  377. package/esm/Message/Message.js +1 -2
  378. package/esm/Modal/Modal.js +1 -2
  379. package/esm/Modal/ModalHeader.js +1 -2
  380. package/esm/MultiCascadeTree/MultiCascadeTree.js +1 -2
  381. package/esm/MultiCascadeTree/SearchView.js +1 -2
  382. package/esm/MultiCascadeTree/TreeView.js +1 -2
  383. package/esm/MultiCascader/MultiCascader.js +1 -2
  384. package/esm/Nav/Nav.js +1 -2
  385. package/esm/Nav/NavDropdownMenu.js +1 -2
  386. package/esm/Navbar/Navbar.d.ts +1 -1
  387. package/esm/Navbar/Navbar.js +1 -2
  388. package/esm/Navbar/NavbarDropdownMenu.js +1 -2
  389. package/esm/Navbar/NavbarToggle.d.ts +8 -3
  390. package/esm/Navbar/NavbarToggle.js +10 -15
  391. package/esm/Notification/Notification.js +1 -2
  392. package/esm/{InputNumber/InputNumber.d.ts → NumberInput/NumberInput.d.ts} +20 -8
  393. package/esm/NumberInput/NumberInput.js +157 -0
  394. package/esm/NumberInput/hooks/useEvents.d.ts +22 -0
  395. package/esm/NumberInput/hooks/useEvents.js +110 -0
  396. package/esm/NumberInput/hooks/useNumberInputValue.d.ts +7 -0
  397. package/esm/NumberInput/hooks/useNumberInputValue.js +29 -0
  398. package/esm/NumberInput/hooks/useWheelHandler.d.ts +5 -0
  399. package/esm/NumberInput/hooks/useWheelHandler.js +21 -0
  400. package/esm/NumberInput/index.d.ts +4 -0
  401. package/esm/NumberInput/index.js +8 -0
  402. package/esm/NumberInput/utils/number.d.ts +17 -0
  403. package/esm/NumberInput/utils/number.js +59 -0
  404. package/esm/Pagination/LimitPicker.d.ts +2 -2
  405. package/esm/Pagination/Pagination.d.ts +2 -2
  406. package/esm/Pagination/Pagination.js +1 -2
  407. package/esm/Pagination/PaginationGroup.js +1 -2
  408. package/esm/Panel/Panel.js +1 -2
  409. package/esm/PanelGroup/PanelGroup.js +1 -2
  410. package/esm/PasswordInput/PasswordInput.d.ts +4 -0
  411. package/esm/PasswordInput/PasswordInput.js +5 -4
  412. package/esm/PasswordStrengthMeter/PasswordStrengthMeter.js +1 -2
  413. package/esm/PinInput/PinInput.d.ts +36 -0
  414. package/esm/PinInput/PinInput.js +219 -0
  415. package/esm/PinInput/hooks/usePinInputRefs.d.ts +12 -0
  416. package/esm/PinInput/hooks/usePinInputRefs.js +58 -0
  417. package/esm/PinInput/hooks/usePinValue.d.ts +14 -0
  418. package/esm/PinInput/hooks/usePinValue.js +69 -0
  419. package/esm/PinInput/index.d.ts +4 -0
  420. package/esm/PinInput/index.js +4 -0
  421. package/esm/Placeholder/PlaceholderGraph.js +1 -2
  422. package/esm/Placeholder/PlaceholderGrid.js +1 -2
  423. package/esm/Placeholder/PlaceholderParagraph.js +1 -2
  424. package/esm/Popover/Popover.js +1 -2
  425. package/esm/Progress/ProgressCircle.js +1 -2
  426. package/esm/Progress/ProgressLine.js +1 -2
  427. package/esm/Radio/Radio.js +1 -2
  428. package/esm/RadioGroup/RadioGroup.js +1 -2
  429. package/esm/RadioTile/RadioTile.js +1 -2
  430. package/esm/RadioTileGroup/RadioTileGroup.js +1 -2
  431. package/esm/RangeSlider/RangeSlider.js +1 -2
  432. package/esm/Rate/Rate.js +1 -2
  433. package/esm/SelectPicker/SelectPicker.js +1 -2
  434. package/esm/Sidebar/Sidebar.js +1 -2
  435. package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +1 -2
  436. package/esm/Sidenav/Sidenav.js +1 -2
  437. package/esm/Sidenav/SidenavDropdownMenu.js +1 -2
  438. package/esm/Slider/Slider.d.ts +5 -1
  439. package/esm/Slider/Slider.js +12 -13
  440. package/esm/Stack/Stack.js +1 -2
  441. package/esm/Stat/Stat.js +1 -2
  442. package/esm/Stat/StatValue.js +1 -1
  443. package/esm/StatGroup/StatGroup.js +1 -2
  444. package/esm/Steps/Steps.js +1 -2
  445. package/esm/Table/Table.js +1 -1
  446. package/esm/Tabs/Tabs.js +1 -2
  447. package/esm/Tag/Tag.js +1 -2
  448. package/esm/TagInput/TagInput.js +1 -1
  449. package/esm/TagPicker/TagPicker.js +1 -1
  450. package/esm/Text/Text.js +1 -2
  451. package/esm/Textarea/Textarea.js +1 -2
  452. package/esm/TimePicker/TimePicker.d.ts +1 -2
  453. package/esm/TimePicker/TimePicker.js +1 -1
  454. package/esm/TimeRangePicker/TimeRangePicker.js +1 -1
  455. package/esm/Timeline/Timeline.js +1 -2
  456. package/esm/Toggle/Toggle.js +1 -2
  457. package/esm/Tooltip/Tooltip.js +1 -2
  458. package/esm/Tree/Tree.js +1 -2
  459. package/esm/Tree/TreeNode.js +1 -2
  460. package/esm/Tree/TreeNodeToggle.js +1 -2
  461. package/esm/Tree/TreeView.js +1 -2
  462. package/esm/Tree/hooks/useFocusTree.js +1 -2
  463. package/esm/TreePicker/TreePicker.js +1 -2
  464. package/esm/Uploader/Uploader.js +1 -2
  465. package/esm/Whisper/Whisper.js +1 -1
  466. package/esm/index.d.ts +2 -0
  467. package/esm/index.js +2 -0
  468. package/esm/internals/Box/index.d.ts +1 -0
  469. package/esm/internals/Box/index.js +1 -0
  470. package/esm/internals/Burger/Burger.d.ts +16 -0
  471. package/esm/internals/Burger/Burger.js +41 -0
  472. package/esm/internals/Burger/index.d.ts +4 -0
  473. package/esm/internals/Burger/index.js +8 -0
  474. package/esm/internals/CloseButton/CloseButton.js +1 -2
  475. package/esm/internals/Menu/Menu.js +1 -1
  476. package/esm/internals/Menu/Menubar.js +1 -1
  477. package/esm/internals/Picker/PickerIndicator.js +1 -2
  478. package/esm/internals/Picker/hooks/useCombobox.d.ts +1 -1
  479. package/esm/internals/Plaintext/Plaintext.js +1 -2
  480. package/esm/internals/Provider/CustomContext.d.ts +253 -0
  481. package/esm/internals/Provider/CustomContext.js +3 -0
  482. package/esm/internals/Provider/types.d.ts +236 -0
  483. package/esm/internals/Ripple/Ripple.js +1 -2
  484. package/esm/internals/SafeAnchor/SafeAnchor.js +1 -1
  485. package/esm/internals/Windowing/List.js +1 -1
  486. package/esm/internals/hooks/index.d.ts +1 -0
  487. package/esm/internals/hooks/index.js +1 -0
  488. package/esm/{CustomProvider → internals/hooks}/useCustom.d.ts +4 -4
  489. package/esm/{CustomProvider → internals/hooks}/useCustom.js +4 -4
  490. package/esm/internals/hooks/useStyles.js +1 -1
  491. package/esm/internals/hooks/useToggleCaret.js +1 -1
  492. package/esm/{CustomProvider → internals/intl}/FormattedDate.js +1 -1
  493. package/esm/{CustomProvider → internals/intl}/FormattedNumber.js +1 -1
  494. package/esm/internals/types/picker.d.ts +2 -2
  495. package/esm/internals/types/sizes.d.ts +2 -0
  496. package/esm/internals/types/sizes.js +3 -1
  497. package/esm/internals/utils/date/getWeekStartDates.d.ts +0 -1
  498. package/esm/internals/utils/date/getWeekStartDates.js +2 -4
  499. package/esm/internals/utils/react/createComponent.js +12 -2
  500. package/esm/useToaster/useToaster.js +1 -3
  501. package/internals/Burger/styles/index.less +67 -0
  502. package/internals/CloseButton/styles/index.less +0 -10
  503. package/internals/Picker/styles/index.less +13 -10
  504. package/internals/Picker/styles/mixin.less +3 -3
  505. package/package.json +3 -3
  506. package/styles/color-modes/dark.less +7 -10
  507. package/styles/color-modes/high-contrast.less +3 -6
  508. package/styles/color-modes/light.less +5 -8
  509. package/styles/index.less +3 -1
  510. package/styles/mixins/utilities.less +2 -5
  511. package/cjs/CustomProvider/types.d.ts +0 -234
  512. package/cjs/InputNumber/InputNumber.js +0 -300
  513. package/esm/CustomProvider/types.d.ts +0 -234
  514. package/esm/InputNumber/InputNumber.js +0 -293
  515. /package/cjs/{CustomProvider → internals/Provider}/types.js +0 -0
  516. /package/cjs/{CustomProvider → internals/intl}/FormattedDate.d.ts +0 -0
  517. /package/cjs/{CustomProvider → internals/intl}/FormattedNumber.d.ts +0 -0
  518. /package/esm/{CustomProvider → internals/Provider}/types.js +0 -0
  519. /package/esm/{CustomProvider → internals/intl}/FormattedDate.d.ts +0 -0
  520. /package/esm/{CustomProvider → internals/intl}/FormattedNumber.d.ts +0 -0
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
4
  import Button from "../Button/index.js";
5
5
  import { forwardRef } from "../internals/utils/index.js";
6
- import { useStyles } from "../internals/hooks/index.js";
7
- import { useCustom } from "../CustomProvider/index.js";
6
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
8
7
  /**
9
8
  * The `IconButton` component is used to specify a button with icon.
10
9
  * @see https://rsuitejs.com/components/button
@@ -2,11 +2,10 @@
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
4
  import Box from "../internals/Box/index.js";
5
- import { useStyles } from "../internals/hooks/index.js";
5
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
6
+ import { forwardRef } from "../internals/utils/index.js";
6
7
  import { ImageWrapper } from "./ImageWrapper.js";
7
8
  import { useImage } from "./hooks/useImage.js";
8
- import { useCustom } from "../CustomProvider/index.js";
9
- import { forwardRef } from "../internals/utils/index.js";
10
9
  const Image = forwardRef((props, ref) => {
11
10
  const {
12
11
  propsWithDefaults
@@ -5,10 +5,9 @@ import EditableControls from "./EditableControls.js";
5
5
  import useFocusEvent from "./useFocusEvent.js";
6
6
  import useEditState from "./useEditState.js";
7
7
  import Box from "../internals/Box/index.js";
8
- import { useStyles } from "../internals/hooks/index.js";
8
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
9
9
  import { forwardRef, mergeRefs } from "../internals/utils/index.js";
10
10
  import { renderChildren, defaultRenderInput } from "./renderChildren.js";
11
- import { useCustom } from "../CustomProvider/index.js";
12
11
  const InlineEdit = forwardRef((props, ref) => {
13
12
  const {
14
13
  propsWithDefaults
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React, { useContext } from 'react';
4
- import { forwardRef } from "../internals/utils/index.js";
5
4
  import InputBase from "../internals/InputBase/index.js";
5
+ import { forwardRef } from "../internals/utils/index.js";
6
6
  import { InputGroupContext } from "../InputGroup/InputGroup.js";
7
- import { useCustom } from "../CustomProvider/index.js";
7
+ import { useCustom } from "../internals/hooks/index.js";
8
8
  /**
9
9
  * The `<Input>` component is used to get user input in a text field.
10
10
  *
@@ -5,8 +5,7 @@ import Box from "../internals/Box/index.js";
5
5
  import InputGroupAddon from "./InputGroupAddon.js";
6
6
  import InputGroupButton from "./InputGroupButton.js";
7
7
  import { forwardRef } from "../internals/utils/index.js";
8
- import { useStyles } from "../internals/hooks/index.js";
9
- import { useCustom } from "../CustomProvider/index.js";
8
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
10
9
  export const InputGroupContext = /*#__PURE__*/React.createContext(null);
11
10
  const Subcomponents = {
12
11
  Addon: InputGroupAddon,
@@ -1,4 +1,14 @@
1
- import InputNumber from './InputNumber';
2
- export type { InputNumberProps } from './InputNumber';
1
+ /// <reference types="react" />
2
+ import { NumberInputProps as InputNumberProps } from '../NumberInput';
3
+ /**
4
+ * The `InputNumber` component is used to enter a numerical value.
5
+ * @see https://rsuitejs.com/components/number-input
6
+ * @deprecated Use `NumberInput` instead.
7
+ */
8
+ declare const InputNumber: import("../internals/types").InternalRefForwardingComponent<import("../internals/types").InternalRefForwardingComponent<"div", import("..").InputGroupProps, never> & {
9
+ Addon: import("../internals/types").InternalRefForwardingComponent<"span", import("..").InputGroupAddonProps, never> & Record<string, never>;
10
+ Button: import("react").ForwardRefExoticComponent<import("..").ButtonProps & import("react").RefAttributes<any>>;
11
+ }, InputNumberProps<string | number | null>, never> & Record<string, never>;
12
+ export type { InputNumberProps };
3
13
  export { InputNumber };
4
14
  export default InputNumber;
@@ -1,5 +1,12 @@
1
1
  'use client';
2
- import InputNumber from "./InputNumber.js";
2
+ import NumberInput from "../NumberInput/index.js";
3
+
4
+ /**
5
+ * The `InputNumber` component is used to enter a numerical value.
6
+ * @see https://rsuitejs.com/components/number-input
7
+ * @deprecated Use `NumberInput` instead.
8
+ */
9
+ const InputNumber = NumberInput;
3
10
 
4
11
  // export types
5
12
 
@@ -14,11 +14,10 @@ import useInput from "./hooks/useInput.js";
14
14
  import useData from "./hooks/useData.js";
15
15
  import Plaintext from "../internals/Plaintext/index.js";
16
16
  import { filterNodesOfTree } from "../internals/Tree/utils/index.js";
17
- import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
17
+ import { useStyles, useCustom, useControlled, useEventCallback } from "../internals/hooks/index.js";
18
18
  import { KEY_VALUES } from "../internals/constants/index.js";
19
19
  import { useTagContext } from "./InputPickerContext.js";
20
20
  import { convertSize } from "./utils.js";
21
- import { useCustom } from "../CustomProvider/index.js";
22
21
  import { forwardRef, shallowEqual, getDataGroupBy, createChainedFunction, tplTransform, mergeRefs, isOneOf, mergeStyles } from "../internals/utils/index.js";
23
22
  import { Listbox, ListItem, ListCheckItem, PickerToggle, PickerPopup, PickerToggleTrigger, useFocusItemValue, useSearch, usePickerRef, useToggleKeyDownEvent, triggerPropKeys } from "../internals/Picker/index.js";
24
23
  import { getPositionStyle } from "../internals/Overlay/Position.js";
@@ -1 +1 @@
1
- export declare const convertSize: (size?: string) => "sm" | "md" | "lg";
1
+ export declare const convertSize: (size?: string) => "lg" | "md" | "sm";
package/esm/Kbd/Kbd.js CHANGED
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
4
  import Box from "../internals/Box/index.js";
5
5
  import { forwardRef } from "../internals/utils/index.js";
6
- import { useStyles } from "../internals/hooks/index.js";
7
- import { useCustom } from "../CustomProvider/index.js";
6
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
8
7
  /**
9
8
  *
10
9
  * The `Kbd` component is used to display a Kbd.
package/esm/Link/Link.js CHANGED
@@ -2,8 +2,7 @@
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
4
  import { forwardRef } from "../internals/utils/index.js";
5
- import { useStyles } from "../internals/hooks/index.js";
6
- import { useCustom } from "../CustomProvider/index.js";
5
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
7
6
  import SafeAnchor from "../internals/SafeAnchor/index.js";
8
7
  import ExternalLinkIcon from "./ExternalLinkIcon.js";
9
8
  const Link = forwardRef((props, ref) => {
package/esm/List/List.js CHANGED
@@ -5,9 +5,8 @@ import useSortHelper from "./helper/useSortHelper.js";
5
5
  import ListContext from "./ListContext.js";
6
6
  import ListItem from "./ListItem.js";
7
7
  import Box from "../internals/Box/index.js";
8
- import { useStyles } from "../internals/hooks/index.js";
8
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
9
9
  import { forwardRef, mergeRefs } from "../internals/utils/index.js";
10
- import { useCustom } from "../CustomProvider/index.js";
11
10
  const Subcomponents = {
12
11
  Item: ListItem
13
12
  };
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
4
  import Box from "../internals/Box/index.js";
5
5
  import { forwardRef } from "../internals/utils/index.js";
6
- import { useStyles, useUniqueId } from "../internals/hooks/index.js";
7
- import { useCustom } from "../CustomProvider/index.js";
6
+ import { useStyles, useCustom, useUniqueId } from "../internals/hooks/index.js";
8
7
  /**
9
8
  * The `Loader` component is used to indicate the loading state of a page or a section.
10
9
  * @see https://rsuitejs.com/components/loader
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import TextMask from "./TextMask.js";
5
5
  import Input from "../Input/index.js";
6
6
  import { forwardRef } from "../internals/utils/index.js";
7
- import { useCustom } from "../CustomProvider/index.js";
7
+ import { useCustom } from "../internals/hooks/index.js";
8
8
  const MaskedInput = forwardRef((props, ref) => {
9
9
  const {
10
10
  propsWithDefaults
@@ -6,8 +6,7 @@ import useDelayedClosure from "../toaster/hooks/useDelayedClosure.js";
6
6
  import Box from "../internals/Box/index.js";
7
7
  import { mergeRefs, forwardRef } from "../internals/utils/index.js";
8
8
  import { MESSAGE_STATUS_ICONS } from "../internals/constants/statusIcons.js";
9
- import { useStyles, useIsMounted, useEventCallback } from "../internals/hooks/index.js";
10
- import { useCustom } from "../CustomProvider/index.js";
9
+ import { useStyles, useCustom, useIsMounted, useEventCallback } from "../internals/hooks/index.js";
11
10
  /**
12
11
  * The `Message` component is used to display important messages to users.
13
12
  * @see https://rsuitejs.com/components/message
@@ -11,11 +11,10 @@ import ModalBody from "./ModalBody.js";
11
11
  import ModalHeader from "./ModalHeader.js";
12
12
  import ModalTitle from "./ModalTitle.js";
13
13
  import ModalFooter from "./ModalFooter.js";
14
- import { useStyles, useWillUnmount, useUniqueId } from "../internals/hooks/index.js";
14
+ import { useStyles, useCustom, useWillUnmount, useUniqueId } from "../internals/hooks/index.js";
15
15
  import { mergeRefs, forwardRef } from "../internals/utils/index.js";
16
16
  import { ModalContext } from "./ModalContext.js";
17
17
  import { useBodyStyles } from "./utils.js";
18
- import { useCustom } from "../CustomProvider/index.js";
19
18
  const modalSizes = ['xs', 'sm', 'md', 'lg', 'full'];
20
19
  const Subcomponents = {
21
20
  Body: ModalBody,
@@ -25,7 +25,6 @@ const ModalHeader = forwardRef((props, ref) => {
25
25
  const classes = merge(className, withPrefix());
26
26
  const context = useContext(ModalContext);
27
27
  const {
28
- isDrawer,
29
28
  onModalClose
30
29
  } = context || {};
31
30
  return /*#__PURE__*/React.createElement(Box, _extends({
@@ -34,7 +33,7 @@ const ModalHeader = forwardRef((props, ref) => {
34
33
  ref: ref,
35
34
  className: classes
36
35
  }), closeButton && /*#__PURE__*/React.createElement(CloseButton, {
37
- as: isDrawer ? IconButton : 'button',
36
+ as: IconButton,
38
37
  className: prefix('close'),
39
38
  onClick: createChainedFunction(onClose, onModalClose)
40
39
  }), children);
@@ -6,8 +6,7 @@ import SearchView from "./SearchView.js";
6
6
  import Box from "../internals/Box/index.js";
7
7
  import { forwardRef } from "../internals/utils/index.js";
8
8
  import { useCascadeValue, useSelect, useSearch } from "./hooks/index.js";
9
- import { useStyles, useControlled } from "../internals/hooks/index.js";
10
- import { useCustom } from "../CustomProvider/index.js";
9
+ import { useStyles, useCustom, useControlled } from "../internals/hooks/index.js";
11
10
  const emptyArray = [];
12
11
 
13
12
  /**
@@ -4,8 +4,7 @@ import React from 'react';
4
4
  import SearchBox from "../internals/SearchBox/index.js";
5
5
  import Checkbox from "../Checkbox/index.js";
6
6
  import Highlight from "../Highlight/index.js";
7
- import { useStyles } from "../internals/hooks/index.js";
8
- import { useCustom } from "../CustomProvider/index.js";
7
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
9
8
  import { isSomeChildChecked, getNodeParents } from "./utils.js";
10
9
  function SearchView(props) {
11
10
  const {
@@ -4,11 +4,10 @@ import React from 'react';
4
4
  import SpinnerIcon from '@rsuite/icons/Spinner';
5
5
  import ArrowLeftLineIcon from '@rsuite/icons/ArrowLeftLine';
6
6
  import ArrowRightLineIcon from '@rsuite/icons/ArrowRightLine';
7
- import { useStyles, useEventCallback } from "../internals/hooks/index.js";
7
+ import { useStyles, useCustom, useEventCallback } from "../internals/hooks/index.js";
8
8
  import { forwardRef, shallowEqual, mergeStyles } from "../internals/utils/index.js";
9
9
  import { ListCheckItem, useCombobox } from "../internals/Picker/index.js";
10
10
  import { isSomeParentChecked, isSomeChildChecked } from "./utils.js";
11
- import { useCustom } from "../CustomProvider/index.js";
12
11
  const emptyArray = [];
13
12
  const TreeView = forwardRef((props, ref) => {
14
13
  const {
@@ -8,11 +8,10 @@ import TreeView from "../MultiCascadeTree/TreeView.js";
8
8
  import SearchView from "../MultiCascadeTree/SearchView.js";
9
9
  import useActive from "../Cascader/useActive.js";
10
10
  import { findNodeOfTree } from "../internals/Tree/utils/index.js";
11
- import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
11
+ import { useStyles, useCustom, useControlled, useEventCallback } from "../internals/hooks/index.js";
12
12
  import { getColumnsAndPaths } from "../CascadeTree/utils.js";
13
13
  import { forwardRef, createChainedFunction, mergeRefs } from "../internals/utils/index.js";
14
14
  import { useCascadeValue, useSearch, useSelect } from "../MultiCascadeTree/hooks/index.js";
15
- import { useCustom } from "../CustomProvider/index.js";
16
15
  import { PickerToggle, PickerPopup, SelectedElement, PickerToggleTrigger, usePickerRef, useToggleKeyDownEvent, useFocusItemValue, triggerPropKeys } from "../internals/Picker/index.js";
17
16
  const emptyArray = [];
18
17
 
package/esm/Nav/Nav.js CHANGED
@@ -11,10 +11,9 @@ import NavDropdownMenu from "./NavDropdownMenu.js";
11
11
  import AdaptiveNavItem from "./AdaptiveNavItem.js";
12
12
  import Box from "../internals/Box/index.js";
13
13
  import { forwardRef, deprecateComponent } from "../internals/utils/index.js";
14
- import { useStyles, useEnsuredRef, useControlled } from "../internals/hooks/index.js";
14
+ import { useStyles, useCustom, useEnsuredRef, useControlled } from "../internals/hooks/index.js";
15
15
  import { NavbarContext } from "../Navbar/NavbarContext.js";
16
16
  import { SidenavContext } from "../Sidenav/Sidenav.js";
17
- import { useCustom } from "../CustomProvider/index.js";
18
17
  const DeprecatedNavDropdown = deprecateComponent(NavDropdown, '<Nav.Dropdown> is deprecated, use <Nav.Menu> instead.');
19
18
  DeprecatedNavDropdown.Menu = deprecateComponent(NavDropdownMenu, '<Nav.Dropdown.Menu> is deprecated, use <Nav.Menu> instead');
20
19
  DeprecatedNavDropdown.Item = deprecateComponent(NavDropdownItem, '<Nav.Dropdown.Item> is deprecated, use <Nav.Item> instead');
@@ -7,9 +7,8 @@ import MenuItem from "../internals/Menu/MenuItem.js";
7
7
  import PagePreviousIcon from '@rsuite/icons/PagePrevious';
8
8
  import PageNextIcon from '@rsuite/icons/PageNext';
9
9
  import NavContext from "./NavContext.js";
10
- import { useStyles } from "../internals/hooks/index.js";
10
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
11
11
  import { mergeRefs } from "../internals/utils/index.js";
12
- import { useCustom } from "../CustomProvider/index.js";
13
12
  /**
14
13
  * @private
15
14
  */
@@ -17,7 +17,7 @@ export interface NavbarProps extends BoxProps {
17
17
  declare const Navbar: import("../internals/types").InternalRefForwardingComponent<"div", NavbarProps, never> & {
18
18
  Brand: import("../internals/types").InternalRefForwardingComponent<"a", Partial<import("../internals/utils").ComponentProps>, never> & Record<string, never>;
19
19
  Content: import("../internals/types").InternalRefForwardingComponent<import("../internals/types").InternalRefForwardingComponent<"div", BoxProps, never> & Record<string, never>, Partial<import("./NavbarContent").NavbarContentProps>, never> & Record<string, never>;
20
- Toggle: React.ForwardRefExoticComponent<import("..").IconButtonProps & React.RefAttributes<any>>;
20
+ Toggle: React.ForwardRefExoticComponent<import("./NavbarToggle").NavbarToggleProps & React.RefAttributes<any>>;
21
21
  Drawer: React.ForwardRefExoticComponent<import("..").DrawerProps & React.RefAttributes<any>>;
22
22
  };
23
23
  export default Navbar;
@@ -7,8 +7,7 @@ import NavbarToggle from "./NavbarToggle.js";
7
7
  import NavbarDrawer from "./NavbarDrawer.js";
8
8
  import Box from "../internals/Box/index.js";
9
9
  import { forwardRef } from "../internals/utils/index.js";
10
- import { useStyles, useEventCallback, useUniqueId } from "../internals/hooks/index.js";
11
- import { useCustom } from "../CustomProvider/index.js";
10
+ import { useStyles, useCustom, useEventCallback, useUniqueId } from "../internals/hooks/index.js";
12
11
  import { NavbarContext } from "./NavbarContext.js";
13
12
  const Subcomponents = {
14
13
  Brand: NavbarBrand,
@@ -8,9 +8,8 @@ import PageNextIcon from '@rsuite/icons/PageNext';
8
8
  import Disclosure from "../internals/Disclosure/index.js";
9
9
  import NavContext from "../Nav/NavContext.js";
10
10
  import { mergeRefs } from "../internals/utils/index.js";
11
- import { useStyles } from "../internals/hooks/index.js";
11
+ import { useStyles, useCustom } from "../internals/hooks/index.js";
12
12
  import { NavbarContext } from "./NavbarContext.js";
13
- import { useCustom } from "../CustomProvider/index.js";
14
13
  /**
15
14
  * @private this component is not supposed to be used directly
16
15
  * Instead it's rendered by a <Nav.Menu> within a <Navbar>
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
- import { IconButtonProps } from '../IconButton';
3
- export type NavbarToggleProps = IconButtonProps;
4
- declare const NavbarToggle: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<any>>;
2
+ import { BurgerProps } from '../internals/Burger';
3
+ export interface NavbarToggleProps extends Omit<BurgerProps, 'onToggle'> {
4
+ /**
5
+ * Callback function that is called when the toggle is clicked.
6
+ */
7
+ onToggle?: (open: boolean) => void;
8
+ }
9
+ declare const NavbarToggle: React.ForwardRefExoticComponent<NavbarToggleProps & React.RefAttributes<any>>;
5
10
  export default NavbarToggle;
@@ -1,36 +1,31 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React, { useContext } from 'react';
4
- import IconButton from "../IconButton/index.js";
5
- import MenuIcon from '@rsuite/icons/Menu';
4
+ import { Burger } from "../internals/Burger/index.js";
6
5
  import { useEventCallback } from "../internals/hooks/index.js";
7
- import { createComponent, createChainedFunction } from "../internals/utils/index.js";
6
+ import { createChainedFunction } from "../internals/utils/index.js";
8
7
  import { NavbarContext } from "./NavbarContext.js";
9
- const Toggle = createComponent({
10
- name: 'NavbarToggle',
11
- componentAs: IconButton,
12
- componentClassPrefix: 'navbar-toggle',
13
- icon: /*#__PURE__*/React.createElement(MenuIcon, null)
14
- });
15
8
  const NavbarToggle = /*#__PURE__*/React.forwardRef((props, ref) => {
16
9
  const {
17
- appearance: navbarAppearance,
18
10
  navbarId,
19
- onToggle
11
+ open: contextOpen,
12
+ onToggle: onToggleContext
20
13
  } = useContext(NavbarContext) || {};
21
14
  const {
22
- appearance = navbarAppearance === 'inverse' ? 'primary' : 'subtle',
15
+ open,
23
16
  onClick,
17
+ onToggle,
24
18
  ...rest
25
19
  } = props;
26
20
  const handleClick = useEventCallback(() => {
27
21
  onToggle === null || onToggle === void 0 || onToggle(true);
22
+ onToggleContext === null || onToggleContext === void 0 || onToggleContext(true);
28
23
  });
29
- return /*#__PURE__*/React.createElement(Toggle, _extends({
24
+ return /*#__PURE__*/React.createElement(Burger, _extends({
30
25
  ref: ref,
31
- appearance: appearance,
32
26
  onClick: createChainedFunction(handleClick, onClick),
33
- "aria-controls": `${navbarId}-drawer`
27
+ "aria-controls": `${navbarId}-drawer`,
28
+ open: typeof open === 'boolean' ? open : contextOpen
34
29
  }, rest));
35
30
  });
36
31
  NavbarToggle.displayName = 'NavbarToggle';
@@ -5,9 +5,8 @@ import useDelayedClosure from "../toaster/hooks/useDelayedClosure.js";
5
5
  import CloseButton from "../internals/CloseButton/index.js";
6
6
  import Box from "../internals/Box/index.js";
7
7
  import { MESSAGE_STATUS_ICONS } from "../internals/constants/statusIcons.js";
8
- import { useStyles, useIsMounted, useEventCallback } from "../internals/hooks/index.js";
8
+ import { useStyles, useCustom, useIsMounted, useEventCallback } from "../internals/hooks/index.js";
9
9
  import { forwardRef, mergeRefs } from "../internals/utils/index.js";
10
- import { useCustom } from "../CustomProvider/index.js";
11
10
  /**
12
11
  * The `Notification` component is used to display global messages and notifications.
13
12
  *
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { BoxProps } from '../internals/Box';
3
- import type { SanitizedInputProps, FormControlBaseProps, AppearanceType, Size } from '../internals/types';
4
- export interface InputNumberProps<T = number | string | null> extends Omit<SanitizedInputProps, 'value' | 'defaultValue' | 'prefix'>, BoxProps, FormControlBaseProps<T> {
3
+ import type { SanitizedInputProps, FormControlBaseProps, AppearanceType, BasicSize } from '../internals/types';
4
+ export interface NumberInputProps<T = number | string | null> extends Omit<SanitizedInputProps, 'value' | 'defaultValue' | 'prefix'>, BoxProps, FormControlBaseProps<T> {
5
5
  /**
6
6
  * Button can have different appearances
7
7
  */
@@ -41,27 +41,39 @@ export interface InputNumberProps<T = number | string | null> extends Omit<Sanit
41
41
  prefix?: React.ReactNode;
42
42
  /**
43
43
  * Sets the element displayed on the right side of the component
44
+ * @deprecated Use `suffix` instead.
44
45
  */
45
46
  postfix?: React.ReactNode;
47
+ /**
48
+ * Sets the element displayed on the right side of the component
49
+ */
50
+ suffix?: React.ReactNode;
46
51
  /**
47
52
  * An Input can have different sizes
48
53
  */
49
- size?: Size;
54
+ size?: BasicSize;
50
55
  /**
51
56
  * Whether the value can be changed through the wheel event
52
57
  */
53
58
  scrollable?: boolean;
59
+ /**
60
+ * Show or hide control icons:
61
+ * - `true` (default): show default up/down buttons.
62
+ * - `false`: hide controls.
63
+ * - `(trigger) => ReactNode`: fully custom control per trigger ('up' | 'down').
64
+ */
65
+ controls?: boolean | ((trigger: 'up' | 'down') => React.ReactNode);
54
66
  /**
55
67
  * Callback function when wheel event is triggered
56
68
  */
57
69
  onWheel?: (event: React.WheelEvent) => void;
58
70
  }
59
71
  /**
60
- * The `InputNumber` component is used to enter a numerical value.
61
- * @see https://rsuitejs.com/components/input-number
72
+ * The `NumberInput` component is used to enter a numerical value.
73
+ * @see https://rsuitejs.com/components/number-input
62
74
  */
63
- declare const InputNumber: import("../internals/types").InternalRefForwardingComponent<import("../internals/types").InternalRefForwardingComponent<"div", import("../InputGroup/InputGroup").InputGroupProps, never> & {
75
+ declare const NumberInput: import("../internals/types").InternalRefForwardingComponent<import("../internals/types").InternalRefForwardingComponent<"div", import("../InputGroup/InputGroup").InputGroupProps, never> & {
64
76
  Addon: import("../internals/types").InternalRefForwardingComponent<"span", import("../InputGroup/InputGroupAddon").InputGroupAddonProps, never> & Record<string, never>;
65
77
  Button: React.ForwardRefExoticComponent<import("../Button").ButtonProps & React.RefAttributes<any>>;
66
- }, InputNumberProps<string | number | null>, never> & Record<string, never>;
67
- export default InputNumber;
78
+ }, NumberInputProps<string | number | null>, never> & Record<string, never>;
79
+ export default NumberInput;
@@ -0,0 +1,157 @@
1
+ 'use client';
2
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import React from 'react';
4
+ import ArrowUpLineIcon from '@rsuite/icons/ArrowUpLine';
5
+ import ArrowDownLineIcon from '@rsuite/icons/ArrowDownLine';
6
+ import InputGroup from "../InputGroup/InputGroup.js";
7
+ import InputGroupAddon from "../InputGroup/InputGroupAddon.js";
8
+ import Input from "../Input/index.js";
9
+ import Button from "../Button/index.js";
10
+ import { useStyles, useCustom, useControlled, useEventCallback } from "../internals/hooks/index.js";
11
+ import { forwardRef, partitionHTMLProps, createChainedFunction } from "../internals/utils/index.js";
12
+ import { useNumberInputValue } from "./hooks/useNumberInputValue.js";
13
+ import { useEvents } from "./hooks/useEvents.js";
14
+ import { valueReachesMax, valueReachesMin } from "./utils/number.js";
15
+ /**
16
+ * The `NumberInput` component is used to enter a numerical value.
17
+ * @see https://rsuitejs.com/components/number-input
18
+ */
19
+ const NumberInput = forwardRef((props, ref) => {
20
+ const {
21
+ propsWithDefaults
22
+ } = useCustom('NumberInput', props);
23
+ const {
24
+ as,
25
+ className,
26
+ classPrefix = 'number-input',
27
+ controls = true,
28
+ disabled,
29
+ decimalSeparator,
30
+ formatter,
31
+ readOnly,
32
+ plaintext,
33
+ value: valueProp,
34
+ defaultValue,
35
+ size,
36
+ prefix: prefixElement,
37
+ postfix,
38
+ suffix = postfix,
39
+ step = 1,
40
+ buttonAppearance = 'subtle',
41
+ min: minProp,
42
+ max: maxProp,
43
+ scrollable = true,
44
+ onChange,
45
+ onWheel,
46
+ onBlur: onBlurProp,
47
+ onFocus: onFocusProp,
48
+ ...rest
49
+ } = propsWithDefaults;
50
+ const min = minProp !== null && minProp !== void 0 ? minProp : -Infinity;
51
+ const max = maxProp !== null && maxProp !== void 0 ? maxProp : Infinity;
52
+ const [value, setValue] = useControlled(valueProp, defaultValue);
53
+ const {
54
+ withPrefix,
55
+ merge,
56
+ prefix
57
+ } = useStyles(classPrefix);
58
+ const classes = merge(className, withPrefix());
59
+ const [htmlInputProps, restProps] = partitionHTMLProps(rest);
60
+ const onChangeValue = (currentValue, event) => {
61
+ if (currentValue !== value) {
62
+ setValue(currentValue);
63
+ onChange === null || onChange === void 0 || onChange(currentValue, event);
64
+ }
65
+ };
66
+ const {
67
+ inputRef,
68
+ isFocused,
69
+ onStepUp,
70
+ onStepDown,
71
+ onKeyDown,
72
+ onFocus,
73
+ onBlur
74
+ } = useEvents({
75
+ min: minProp,
76
+ max: maxProp,
77
+ step,
78
+ value,
79
+ scrollable,
80
+ disabled,
81
+ readOnly,
82
+ decimalSeparator,
83
+ onWheel,
84
+ onChangeValue
85
+ });
86
+ const handleChange = useEventCallback((value, event) => {
87
+ const separator = decimalSeparator || '.';
88
+ const escapedSeparator = separator.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
89
+
90
+ // Support both custom decimalSeparator and standard decimal point '.'
91
+ let regex;
92
+ if (separator !== '.') {
93
+ // Allow both the custom separator and the standard decimal point
94
+ regex = new RegExp(`^-?(?:\\d+)?([.${escapedSeparator}])?\\d*$`);
95
+ } else {
96
+ regex = new RegExp(`^-?(?:\\d+)?(${escapedSeparator})?\\d*$`);
97
+ }
98
+ if (!regex.test(value) && value !== '') {
99
+ return;
100
+ }
101
+ onChangeValue(value, event);
102
+ });
103
+ const inputValue = useNumberInputValue({
104
+ value,
105
+ isFocused,
106
+ formatter,
107
+ decimalSeparator
108
+ });
109
+ const input = /*#__PURE__*/React.createElement(Input, _extends({}, htmlInputProps, {
110
+ ref: plaintext ? ref : undefined,
111
+ inputRef: inputRef,
112
+ autoComplete: "off",
113
+ inputMode: "numeric",
114
+ step: step,
115
+ value: inputValue,
116
+ disabled: disabled,
117
+ readOnly: readOnly,
118
+ plaintext: plaintext,
119
+ onKeyDown: onKeyDown,
120
+ onChange: handleChange,
121
+ onBlur: createChainedFunction(onBlur, onBlurProp),
122
+ onFocus: createChainedFunction(onFocus, onFocusProp)
123
+ }));
124
+ if (plaintext) {
125
+ return input;
126
+ }
127
+ const stepUpDisabled = disabled || readOnly || valueReachesMax(value, max);
128
+ const stepDownDisabled = disabled || readOnly || valueReachesMin(value, min);
129
+ return /*#__PURE__*/React.createElement(InputGroup, _extends({
130
+ as: as,
131
+ ref: ref,
132
+ className: classes,
133
+ disabled: disabled,
134
+ size: size,
135
+ inside: true
136
+ }, restProps), prefixElement && /*#__PURE__*/React.createElement(InputGroupAddon, null, prefixElement), input, suffix && /*#__PURE__*/React.createElement(InputGroupAddon, null, suffix), controls && /*#__PURE__*/React.createElement("span", {
137
+ className: prefix('btn-group-vertical')
138
+ }, /*#__PURE__*/React.createElement(Button, {
139
+ tabIndex: -1,
140
+ appearance: buttonAppearance,
141
+ className: prefix('touchspin-up'),
142
+ onClick: onStepUp,
143
+ disabled: stepUpDisabled,
144
+ "aria-label": "Increment",
145
+ size: size
146
+ }, typeof controls === 'function' ? controls('up') : /*#__PURE__*/React.createElement(ArrowUpLineIcon, null)), /*#__PURE__*/React.createElement(Button, {
147
+ tabIndex: -1,
148
+ appearance: buttonAppearance,
149
+ className: prefix('touchspin-down'),
150
+ onClick: onStepDown,
151
+ disabled: stepDownDisabled,
152
+ "aria-label": "Decrement",
153
+ size: size
154
+ }, typeof controls === 'function' ? controls('down') : /*#__PURE__*/React.createElement(ArrowDownLineIcon, null))));
155
+ });
156
+ NumberInput.displayName = 'NumberInput';
157
+ export default NumberInput;