rsuite 6.0.0-canary-20250622 → 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 (298) 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/AutoComplete/AutoComplete.d.ts +1 -1
  59. package/cjs/AutoComplete/AutoComplete.js +1 -0
  60. package/cjs/Badge/Badge.js +16 -11
  61. package/cjs/Breadcrumb/Breadcrumb.d.ts +2 -2
  62. package/cjs/Button/Button.js +9 -7
  63. package/cjs/ButtonGroup/ButtonGroup.js +7 -7
  64. package/cjs/Card/Card.js +6 -6
  65. package/cjs/Checkbox/Checkbox.js +6 -7
  66. package/cjs/CheckboxGroup/CheckboxGroup.js +3 -4
  67. package/cjs/Dropdown/Dropdown.js +3 -4
  68. package/cjs/Dropdown/DropdownItem.js +4 -4
  69. package/cjs/Dropdown/DropdownMenu.js +9 -10
  70. package/cjs/FormControl/FormControl.d.ts +1 -1
  71. package/cjs/FormControlLabel/FormControlLabel.d.ts +1 -1
  72. package/cjs/FormHelpText/FormHelpText.d.ts +1 -1
  73. package/cjs/FormStack/FormStack.d.ts +0 -5
  74. package/cjs/FormStack/FormStack.js +1 -6
  75. package/cjs/IconButton/IconButton.d.ts +1 -1
  76. package/cjs/IconButton/IconButton.js +9 -9
  77. package/cjs/Image/Image.d.ts +1 -1
  78. package/cjs/InlineEdit/InlineEdit.js +3 -2
  79. package/cjs/InputGroup/InputGroup.js +12 -14
  80. package/cjs/InputGroup/InputGroupAddon.d.ts +2 -2
  81. package/cjs/InputPicker/InputAutosize.js +4 -6
  82. package/cjs/List/List.d.ts +1 -1
  83. package/cjs/List/List.js +7 -8
  84. package/cjs/List/ListItem.d.ts +2 -2
  85. package/cjs/List/ListItem.js +4 -4
  86. package/cjs/Loader/Loader.js +8 -7
  87. package/cjs/Menu/MenuSeparator.d.ts +2 -2
  88. package/cjs/Nav/Nav.d.ts +2 -2
  89. package/cjs/Nav/Nav.js +12 -13
  90. package/cjs/Nav/NavDropdownItem.js +4 -4
  91. package/cjs/Nav/NavDropdownMenu.js +10 -13
  92. package/cjs/Nav/NavItem.d.ts +2 -2
  93. package/cjs/Nav/NavItem.js +6 -8
  94. package/cjs/Navbar/Navbar.js +6 -6
  95. package/cjs/Navbar/NavbarDropdown.d.ts +1 -1
  96. package/cjs/Navbar/NavbarDropdown.js +3 -4
  97. package/cjs/Navbar/NavbarDropdownItem.js +4 -4
  98. package/cjs/Navbar/NavbarDropdownMenu.js +8 -11
  99. package/cjs/NumberInput/NumberInput.d.ts +1 -1
  100. package/cjs/Pagination/Pagination.js +3 -2
  101. package/cjs/Pagination/PaginationButton.d.ts +3 -3
  102. package/cjs/Pagination/PaginationButton.js +9 -17
  103. package/cjs/Pagination/PaginationGroup.js +2 -1
  104. package/cjs/Panel/PanelHeader.d.ts +1 -1
  105. package/cjs/Progress/index.d.ts +1 -2
  106. package/cjs/Progress/index.js +0 -2
  107. package/cjs/Radio/Radio.js +6 -6
  108. package/cjs/RadioGroup/RadioGroup.js +4 -4
  109. package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
  110. package/cjs/Sidenav/Sidenav.js +3 -2
  111. package/cjs/Sidenav/SidenavDropdown.js +3 -5
  112. package/cjs/Sidenav/SidenavDropdownItem.js +4 -4
  113. package/cjs/Sidenav/SidenavDropdownMenu.js +10 -13
  114. package/cjs/Sidenav/SidenavItem.d.ts +2 -2
  115. package/cjs/Sidenav/SidenavItem.js +4 -5
  116. package/cjs/Slider/Handle.d.ts +1 -1
  117. package/cjs/Stack/Stack.d.ts +3 -21
  118. package/cjs/Stack/Stack.js +3 -28
  119. package/cjs/Stack/StackItem.d.ts +4 -5
  120. package/cjs/Stack/StackItem.js +4 -10
  121. package/cjs/Steps/StepItem.js +7 -8
  122. package/cjs/Steps/Steps.d.ts +2 -1
  123. package/cjs/Steps/Steps.js +32 -34
  124. package/cjs/Tabs/Tabs.js +1 -1
  125. package/cjs/Tag/Tag.js +5 -2
  126. package/cjs/Toggle/Toggle.d.ts +1 -1
  127. package/cjs/Toggle/Toggle.js +7 -6
  128. package/cjs/Tree/types.d.ts +2 -2
  129. package/cjs/Uploader/Uploader.d.ts +2 -2
  130. package/cjs/internals/Box/Box.d.ts +4 -38
  131. package/cjs/internals/Box/Box.js +3 -3
  132. package/cjs/internals/Box/index.d.ts +1 -1
  133. package/cjs/internals/Box/utils.d.ts +0 -9
  134. package/cjs/internals/Box/utils.js +22 -226
  135. package/cjs/internals/InputBase/InputBase.d.ts +1 -1
  136. package/cjs/internals/InputBase/InputBase.js +3 -2
  137. package/cjs/internals/Menu/MenuItem.js +1 -1
  138. package/cjs/internals/Overlay/Modal.d.ts +1 -1
  139. package/cjs/internals/Picker/PickerToggle.js +2 -4
  140. package/cjs/internals/SafeAnchor/SafeAnchor.d.ts +2 -2
  141. package/cjs/internals/Tree/TreeView.d.ts +2 -2
  142. package/cjs/internals/hooks/useCustom.js +24 -7
  143. package/cjs/internals/styled-system/css-alias.d.ts +7 -0
  144. package/cjs/internals/styled-system/css-alias.js +391 -0
  145. package/cjs/internals/styled-system/css-properties.d.ts +6 -0
  146. package/cjs/internals/styled-system/css-properties.js +30 -0
  147. package/cjs/internals/styled-system/index.d.ts +5 -0
  148. package/cjs/internals/styled-system/index.js +34 -0
  149. package/cjs/internals/styled-system/responsive.d.ts +26 -0
  150. package/cjs/internals/styled-system/responsive.js +118 -0
  151. package/cjs/internals/styled-system/types.d.ts +208 -0
  152. package/cjs/internals/styled-system/types.js +4 -0
  153. package/cjs/internals/{hooks → styled-system}/useStyled.d.ts +2 -6
  154. package/cjs/internals/{hooks → styled-system}/useStyled.js +24 -84
  155. package/cjs/internals/types/html.d.ts +6 -6
  156. package/cjs/internals/types/picker.d.ts +2 -2
  157. package/cjs/internals/types/sizes.d.ts +2 -1
  158. package/cjs/internals/utils/colours.d.ts +1 -1
  159. package/cjs/internals/utils/colours.js +4 -4
  160. package/cjs/internals/utils/sizes.d.ts +1 -0
  161. package/cjs/internals/utils/sizes.js +8 -1
  162. package/cjs/internals/utils/style-sheet/css.d.ts +6 -0
  163. package/cjs/internals/utils/style-sheet/css.js +35 -0
  164. package/cjs/internals/utils/style-sheet/index.d.ts +0 -1
  165. package/cjs/internals/utils/style-sheet/index.js +0 -6
  166. package/cjs/internals/utils/style-sheet/responsive.d.ts +15 -0
  167. package/cjs/internals/utils/style-sheet/responsive.js +19 -0
  168. package/cjs/useMediaQuery/breakpoints.d.ts +6 -6
  169. package/cjs/useMediaQuery/breakpoints.js +27 -31
  170. package/cjs/useMediaQuery/types.d.ts +2 -2
  171. package/cjs/useMediaQuery/useMediaQuery.js +3 -13
  172. package/dist/rsuite-no-reset.css +641 -655
  173. package/dist/rsuite-no-reset.min.css +1 -1
  174. package/dist/rsuite.css +641 -655
  175. package/dist/rsuite.js +128 -95
  176. package/dist/rsuite.js.map +1 -1
  177. package/dist/rsuite.min.css +1 -1
  178. package/dist/rsuite.min.js +1 -1
  179. package/dist/rsuite.min.js.map +1 -1
  180. package/esm/AutoComplete/AutoComplete.d.ts +1 -1
  181. package/esm/AutoComplete/AutoComplete.js +1 -0
  182. package/esm/Badge/Badge.js +16 -11
  183. package/esm/Breadcrumb/Breadcrumb.d.ts +2 -2
  184. package/esm/Button/Button.js +9 -7
  185. package/esm/ButtonGroup/ButtonGroup.js +7 -7
  186. package/esm/Card/Card.js +6 -6
  187. package/esm/Checkbox/Checkbox.js +6 -7
  188. package/esm/CheckboxGroup/CheckboxGroup.js +3 -4
  189. package/esm/Dropdown/Dropdown.js +3 -4
  190. package/esm/Dropdown/DropdownItem.js +4 -4
  191. package/esm/Dropdown/DropdownMenu.js +9 -10
  192. package/esm/FormControl/FormControl.d.ts +1 -1
  193. package/esm/FormControlLabel/FormControlLabel.d.ts +1 -1
  194. package/esm/FormHelpText/FormHelpText.d.ts +1 -1
  195. package/esm/FormStack/FormStack.d.ts +0 -5
  196. package/esm/FormStack/FormStack.js +2 -7
  197. package/esm/IconButton/IconButton.d.ts +1 -1
  198. package/esm/IconButton/IconButton.js +9 -9
  199. package/esm/Image/Image.d.ts +1 -1
  200. package/esm/InlineEdit/InlineEdit.js +3 -2
  201. package/esm/InputGroup/InputGroup.js +12 -14
  202. package/esm/InputGroup/InputGroupAddon.d.ts +2 -2
  203. package/esm/InputPicker/InputAutosize.js +4 -6
  204. package/esm/List/List.d.ts +1 -1
  205. package/esm/List/List.js +7 -8
  206. package/esm/List/ListItem.d.ts +2 -2
  207. package/esm/List/ListItem.js +4 -4
  208. package/esm/Loader/Loader.js +8 -7
  209. package/esm/Menu/MenuSeparator.d.ts +2 -2
  210. package/esm/Nav/Nav.d.ts +2 -2
  211. package/esm/Nav/Nav.js +12 -13
  212. package/esm/Nav/NavDropdownItem.js +4 -4
  213. package/esm/Nav/NavDropdownMenu.js +10 -13
  214. package/esm/Nav/NavItem.d.ts +2 -2
  215. package/esm/Nav/NavItem.js +6 -8
  216. package/esm/Navbar/Navbar.js +7 -7
  217. package/esm/Navbar/NavbarDropdown.d.ts +1 -1
  218. package/esm/Navbar/NavbarDropdown.js +3 -4
  219. package/esm/Navbar/NavbarDropdownItem.js +4 -4
  220. package/esm/Navbar/NavbarDropdownMenu.js +8 -11
  221. package/esm/NumberInput/NumberInput.d.ts +1 -1
  222. package/esm/Pagination/Pagination.js +3 -2
  223. package/esm/Pagination/PaginationButton.d.ts +3 -3
  224. package/esm/Pagination/PaginationButton.js +9 -16
  225. package/esm/Pagination/PaginationGroup.js +2 -1
  226. package/esm/Panel/PanelHeader.d.ts +1 -1
  227. package/esm/Progress/index.d.ts +1 -2
  228. package/esm/Progress/index.js +1 -2
  229. package/esm/Radio/Radio.js +6 -6
  230. package/esm/RadioGroup/RadioGroup.js +4 -4
  231. package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
  232. package/esm/Sidenav/Sidenav.js +3 -2
  233. package/esm/Sidenav/SidenavDropdown.js +3 -5
  234. package/esm/Sidenav/SidenavDropdownItem.js +4 -4
  235. package/esm/Sidenav/SidenavDropdownMenu.js +10 -13
  236. package/esm/Sidenav/SidenavItem.d.ts +2 -2
  237. package/esm/Sidenav/SidenavItem.js +4 -5
  238. package/esm/Slider/Handle.d.ts +1 -1
  239. package/esm/Stack/Stack.d.ts +3 -21
  240. package/esm/Stack/Stack.js +3 -28
  241. package/esm/Stack/StackItem.d.ts +4 -5
  242. package/esm/Stack/StackItem.js +5 -11
  243. package/esm/Steps/StepItem.js +7 -8
  244. package/esm/Steps/Steps.d.ts +2 -1
  245. package/esm/Steps/Steps.js +31 -34
  246. package/esm/Tabs/Tabs.js +1 -1
  247. package/esm/Tag/Tag.js +5 -2
  248. package/esm/Toggle/Toggle.d.ts +1 -1
  249. package/esm/Toggle/Toggle.js +7 -6
  250. package/esm/Tree/types.d.ts +2 -2
  251. package/esm/Uploader/Uploader.d.ts +2 -2
  252. package/esm/internals/Box/Box.d.ts +4 -38
  253. package/esm/internals/Box/Box.js +3 -3
  254. package/esm/internals/Box/index.d.ts +1 -1
  255. package/esm/internals/Box/utils.d.ts +0 -9
  256. package/esm/internals/Box/utils.js +20 -224
  257. package/esm/internals/InputBase/InputBase.d.ts +1 -1
  258. package/esm/internals/InputBase/InputBase.js +3 -2
  259. package/esm/internals/Menu/MenuItem.js +1 -1
  260. package/esm/internals/Overlay/Modal.d.ts +1 -1
  261. package/esm/internals/Picker/PickerToggle.js +2 -4
  262. package/esm/internals/SafeAnchor/SafeAnchor.d.ts +2 -2
  263. package/esm/internals/Tree/TreeView.d.ts +2 -2
  264. package/esm/internals/hooks/useCustom.js +24 -7
  265. package/esm/internals/styled-system/css-alias.d.ts +7 -0
  266. package/esm/internals/styled-system/css-alias.js +387 -0
  267. package/esm/internals/styled-system/css-properties.d.ts +6 -0
  268. package/esm/internals/styled-system/css-properties.js +26 -0
  269. package/esm/internals/styled-system/index.d.ts +5 -0
  270. package/esm/internals/styled-system/index.js +6 -0
  271. package/esm/internals/styled-system/responsive.d.ts +26 -0
  272. package/esm/internals/styled-system/responsive.js +110 -0
  273. package/esm/internals/styled-system/types.d.ts +208 -0
  274. package/esm/internals/styled-system/types.js +2 -0
  275. package/esm/internals/{hooks → styled-system}/useStyled.d.ts +2 -6
  276. package/esm/internals/{hooks → styled-system}/useStyled.js +20 -79
  277. package/esm/internals/types/html.d.ts +6 -6
  278. package/esm/internals/types/picker.d.ts +2 -2
  279. package/esm/internals/types/sizes.d.ts +2 -1
  280. package/esm/internals/utils/colours.d.ts +1 -1
  281. package/esm/internals/utils/colours.js +2 -2
  282. package/esm/internals/utils/sizes.d.ts +1 -0
  283. package/esm/internals/utils/sizes.js +6 -0
  284. package/esm/internals/utils/style-sheet/css.d.ts +6 -0
  285. package/esm/internals/utils/style-sheet/css.js +34 -0
  286. package/esm/internals/utils/style-sheet/index.d.ts +0 -1
  287. package/esm/internals/utils/style-sheet/index.js +1 -2
  288. package/esm/internals/utils/style-sheet/responsive.d.ts +15 -0
  289. package/esm/internals/utils/style-sheet/responsive.js +19 -0
  290. package/esm/useMediaQuery/breakpoints.d.ts +6 -6
  291. package/esm/useMediaQuery/breakpoints.js +27 -31
  292. package/esm/useMediaQuery/types.d.ts +2 -2
  293. package/esm/useMediaQuery/useMediaQuery.js +2 -12
  294. package/package.json +1 -1
  295. /package/cjs/internals/{utils/style-sheet → styled-system}/style-manager.d.ts +0 -0
  296. /package/cjs/internals/{utils/style-sheet → styled-system}/style-manager.js +0 -0
  297. /package/esm/internals/{utils/style-sheet → styled-system}/style-manager.d.ts +0 -0
  298. /package/esm/internals/{utils/style-sheet → styled-system}/style-manager.js +0 -0
