rsuite 6.0.0-canary-20241227 → 6.0.0-canary-20250103

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 (313) hide show
  1. package/AutoComplete/styles/index.css +8 -16
  2. package/Badge/styles/index.css +83 -17
  3. package/Badge/styles/index.less +68 -9
  4. package/Button/styles/index.css +5 -10
  5. package/Button/styles/mixin.less +1 -2
  6. package/CHANGELOG.md +18 -0
  7. package/Calendar/styles/index.css +6 -12
  8. package/Cascader/styles/index.css +8 -16
  9. package/CheckPicker/styles/index.css +8 -16
  10. package/CheckTree/styles/index.css +8 -16
  11. package/CheckTreePicker/styles/index.css +8 -16
  12. package/DatePicker/styles/index.css +9 -18
  13. package/DateRangePicker/styles/index.css +9 -18
  14. package/Dropdown/styles/index.css +5 -10
  15. package/IconButton/styles/index.css +7 -14
  16. package/InputGroup/styles/index.css +6 -12
  17. package/InputNumber/styles/index.css +6 -12
  18. package/InputPicker/styles/index.css +8 -16
  19. package/MultiCascadeTree/styles/index.css +8 -16
  20. package/MultiCascader/styles/index.css +8 -16
  21. package/Nav/styles/index.css +5 -10
  22. package/Navbar/styles/index.css +5 -10
  23. package/Pagination/styles/index.css +11 -22
  24. package/Rate/styles/index.css +16 -8
  25. package/Rate/styles/index.less +6 -2
  26. package/SelectPicker/styles/index.css +8 -16
  27. package/Stat/styles/index.css +7 -14
  28. package/Table/styles/index.css +2 -2
  29. package/Tabs/styles/index.css +5 -10
  30. package/Tag/styles/index.css +29 -21
  31. package/Tag/styles/index.less +6 -3
  32. package/TagInput/styles/index.css +8 -16
  33. package/TagPicker/styles/index.css +8 -16
  34. package/TimePicker/styles/index.css +9 -18
  35. package/TimeRangePicker/styles/index.css +9 -18
  36. package/Tree/styles/index.css +8 -16
  37. package/TreePicker/styles/index.css +8 -16
  38. package/Uploader/styles/index.css +7 -14
  39. package/cjs/Accordion/Accordion.js +1 -1
  40. package/cjs/AutoComplete/AutoComplete.d.ts +2 -2
  41. package/cjs/AutoComplete/Combobox.js +1 -1
  42. package/cjs/Badge/Badge.d.ts +40 -5
  43. package/cjs/Badge/Badge.js +30 -19
  44. package/cjs/Breadcrumb/Breadcrumb.js +1 -1
  45. package/cjs/Button/Button.d.ts +5 -1
  46. package/cjs/Button/Button.js +17 -3
  47. package/cjs/Card/Card.js +1 -1
  48. package/cjs/CascadeTree/utils.js +1 -1
  49. package/cjs/CustomProvider/CustomProvider.d.ts +12 -4
  50. package/cjs/CustomProvider/CustomProvider.js +4 -3
  51. package/cjs/DateInput/hooks/useDateInputState.js +10 -8
  52. package/cjs/DateInput/hooks/useKeyboardInputEvent.js +1 -0
  53. package/cjs/DatePicker/PredefinedRanges.js +1 -1
  54. package/cjs/DateRangePicker/DateRangePicker.js +1 -1
  55. package/cjs/Drawer/Drawer.d.ts +2 -2
  56. package/cjs/Drawer/Drawer.js +1 -1
  57. package/cjs/Drawer/DrawerBody.js +7 -5
  58. package/cjs/Drawer/DrawerFooter.js +7 -5
  59. package/cjs/Drawer/DrawerHeader.js +7 -5
  60. package/cjs/Drawer/DrawerTitle.js +7 -5
  61. package/cjs/Dropdown/Dropdown.d.ts +2 -2
  62. package/cjs/Dropdown/Dropdown.js +1 -1
  63. package/cjs/Dropdown/DropdownContext.d.ts +1 -1
  64. package/cjs/Dropdown/DropdownMenu.d.ts +2 -2
  65. package/cjs/Dropdown/DropdownToggle.d.ts +2 -2
  66. package/cjs/FlexboxGrid/FlexboxGrid.js +1 -1
  67. package/cjs/Form/Form.js +1 -1
  68. package/cjs/FormControl/FormControl.d.ts +2 -2
  69. package/cjs/FormErrorMessage/FormErrorMessage.d.ts +2 -2
  70. package/cjs/InlineEdit/EditableControls.js +1 -1
  71. package/cjs/InputGroup/InputGroup.js +1 -1
  72. package/cjs/InputNumber/InputNumber.js +1 -1
  73. package/cjs/InputPicker/InputPicker.js +0 -1
  74. package/cjs/InputPicker/TagList.js +1 -0
  75. package/cjs/InputPicker/TextBox.js +1 -0
  76. package/cjs/InputPicker/hooks/useMaxWidth.js +0 -1
  77. package/cjs/List/List.js +1 -1
  78. package/cjs/MaskedInput/MaskedInput.js +1 -0
  79. package/cjs/MaskedInput/conformToMask.js +0 -1
  80. package/cjs/Modal/Modal.js +1 -1
  81. package/cjs/Modal/utils.js +0 -1
  82. package/cjs/Nav/Nav.js +1 -1
  83. package/cjs/Nav/NavDropdown.d.ts +2 -2
  84. package/cjs/Nav/NavDropdown.js +1 -1
  85. package/cjs/Nav/NavDropdownToggle.d.ts +2 -2
  86. package/cjs/Navbar/Navbar.js +1 -1
  87. package/cjs/Navbar/NavbarDropdown.d.ts +2 -2
  88. package/cjs/Navbar/NavbarDropdown.js +1 -1
  89. package/cjs/Navbar/NavbarDropdownToggle.d.ts +2 -2
  90. package/cjs/Navbar/index.js +0 -0
  91. package/cjs/RangeSlider/RangeSlider.js +4 -4
  92. package/cjs/Rate/Character.js +6 -6
  93. package/cjs/Rate/Rate.d.ts +4 -4
  94. package/cjs/Rate/Rate.js +16 -15
  95. package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +2 -2
  96. package/cjs/Sidenav/Sidenav.js +1 -1
  97. package/cjs/Sidenav/SidenavDropdown.d.ts +2 -2
  98. package/cjs/Sidenav/SidenavDropdown.js +1 -1
  99. package/cjs/Sidenav/SidenavDropdownToggle.d.ts +2 -2
  100. package/cjs/Stack/HStack.js +1 -1
  101. package/cjs/Stack/Stack.js +1 -1
  102. package/cjs/Stack/VStack.js +1 -1
  103. package/cjs/Stat/Stat.js +1 -1
  104. package/cjs/Steps/Steps.js +1 -1
  105. package/cjs/Table/Table.js +2 -2
  106. package/cjs/Tabs/Tabs.js +8 -9
  107. package/cjs/Tag/Tag.d.ts +2 -2
  108. package/cjs/Tag/Tag.js +12 -6
  109. package/cjs/Timeline/Timeline.js +8 -5
  110. package/cjs/Tooltip/Tooltip.d.ts +2 -2
  111. package/cjs/Tree/hooks/useFlattenTree.js +1 -3
  112. package/cjs/Tree/hooks/useFocusTree.js +0 -1
  113. package/cjs/Tree/hooks/useTreeSearch.js +0 -1
  114. package/cjs/Uploader/UploadTrigger.js +13 -28
  115. package/cjs/Uploader/utils/ajaxUpload.js +1 -1
  116. package/cjs/internals/Disclosure/Disclosure.js +1 -0
  117. package/cjs/internals/Menu/useMenu.js +51 -49
  118. package/cjs/internals/Overlay/Overlay.d.ts +2 -2
  119. package/cjs/internals/Overlay/OverlayTrigger.d.ts +2 -2
  120. package/cjs/internals/Overlay/Position.d.ts +2 -2
  121. package/cjs/internals/Overlay/positionUtils.d.ts +2 -2
  122. package/cjs/internals/Picker/PickerToggle.d.ts +2 -2
  123. package/cjs/internals/Picker/PickerToggleTrigger.d.ts +2 -2
  124. package/cjs/internals/Picker/hooks/useFocusItemValue.js +1 -1
  125. package/cjs/internals/Picker/hooks/usePickerClassName.d.ts +2 -2
  126. package/cjs/internals/ScrollView/hooks/useScrollState.d.ts +1 -1
  127. package/cjs/internals/Tree/TreeView.js +2 -1
  128. package/cjs/internals/Tree/utils/getPathTowardsItem.js +1 -1
  129. package/cjs/internals/Windowing/AutoSizer.js +1 -0
  130. package/cjs/internals/Windowing/List.js +2 -1
  131. package/cjs/internals/hooks/useClassNames.d.ts +1 -2
  132. package/cjs/internals/hooks/useClassNames.js +0 -2
  133. package/cjs/internals/hooks/usePortal.js +1 -1
  134. package/cjs/internals/hooks/useToggleCaret.d.ts +2 -2
  135. package/cjs/internals/hooks/useToggleCaret.js +1 -1
  136. package/cjs/internals/hooks/useUpdateEffect.js +0 -1
  137. package/cjs/internals/hooks/useWillUnmount.js +0 -2
  138. package/cjs/internals/symbols.d.ts +1 -0
  139. package/cjs/internals/symbols.js +3 -2
  140. package/cjs/internals/types/colours.d.ts +10 -0
  141. package/cjs/internals/types/colours.js +15 -0
  142. package/cjs/internals/types/index.d.ts +6 -7
  143. package/cjs/internals/types/index.js +13 -1
  144. package/cjs/internals/types/placement.d.ts +5 -0
  145. package/cjs/internals/types/placement.js +4 -0
  146. package/cjs/internals/utils/BrowserDetection.d.ts +0 -2
  147. package/cjs/internals/utils/BrowserDetection.js +2 -12
  148. package/cjs/internals/utils/ReactChildren.js +0 -2
  149. package/cjs/internals/utils/colours.d.ts +21 -0
  150. package/cjs/internals/utils/colours.js +86 -0
  151. package/cjs/internals/utils/css.d.ts +13 -1
  152. package/cjs/internals/utils/css.js +42 -3
  153. package/cjs/internals/utils/getDOMNode.js +2 -2
  154. package/cjs/internals/utils/getSafeRegExpString.js +2 -1
  155. package/cjs/internals/utils/index.d.ts +2 -2
  156. package/cjs/internals/utils/index.js +17 -9
  157. package/cjs/toaster/ToastContainer.d.ts +8 -8
  158. package/cjs/toaster/ToastContainer.js +39 -36
  159. package/cjs/toaster/render.d.ts +2 -0
  160. package/cjs/toaster/render.js +25 -0
  161. package/cjs/toaster/toaster.js +29 -19
  162. package/cjs/useMediaQuery/useMediaQuery.js +1 -3
  163. package/cjs/useToaster/useToaster.js +10 -5
  164. package/dist/rsuite-no-reset-rtl.css +143 -74
  165. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  166. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  167. package/dist/rsuite-no-reset.css +143 -74
  168. package/dist/rsuite-no-reset.min.css +1 -1
  169. package/dist/rsuite-no-reset.min.css.map +1 -1
  170. package/dist/rsuite-rtl.css +143 -74
  171. package/dist/rsuite-rtl.min.css +1 -1
  172. package/dist/rsuite-rtl.min.css.map +1 -1
  173. package/dist/rsuite.css +143 -74
  174. package/dist/rsuite.js +113 -91
  175. package/dist/rsuite.js.map +1 -1
  176. package/dist/rsuite.min.css +1 -1
  177. package/dist/rsuite.min.css.map +1 -1
  178. package/dist/rsuite.min.js +1 -1
  179. package/dist/rsuite.min.js.map +1 -1
  180. package/esm/Accordion/Accordion.js +1 -1
  181. package/esm/AutoComplete/AutoComplete.d.ts +2 -2
  182. package/esm/AutoComplete/Combobox.js +1 -1
  183. package/esm/Badge/Badge.d.ts +40 -5
  184. package/esm/Badge/Badge.js +28 -19
  185. package/esm/Breadcrumb/Breadcrumb.js +1 -1
  186. package/esm/Button/Button.d.ts +5 -1
  187. package/esm/Button/Button.js +18 -4
  188. package/esm/Card/Card.js +1 -1
  189. package/esm/CascadeTree/utils.js +1 -1
  190. package/esm/CustomProvider/CustomProvider.d.ts +12 -4
  191. package/esm/CustomProvider/CustomProvider.js +5 -4
  192. package/esm/DateInput/hooks/useDateInputState.js +10 -8
  193. package/esm/DateInput/hooks/useKeyboardInputEvent.js +1 -0
  194. package/esm/DatePicker/PredefinedRanges.js +1 -1
  195. package/esm/DateRangePicker/DateRangePicker.js +1 -1
  196. package/esm/Drawer/Drawer.d.ts +2 -2
  197. package/esm/Drawer/Drawer.js +1 -1
  198. package/esm/Drawer/DrawerBody.js +7 -5
  199. package/esm/Drawer/DrawerFooter.js +7 -5
  200. package/esm/Drawer/DrawerHeader.js +7 -5
  201. package/esm/Drawer/DrawerTitle.js +7 -5
  202. package/esm/Dropdown/Dropdown.d.ts +2 -2
  203. package/esm/Dropdown/Dropdown.js +1 -1
  204. package/esm/Dropdown/DropdownContext.d.ts +1 -1
  205. package/esm/Dropdown/DropdownMenu.d.ts +2 -2
  206. package/esm/Dropdown/DropdownToggle.d.ts +2 -2
  207. package/esm/FlexboxGrid/FlexboxGrid.js +1 -1
  208. package/esm/Form/Form.js +1 -1
  209. package/esm/FormControl/FormControl.d.ts +2 -2
  210. package/esm/FormErrorMessage/FormErrorMessage.d.ts +2 -2
  211. package/esm/InlineEdit/EditableControls.js +1 -1
  212. package/esm/InputGroup/InputGroup.js +1 -1
  213. package/esm/InputNumber/InputNumber.js +1 -1
  214. package/esm/InputPicker/InputPicker.js +0 -1
  215. package/esm/InputPicker/TagList.js +1 -0
  216. package/esm/InputPicker/TextBox.js +1 -0
  217. package/esm/InputPicker/hooks/useMaxWidth.js +0 -1
  218. package/esm/List/List.js +1 -1
  219. package/esm/MaskedInput/MaskedInput.js +1 -0
  220. package/esm/MaskedInput/conformToMask.js +0 -1
  221. package/esm/Modal/Modal.js +1 -1
  222. package/esm/Modal/utils.js +0 -1
  223. package/esm/Nav/Nav.js +1 -1
  224. package/esm/Nav/NavDropdown.d.ts +2 -2
  225. package/esm/Nav/NavDropdown.js +1 -1
  226. package/esm/Nav/NavDropdownToggle.d.ts +2 -2
  227. package/esm/Navbar/Navbar.js +1 -1
  228. package/esm/Navbar/NavbarDropdown.d.ts +2 -2
  229. package/esm/Navbar/NavbarDropdown.js +1 -1
  230. package/esm/Navbar/NavbarDropdownToggle.d.ts +2 -2
  231. package/esm/Navbar/index.js +0 -0
  232. package/esm/RangeSlider/RangeSlider.js +4 -4
  233. package/esm/Rate/Character.js +8 -8
  234. package/esm/Rate/Rate.d.ts +4 -4
  235. package/esm/Rate/Rate.js +19 -18
  236. package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +2 -2
  237. package/esm/Sidenav/Sidenav.js +1 -1
  238. package/esm/Sidenav/SidenavDropdown.d.ts +2 -2
  239. package/esm/Sidenav/SidenavDropdown.js +1 -1
  240. package/esm/Sidenav/SidenavDropdownToggle.d.ts +2 -2
  241. package/esm/Stack/HStack.js +1 -1
  242. package/esm/Stack/Stack.js +1 -1
  243. package/esm/Stack/VStack.js +1 -1
  244. package/esm/Stat/Stat.js +1 -1
  245. package/esm/Steps/Steps.js +1 -1
  246. package/esm/Table/Table.js +2 -2
  247. package/esm/Tabs/Tabs.js +8 -9
  248. package/esm/Tag/Tag.d.ts +2 -2
  249. package/esm/Tag/Tag.js +10 -6
  250. package/esm/Timeline/Timeline.js +8 -5
  251. package/esm/Tooltip/Tooltip.d.ts +2 -2
  252. package/esm/Tree/hooks/useFlattenTree.js +1 -3
  253. package/esm/Tree/hooks/useFocusTree.js +0 -1
  254. package/esm/Tree/hooks/useTreeSearch.js +0 -1
  255. package/esm/Uploader/UploadTrigger.js +15 -30
  256. package/esm/Uploader/utils/ajaxUpload.js +1 -1
  257. package/esm/internals/Disclosure/Disclosure.js +1 -0
  258. package/esm/internals/Menu/useMenu.js +51 -49
  259. package/esm/internals/Overlay/Overlay.d.ts +2 -2
  260. package/esm/internals/Overlay/OverlayTrigger.d.ts +2 -2
  261. package/esm/internals/Overlay/Position.d.ts +2 -2
  262. package/esm/internals/Overlay/positionUtils.d.ts +2 -2
  263. package/esm/internals/Picker/PickerToggle.d.ts +2 -2
  264. package/esm/internals/Picker/PickerToggleTrigger.d.ts +2 -2
  265. package/esm/internals/Picker/hooks/useFocusItemValue.js +1 -1
  266. package/esm/internals/Picker/hooks/usePickerClassName.d.ts +2 -2
  267. package/esm/internals/ScrollView/hooks/useScrollState.d.ts +1 -1
  268. package/esm/internals/Tree/TreeView.js +2 -1
  269. package/esm/internals/Tree/utils/getPathTowardsItem.js +1 -1
  270. package/esm/internals/Windowing/AutoSizer.js +1 -0
  271. package/esm/internals/Windowing/List.js +2 -1
  272. package/esm/internals/hooks/useClassNames.d.ts +1 -2
  273. package/esm/internals/hooks/useClassNames.js +0 -2
  274. package/esm/internals/hooks/usePortal.js +1 -1
  275. package/esm/internals/hooks/useToggleCaret.d.ts +2 -2
  276. package/esm/internals/hooks/useToggleCaret.js +1 -1
  277. package/esm/internals/hooks/useUpdateEffect.js +0 -1
  278. package/esm/internals/hooks/useWillUnmount.js +0 -2
  279. package/esm/internals/symbols.d.ts +1 -0
  280. package/esm/internals/symbols.js +2 -1
  281. package/esm/internals/types/colours.d.ts +10 -0
  282. package/esm/internals/types/colours.js +11 -0
  283. package/esm/internals/types/index.d.ts +6 -7
  284. package/esm/internals/types/index.js +6 -0
  285. package/esm/internals/types/placement.d.ts +5 -0
  286. package/esm/internals/types/placement.js +2 -0
  287. package/esm/internals/utils/BrowserDetection.d.ts +0 -2
  288. package/esm/internals/utils/BrowserDetection.js +1 -9
  289. package/esm/internals/utils/ReactChildren.js +0 -2
  290. package/esm/internals/utils/colours.d.ts +21 -0
  291. package/esm/internals/utils/colours.js +77 -0
  292. package/esm/internals/utils/css.d.ts +13 -1
  293. package/esm/internals/utils/css.js +40 -3
  294. package/esm/internals/utils/getDOMNode.js +1 -2
  295. package/esm/internals/utils/getSafeRegExpString.js +2 -1
  296. package/esm/internals/utils/index.d.ts +2 -2
  297. package/esm/internals/utils/index.js +3 -3
  298. package/esm/toaster/ToastContainer.d.ts +8 -8
  299. package/esm/toaster/ToastContainer.js +39 -37
  300. package/esm/toaster/render.d.ts +2 -0
  301. package/esm/toaster/render.js +21 -0
  302. package/esm/toaster/toaster.js +27 -18
  303. package/esm/useMediaQuery/useMediaQuery.js +1 -3
  304. package/esm/useToaster/useToaster.js +10 -5
  305. package/package.json +1 -1
  306. package/styles/color-modes/dark.less +1 -0
  307. package/styles/color-modes/high-contrast.less +1 -0
  308. package/styles/color-modes/light.less +1 -0
  309. package/styles/variables.less +1 -1
  310. package/cjs/internals/utils/render.d.ts +0 -7
  311. package/cjs/internals/utils/render.js +0 -26
  312. package/esm/internals/utils/render.d.ts +0 -7
  313. package/esm/internals/utils/render.js +0 -22
