rsuite 6.0.0-canary-20250624 → 6.0.0-canary-20250702

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 (247) hide show
  1. package/AutoComplete/styles/index.css +156 -161
  2. package/AvatarGroup/styles/index.css +1 -10
  3. package/Badge/styles/index.css +21 -21
  4. package/Button/styles/index.css +78 -63
  5. package/ButtonGroup/styles/index.css +15 -12
  6. package/ButtonToolbar/styles/index.css +1 -10
  7. package/CHANGELOG.md +9 -0
  8. package/Calendar/styles/index.css +92 -67
  9. package/Card/styles/index.css +7 -7
  10. package/CascadeTree/styles/index.css +8 -9
  11. package/Cascader/styles/index.css +160 -164
  12. package/CheckPicker/styles/index.css +173 -178
  13. package/CheckTree/styles/index.css +175 -180
  14. package/CheckTreePicker/styles/index.css +175 -180
  15. package/Checkbox/styles/index.css +21 -28
  16. package/CheckboxGroup/styles/index.css +1 -1
  17. package/DateInput/styles/index.css +8 -18
  18. package/DatePicker/styles/index.css +173 -168
  19. package/DateRangeInput/styles/index.css +8 -18
  20. package/DateRangePicker/styles/index.css +173 -168
  21. package/Dropdown/styles/index.css +110 -94
  22. package/IconButton/styles/index.css +95 -79
  23. package/InlineEdit/styles/index.css +12 -19
  24. package/Input/styles/index.css +8 -18
  25. package/InputGroup/styles/index.css +31 -38
  26. package/InputNumber/styles/index.css +115 -100
  27. package/InputPicker/styles/index.css +156 -161
  28. package/List/styles/index.css +10 -10
  29. package/Loader/styles/index.css +16 -16
  30. package/Menu/styles/index.css +2 -2
  31. package/Message/styles/index.css +2 -2
  32. package/MultiCascadeTree/styles/index.css +178 -191
  33. package/MultiCascader/styles/index.css +178 -200
  34. package/Nav/styles/index.css +162 -146
  35. package/Navbar/styles/index.css +140 -124
  36. package/NumberInput/styles/index.css +115 -100
  37. package/Pagination/styles/index.css +177 -200
  38. package/PasswordInput/styles/index.css +36 -43
  39. package/PinInput/styles/index.css +12 -22
  40. package/Radio/styles/index.css +22 -29
  41. package/RadioGroup/styles/index.css +11 -11
  42. package/SelectPicker/styles/index.css +156 -161
  43. package/Sidenav/styles/index.css +122 -129
  44. package/Stack/styles/index.css +1 -10
  45. package/Stat/styles/index.css +95 -79
  46. package/Steps/styles/index.css +26 -25
  47. package/Table/styles/index.css +11 -0
  48. package/Tabs/styles/index.css +162 -146
  49. package/Tag/styles/index.css +112 -96
  50. package/TagInput/styles/index.css +174 -179
  51. package/TagPicker/styles/index.css +174 -179
  52. package/TimePicker/styles/index.css +173 -168
  53. package/TimeRangePicker/styles/index.css +173 -168
  54. package/Toggle/styles/index.css +27 -30
  55. package/Tree/styles/index.css +157 -162
  56. package/TreePicker/styles/index.css +157 -162
  57. package/Uploader/styles/index.css +94 -65
  58. package/cjs/Badge/Badge.js +16 -11
  59. package/cjs/Breadcrumb/Breadcrumb.d.ts +2 -2
  60. package/cjs/Button/Button.js +9 -7
  61. package/cjs/ButtonGroup/ButtonGroup.js +7 -7
  62. package/cjs/Card/Card.js +6 -6
  63. package/cjs/Checkbox/Checkbox.js +6 -7
  64. package/cjs/CheckboxGroup/CheckboxGroup.js +3 -4
  65. package/cjs/Dropdown/Dropdown.js +3 -4
  66. package/cjs/Dropdown/DropdownItem.js +4 -4
  67. package/cjs/Dropdown/DropdownMenu.js +9 -10
  68. package/cjs/FormControl/FormControl.d.ts +1 -1
  69. package/cjs/FormControlLabel/FormControlLabel.d.ts +1 -1
  70. package/cjs/FormHelpText/FormHelpText.d.ts +1 -1
  71. package/cjs/IconButton/IconButton.d.ts +1 -1
  72. package/cjs/IconButton/IconButton.js +9 -9
  73. package/cjs/Image/Image.d.ts +1 -1
  74. package/cjs/InlineEdit/InlineEdit.js +3 -2
  75. package/cjs/InputGroup/InputGroup.js +12 -14
  76. package/cjs/InputGroup/InputGroupAddon.d.ts +2 -2
  77. package/cjs/InputPicker/InputAutosize.js +4 -6
  78. package/cjs/List/List.d.ts +1 -1
  79. package/cjs/List/List.js +7 -8
  80. package/cjs/List/ListItem.d.ts +2 -2
  81. package/cjs/List/ListItem.js +4 -4
  82. package/cjs/Loader/Loader.js +8 -7
  83. package/cjs/Menu/MenuSeparator.d.ts +2 -2
  84. package/cjs/Nav/Nav.d.ts +2 -2
  85. package/cjs/Nav/Nav.js +12 -13
  86. package/cjs/Nav/NavDropdownItem.js +4 -4
  87. package/cjs/Nav/NavDropdownMenu.js +10 -13
  88. package/cjs/Nav/NavItem.d.ts +2 -2
  89. package/cjs/Nav/NavItem.js +6 -8
  90. package/cjs/Navbar/Navbar.js +6 -6
  91. package/cjs/Navbar/NavbarDropdown.d.ts +1 -1
  92. package/cjs/Navbar/NavbarDropdown.js +3 -4
  93. package/cjs/Navbar/NavbarDropdownItem.js +4 -4
  94. package/cjs/Navbar/NavbarDropdownMenu.js +8 -11
  95. package/cjs/NumberInput/NumberInput.d.ts +1 -1
  96. package/cjs/Pagination/Pagination.js +3 -2
  97. package/cjs/Pagination/PaginationButton.d.ts +3 -3
  98. package/cjs/Pagination/PaginationButton.js +9 -17
  99. package/cjs/Pagination/PaginationGroup.js +2 -1
  100. package/cjs/Panel/PanelHeader.d.ts +1 -1
  101. package/cjs/Radio/Radio.js +6 -6
  102. package/cjs/RadioGroup/RadioGroup.js +4 -4
  103. package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
  104. package/cjs/Sidenav/Sidenav.js +3 -2
  105. package/cjs/Sidenav/SidenavDropdown.js +3 -5
  106. package/cjs/Sidenav/SidenavDropdownItem.js +4 -4
  107. package/cjs/Sidenav/SidenavDropdownMenu.js +10 -13
  108. package/cjs/Sidenav/SidenavItem.d.ts +2 -2
  109. package/cjs/Sidenav/SidenavItem.js +4 -5
  110. package/cjs/Slider/Handle.d.ts +1 -1
  111. package/cjs/Stack/Stack.d.ts +1 -17
  112. package/cjs/Stack/Stack.js +3 -4
  113. package/cjs/Stack/StackItem.d.ts +4 -5
  114. package/cjs/Stack/StackItem.js +4 -10
  115. package/cjs/Steps/StepItem.js +7 -8
  116. package/cjs/Steps/Steps.d.ts +2 -1
  117. package/cjs/Steps/Steps.js +32 -34
  118. package/cjs/Tabs/Tabs.js +1 -1
  119. package/cjs/Tag/Tag.js +5 -2
  120. package/cjs/Toggle/Toggle.d.ts +1 -1
  121. package/cjs/Toggle/Toggle.js +7 -6
  122. package/cjs/Tree/types.d.ts +2 -2
  123. package/cjs/Uploader/Uploader.d.ts +2 -2
  124. package/cjs/internals/Box/Box.d.ts +1 -0
  125. package/cjs/internals/Box/index.d.ts +1 -1
  126. package/cjs/internals/Box/utils.js +5 -4
  127. package/cjs/internals/InputBase/InputBase.d.ts +1 -1
  128. package/cjs/internals/InputBase/InputBase.js +3 -2
  129. package/cjs/internals/Menu/MenuItem.js +1 -1
  130. package/cjs/internals/Overlay/Modal.d.ts +1 -1
  131. package/cjs/internals/Picker/PickerToggle.js +2 -4
  132. package/cjs/internals/SafeAnchor/SafeAnchor.d.ts +2 -2
  133. package/cjs/internals/Tree/TreeView.d.ts +2 -2
  134. package/cjs/internals/hooks/useCustom.js +24 -7
  135. package/cjs/internals/styled-system/css-alias.d.ts +7 -0
  136. package/cjs/internals/styled-system/css-alias.js +391 -0
  137. package/cjs/internals/styled-system/css-properties.d.ts +6 -0
  138. package/cjs/internals/styled-system/css-properties.js +30 -0
  139. package/cjs/internals/styled-system/index.d.ts +1 -1
  140. package/cjs/internals/styled-system/index.js +4 -4
  141. package/cjs/internals/styled-system/responsive.d.ts +0 -4
  142. package/cjs/internals/styled-system/responsive.js +12 -33
  143. package/cjs/internals/styled-system/types.d.ts +59 -5
  144. package/cjs/internals/styled-system/useStyled.js +3 -3
  145. package/cjs/internals/types/html.d.ts +6 -6
  146. package/cjs/internals/types/picker.d.ts +1 -1
  147. package/dist/rsuite-no-reset.css +641 -641
  148. package/dist/rsuite-no-reset.min.css +1 -1
  149. package/dist/rsuite.css +641 -641
  150. package/dist/rsuite.js +60 -60
  151. package/dist/rsuite.min.css +1 -1
  152. package/dist/rsuite.min.js +1 -1
  153. package/dist/rsuite.min.js.map +1 -1
  154. package/esm/Badge/Badge.js +16 -11
  155. package/esm/Breadcrumb/Breadcrumb.d.ts +2 -2
  156. package/esm/Button/Button.js +9 -7
  157. package/esm/ButtonGroup/ButtonGroup.js +7 -7
  158. package/esm/Card/Card.js +6 -6
  159. package/esm/Checkbox/Checkbox.js +6 -7
  160. package/esm/CheckboxGroup/CheckboxGroup.js +3 -4
  161. package/esm/Dropdown/Dropdown.js +3 -4
  162. package/esm/Dropdown/DropdownItem.js +4 -4
  163. package/esm/Dropdown/DropdownMenu.js +9 -10
  164. package/esm/FormControl/FormControl.d.ts +1 -1
  165. package/esm/FormControlLabel/FormControlLabel.d.ts +1 -1
  166. package/esm/FormHelpText/FormHelpText.d.ts +1 -1
  167. package/esm/IconButton/IconButton.d.ts +1 -1
  168. package/esm/IconButton/IconButton.js +9 -9
  169. package/esm/Image/Image.d.ts +1 -1
  170. package/esm/InlineEdit/InlineEdit.js +3 -2
  171. package/esm/InputGroup/InputGroup.js +12 -14
  172. package/esm/InputGroup/InputGroupAddon.d.ts +2 -2
  173. package/esm/InputPicker/InputAutosize.js +4 -6
  174. package/esm/List/List.d.ts +1 -1
  175. package/esm/List/List.js +7 -8
  176. package/esm/List/ListItem.d.ts +2 -2
  177. package/esm/List/ListItem.js +4 -4
  178. package/esm/Loader/Loader.js +8 -7
  179. package/esm/Menu/MenuSeparator.d.ts +2 -2
  180. package/esm/Nav/Nav.d.ts +2 -2
  181. package/esm/Nav/Nav.js +12 -13
  182. package/esm/Nav/NavDropdownItem.js +4 -4
  183. package/esm/Nav/NavDropdownMenu.js +10 -13
  184. package/esm/Nav/NavItem.d.ts +2 -2
  185. package/esm/Nav/NavItem.js +6 -8
  186. package/esm/Navbar/Navbar.js +7 -7
  187. package/esm/Navbar/NavbarDropdown.d.ts +1 -1
  188. package/esm/Navbar/NavbarDropdown.js +3 -4
  189. package/esm/Navbar/NavbarDropdownItem.js +4 -4
  190. package/esm/Navbar/NavbarDropdownMenu.js +8 -11
  191. package/esm/NumberInput/NumberInput.d.ts +1 -1
  192. package/esm/Pagination/Pagination.js +3 -2
  193. package/esm/Pagination/PaginationButton.d.ts +3 -3
  194. package/esm/Pagination/PaginationButton.js +9 -16
  195. package/esm/Pagination/PaginationGroup.js +2 -1
  196. package/esm/Panel/PanelHeader.d.ts +1 -1
  197. package/esm/Radio/Radio.js +6 -6
  198. package/esm/RadioGroup/RadioGroup.js +4 -4
  199. package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
  200. package/esm/Sidenav/Sidenav.js +3 -2
  201. package/esm/Sidenav/SidenavDropdown.js +3 -5
  202. package/esm/Sidenav/SidenavDropdownItem.js +4 -4
  203. package/esm/Sidenav/SidenavDropdownMenu.js +10 -13
  204. package/esm/Sidenav/SidenavItem.d.ts +2 -2
  205. package/esm/Sidenav/SidenavItem.js +4 -5
  206. package/esm/Slider/Handle.d.ts +1 -1
  207. package/esm/Stack/Stack.d.ts +1 -17
  208. package/esm/Stack/Stack.js +3 -4
  209. package/esm/Stack/StackItem.d.ts +4 -5
  210. package/esm/Stack/StackItem.js +5 -11
  211. package/esm/Steps/StepItem.js +7 -8
  212. package/esm/Steps/Steps.d.ts +2 -1
  213. package/esm/Steps/Steps.js +31 -34
  214. package/esm/Tabs/Tabs.js +1 -1
  215. package/esm/Tag/Tag.js +5 -2
  216. package/esm/Toggle/Toggle.d.ts +1 -1
  217. package/esm/Toggle/Toggle.js +7 -6
  218. package/esm/Tree/types.d.ts +2 -2
  219. package/esm/Uploader/Uploader.d.ts +2 -2
  220. package/esm/internals/Box/Box.d.ts +1 -0
  221. package/esm/internals/Box/index.d.ts +1 -1
  222. package/esm/internals/Box/utils.js +6 -5
  223. package/esm/internals/InputBase/InputBase.d.ts +1 -1
  224. package/esm/internals/InputBase/InputBase.js +3 -2
  225. package/esm/internals/Menu/MenuItem.js +1 -1
  226. package/esm/internals/Overlay/Modal.d.ts +1 -1
  227. package/esm/internals/Picker/PickerToggle.js +2 -4
  228. package/esm/internals/SafeAnchor/SafeAnchor.d.ts +2 -2
  229. package/esm/internals/Tree/TreeView.d.ts +2 -2
  230. package/esm/internals/hooks/useCustom.js +24 -7
  231. package/esm/internals/styled-system/css-alias.d.ts +7 -0
  232. package/esm/internals/styled-system/css-alias.js +387 -0
  233. package/esm/internals/styled-system/css-properties.d.ts +6 -0
  234. package/esm/internals/styled-system/css-properties.js +26 -0
  235. package/esm/internals/styled-system/index.d.ts +1 -1
  236. package/esm/internals/styled-system/index.js +1 -1
  237. package/esm/internals/styled-system/responsive.d.ts +0 -4
  238. package/esm/internals/styled-system/responsive.js +11 -31
  239. package/esm/internals/styled-system/types.d.ts +59 -5
  240. package/esm/internals/styled-system/useStyled.js +3 -3
  241. package/esm/internals/types/html.d.ts +6 -6
  242. package/esm/internals/types/picker.d.ts +1 -1
  243. package/package.json +1 -1
  244. package/cjs/internals/styled-system/css-property.d.ts +0 -6
  245. package/cjs/internals/styled-system/css-property.js +0 -289
  246. package/esm/internals/styled-system/css-property.d.ts +0 -6
  247. package/esm/internals/styled-system/css-property.js +0 -285