@@ -58,7 +58,7 @@ const InputBase = (0, _utils.forwardRef)((props, ref) => {
58
58
  withPrefix,
59
59
  merge
60
60
  } = (0, _hooks.useStyles)(classPrefix || 'input');
61
- const classes = merge(className, withPrefix(size, {
61
+ const classes = merge(className, withPrefix({
62
62
  plaintext
63
63
  }));
64
64
 
@@ -88,7 +88,8 @@ const InputBase = (0, _utils.forwardRef)((props, ref) => {
88
88
  defaultValue: defaultValue,
89
89
  disabled: disabled,
90
90
  readOnly: readOnly,
91
- placeholder: placeholder
91
+ placeholder: placeholder,
92
+ "data-size": size
92
93
  }, inputProps, eventProps, rest));
93
94
  });
94
95
  InputBase.displayName = 'InputBase';
@@ -89,7 +89,7 @@ function MenuItem(props) {
89
89
  role: 'menuitem',
90
90
  // fixme Only use `aria-checked` on menuitemradio and menuitemcheckbox
91
91
  'aria-checked': selected || undefined,
92
- 'aria-disabled': disabled,
92
+ 'aria-disabled': disabled || undefined,
93
93
  tabIndex: -1,
94
94
  onClick: handleClick,
95
95
  // render props
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { BoxProps } from '../Box';
3
3
  import type { AnimationEventProps } from '../types';
4
- export interface BaseModalProps extends Omit<BoxProps, 'children'>, AnimationEventProps {
4
+ export interface BaseModalProps extends Omit<BoxProps, 'children' | 'transition' | 'color' | 'overflow'>, AnimationEventProps {
5
5
  /** Animation-related properties */
6
6
  animationProps?: any;
7
7
  /** Primary content */
@@ -109,9 +109,7 @@ const PickerToggle = (0, _utils.forwardRef)((props, ref) => {
109
109
  id: labelId
110
110
  }, label)), /*#__PURE__*/_react.default.createElement(_Stack.default.Item, {
111
111
  grow: 1,
112
- style: {
113
- overflow: 'hidden'
114
- }
112
+ overflow: "hidden"
115
113
  }, /*#__PURE__*/_react.default.createElement("input", {
116
114
  readOnly: true,
117
115
  "aria-hidden": true,
@@ -119,7 +117,7 @@ const PickerToggle = (0, _utils.forwardRef)((props, ref) => {
119
117
  "data-testid": "picker-toggle-input",
120
118
  name: name,
121
119
  value: inputValue,
122
- className: prefix('textbox', 'read-only'),
120
+ className: prefix('textbox'),
123
121
  style: {
124
122
  pointerEvents: 'none'
125
123
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { BoxProps } from '../Box';
3
- export interface SafeAnchorProps extends BoxProps, React.HTMLAttributes<HTMLElement> {
2
+ import { BaseBoxProps } from '../Box';
3
+ export interface SafeAnchorProps extends BaseBoxProps, React.HTMLAttributes<HTMLElement> {
4
4
  /** Link specified url */
5
5
  href?: string;
6
6
  /** A link can show it is currently unable to be interacted with */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { BoxProps } from '../Box';
3
- interface TreeViewProps extends BoxProps, React.HTMLAttributes<HTMLDivElement> {
2
+ import { BaseBoxProps } from '../Box';
3
+ interface TreeViewProps extends BaseBoxProps, React.HTMLAttributes<HTMLDivElement> {
4
4
  treeRootClassName: string;
5
5
  multiselectable?: boolean;
6
6
  height?: number;
@@ -13,12 +13,29 @@ var _CustomContext = require("../Provider/CustomContext");
13
13
  function getDefaultRTL() {
14
14
  return typeof document !== 'undefined' && (document.body.getAttribute('dir') || document.dir) === 'rtl';
15
15
  }
16
- function toLocaleKey(componentName) {
17
- const Picker = ['Cascader', 'CheckTreePicker', 'MultiCascader', 'SelectPicker', 'TreePicker', 'CheckPicker', 'CheckTreePicker'];
18
- if (Picker.includes(componentName)) {
19
- return 'Combobox';
20
- }
21
- return componentName;
16
+
17
+ /**
18
+ * Maps a component name to its corresponding locale key
19
+ * @param componentName - The name of the component
20
+ * @returns The locale key for the component
21
+ */
22
+ function getComponentLocaleKey(componentName) {
23
+ // Define mappings for components that share locale keys
24
+ const localeKeyMappings = {
25
+ // All picker components use the Combobox locale
26
+ Cascader: 'Combobox',
27
+ CheckTreePicker: 'Combobox',
28
+ MultiCascader: 'Combobox',
29
+ SelectPicker: 'Combobox',
30
+ TreePicker: 'Combobox',
31
+ CheckPicker: 'Combobox',
32
+ // Time components use date components locales
33
+ TimePicker: 'DatePicker',
34
+ TimeRangePicker: 'DateRangePicker'
35
+ };
36
+
37
+ // Return the mapped locale key or the component name itself if no mapping exists
38
+ return localeKeyMappings[componentName] || componentName;
22
39
  }
23
40
 
24
41
  /**
@@ -63,7 +80,7 @@ function useCustom(componentName, componentProps) {
63
80
  //Memoize the global default props based on component name
64
81
  const globalDefaultProps = ((_components$component = components[componentName]) === null || _components$component === void 0 ? void 0 : _components$component.defaultProps) || {};
65
82
  const mergedProps = (0, _assign.default)({}, globalDefaultProps, restProps);
66
- const localeKey = toLocaleKey(componentName);
83
+ const localeKey = getComponentLocaleKey(componentName);
67
84
 
68
85
  // If the default locale has the component name, then merge the locale.
69
86
  if (Object.keys(_en_GB.default).includes(localeKey)) {
@@ -0,0 +1,7 @@
1
+ import type { CSSSystemProps, CSSProperty } from './types';
2
+ /**
3
+ * CSS Property Alias
4
+ * This type maps all the CSS properties defined in cssSystemPropAlias to their corresponding React CSS types
5
+ */
6
+ export declare const cssSystemPropAlias: Partial<Record<keyof CSSSystemProps, CSSProperty>>;
7
+ export type CSSSystemPropKey = keyof typeof cssSystemPropAlias;
@@ -0,0 +1,391 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ exports.__esModule = true;
5
+ exports.cssSystemPropAlias = void 0;
6
+ var _utils = require("../utils");
7
+ const transformRadiusValue = value => (0, _utils.getSizeValue)('radius', value);
8
+ const transformShadowValue = value => (0, _utils.getSizeValue)('shadow', value);
9
+
10
+ /**
11
+ * CSS Property Alias
12
+ * This type maps all the CSS properties defined in cssSystemPropAlias to their corresponding React CSS types
13
+ */
14
+ const cssSystemPropAlias = exports.cssSystemPropAlias = {
15
+ // — Spacing ————————————————————
16
+ p: {
17
+ type: 'any',
18
+ property: 'padding'
19
+ },
20
+ pt: {
21
+ type: 'any',
22
+ property: 'padding-top'
23
+ },
24
+ pr: {
25
+ type: 'any',
26
+ property: 'padding-right'
27
+ },
28
+ pb: {
29
+ type: 'any',
30
+ property: 'padding-bottom'
31
+ },
32
+ pl: {
33
+ type: 'any',
34
+ property: 'padding-left'
35
+ },
36
+ px: {
37
+ type: 'any',
38
+ property: 'padding-inline'
39
+ },
40
+ py: {
41
+ type: 'any',
42
+ property: 'padding-block'
43
+ },
44
+ ps: {
45
+ type: 'any',
46
+ property: 'padding-inline-start'
47
+ },
48
+ pe: {
49
+ type: 'any',
50
+ property: 'padding-inline-end'
51
+ },
52
+ m: {
53
+ type: 'any',
54
+ property: 'margin'
55
+ },
56
+ mt: {
57
+ type: 'any',
58
+ property: 'margin-top'
59
+ },
60
+ mr: {
61
+ type: 'any',
62
+ property: 'margin-right'
63
+ },
64
+ mb: {
65
+ type: 'any',
66
+ property: 'margin-bottom'
67
+ },
68
+ ml: {
69
+ type: 'any',
70
+ property: 'margin-left'
71
+ },
72
+ mx: {
73
+ type: 'any',
74
+ property: 'margin-inline'
75
+ },
76
+ my: {
77
+ type: 'any',
78
+ property: 'margin-block'
79
+ },
80
+ ms: {
81
+ type: 'any',
82
+ property: 'margin-inline-start'
83
+ },
84
+ me: {
85
+ type: 'any',
86
+ property: 'margin-inline-end'
87
+ },
88
+ // — Sizing ————————————————————
89
+ w: {
90
+ type: 'any',
91
+ property: 'width'
92
+ },
93
+ h: {
94
+ type: 'any',
95
+ property: 'height'
96
+ },
97
+ minw: {
98
+ type: 'any',
99
+ property: 'min-width'
100
+ },
101
+ maxw: {
102
+ type: 'any',
103
+ property: 'max-width'
104
+ },
105
+ minh: {
106
+ type: 'any',
107
+ property: 'min-height'
108
+ },
109
+ maxh: {
110
+ type: 'any',
111
+ property: 'max-height'
112
+ },
113
+ // — Layout & Position ————————————————————
114
+ display: {
115
+ type: 'any',
116
+ property: 'display'
117
+ },
118
+ pos: {
119
+ type: 'any',
120
+ property: 'position'
121
+ },
122
+ left: {
123
+ type: 'any',
124
+ property: 'left'
125
+ },
126
+ top: {
127
+ type: 'any',
128
+ property: 'top'
129
+ },
130
+ right: {
131
+ type: 'any',
132
+ property: 'right'
133
+ },
134
+ bottom: {
135
+ type: 'any',
136
+ property: 'bottom'
137
+ },
138
+ inset: {
139
+ type: 'any',
140
+ property: 'inset'
141
+ },
142
+ insetx: {
143
+ type: 'any',
144
+ property: 'inset-inline'
145
+ },
146
+ insety: {
147
+ type: 'any',
148
+ property: 'inset-block'
149
+ },
150
+ bsz: {
151
+ type: 'string',
152
+ property: 'box-sizing'
153
+ },
154
+ z: {
155
+ type: 'number',
156
+ property: 'z-index'
157
+ },
158
+ // — Background ————————————————————
159
+ bg: {
160
+ type: 'string',
161
+ property: 'background',
162
+ transformer: _utils.getColorValue
163
+ },
164
+ bgc: {
165
+ type: 'string',
166
+ property: 'background-color',
167
+ transformer: _utils.getColorValue
168
+ },
169
+ bgi: {
170
+ type: 'string',
171
+ property: 'background-image'
172
+ },
173
+ bga: {
174
+ type: 'string',
175
+ property: 'background-attachment'
176
+ },
177
+ bgp: {
178
+ type: 'string',
179
+ property: 'background-position'
180
+ },
181
+ bgsz: {
182
+ type: 'string',
183
+ property: 'background-size'
184
+ },
185
+ bgr: {
186
+ type: 'string',
187
+ property: 'background-repeat'
188
+ },
189
+ // — Typography ————————————————————
190
+ c: {
191
+ type: 'string',
192
+ property: 'color',
193
+ transformer: _utils.getColorValue
194
+ },
195
+ ff: {
196
+ type: 'string',
197
+ property: 'font-family'
198
+ },
199
+ fs: {
200
+ type: 'string',
201
+ property: 'font-size'
202
+ },
203
+ fw: {
204
+ type: 'string',
205
+ property: 'font-weight'
206
+ },
207
+ ta: {
208
+ type: 'string',
209
+ property: 'text-align'
210
+ },
211
+ tt: {
212
+ type: 'string',
213
+ property: 'text-transform'
214
+ },
215
+ td: {
216
+ type: 'string',
217
+ property: 'text-decoration'
218
+ },
219
+ tds: {
220
+ type: 'string',
221
+ property: 'text-decoration-style'
222
+ },
223
+ tdc: {
224
+ type: 'string',
225
+ property: 'text-decoration-color',
226
+ transformer: _utils.getColorValue
227
+ },
228
+ lts: {
229
+ type: 'string',
230
+ property: 'letter-spacing'
231
+ },
232
+ lh: {
233
+ type: 'any',
234
+ property: 'line-height'
235
+ },
236
+ // — Border ————————————————————
237
+ bd: {
238
+ type: 'string',
239
+ property: 'border'
240
+ },
241
+ bs: {
242
+ type: 'string',
243
+ property: 'border-style'
244
+ },
245
+ bc: {
246
+ type: 'string',
247
+ property: 'border-color',
248
+ transformer: _utils.getColorValue
249
+ },
250
+ bw: {
251
+ type: 'any',
252
+ property: 'border-width'
253
+ },
254
+ bdt: {
255
+ type: 'string',
256
+ property: 'border-top'
257
+ },
258
+ bdb: {
259
+ type: 'string',
260
+ property: 'border-bottom'
261
+ },
262
+ bdl: {
263
+ type: 'string',
264
+ property: 'border-left'
265
+ },
266
+ bdr: {
267
+ type: 'string',
268
+ property: 'border-right'
269
+ },
270
+ bdts: {
271
+ type: 'string',
272
+ property: 'border-top-style'
273
+ },
274
+ bdbs: {
275
+ type: 'string',
276
+ property: 'border-bottom-style'
277
+ },
278
+ bdls: {
279
+ type: 'string',
280
+ property: 'border-left-style'
281
+ },
282
+ bdrs: {
283
+ type: 'string',
284
+ property: 'border-right-style'
285
+ },
286
+ bdtc: {
287
+ type: 'string',
288
+ property: 'border-top-color',
289
+ transformer: _utils.getColorValue
290
+ },
291
+ bdbc: {
292
+ type: 'string',
293
+ property: 'border-bottom-color',
294
+ transformer: _utils.getColorValue
295
+ },
296
+ bdlc: {
297
+ type: 'string',
298
+ property: 'border-left-color',
299
+ transformer: _utils.getColorValue
300
+ },
301
+ bdrc: {
302
+ type: 'string',
303
+ property: 'border-right-color',
304
+ transformer: _utils.getColorValue
305
+ },
306
+ bdtw: {
307
+ type: 'any',
308
+ property: 'border-top-width'
309
+ },
310
+ bdbw: {
311
+ type: 'any',
312
+ property: 'border-bottom-width'
313
+ },
314
+ bdlw: {
315
+ type: 'any',
316
+ property: 'border-left-width'
317
+ },
318
+ bdrw: {
319
+ type: 'any',
320
+ property: 'border-right-width'
321
+ },
322
+ rounded: {
323
+ type: 'any',
324
+ property: 'border-radius',
325
+ transformer: transformRadiusValue
326
+ },
327
+ // — Shadow & Effects ————————————————————
328
+ shadow: {
329
+ type: 'any',
330
+ property: 'box-shadow',
331
+ transformer: transformShadowValue
332
+ },
333
+ opacity: {
334
+ type: 'any',
335
+ property: 'opacity'
336
+ },
337
+ // — Flex ————————————————————
338
+ gap: {
339
+ type: 'any',
340
+ property: 'gap'
341
+ },
342
+ spacing: {
343
+ type: 'any',
344
+ property: 'gap'
345
+ },
346
+ // alias for gap
347
+ rowgap: {
348
+ type: 'any',
349
+ property: 'row-gap'
350
+ },
351
+ colgap: {
352
+ type: 'any',
353
+ property: 'column-gap'
354
+ },
355
+ align: {
356
+ type: 'string',
357
+ property: 'align-items'
358
+ },
359
+ justify: {
360
+ type: 'string',
361
+ property: 'justify-content'
362
+ },
363
+ self: {
364
+ type: 'string',
365
+ property: 'align-self'
366
+ },
367
+ basis: {
368
+ type: 'any',
369
+ property: 'flex-basis'
370
+ },
371
+ flex: {
372
+ type: 'string',
373
+ property: 'flex'
374
+ },
375
+ grow: {
376
+ type: 'number',
377
+ property: 'flex-grow'
378
+ },
379
+ order: {
380
+ type: 'number',
381
+ property: 'order'
382
+ },
383
+ shrink: {
384
+ type: 'number',
385
+ property: 'flex-shrink'
386
+ },
387
+ direction: {
388
+ type: 'string',
389
+ property: 'flex-direction'
390
+ }
391
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * List of commonly used CSS properties in React components
3
+ * Focused on layout, spacing, typography, and common UI patterns
4
+ */
5
+ export declare const supportedCSSProperties: readonly ["display", "position", "top", "right", "bottom", "left", "zIndex", "boxSizing", "width", "height", "minWidth", "maxWidth", "minHeight", "maxHeight", "overflow", "overflowX", "overflowY", "aspectRatio", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "flex", "flexGrow", "flexShrink", "flexBasis", "flexDirection", "flexWrap", "justifyContent", "alignItems", "alignSelf", "alignContent", "gap", "rowGap", "columnGap", "order", "grid", "gridTemplate", "gridTemplateAreas", "gridTemplateColumns", "gridTemplateRows", "gridArea", "gridColumn", "gridRow", "gridAutoFlow", "gridAutoColumns", "gridAutoRows", "color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "lineHeight", "textAlign", "textDecoration", "textTransform", "whiteSpace", "wordBreak", "wordWrap", "textOverflow", "letterSpacing", "background", "backgroundColor", "backgroundImage", "backgroundPosition", "backgroundSize", "backgroundRepeat", "border", "borderColor", "borderStyle", "borderWidth", "borderRadius", "borderTop", "borderRight", "borderBottom", "borderLeft", "boxShadow", "opacity", "transform", "transformOrigin", "transition", "transitionProperty", "transitionDuration", "transitionTimingFunction", "transitionDelay", "cursor", "pointerEvents", "userSelect", "visibility", "scrollBehavior", "scrollbarWidth", "scrollbarColor", "overscrollBehavior", "clipPath", "filter", "objectFit", "objectPosition", "resize"];
6
+ export type SupportedCSSProperty = (typeof supportedCSSProperties)[number];
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ exports.__esModule = true;
5
+ exports.supportedCSSProperties = void 0;
6
+ /**
7
+ * List of commonly used CSS properties in React components
8
+ * Focused on layout, spacing, typography, and common UI patterns
9
+ */
10
+ const supportedCSSProperties = exports.supportedCSSProperties = [
11
+ // Layout & Box Model
12
+ 'display', 'position', 'top', 'right', 'bottom', 'left', 'zIndex', 'boxSizing', 'width', 'height', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'overflow', 'overflowX', 'overflowY', 'aspectRatio',
13
+ // Spacing
14
+ 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft',
15
+ // Flexbox
16
+ 'flex', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection', 'flexWrap', 'justifyContent', 'alignItems', 'alignSelf', 'alignContent', 'gap', 'rowGap', 'columnGap', 'order',
17
+ // Grid
18
+ 'grid', 'gridTemplate', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows', 'gridArea', 'gridColumn', 'gridRow', 'gridAutoFlow', 'gridAutoColumns', 'gridAutoRows',
19
+ // Typography
20
+ 'color', 'fontFamily', 'fontSize', 'fontWeight', 'fontStyle', 'lineHeight', 'textAlign', 'textDecoration', 'textTransform', 'whiteSpace', 'wordBreak', 'wordWrap', 'textOverflow', 'letterSpacing',
21
+ // Background & Borders
22
+ 'background', 'backgroundColor', 'backgroundImage', 'backgroundPosition', 'backgroundSize', 'backgroundRepeat', 'border', 'borderColor', 'borderStyle', 'borderWidth', 'borderRadius', 'borderTop', 'borderRight', 'borderBottom', 'borderLeft', 'boxShadow', 'opacity',
23
+ // Transforms & Transitions
24
+ 'transform', 'transformOrigin', 'transition', 'transitionProperty', 'transitionDuration', 'transitionTimingFunction', 'transitionDelay',
25
+ // Interactivity
26
+ 'cursor', 'pointerEvents', 'userSelect', 'visibility',
27
+ // Scroll
28
+ 'scrollBehavior', 'scrollbarWidth', 'scrollbarColor', 'overscrollBehavior',
29
+ // Other
30
+ 'clipPath', 'filter', 'objectFit', 'objectPosition', 'resize'];
@@ -0,0 +1,5 @@
1
+ export * from './responsive';
2
+ export * from './useStyled';
3
+ export * from './style-manager';
4
+ export * from './css-alias';
5
+ export * from './types';
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ exports.__esModule = true;
5
+ var _responsive = require("./responsive");
6
+ Object.keys(_responsive).forEach(function (key) {
7
+ if (key === "default" || key === "__esModule") return;
8
+ if (key in exports && exports[key] === _responsive[key]) return;
9
+ exports[key] = _responsive[key];
10
+ });
11
+ var _useStyled = require("./useStyled");
12
+ Object.keys(_useStyled).forEach(function (key) {
13
+ if (key === "default" || key === "__esModule") return;
14
+ if (key in exports && exports[key] === _useStyled[key]) return;
15
+ exports[key] = _useStyled[key];
16
+ });
17
+ var _styleManager = require("./style-manager");
18
+ Object.keys(_styleManager).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _styleManager[key]) return;
21
+ exports[key] = _styleManager[key];
22
+ });
23
+ var _cssAlias = require("./css-alias");
24
+ Object.keys(_cssAlias).forEach(function (key) {
25
+ if (key === "default" || key === "__esModule") return;
26
+ if (key in exports && exports[key] === _cssAlias[key]) return;
27
+ exports[key] = _cssAlias[key];
28
+ });
29
+ var _types = require("./types");
30
+ Object.keys(_types).forEach(function (key) {
31
+ if (key === "default" || key === "__esModule") return;
32
+ if (key in exports && exports[key] === _types[key]) return;
33
+ exports[key] = _types[key];
34
+ });
@@ -0,0 +1,26 @@
1
+ import type { Breakpoints, ResponsiveValue, WithResponsive } from '../types';
2
+ /**
3
+ * Breakpoint values in pixels - matching SCSS variables
4
+ * These values are used for responsive design across the application.
5
+ * They follow a mobile-first approach where 'xs' is the base breakpoint.
6
+ */
7
+ export declare const breakpointValues: Record<Breakpoints, number>;
8
+ /**
9
+ * Checks if a value is a responsive value object
10
+ * @param value - Value to check
11
+ * @returns True if the value is a responsive value object
12
+ */
13
+ export declare function isResponsiveValue(value: any): value is ResponsiveValue<any>;
14
+ /**
15
+ * Process a value that might be a responsive value
16
+ * @param value - Value to process
17
+ * @param processor - Function to process non-responsive values
18
+ * @returns Processed value or responsive object with processed values
19
+ */
20
+ export declare function processResponsiveValue<T, R extends string | number | undefined>(value: T | ResponsiveValue<T> | undefined, processor: (val: T) => R): R | ResponsiveValue<R> | undefined;
21
+ type CSSVarValue = WithResponsive<string | number | undefined>;
22
+ /**
23
+ * Converts layout properties to CSS variables with abbreviated names
24
+ */
25
+ export declare const getCSSVariables: (props: Record<string, any>, prefix?: string) => Record<string, CSSVarValue>;
26
+ export {};