package/esm/Tag/Tag.js CHANGED
@@ -1,9 +1,10 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- import React from 'react';
3
+ import React, { useMemo } from 'react';
4
4
  import CloseButton from "../internals/CloseButton/index.js";
5
5
  import { useClassNames } from "../internals/hooks/index.js";
6
6
  import { useCustom } from "../CustomProvider/index.js";
7
+ import { mergeStyles, isPresetColor, createColorVariables } from "../internals/utils/index.js";
7
8
  /**
8
9
  * The `Tag` component is used to label and categorize.
9
10
  * It can be used to mark the status of an object or classify it into different categories.
@@ -19,11 +20,12 @@ const Tag = /*#__PURE__*/React.forwardRef((props, ref) => {
19
20
  as: Component = 'div',
20
21
  classPrefix = 'tag',
21
22
  size = 'md',
22
- color = 'default',
23
+ color,
23
24
  children,
24
25
  closable,
25
26
  className,
26
27
  locale: overrideLocale,
28
+ style,
27
29
  onClose,
28
30
  ...rest
29
31
  } = propsWithDefaults;
@@ -35,13 +37,15 @@ const Tag = /*#__PURE__*/React.forwardRef((props, ref) => {
35
37
  prefix,
36
38
  merge
37
39
  } = useClassNames(classPrefix);
38
- const classes = merge(className, withClassPrefix(size, color, {
40
+ const classes = merge(className, withClassPrefix(size, isPresetColor(color) && color, {
39
41
  closable
40
42
  }));
41
- return /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
43
+ const styles = useMemo(() => mergeStyles(style, createColorVariables(color, '--rs-tag-bg', '--rs-tag-text')), [style, color]);
44
+ return /*#__PURE__*/React.createElement(Component, _extends({
42
45
  ref: ref,
43
- className: classes
44
- }), /*#__PURE__*/React.createElement("span", {
46
+ className: classes,
47
+ style: styles
48
+ }, rest), /*#__PURE__*/React.createElement("span", {
45
49
  className: prefix`text`
46
50
  }, children), closable && /*#__PURE__*/React.createElement(CloseButton, {
47
51
  className: prefix`icon-close`,
@@ -6,12 +6,15 @@ import TimelineItem from "./TimelineItem.js";
6
6
  import { useClassNames } from "../internals/hooks/index.js";
7
7
  import { useCustom } from "../CustomProvider/index.js";
8
8
  import { ReactChildren } from "../internals/utils/index.js";
9
+ const ACTIVE_FIRST = index => index === 0;
10
+ const ACTIVE_LAST = (index, totalItemsCount) => index === totalItemsCount - 1;
11
+
9
12
  /**
10
13
  * The `Timeline` component is used to display a list of items in chronological order.
11
14
  *
12
15
  * @see https://rsuitejs.com/components/timeline
13
16
  */
14
- const Timeline = /*#__PURE__*/React.forwardRef((props, ref) => {
17
+ const Timeline = /*#__PURE__*/React.forwardRef(function Timeline(props, ref) {
15
18
  const {
16
19
  propsWithDefaults
17
20
  } = useCustom('Timeline', props);
@@ -22,7 +25,7 @@ const Timeline = /*#__PURE__*/React.forwardRef((props, ref) => {
22
25
  className,
23
26
  align = 'left',
24
27
  endless,
25
- isItemActive = Timeline.ACTIVE_LAST,
28
+ isItemActive = ACTIVE_LAST,
26
29
  ...rest
27
30
  } = propsWithDefaults;
28
31
  const {
@@ -47,8 +50,8 @@ const Timeline = /*#__PURE__*/React.forwardRef((props, ref) => {
47
50
  align
48
51
  })));
49
52
  });
50
- Timeline.ACTIVE_FIRST = index => index === 0;
51
- Timeline.ACTIVE_LAST = (index, totalItemsCount) => index === totalItemsCount - 1;
52
- Timeline.Item = TimelineItem;
53
53
  Timeline.displayName = 'Timeline';
54
+ Timeline.ACTIVE_FIRST = ACTIVE_FIRST;
55
+ Timeline.ACTIVE_LAST = ACTIVE_LAST;
56
+ Timeline.Item = TimelineItem;
54
57
  export default Timeline;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import type { TypeAttributes, WithAsProps, RsRefForwardingComponent } from '../internals/types';
2
+ import type { Placement, WithAsProps, RsRefForwardingComponent } from '../internals/types';
3
3
  export interface TooltipProps extends WithAsProps {
4
4
  /** Dispaly placement */
5
- placement?: TypeAttributes.Placement;
5
+ placement?: Placement;
6
6
  /** Whether visible */
7
7
  visible?: boolean;
8
8
  /** Primary content */
@@ -77,8 +77,7 @@ function useFlattenTree(data, options) {
77
77
  // when data is changed, should clear the flattenedNodes, avoid duplicate keys
78
78
  flattenedNodes.current = {};
79
79
  flattenTreeData(data);
80
- }, [data]); // eslint-disable-line react-hooks/exhaustive-deps
81
-
80
+ }, [data]);
82
81
  useEffect(() => {
83
82
  if (multiple) {
84
83
  updateTreeNodeCheckState(value);
@@ -90,7 +89,6 @@ function useFlattenTree(data, options) {
90
89
  * data may change and the node status needs to be updated.
91
90
  * @see https://github.com/rsuite/rsuite/issues/3973
92
91
  */
93
- // eslint-disable-next-line react-hooks/exhaustive-deps
94
92
  }, [value, data]);
95
93
  return flattenedNodes.current;
96
94
  }
@@ -132,7 +132,6 @@ function useFocusTree(props) {
132
132
  return () => {
133
133
  unregister === null || unregister === void 0 || unregister();
134
134
  };
135
- // eslint-disable-next-line react-hooks/exhaustive-deps
136
135
  }, []);
137
136
  useEffect(() => {
138
137
  flattenedNodesRef.current = flattenedNodes;
@@ -46,7 +46,6 @@ export default function useTreeSearch(props) {
46
46
  };
47
47
  useEffect(() => {
48
48
  handleSearch(searchKeyword !== null && searchKeyword !== void 0 ? searchKeyword : '');
49
- // eslint-disable-next-line react-hooks/exhaustive-deps
50
49
  }, [searchKeyword]);
51
50
  useEffect(() => {
52
51
  setSearchKeyword(searchKeyword !== null && searchKeyword !== void 0 ? searchKeyword : '');
@@ -1,8 +1,7 @@
1
1
  'use client';
2
- import React, { useCallback, useRef, useState, useImperativeHandle } from 'react';
2
+ import React, { useRef, useState, useImperativeHandle } from 'react';
3
3
  import Button from "../Button/index.js";
4
- import { useClassNames } from "../internals/hooks/index.js";
5
- import { isIE11 } from "../internals/utils/index.js";
4
+ import { useClassNames, useEventCallback } from "../internals/hooks/index.js";
6
5
  const UploadTrigger = /*#__PURE__*/React.forwardRef((props, ref) => {
7
6
  const {
8
7
  as: Component = Button,
@@ -36,55 +35,41 @@ const UploadTrigger = /*#__PURE__*/React.forwardRef((props, ref) => {
36
35
  customize: children,
37
36
  'drag-over': dragOver
38
37
  }));
39
- const handleClick = useCallback(() => {
38
+ const handleClick = useEventCallback(() => {
40
39
  var _inputRef$current;
41
40
  (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.click();
42
- }, []);
43
- const handleClearInput = useCallback(() => {
41
+ });
42
+ const handleClearInput = useEventCallback(() => {
44
43
  if (inputRef.current) {
45
44
  inputRef.current.value = '';
46
45
  }
47
- }, []);
48
- const handleDragEnter = useCallback(event => {
46
+ });
47
+ const handleDragEnter = useEventCallback(event => {
49
48
  if (draggable) {
50
49
  event.preventDefault();
51
50
  setDragOver(true);
52
51
  }
53
52
  onDragEnter === null || onDragEnter === void 0 || onDragEnter(event);
54
- }, [draggable, onDragEnter]);
55
- const handleDragLeave = useCallback(event => {
53
+ });
54
+ const handleDragLeave = useEventCallback(event => {
56
55
  if (draggable) {
57
56
  event.preventDefault();
58
57
  setDragOver(false);
59
58
  }
60
59
  onDragLeave === null || onDragLeave === void 0 || onDragLeave(event);
61
- }, [draggable, onDragLeave]);
62
- const handleDragOver = useCallback(event => {
60
+ });
61
+ const handleDragOver = useEventCallback(event => {
63
62
  draggable && event.preventDefault();
64
63
  onDragOver === null || onDragOver === void 0 || onDragOver(event);
65
- }, [draggable, onDragOver]);
66
- const handleDrop = useCallback(event => {
64
+ });
65
+ const handleDrop = useEventCallback(event => {
67
66
  if (draggable) {
68
67
  event.preventDefault();
69
68
  setDragOver(false);
70
69
  onChange === null || onChange === void 0 || onChange(event);
71
70
  }
72
71
  onDrop === null || onDrop === void 0 || onDrop(event);
73
- }, [draggable, onChange, onDrop]);
74
- const handleChange = useCallback(event => {
75
- if (isIE11()) {
76
- var _event$target;
77
- /**
78
- * IE11 triggers onChange event of file input when element.value is assigned
79
- * https://github.com/facebook/react/issues/8793
80
- */
81
- if (((_event$target = event.target) === null || _event$target === void 0 || (_event$target = _event$target.files) === null || _event$target === void 0 ? void 0 : _event$target.length) > 0) {
82
- onChange === null || onChange === void 0 || onChange(event);
83
- }
84
- return;
85
- }
86
- onChange === null || onChange === void 0 || onChange(event);
87
- }, [onChange]);
72
+ });
88
73
  useImperativeHandle(ref, () => ({
89
74
  root: rootRef.current,
90
75
  clearInput: handleClearInput
@@ -113,7 +98,7 @@ const UploadTrigger = /*#__PURE__*/React.forwardRef((props, ref) => {
113
98
  readOnly: readOnly,
114
99
  accept: accept,
115
100
  ref: inputRef,
116
- onChange: handleChange
101
+ onChange: onChange
117
102
  }), trigger);
118
103
  });
119
104
  UploadTrigger.displayName = 'UploadTrigger';
@@ -6,7 +6,7 @@ function getResponse(xhr) {
6
6
  }
7
7
  try {
8
8
  return JSON.parse(text);
9
- } catch (e) {
9
+ } catch {
10
10
  return text;
11
11
  }
12
12
  }
@@ -97,6 +97,7 @@ const Disclosure = /*#__PURE__*/React.memo(props => {
97
97
  value: contextValue
98
98
  }, children(renderProps, containerElementRef));
99
99
  });
100
+ Disclosure.displayName = 'Disclosure';
100
101
  Disclosure.Button = DisclosureButton;
101
102
  Disclosure.Content = DisclosureContent;
102
103
  export default Disclosure;
@@ -38,61 +38,63 @@ export function menuReducer(state, action) {
38
38
  open: false
39
39
  };
40
40
  case MenuActionTypes.MoveFocus:
41
- let nextActiveItemIndex = activeItemIndex;
42
- switch (action.to) {
43
- case MoveFocusTo.Next:
44
- for (let i = activeItemIndex === null ? 0 : activeItemIndex + 1; i < items.length; i++) {
45
- var _items$i$props;
46
- if (!((_items$i$props = items[i].props) !== null && _items$i$props !== void 0 && _items$i$props.disabled)) {
47
- nextActiveItemIndex = i;
48
- break;
41
+ {
42
+ let nextActiveItemIndex = activeItemIndex;
43
+ switch (action.to) {
44
+ case MoveFocusTo.Next:
45
+ for (let i = activeItemIndex === null ? 0 : activeItemIndex + 1; i < items.length; i++) {
46
+ var _items$i$props;
47
+ if (!((_items$i$props = items[i].props) !== null && _items$i$props !== void 0 && _items$i$props.disabled)) {
48
+ nextActiveItemIndex = i;
49
+ break;
50
+ }
49
51
  }
50
- }
51
- break;
52
- case MoveFocusTo.Prev:
53
- for (let i = activeItemIndex === null ? items.length - 1 : activeItemIndex - 1; i >= 0; i--) {
54
- var _items$i$props2;
55
- if (!((_items$i$props2 = items[i].props) !== null && _items$i$props2 !== void 0 && _items$i$props2.disabled)) {
56
- nextActiveItemIndex = i;
57
- break;
52
+ break;
53
+ case MoveFocusTo.Prev:
54
+ for (let i = activeItemIndex === null ? items.length - 1 : activeItemIndex - 1; i >= 0; i--) {
55
+ var _items$i$props2;
56
+ if (!((_items$i$props2 = items[i].props) !== null && _items$i$props2 !== void 0 && _items$i$props2.disabled)) {
57
+ nextActiveItemIndex = i;
58
+ break;
59
+ }
58
60
  }
59
- }
60
- break;
61
- case MoveFocusTo.First:
62
- for (let i = 0; i < items.length; i++) {
63
- var _items$i$props3;
64
- if (!((_items$i$props3 = items[i].props) !== null && _items$i$props3 !== void 0 && _items$i$props3.disabled)) {
65
- nextActiveItemIndex = i;
66
- break;
61
+ break;
62
+ case MoveFocusTo.First:
63
+ for (let i = 0; i < items.length; i++) {
64
+ var _items$i$props3;
65
+ if (!((_items$i$props3 = items[i].props) !== null && _items$i$props3 !== void 0 && _items$i$props3.disabled)) {
66
+ nextActiveItemIndex = i;
67
+ break;
68
+ }
67
69
  }
68
- }
69
- break;
70
- case MoveFocusTo.Last:
71
- for (let i = items.length - 1; i >= 0; i--) {
72
- var _items$i$props4;
73
- if (!((_items$i$props4 = items[i].props) !== null && _items$i$props4 !== void 0 && _items$i$props4.disabled)) {
74
- nextActiveItemIndex = i;
75
- break;
70
+ break;
71
+ case MoveFocusTo.Last:
72
+ for (let i = items.length - 1; i >= 0; i--) {
73
+ var _items$i$props4;
74
+ if (!((_items$i$props4 = items[i].props) !== null && _items$i$props4 !== void 0 && _items$i$props4.disabled)) {
75
+ nextActiveItemIndex = i;
76
+ break;
77
+ }
76
78
  }
77
- }
78
- break;
79
- case MoveFocusTo.Specific:
80
- for (let i = 0; i < items.length; i++) {
81
- var _items$i$props5;
82
- if (items[i].element.id === action.id && !((_items$i$props5 = items[i].props) !== null && _items$i$props5 !== void 0 && _items$i$props5.disabled)) {
83
- nextActiveItemIndex = i;
84
- break;
79
+ break;
80
+ case MoveFocusTo.Specific:
81
+ for (let i = 0; i < items.length; i++) {
82
+ var _items$i$props5;
83
+ if (items[i].element.id === action.id && !((_items$i$props5 = items[i].props) !== null && _items$i$props5 !== void 0 && _items$i$props5.disabled)) {
84
+ nextActiveItemIndex = i;
85
+ break;
86
+ }
85
87
  }
86
- }
87
- break;
88
- case MoveFocusTo.None:
89
- nextActiveItemIndex = null;
90
- break;
88
+ break;
89
+ case MoveFocusTo.None:
90
+ nextActiveItemIndex = null;
91
+ break;
92
+ }
93
+ return {
94
+ ...state,
95
+ activeItemIndex: nextActiveItemIndex
96
+ };
91
97
  }
92
- return {
93
- ...state,
94
- activeItemIndex: nextActiveItemIndex
95
- };
96
98
  default:
97
99
  return state;
98
100
  }
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { PositionChildProps } from './Position';
3
- import { TypeAttributes, AnimationEventProps, CursorPosition } from '../types';
3
+ import { Placement, AnimationEventProps, CursorPosition } from '../types';
4
4
  export interface OverlayProps extends AnimationEventProps {
5
5
  container?: HTMLElement | (() => HTMLElement | null) | null;
6
6
  children: React.ReactElement | ((props: PositionChildProps & React.HTMLAttributes<HTMLElement>, ref: React.RefCallback<HTMLElement>) => React.ReactElement);
7
7
  childrenProps?: React.HTMLAttributes<HTMLElement>;
8
8
  className?: string;
9
9
  containerPadding?: number;
10
- placement?: TypeAttributes.Placement;
10
+ placement?: Placement;
11
11
  preventOverflow?: boolean;
12
12
  open?: boolean;
13
13
  rootClose?: boolean;
@@ -1,13 +1,13 @@
1
1
  /// <reference types="node" />
2
2
  import React from 'react';
3
- import type { AnimationEventProps, StandardProps, TypeAttributes } from '../types';
3
+ import type { AnimationEventProps, StandardProps, Placement } from '../types';
4
4
  import type { PositionChildProps } from './Position';
5
5
  export type OverlayTriggerType = 'click' | 'hover' | 'focus' | 'active' | 'contextMenu' | 'none';
6
6
  export interface OverlayTriggerProps extends Omit<StandardProps, 'children'>, AnimationEventProps {
7
7
  /** Triggering events */
8
8
  trigger?: OverlayTriggerType | OverlayTriggerType[];
9
9
  /** Display placement */
10
- placement?: TypeAttributes.Placement;
10
+ placement?: Placement;
11
11
  /** Delay time */
12
12
  delay?: number;
13
13
  /** Open delay time */
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CursorPosition, TypeAttributes } from '../types';
2
+ import { CursorPosition, Placement } from '../types';
3
3
  export interface PositionChildProps {
4
4
  className: string;
5
5
  left?: number;
@@ -12,7 +12,7 @@ export interface PositionProps {
12
12
  className?: string;
13
13
  container?: HTMLElement | (() => HTMLElement | null) | null;
14
14
  containerPadding?: number;
15
- placement?: TypeAttributes.Placement;
15
+ placement?: Placement;
16
16
  preventOverflow?: boolean;
17
17
  triggerTarget?: React.RefObject<any>;
18
18
  followCursor?: boolean;
@@ -1,4 +1,4 @@
1
- import { CursorPosition, TypeAttributes } from '../types';
1
+ import { CursorPosition, Placement } from '../types';
2
2
  type Offset = {
3
3
  top: number;
4
4
  left: number;
@@ -13,7 +13,7 @@ export interface PositionType {
13
13
  positionClassName?: string;
14
14
  }
15
15
  export interface UtilProps {
16
- placement: TypeAttributes.Placement;
16
+ placement: Placement;
17
17
  preventOverflow: boolean;
18
18
  padding: number;
19
19
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import ToggleButton, { ToggleButtonProps } from './ToggleButton';
3
- import { RsRefForwardingComponent, TypeAttributes, DataItemValue } from '../types';
3
+ import { RsRefForwardingComponent, Placement, DataItemValue } from '../types';
4
4
  import { IconProps } from '@rsuite/icons/Icon';
5
5
  export interface PickerToggleProps<T = DataItemValue> extends ToggleButtonProps {
6
6
  active?: boolean;
@@ -17,7 +17,7 @@ export interface PickerToggleProps<T = DataItemValue> extends ToggleButtonProps
17
17
  */
18
18
  caretAs?: React.ElementType;
19
19
  disabled?: boolean;
20
- placement?: TypeAttributes.Placement;
20
+ placement?: Placement;
21
21
  readOnly?: boolean;
22
22
  plaintext?: boolean;
23
23
  tabIndex?: number;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { OverlayTriggerHandle, OverlayTriggerProps, OverlayTriggerType } from '../Overlay/OverlayTrigger';
3
3
  import { PositionChildProps } from '../Overlay/Position';
4
- import type { TypeAttributes, AnimationEventProps } from '../types';
4
+ import type { Placement, AnimationEventProps } from '../types';
5
5
  export type { OverlayTriggerHandle, PositionChildProps };
6
6
  export interface PickerToggleTriggerProps extends Omit<AnimationEventProps, 'onEntering' | 'onExiting'>, Pick<OverlayTriggerProps, 'speaker' | 'onOpen' | 'onClose'> {
7
7
  id?: string;
@@ -12,7 +12,7 @@ export interface PickerToggleTriggerProps extends Omit<AnimationEventProps, 'onE
12
12
  */
13
13
  popupType?: 'listbox' | 'tree' | 'grid' | 'dialog' | 'menu';
14
14
  multiple?: boolean;
15
- placement?: TypeAttributes.Placement;
15
+ placement?: Placement;
16
16
  pickerProps: any;
17
17
  open?: boolean;
18
18
  trigger?: OverlayTriggerType | OverlayTriggerType[];
@@ -78,7 +78,7 @@ const useFocusItemValue = (defaultFocusItemValue, props) => {
78
78
  }
79
79
 
80
80
  // 1. It is necessary to traverse the `keys` instead of `data` here to preserve the order of the array.
81
- // 2. The values ​​in `keys` are all string, so the corresponding value of `data` should also be converted to string
81
+ // 2. The values in `keys` are all string, so the corresponding value of `data` should also be converted to string
82
82
  return currentKeys.map(key => find(data, i => `${i[valueKey]}` === key));
83
83
  };
84
84
 
@@ -1,9 +1,9 @@
1
- import { TypeAttributes } from '../../types';
1
+ import { Placement } from '../../types';
2
2
  export interface PickerClassNameProps {
3
3
  name?: string;
4
4
  classPrefix: string;
5
5
  className?: string;
6
- placement?: TypeAttributes.Placement;
6
+ placement?: Placement;
7
7
  appearance?: 'default' | 'subtle';
8
8
  cleanable?: boolean;
9
9
  block?: boolean;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare function useScrollState(scrollShadow?: boolean): {
3
- scrollState: "top" | "bottom" | "middle" | null;
3
+ scrollState: "bottom" | "top" | "middle" | null;
4
4
  handleScroll: ((...args: any[]) => any) | undefined;
5
5
  bodyRef: import("react").RefObject<HTMLDivElement>;
6
6
  };
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import useCombobox from "../Picker/hooks/useCombobox.js";
5
5
  import ScrollView from "../ScrollView/index.js";
6
6
  import { useTreeContextProps } from "./TreeProvider.js";
7
- const ScrollShadowView = /*#__PURE__*/React.forwardRef((props, ref) => {
7
+ const ScrollShadowView = /*#__PURE__*/React.forwardRef(function ScrollShadowView(props, ref) {
8
8
  return /*#__PURE__*/React.createElement(ScrollView, _extends({
9
9
  scrollShadow: true,
10
10
  ref: ref
@@ -49,4 +49,5 @@ const TreeView = /*#__PURE__*/React.forwardRef((props, ref) => {
49
49
  className: treeRootClassName
50
50
  }, children));
51
51
  });
52
+ TreeView.displayName = 'TreeView';
52
53
  export default TreeView;
@@ -5,7 +5,7 @@
5
5
  export function getPathTowardsItem(target, getParent) {
6
6
  if (!target) return [];
7
7
  const path = [target];
8
- for (let parent = getParent(target); !!parent; parent = getParent(parent)) {
8
+ for (let parent = getParent(target); parent; parent = getParent(parent)) {
9
9
  path.unshift(parent);
10
10
  }
11
11
  return path;
@@ -80,4 +80,5 @@ const AutoSizer = /*#__PURE__*/React.forwardRef((props, ref) => {
80
80
  }
81
81
  }, rest), children(childParams));
82
82
  });
83
+ AutoSizer.displayName = 'AutoSizer';
83
84
  export default AutoSizer;
@@ -5,7 +5,7 @@ import ScrollView from "../ScrollView/index.js";
5
5
  import { VariableSizeList } from 'react-window';
6
6
  import { useCustom } from "../../CustomProvider/index.js";
7
7
  export const defaultItemSize = () => 36;
8
- const OuterElementType = /*#__PURE__*/React.forwardRef((props, ref) => {
8
+ const OuterElementType = /*#__PURE__*/React.forwardRef(function OuterElementType(props, ref) {
9
9
  return /*#__PURE__*/React.createElement(ScrollView, _extends({
10
10
  scrollShadow: true,
11
11
  ref: ref
@@ -70,4 +70,5 @@ const List = /*#__PURE__*/React.forwardRef((props, ref) => {
70
70
  outerElementType: scrollShadow ? OuterElementType : undefined
71
71
  }));
72
72
  });
73
+ List.displayName = 'List';
73
74
  export default List;
@@ -1,6 +1,5 @@
1
1
  export type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | boolean;
2
- export interface ClassArray extends Array<ClassValue> {
3
- }
2
+ export type ClassArray = Array<ClassValue>;
4
3
  export interface ClassDictionary {
5
4
  [id: string]: any;
6
5
  }
@@ -7,8 +7,6 @@ import { CustomContext } from "../../CustomProvider/CustomProvider.js";
7
7
  // This is the only way I found to break circular references between ClassArray and ClassValue
8
8
  // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
9
9
 
10
- //eslint-disable-line @typescript-eslint/no-empty-interface
11
-
12
10
  /**
13
11
  * Add a prefix to all classNames.
14
12
  *
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React, { useEffect, useState, useCallback, useMemo } from 'react';
4
4
  import { createPortal } from 'react-dom';
5
5
  import canUseDOM from 'dom-lib/canUseDOM';
6
- const MountedPortal = /*#__PURE__*/React.memo(_ref => {
6
+ const MountedPortal = /*#__PURE__*/React.memo(function MountedPortal(_ref) {
7
7
  let {
8
8
  children,
9
9
  container
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { TypeAttributes } from '../types';
3
- export declare function useToggleCaret(placement: TypeAttributes.Placement8 | TypeAttributes.Placement): import("react").ForwardRefExoticComponent<import("@rsuite/icons/esm/Icon").IconProps & import("react").RefAttributes<SVGElement>>;
2
+ import { PlacementCorners, Placement } from '../types';
3
+ export declare function useToggleCaret(placement: PlacementCorners | Placement): import("react").ForwardRefExoticComponent<import("@rsuite/icons/esm/Icon").IconProps & import("react").RefAttributes<SVGElement>>;
4
4
  export default useToggleCaret;
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { useMemo } from 'react';
3
+ import { useCustom } from "../../CustomProvider/index.js";
3
4
  import ArrowUpLineIcon from '@rsuite/icons/ArrowUpLine';
4
5
  import ArrowDownLineIcon from '@rsuite/icons/ArrowDownLine';
5
6
  import ArrowLeftLineIcon from '@rsuite/icons/ArrowLeftLine';
6
7
  import ArrowRightLineIcon from '@rsuite/icons/ArrowRightLine';
7
- import { useCustom } from "../../CustomProvider/index.js";
8
8
  export function useToggleCaret(placement) {
9
9
  const {
10
10
  rtl
@@ -8,7 +8,6 @@ export const useUpdateEffect = (effect, deps) => {
8
8
  return;
9
9
  }
10
10
  effect();
11
- // eslint-disable-next-line react-hooks/exhaustive-deps
12
11
  }, deps);
13
12
  };
14
13
  export default useUpdateEffect;
@@ -10,8 +10,6 @@ import { useEffect } from 'react';
10
10
  */
11
11
  export function useWillUnmount(fn) {
12
12
  const onUnmount = useUpdatedRef(fn);
13
-
14
- // eslint-disable-next-line react-hooks/exhaustive-deps
15
13
  useEffect(() => () => onUnmount.current(), []);
16
14
  }
17
15
  export default useWillUnmount;
@@ -1,2 +1,3 @@
1
1
  export declare const RSUITE_PICKER_TYPE: symbol;
2
2
  export declare const RSUITE_PICKER_GROUP_KEY: unique symbol;
3
+ export declare const RSUITE_TOASTER_ID: unique symbol;
@@ -1,3 +1,4 @@
1
1
  'use client';
2
2
  export const RSUITE_PICKER_TYPE = Symbol.for('rsuite.picker');
3
- export const RSUITE_PICKER_GROUP_KEY = Symbol.for('rsuite.picker_group_key');
3
+ export const RSUITE_PICKER_GROUP_KEY = Symbol.for('rsuite.picker_group_key');
4
+ export const RSUITE_TOASTER_ID = Symbol.for('rsuite.toaster_id');
@@ -0,0 +1,10 @@
1
+ export declare enum Colours {
2
+ Red = "red",
3
+ Orange = "orange",
4
+ Yellow = "yellow",
5
+ Green = "green",
6
+ Cyan = "cyan",
7
+ Blue = "blue",
8
+ Violet = "violet"
9
+ }
10
+ export type Color = `${Colours}`;