@@ -3,7 +3,7 @@ import { BoxProps } from '../internals/Box';
3
3
  import type { PlacementCorners, WithAsProps } from '../internals/types';
4
4
  import type { IconProps } from '@rsuite/icons/Icon';
5
5
  export type NavbarDropdownTrigger = 'click' | 'hover' | 'contextMenu';
6
- export interface NavbarDropdownProps<T = any> extends BoxProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect' | 'onToggle' | 'title'> {
6
+ export interface NavbarDropdownProps<T = any> extends BoxProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect' | 'onToggle' | 'title' | 'color'> {
7
7
  /** Define the title as a submenu */
8
8
  title?: React.ReactNode;
9
9
  /** Set the icon */
@@ -71,15 +71,14 @@ const NavbarDropdown = (0, _utils.forwardRef)((props, ref) => {
71
71
  open,
72
72
  ...props
73
73
  }, containerRef) => {
74
- const classes = merge(className, withPrefix({
75
- disabled,
76
- open
77
- }));
74
+ const classes = merge(className, withPrefix());
78
75
  return /*#__PURE__*/_react.default.createElement(_Box.default, (0, _extends2.default)({
79
76
  as: as,
80
77
  ref: (0, _utils.mergeRefs)(ref, containerRef),
81
78
  className: classes,
82
79
  style: style,
80
+ "data-open": open,
81
+ "data-disabled": disabled,
83
82
  "data-placement": (0, _utils.kebabPlace)(placement)
84
83
  }, props), /*#__PURE__*/_react.default.createElement(_Disclosure.default.Button, null, (buttonProps, buttonRef) => /*#__PURE__*/_react.default.createElement(_NavbarDropdownToggle.default, (0, _extends2.default)({
85
84
  ref: buttonRef,
@@ -75,13 +75,13 @@ const NavbarDropdownItem = (0, _utils.forwardRef)((props, ref) => {
75
75
  });
76
76
  }
77
77
  const classes = merge(className, withPrefix({
78
- 'with-icon': icon,
79
- disabled,
80
78
  divider,
81
- panel,
82
- active: selected
79
+ panel
83
80
  }));
84
81
  const dataAttributes = {
82
+ 'data-active': selected,
83
+ 'data-with-icon': !!icon,
84
+ 'data-disabled': disabled,
85
85
  'data-event-key': eventKey
86
86
  };
87
87
  if (!(0, _isNil.default)(eventKey) && typeof eventKey !== 'string') {
@@ -77,24 +77,21 @@ const NavbarDropdownMenu = /*#__PURE__*/_react.default.forwardRef((props, ref) =
77
77
  open,
78
78
  ...props
79
79
  }, containerRef) => {
80
- const classes = mergeItemClassNames(className, withItemClassPrefix({
81
- disabled,
82
- open,
83
- submenu: true
84
- }));
80
+ const classes = mergeItemClassNames(className, withItemClassPrefix('submenu'));
85
81
  return /*#__PURE__*/_react.default.createElement("li", (0, _extends2.default)({
86
82
  ref: (0, _utils.mergeRefs)(ref, containerRef),
87
- className: classes
83
+ className: classes,
84
+ "data-open": open,
85
+ "data-disabled": disabled
88
86
  }, props), /*#__PURE__*/_react.default.createElement(_Disclosure.default.Button, null, ({
89
87
  open,
90
88
  ...buttonProps
91
89
  }, buttonRef) => {
92
- const classes = mergeItemClassNames(className, prefixItemClassName`toggle`, withItemClassPrefix({
93
- 'with-icon': icon,
94
- open,
95
- disabled
96
- }));
90
+ const classes = mergeItemClassNames(className, prefixItemClassName`toggle`, withItemClassPrefix());
97
91
  const dataAttributes = {
92
+ 'data-open': open,
93
+ 'data-disabled': disabled,
94
+ 'data-with-icon': !!icon,
98
95
  'data-event-key': eventKey
99
96
  };
100
97
  if (!(0, _isNil.default)(eventKey) && typeof eventKey !== 'string') {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { BoxProps } from '../internals/Box';
3
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> {
4
+ export interface NumberInputProps<T = number | string | null> extends Omit<SanitizedInputProps, 'value' | 'defaultValue' | 'prefix'>, Omit<BoxProps, 'height' | 'width'>, FormControlBaseProps<T> {
5
5
  /**
6
6
  * Button can have different appearances
7
7
  */
@@ -188,11 +188,12 @@ const Pagination = (0, _utils.forwardRef)((props, ref) => {
188
188
  }, last === true ? icons.last : last)
189
189
  });
190
190
  };
191
- const classes = merge(className, withPrefix(size));
191
+ const classes = merge(className, withPrefix());
192
192
  return /*#__PURE__*/_react.default.createElement(_Box.default, (0, _extends2.default)({
193
193
  as: as,
194
194
  ref: ref,
195
- className: classes
195
+ className: classes,
196
+ "data-size": size
196
197
  }, rest), renderFirst(), renderPrev(), renderPageButtons(), renderNext(), renderLast());
197
198
  });
198
199
  Pagination.displayName = 'Pagination';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { WithAsProps, HTMLPropsWithoutSelect } from '../internals/types';
3
- export interface PaginationButtonProps<T = number | string> extends WithAsProps, HTMLPropsWithoutSelect<HTMLButtonElement, React.ButtonHTMLAttributes<HTMLButtonElement>> {
2
+ import { ButtonProps } from '../Button';
3
+ export interface PaginationButtonProps<T = number | string> extends Omit<ButtonProps, 'onSelect'> {
4
4
  /** The value of the current option */
5
5
  eventKey: T;
6
6
  /** A button can show it is currently unable to be interacted with */
@@ -18,5 +18,5 @@ export interface PaginationButtonProps<T = number | string> extends WithAsProps,
18
18
  * PaginationButton component for pagination navigation.
19
19
  * Renders a button that can be used in pagination contexts.
20
20
  */
21
- declare const PaginationButton: import("../internals/types").InternalRefForwardingComponent<"button", PaginationButtonProps<string | number>, never> & Record<string, never>;
21
+ declare const PaginationButton: import("../internals/types").InternalRefForwardingComponent<import("../internals/types").InternalRefForwardingComponent<"button", ButtonProps, never> & Record<string, never>, PaginationButtonProps<string | number>, never> & Record<string, never>;
22
22
  export default PaginationButton;
@@ -5,18 +5,17 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
7
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
9
9
  var _Button = _interopRequireDefault(require("../Button"));
10
10
  var _hooks = require("../internals/hooks");
11
11
  var _utils = require("../internals/utils");
12
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
12
  /**
14
13
  * PaginationButton component for pagination navigation.
15
14
  * Renders a button that can be used in pagination contexts.
16
15
  */
17
16
  const PaginationButton = (0, _utils.forwardRef)((props, ref) => {
18
17
  const {
19
- as: Component = _Button.default,
18
+ as,
20
19
  active,
21
20
  disabled,
22
21
  className,
@@ -31,10 +30,7 @@ const PaginationButton = (0, _utils.forwardRef)((props, ref) => {
31
30
  merge,
32
31
  withPrefix
33
32
  } = (0, _hooks.useStyles)(classPrefix);
34
- const classes = merge(className, withPrefix({
35
- active,
36
- disabled
37
- }));
33
+ const classes = merge(className, withPrefix());
38
34
  const handleClick = (0, _hooks.useEventCallback)(event => {
39
35
  if (disabled) {
40
36
  return;
@@ -46,21 +42,17 @@ const PaginationButton = (0, _utils.forwardRef)((props, ref) => {
46
42
  onSelect(eventKey, event);
47
43
  }
48
44
  });
49
-
50
- // Determine props to pass based on component type
51
- const asProps = (0, _react.useMemo)(() => Component !== _Button.default && typeof Component !== 'string' ? {
52
- eventKey,
53
- active,
54
- role: 'button'
55
- } : {}, [Component, eventKey, active]);
56
- return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, asProps, {
45
+ return /*#__PURE__*/_react.default.createElement(_Button.default, (0, _extends2.default)({}, rest, {
46
+ as: as,
57
47
  disabled: disabled,
58
48
  onClick: handleClick,
59
49
  ref: ref,
60
50
  className: classes,
61
- role: "button",
51
+ appearance: "subtle",
62
52
  "aria-disabled": disabled,
63
- "aria-current": active ? 'page' : undefined
53
+ "aria-current": active ? 'page' : undefined,
54
+ active: active,
55
+ "data-event-key": eventKey
64
56
  }), children);
65
57
  });
66
58
  PaginationButton.displayName = 'PaginationButton';
@@ -57,7 +57,7 @@ const PaginationGroup = (0, _utils.forwardRef)((props, ref) => {
57
57
  const [limit, setLimit] = (0, _hooks.useControlled)(limitProp, 30);
58
58
  const [activePage, setActivePage] = (0, _hooks.useControlled)(activePageProp, 1);
59
59
  const pages = Math.floor(total / limit) + (total % limit ? 1 : 0);
60
- const classes = merge(className, withPrefix(size));
60
+ const classes = merge(className, withPrefix());
61
61
  const {
62
62
  getLocale
63
63
  } = (0, _hooks.useCustom)();
@@ -82,6 +82,7 @@ const PaginationGroup = (0, _utils.forwardRef)((props, ref) => {
82
82
  as: as,
83
83
  ref: ref,
84
84
  className: classes,
85
+ "data-size": size,
85
86
  style: style
86
87
  }, layout.map((key, index) => {
87
88
  const onlyKey = `${key}${index}`;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BoxProps } from '../internals/Box';
3
- export interface PanelHeaderProps extends BoxProps, React.HTMLAttributes<HTMLHeadingElement> {
3
+ export interface PanelHeaderProps extends BoxProps, Omit<React.HTMLAttributes<HTMLHeadingElement>, 'color'> {
4
4
  caretAs?: React.ElementType;
5
5
  collapsible?: boolean;
6
6
  disabled?: boolean;
@@ -57,11 +57,7 @@ const Radio = (0, _utils.forwardRef)((props, ref) => {
57
57
  withPrefix,
58
58
  prefix
59
59
  } = (0, _hooks.useStyles)(classPrefix);
60
- const classes = merge(className, withPrefix(color, {
61
- inline,
62
- disabled,
63
- checked
64
- }));
60
+ const classes = merge(className, withPrefix());
65
61
  const [htmlInputProps, restProps] = (0, _utils.partitionHTMLProps)(rest);
66
62
  const handleChange = (0, _hooks.useEventCallback)(event => {
67
63
  if (disabled || readOnly) {
@@ -106,7 +102,11 @@ const Radio = (0, _utils.forwardRef)((props, ref) => {
106
102
  as: as,
107
103
  ref: ref,
108
104
  onClick: onClick,
109
- className: classes
105
+ className: classes,
106
+ "data-color": color,
107
+ "data-checked": checked,
108
+ "data-disabled": disabled,
109
+ "data-inline": inline
110
110
  }, restProps), /*#__PURE__*/_react.default.createElement("div", {
111
111
  className: prefix`checker`
112
112
  }, children ? /*#__PURE__*/_react.default.createElement("label", {
@@ -41,9 +41,7 @@ const RadioGroup = (0, _utils.forwardRef)((props, ref) => {
41
41
  merge,
42
42
  withPrefix
43
43
  } = (0, _hooks.useStyles)(classPrefix);
44
- const classes = merge(className, withPrefix(appearance, {
45
- inline
46
- }));
44
+ const classes = merge(className, withPrefix());
47
45
  const [value, setValue, isControlled] = (0, _hooks.useControlled)(valueProp, defaultValue);
48
46
  const handleChange = (0, _hooks.useEventCallback)((nextValue, event) => {
49
47
  setValue(nextValue);
@@ -69,7 +67,9 @@ const RadioGroup = (0, _utils.forwardRef)((props, ref) => {
69
67
  role: "radiogroup"
70
68
  }, rest, {
71
69
  ref: ref,
72
- className: classes
70
+ className: classes,
71
+ "data-inline": inline,
72
+ "data-appearance": appearance
73
73
  }), children));
74
74
  });
75
75
  RadioGroup.displayName = 'RadioGroup';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { BoxProps } from '../internals/Box';
3
3
  import type { PlacementCorners } from '../internals/types';
4
4
  import type { IconProps } from '@rsuite/icons/Icon';
5
- export interface SidenavDropdownProps<T = any> extends BoxProps, Omit<React.HTMLAttributes<HTMLElement>, 'onToggle' | 'title'> {
5
+ export interface SidenavDropdownProps<T = any> extends BoxProps, Omit<React.HTMLAttributes<HTMLElement>, 'onToggle' | 'title' | 'color'> {
6
6
  /** Define the title as a submenu */
7
7
  title?: React.ReactNode;
8
8
  /** Set the icon */
@@ -54,7 +54,7 @@ const Sidenav = (0, _utils.forwardRef)((props, ref) => {
54
54
  merge,
55
55
  withPrefix
56
56
  } = (0, _hooks.useStyles)(classPrefix);
57
- const classes = merge(className, withPrefix(appearance));
57
+ const classes = merge(className, withPrefix());
58
58
  const handleOpenChange = (0, _react.useCallback)((eventKey, event) => {
59
59
  const find = key => (0, _utils.shallowEqual)(key, eventKey);
60
60
  const nextOpenKeys = [...openKeys];
@@ -92,7 +92,8 @@ const Sidenav = (0, _utils.forwardRef)((props, ref) => {
92
92
  as: as
93
93
  }, rest, transitionRest, {
94
94
  ref: (0, _utils.mergeRefs)(ref, transitionRef),
95
- className: merge(classes, className)
95
+ className: merge(classes, className),
96
+ "data-appearance": appearance
96
97
  }));
97
98
  }));
98
99
  }, Subcomponents);
@@ -152,16 +152,14 @@ const SidenavDropdown = (0, _utils.forwardRef)((props, ref) => {
152
152
  open,
153
153
  ...menuContainer
154
154
  }, menuContainerRef) => {
155
- const classes = merge(className, withPrefix({
156
- disabled,
157
- open,
158
- submenu: true
159
- }));
155
+ const classes = merge(className, withPrefix('submenu'));
160
156
  return /*#__PURE__*/_react.default.createElement(_Box.default, (0, _extends2.default)({
161
157
  as: as,
162
158
  ref: (0, _utils.mergeRefs)(ref, menuContainerRef),
163
159
  className: classes,
164
160
  style: style,
161
+ "data-open": open,
162
+ "data-disabled": disabled,
165
163
  "data-placement": (0, _utils.kebabPlace)(placement),
166
164
  "data-active-descendant": hasSelectedItems
167
165
  }, menuContainer, (0, _pick.default)(toggleProps, ['data-testid'])));
@@ -91,14 +91,14 @@ const SidenavDropdownItem = (0, _utils.forwardRef)((props, ref) => {
91
91
  ...menuitem
92
92
  }, menuitemRef) => {
93
93
  const classes = merge(className, withPrefix({
94
- 'with-icon': icon,
95
- active: selected,
96
- disabled,
97
- focus: active,
98
94
  divider,
99
95
  panel
100
96
  }));
101
97
  const dataAttributes = {
98
+ 'data-active': selected,
99
+ 'data-disabled': disabled,
100
+ 'data-focus': active,
101
+ 'data-with-icon': !!icon,
102
102
  'data-event-key': eventKey
103
103
  };
104
104
  if (!(0, _isNil.default)(eventKey) && typeof eventKey !== 'string') {
@@ -88,16 +88,15 @@ const SidenavDropdownMenu = /*#__PURE__*/_react.default.forwardRef((props, ref)
88
88
  active,
89
89
  ...menuitem
90
90
  }, menuitemRef) => {
91
- const classes = mergeItemClassNames(className, prefixItemClassName`toggle`, withItemClassPrefix({
92
- 'with-icon': icon,
93
- open,
94
- active: selected,
95
- disabled,
96
- focus: active
97
- }));
91
+ const classes = mergeItemClassNames(className, prefixItemClassName`toggle`, withItemClassPrefix());
98
92
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
99
93
  ref: (0, _utils.mergeRefs)(buttonRef, menuitemRef),
100
94
  className: classes,
95
+ "data-open": open,
96
+ "data-disabled": disabled,
97
+ "data-active": selected,
98
+ "data-focus": active,
99
+ "data-with-icon": icon,
101
100
  "data-event-key": eventKey,
102
101
  "data-event-key-type": typeof eventKey
103
102
  }, menuitem, (0, _omit.default)(menuButtonProps, ['role'])), icon && /*#__PURE__*/_react.default.cloneElement(icon, {
@@ -122,14 +121,12 @@ const SidenavDropdownMenu = /*#__PURE__*/_react.default.forwardRef((props, ref)
122
121
  open,
123
122
  ...menuContainer
124
123
  }, menuContainerRef) => {
125
- const classes = mergeItemClassNames(className, withItemClassPrefix({
126
- disabled,
127
- open,
128
- submenu: true
129
- }));
124
+ const classes = mergeItemClassNames(className, withItemClassPrefix('submenu'));
130
125
  return /*#__PURE__*/_react.default.createElement("li", (0, _extends2.default)({
131
126
  ref: (0, _utils.mergeRefs)(ref, menuContainerRef),
132
- className: classes
127
+ className: classes,
128
+ "data-open": open,
129
+ "data-disabled": disabled
133
130
  }, menuContainer));
134
131
  });
135
132
  });
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import { BoxProps } from '../internals/Box';
2
+ import { BaseBoxProps } from '../internals/Box';
3
3
  import type { HTMLPropsWithoutSelect } from '../internals/types';
4
4
  import type { IconProps } from '@rsuite/icons/Icon';
5
5
  /**
6
6
  * Props of SidenavItem component
7
7
  */
8
- export interface SidenavItemProps<T = any> extends BoxProps, HTMLPropsWithoutSelect {
8
+ export interface SidenavItemProps<T = any> extends BaseBoxProps, HTMLPropsWithoutSelect {
9
9
  /**
10
10
  * Whether the item is activated
11
11
  */
@@ -91,11 +91,7 @@ const SidenavItem = (0, _utils.forwardRef)((props, ref) => {
91
91
  active,
92
92
  ...menuitem
93
93
  }, menuitemRef) => {
94
- const classes = merge(className, withPrefix({
95
- focus: active,
96
- active: selected,
97
- disabled
98
- }));
94
+ const classes = merge(className, withPrefix());
99
95
 
100
96
  // Show tooltip when inside a collapse <Sidenav>
101
97
  return /*#__PURE__*/_react.default.createElement(_Box.default, (0, _extends2.default)({
@@ -103,6 +99,9 @@ const SidenavItem = (0, _utils.forwardRef)((props, ref) => {
103
99
  ref: (0, _utils.mergeRefs)((0, _utils.mergeRefs)(ref, menuitemRef), triggerRef),
104
100
  disabled: as === _SafeAnchor.default ? disabled : undefined,
105
101
  className: classes,
102
+ "data-active": selected,
103
+ "data-disabled": disabled,
104
+ "data-focus": active,
106
105
  "data-event-key": eventKey
107
106
  }, (0, _omit.default)(rest, ['divider', 'panel']), triggerProps, menuitem, {
108
107
  onMouseOver: (0, _utils.createChainedFunction)(menuitem.onMouseOver, triggerProps.onMouseOver),
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BoxProps } from '../internals/Box';
3
- export interface HandleProps extends BoxProps, React.HTMLAttributes<HTMLDivElement> {
3
+ export interface HandleProps extends Omit<BoxProps, 'color' | 'position' | 'height' | 'width'>, React.HTMLAttributes<HTMLDivElement> {
4
4
  disabled?: boolean;
5
5
  vertical?: boolean;
6
6
  tooltip?: boolean;
@@ -1,25 +1,9 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import { BoxProps } from '../internals/Box';
3
3
  import type { WithResponsive } from '../internals/types';
4
- interface DeprecatedStackProps {
5
- /**
6
- * Define the alignment of the children in the stack on the inline axis
7
- * @deprecated Use `justify` instead
8
- */
9
- justifyContent?: CSSProperties['justifyContent'];
10
- /**
11
- * Define the alignment of the children in the stack on the cross axis
12
- * @deprecated Use `align` instead
13
- */
14
- alignItems?: CSSProperties['alignItems'];
15
- }
16
- export interface StackProps extends BoxProps, DeprecatedStackProps {
17
- /** Define the alignment of the children in the stack on the cross axis */
18
- align?: CSSProperties['alignItems'];
4
+ export interface StackProps extends BoxProps {
19
5
  /** The direction of the children in the stack */
20
6
  direction?: WithResponsive<CSSProperties['flexDirection']>;
21
- /** Define the alignment of the children in the stack on the inline axis */
22
- justify?: CSSProperties['justifyContent'];
23
7
  /** Add an element between each child */
24
8
  divider?: React.ReactNode;
25
9
  /** Define whether the children in the stack are forced onto one line or can wrap onto multiple lines */
@@ -39,15 +39,14 @@ const Stack = (0, _utils.forwardRef)((props, ref) => {
39
39
  merge,
40
40
  responsive
41
41
  } = (0, _hooks.useStyles)(classPrefix);
42
- const baseClasses = merge(className, withPrefix({
43
- wrap
44
- }), ...responsive(direction));
42
+ const baseClasses = merge(className, withPrefix(), ...responsive(direction));
45
43
  const filteredChildren = _react.default.Children.toArray(children);
46
44
  const childCount = filteredChildren.length;
47
45
  return /*#__PURE__*/_react.default.createElement(_Box.default, (0, _extends2.default)({
48
46
  as: as,
49
47
  ref: ref,
50
- className: baseClasses
48
+ className: baseClasses,
49
+ "data-wrap": wrap
51
50
  }, rest), filteredChildren.map((child, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
52
51
  key: index
53
52
  }, child, index < childCount - 1 && divider)));
@@ -1,12 +1,11 @@
1
1
  import React from 'react';
2
2
  import { BoxProps } from '../internals/Box';
3
3
  export interface StackItemProps extends BoxProps {
4
+ /**
5
+ * Define the alignment of the children in the stack on the cross axis
6
+ * @deprecated Use `self` instead
7
+ */
4
8
  alignSelf?: React.CSSProperties['alignSelf'];
5
- flex?: React.CSSProperties['flex'];
6
- grow?: React.CSSProperties['flexGrow'];
7
- shrink?: React.CSSProperties['flexShrink'];
8
- basis?: React.CSSProperties['flexBasis'];
9
- order?: React.CSSProperties['order'];
10
9
  }
11
10
  /**
12
11
  * The `Stack.Item` component is used to set the layout of the child element in the `Stack` component.
@@ -18,28 +18,22 @@ const StackItem = (0, _utils.forwardRef)((props, ref) => {
18
18
  const {
19
19
  as,
20
20
  classPrefix = 'stack-item',
21
- style,
22
21
  className,
23
22
  alignSelf,
24
- flex,
25
- grow,
26
- shrink,
27
- order,
28
- basis,
23
+ self = alignSelf,
29
24
  ...rest
30
25
  } = props;
31
26
  const {
32
27
  withPrefix,
33
- merge,
34
- cssVar
28
+ merge
35
29
  } = (0, _hooks.useStyles)(classPrefix);
36
30
  const classes = merge(className, withPrefix());
37
- const styles = (0, _utils.mergeStyles)(style, cssVar('align-self', alignSelf), cssVar('order', order), cssVar('flex', flex), cssVar('grow', grow), cssVar('shrink', shrink), cssVar('basis', basis));
38
31
  return /*#__PURE__*/_react.default.createElement(_Box.default, (0, _extends2.default)({
39
32
  as: as,
40
33
  ref: ref,
41
34
  className: classes,
42
- style: styles
35
+ self: self,
36
+ paddingTop: 0
43
37
  }, rest));
44
38
  });
45
39
  StackItem.displayName = 'StackItem';
@@ -41,10 +41,7 @@ const StepItem = (0, _utils.forwardRef)((props, ref) => {
41
41
  withPrefix,
42
42
  prefix
43
43
  } = (0, _hooks.useStyles)(classPrefix);
44
- const classes = merge(className, withPrefix({
45
- custom: icon,
46
- [`status-${status}`]: status
47
- }));
44
+ const classes = merge(className, withPrefix());
48
45
  const iconNode = icon ? /*#__PURE__*/_react.default.createElement("span", {
49
46
  className: prefix('icon')
50
47
  }, icon) : /*#__PURE__*/_react.default.createElement("span", {
@@ -52,16 +49,18 @@ const StepItem = (0, _utils.forwardRef)((props, ref) => {
52
49
  [`icon-${status}`]: status
53
50
  })
54
51
  }, status ? (_STEP_STATUS_ICON$sta = STEP_STATUS_ICON[status]) !== null && _STEP_STATUS_ICON$sta !== void 0 ? _STEP_STATUS_ICON$sta : stepNumber : stepNumber);
55
- return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {
52
+ return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
56
53
  ref: ref,
57
54
  className: classes,
58
55
  style: (0, _utils.mergeStyles)({
59
56
  width: itemWidth
60
- }, style)
61
- }), /*#__PURE__*/_react.default.createElement("div", {
57
+ }, style),
58
+ "data-status": status,
59
+ "data-custom-icon": !!icon
60
+ }, rest), /*#__PURE__*/_react.default.createElement("div", {
62
61
  className: prefix('tail')
63
62
  }), /*#__PURE__*/_react.default.createElement("div", {
64
- className: prefix(['icon-wrapper', icon ? 'custom-icon' : ''])
63
+ className: prefix('icon-wrapper')
65
64
  }, iconNode), /*#__PURE__*/_react.default.createElement("div", {
66
65
  className: prefix('content')
67
66
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { StepItemProps } from './StepItem';
2
3
  import { BoxProps } from '../internals/Box';
3
4
  export interface StepsProps extends BoxProps {
4
5
  /** Vertical display */
@@ -18,6 +19,6 @@ export interface StepsProps extends BoxProps {
18
19
  * @see https://rsuitejs.com/components/steps
19
20
  */
20
21
  declare const Steps: import("../internals/types").InternalRefForwardingComponent<"div", StepsProps, never> & {
21
- Item: import("../internals/types").InternalRefForwardingComponent<"div", import("./StepItem").StepItemProps, never> & Record<string, never>;
22
+ Item: import("../internals/types").InternalRefForwardingComponent<"div", StepItemProps, never> & Record<string, never>;
22
23
  };
23
24
  export default Steps;