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
@@ -0,0 +1,387 @@
1
+ 'use client';
2
+ import { getSizeValue, getColorValue } from "../utils/index.js";
3
+ const transformRadiusValue = value => getSizeValue('radius', value);
4
+ const transformShadowValue = value => getSizeValue('shadow', value);
5
+
6
+ /**
7
+ * CSS Property Alias
8
+ * This type maps all the CSS properties defined in cssSystemPropAlias to their corresponding React CSS types
9
+ */
10
+ export const cssSystemPropAlias = {
11
+ // — Spacing ————————————————————
12
+ p: {
13
+ type: 'any',
14
+ property: 'padding'
15
+ },
16
+ pt: {
17
+ type: 'any',
18
+ property: 'padding-top'
19
+ },
20
+ pr: {
21
+ type: 'any',
22
+ property: 'padding-right'
23
+ },
24
+ pb: {
25
+ type: 'any',
26
+ property: 'padding-bottom'
27
+ },
28
+ pl: {
29
+ type: 'any',
30
+ property: 'padding-left'
31
+ },
32
+ px: {
33
+ type: 'any',
34
+ property: 'padding-inline'
35
+ },
36
+ py: {
37
+ type: 'any',
38
+ property: 'padding-block'
39
+ },
40
+ ps: {
41
+ type: 'any',
42
+ property: 'padding-inline-start'
43
+ },
44
+ pe: {
45
+ type: 'any',
46
+ property: 'padding-inline-end'
47
+ },
48
+ m: {
49
+ type: 'any',
50
+ property: 'margin'
51
+ },
52
+ mt: {
53
+ type: 'any',
54
+ property: 'margin-top'
55
+ },
56
+ mr: {
57
+ type: 'any',
58
+ property: 'margin-right'
59
+ },
60
+ mb: {
61
+ type: 'any',
62
+ property: 'margin-bottom'
63
+ },
64
+ ml: {
65
+ type: 'any',
66
+ property: 'margin-left'
67
+ },
68
+ mx: {
69
+ type: 'any',
70
+ property: 'margin-inline'
71
+ },
72
+ my: {
73
+ type: 'any',
74
+ property: 'margin-block'
75
+ },
76
+ ms: {
77
+ type: 'any',
78
+ property: 'margin-inline-start'
79
+ },
80
+ me: {
81
+ type: 'any',
82
+ property: 'margin-inline-end'
83
+ },
84
+ // — Sizing ————————————————————
85
+ w: {
86
+ type: 'any',
87
+ property: 'width'
88
+ },
89
+ h: {
90
+ type: 'any',
91
+ property: 'height'
92
+ },
93
+ minw: {
94
+ type: 'any',
95
+ property: 'min-width'
96
+ },
97
+ maxw: {
98
+ type: 'any',
99
+ property: 'max-width'
100
+ },
101
+ minh: {
102
+ type: 'any',
103
+ property: 'min-height'
104
+ },
105
+ maxh: {
106
+ type: 'any',
107
+ property: 'max-height'
108
+ },
109
+ // — Layout & Position ————————————————————
110
+ display: {
111
+ type: 'any',
112
+ property: 'display'
113
+ },
114
+ pos: {
115
+ type: 'any',
116
+ property: 'position'
117
+ },
118
+ left: {
119
+ type: 'any',
120
+ property: 'left'
121
+ },
122
+ top: {
123
+ type: 'any',
124
+ property: 'top'
125
+ },
126
+ right: {
127
+ type: 'any',
128
+ property: 'right'
129
+ },
130
+ bottom: {
131
+ type: 'any',
132
+ property: 'bottom'
133
+ },
134
+ inset: {
135
+ type: 'any',
136
+ property: 'inset'
137
+ },
138
+ insetx: {
139
+ type: 'any',
140
+ property: 'inset-inline'
141
+ },
142
+ insety: {
143
+ type: 'any',
144
+ property: 'inset-block'
145
+ },
146
+ bsz: {
147
+ type: 'string',
148
+ property: 'box-sizing'
149
+ },
150
+ z: {
151
+ type: 'number',
152
+ property: 'z-index'
153
+ },
154
+ // — Background ————————————————————
155
+ bg: {
156
+ type: 'string',
157
+ property: 'background',
158
+ transformer: getColorValue
159
+ },
160
+ bgc: {
161
+ type: 'string',
162
+ property: 'background-color',
163
+ transformer: getColorValue
164
+ },
165
+ bgi: {
166
+ type: 'string',
167
+ property: 'background-image'
168
+ },
169
+ bga: {
170
+ type: 'string',
171
+ property: 'background-attachment'
172
+ },
173
+ bgp: {
174
+ type: 'string',
175
+ property: 'background-position'
176
+ },
177
+ bgsz: {
178
+ type: 'string',
179
+ property: 'background-size'
180
+ },
181
+ bgr: {
182
+ type: 'string',
183
+ property: 'background-repeat'
184
+ },
185
+ // — Typography ————————————————————
186
+ c: {
187
+ type: 'string',
188
+ property: 'color',
189
+ transformer: getColorValue
190
+ },
191
+ ff: {
192
+ type: 'string',
193
+ property: 'font-family'
194
+ },
195
+ fs: {
196
+ type: 'string',
197
+ property: 'font-size'
198
+ },
199
+ fw: {
200
+ type: 'string',
201
+ property: 'font-weight'
202
+ },
203
+ ta: {
204
+ type: 'string',
205
+ property: 'text-align'
206
+ },
207
+ tt: {
208
+ type: 'string',
209
+ property: 'text-transform'
210
+ },
211
+ td: {
212
+ type: 'string',
213
+ property: 'text-decoration'
214
+ },
215
+ tds: {
216
+ type: 'string',
217
+ property: 'text-decoration-style'
218
+ },
219
+ tdc: {
220
+ type: 'string',
221
+ property: 'text-decoration-color',
222
+ transformer: getColorValue
223
+ },
224
+ lts: {
225
+ type: 'string',
226
+ property: 'letter-spacing'
227
+ },
228
+ lh: {
229
+ type: 'any',
230
+ property: 'line-height'
231
+ },
232
+ // — Border ————————————————————
233
+ bd: {
234
+ type: 'string',
235
+ property: 'border'
236
+ },
237
+ bs: {
238
+ type: 'string',
239
+ property: 'border-style'
240
+ },
241
+ bc: {
242
+ type: 'string',
243
+ property: 'border-color',
244
+ transformer: getColorValue
245
+ },
246
+ bw: {
247
+ type: 'any',
248
+ property: 'border-width'
249
+ },
250
+ bdt: {
251
+ type: 'string',
252
+ property: 'border-top'
253
+ },
254
+ bdb: {
255
+ type: 'string',
256
+ property: 'border-bottom'
257
+ },
258
+ bdl: {
259
+ type: 'string',
260
+ property: 'border-left'
261
+ },
262
+ bdr: {
263
+ type: 'string',
264
+ property: 'border-right'
265
+ },
266
+ bdts: {
267
+ type: 'string',
268
+ property: 'border-top-style'
269
+ },
270
+ bdbs: {
271
+ type: 'string',
272
+ property: 'border-bottom-style'
273
+ },
274
+ bdls: {
275
+ type: 'string',
276
+ property: 'border-left-style'
277
+ },
278
+ bdrs: {
279
+ type: 'string',
280
+ property: 'border-right-style'
281
+ },
282
+ bdtc: {
283
+ type: 'string',
284
+ property: 'border-top-color',
285
+ transformer: getColorValue
286
+ },
287
+ bdbc: {
288
+ type: 'string',
289
+ property: 'border-bottom-color',
290
+ transformer: getColorValue
291
+ },
292
+ bdlc: {
293
+ type: 'string',
294
+ property: 'border-left-color',
295
+ transformer: getColorValue
296
+ },
297
+ bdrc: {
298
+ type: 'string',
299
+ property: 'border-right-color',
300
+ transformer: getColorValue
301
+ },
302
+ bdtw: {
303
+ type: 'any',
304
+ property: 'border-top-width'
305
+ },
306
+ bdbw: {
307
+ type: 'any',
308
+ property: 'border-bottom-width'
309
+ },
310
+ bdlw: {
311
+ type: 'any',
312
+ property: 'border-left-width'
313
+ },
314
+ bdrw: {
315
+ type: 'any',
316
+ property: 'border-right-width'
317
+ },
318
+ rounded: {
319
+ type: 'any',
320
+ property: 'border-radius',
321
+ transformer: transformRadiusValue
322
+ },
323
+ // — Shadow & Effects ————————————————————
324
+ shadow: {
325
+ type: 'any',
326
+ property: 'box-shadow',
327
+ transformer: transformShadowValue
328
+ },
329
+ opacity: {
330
+ type: 'any',
331
+ property: 'opacity'
332
+ },
333
+ // — Flex ————————————————————
334
+ gap: {
335
+ type: 'any',
336
+ property: 'gap'
337
+ },
338
+ spacing: {
339
+ type: 'any',
340
+ property: 'gap'
341
+ },
342
+ // alias for gap
343
+ rowgap: {
344
+ type: 'any',
345
+ property: 'row-gap'
346
+ },
347
+ colgap: {
348
+ type: 'any',
349
+ property: 'column-gap'
350
+ },
351
+ align: {
352
+ type: 'string',
353
+ property: 'align-items'
354
+ },
355
+ justify: {
356
+ type: 'string',
357
+ property: 'justify-content'
358
+ },
359
+ self: {
360
+ type: 'string',
361
+ property: 'align-self'
362
+ },
363
+ basis: {
364
+ type: 'any',
365
+ property: 'flex-basis'
366
+ },
367
+ flex: {
368
+ type: 'string',
369
+ property: 'flex'
370
+ },
371
+ grow: {
372
+ type: 'number',
373
+ property: 'flex-grow'
374
+ },
375
+ order: {
376
+ type: 'number',
377
+ property: 'order'
378
+ },
379
+ shrink: {
380
+ type: 'number',
381
+ property: 'flex-shrink'
382
+ },
383
+ direction: {
384
+ type: 'string',
385
+ property: 'flex-direction'
386
+ }
387
+ };
@@ -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,26 @@
1
+ 'use client';
2
+ /**
3
+ * List of commonly used CSS properties in React components
4
+ * Focused on layout, spacing, typography, and common UI patterns
5
+ */
6
+ export const supportedCSSProperties = [
7
+ // Layout & Box Model
8
+ 'display', 'position', 'top', 'right', 'bottom', 'left', 'zIndex', 'boxSizing', 'width', 'height', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'overflow', 'overflowX', 'overflowY', 'aspectRatio',
9
+ // Spacing
10
+ 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft',
11
+ // Flexbox
12
+ 'flex', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection', 'flexWrap', 'justifyContent', 'alignItems', 'alignSelf', 'alignContent', 'gap', 'rowGap', 'columnGap', 'order',
13
+ // Grid
14
+ 'grid', 'gridTemplate', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows', 'gridArea', 'gridColumn', 'gridRow', 'gridAutoFlow', 'gridAutoColumns', 'gridAutoRows',
15
+ // Typography
16
+ 'color', 'fontFamily', 'fontSize', 'fontWeight', 'fontStyle', 'lineHeight', 'textAlign', 'textDecoration', 'textTransform', 'whiteSpace', 'wordBreak', 'wordWrap', 'textOverflow', 'letterSpacing',
17
+ // Background & Borders
18
+ 'background', 'backgroundColor', 'backgroundImage', 'backgroundPosition', 'backgroundSize', 'backgroundRepeat', 'border', 'borderColor', 'borderStyle', 'borderWidth', 'borderRadius', 'borderTop', 'borderRight', 'borderBottom', 'borderLeft', 'boxShadow', 'opacity',
19
+ // Transforms & Transitions
20
+ 'transform', 'transformOrigin', 'transition', 'transitionProperty', 'transitionDuration', 'transitionTimingFunction', 'transitionDelay',
21
+ // Interactivity
22
+ 'cursor', 'pointerEvents', 'userSelect', 'visibility',
23
+ // Scroll
24
+ 'scrollBehavior', 'scrollbarWidth', 'scrollbarColor', 'overscrollBehavior',
25
+ // Other
26
+ 'clipPath', 'filter', 'objectFit', 'objectPosition', 'resize'];
@@ -1,5 +1,5 @@
1
1
  export * from './responsive';
2
2
  export * from './useStyled';
3
3
  export * from './style-manager';
4
- export * from './css-property';
4
+ export * from './css-alias';
5
5
  export * from './types';
@@ -2,5 +2,5 @@
2
2
  export * from "./responsive.js";
3
3
  export * from "./useStyled.js";
4
4
  export * from "./style-manager.js";
5
- export * from "./css-property.js";
5
+ export * from "./css-alias.js";
6
6
  export * from "./types.js";
@@ -19,10 +19,6 @@ export declare function isResponsiveValue(value: any): value is ResponsiveValue<
19
19
  */
20
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
21
  type CSSVarValue = WithResponsive<string | number | undefined>;
22
- /**
23
- * Converts layout properties to CSS variables with abbreviated names
24
- */
25
- export declare const getCSSVariables2: (props: Record<string, any>, prefix?: string) => Record<string, CSSVarValue>;
26
22
  /**
27
23
  * Converts layout properties to CSS variables with abbreviated names
28
24
  */
@@ -3,7 +3,7 @@ import camelCase from 'lodash/camelCase';
3
3
  import kebabCase from 'lodash/kebabCase';
4
4
  import { getCssValue, isCSSProperty } from "../utils/index.js";
5
5
  import { BREAKPOINTS } from "../constants/index.js";
6
- import { cssPropertyMap } from "./css-property.js";
6
+ import { cssSystemPropAlias } from "./css-alias.js";
7
7
  /**
8
8
  * Breakpoint values in pixels - matching SCSS variables
9
9
  * These values are used for responsive design across the application.
@@ -61,32 +61,11 @@ export function processResponsiveValue(value, processor) {
61
61
 
62
62
  // Type for CSS variable values that can be string, number, or responsive values
63
63
 
64
- /**
65
- * Converts layout properties to CSS variables with abbreviated names
66
- */
67
- export const getCSSVariables2 = (props, prefix = `--rs-`) => {
68
- const cssVars = {};
69
- const cssVar = name => `${prefix}${name}`;
70
-
71
- // Process padding, margin, size properties
72
- Object.entries(cssPropertyMap).forEach(([name, prop]) => {
73
- const {
74
- transformer,
75
- property
76
- } = prop;
77
- const propName = camelCase(property);
78
- if (typeof props[name] === 'undefined' && typeof props[propName] === 'undefined') {
79
- return;
80
- }
81
- const varName = cssVar(name || propName);
82
- const value = props[name] || props[propName];
83
- if (transformer) {
84
- cssVars[varName] = processResponsiveValue(value, val => transformer(val));
85
- } else {
86
- cssVars[varName] = processResponsiveValue(value, val => getCssValue(val));
87
- }
88
- });
89
- return cssVars;
64
+ const transformCSSValue = (value, type) => {
65
+ if (type === 'number') {
66
+ return value;
67
+ }
68
+ return getCssValue(value);
90
69
  };
91
70
 
92
71
  /**
@@ -97,9 +76,9 @@ export const getCSSVariables = (props, prefix = `--rs-`) => {
97
76
  const cssVar = name => `${prefix}${kebabCase(name)}`;
98
77
  const getCSSProperty = name => {
99
78
  let cssName = name;
100
- let cssProp = cssPropertyMap[name];
79
+ let cssProp = cssSystemPropAlias[name];
101
80
  if (!cssProp) {
102
- Object.entries(cssPropertyMap).forEach(([key, prop]) => {
81
+ Object.entries(cssSystemPropAlias).forEach(([key, prop]) => {
103
82
  if (camelCase(prop.property) === name) {
104
83
  cssProp = prop;
105
84
  cssName = key;
@@ -116,10 +95,11 @@ export const getCSSVariables = (props, prefix = `--rs-`) => {
116
95
  const varName = cssVar(cssName);
117
96
  if (cssProp) {
118
97
  const {
119
- transformer
98
+ transformer,
99
+ type
120
100
  } = cssProp;
121
101
  cssVars[varName] = processResponsiveValue(value, val => {
122
- return transformer ? transformer(val) : getCssValue(val);
102
+ return transformer ? transformer(val) : transformCSSValue(val, type);
123
103
  });
124
104
  } else if (isCSSProperty(cssName)) {
125
105
  // For non-predefined CSS properties, directly process with getCssValue
@@ -1,11 +1,12 @@
1
1
  import { CSSProperties as CSS } from 'react';
2
+ import { supportedCSSProperties } from './css-properties';
2
3
  import type { WithResponsive, ColorScheme, Size } from '../types';
3
- type CSSPropertyGroup = 'spacing' | 'sizing' | 'layout' | 'color' | 'border' | 'effect' | 'flex' | 'radius' | 'typography' | 'position' | 'background';
4
+ export type CSSPropertyValueType = 'string' | 'number' | 'any';
4
5
  export type CSSProperty = {
5
6
  /**
6
7
  * CSS Property Type
7
8
  */
8
- type: CSSPropertyGroup;
9
+ type: CSSPropertyValueType;
9
10
  /**
10
11
  * CSS Property
11
12
  */
@@ -15,11 +16,16 @@ export type CSSProperty = {
15
16
  */
16
17
  transformer?: (value: any) => any;
17
18
  };
19
+ export type SupportedCSSProperty = (typeof supportedCSSProperties)[number];
20
+ type MakeResponsive<T> = {
21
+ [K in keyof T]?: T[K] | WithResponsive<T[K]>;
22
+ };
23
+ export type StandardCSSProps = MakeResponsive<Pick<CSS, SupportedCSSProperty>>;
18
24
  /**
19
25
  * CSS Properties type for Box component
20
- * This type maps all the CSS properties defined in cssPropertyMap to their corresponding React CSS types
26
+ * This type maps all the CSS properties defined in cssSystemPropAlias to their corresponding React CSS types
21
27
  */
22
- export interface CSSSystemProps {
28
+ export interface CSSSystemProps extends StandardCSSProps {
23
29
  /** Shorthand for CSS property `padding` */
24
30
  p?: WithResponsive<CSS['padding']>;
25
31
  /** Shorthand for CSS property `paddingTop` */
@@ -87,7 +93,9 @@ export interface CSSSystemProps {
87
93
  /** Shorthand for CSS property `insetBlock` */
88
94
  insety?: WithResponsive<CSS['insetBlock']>;
89
95
  /** Shorthand for CSS property `boxSizing` */
90
- boxsizing?: WithResponsive<CSS['boxSizing']>;
96
+ bsz?: WithResponsive<CSS['boxSizing']>;
97
+ /** Shorthand for CSS property `zIndex` */
98
+ z?: WithResponsive<CSS['zIndex']>;
91
99
  /** Shorthand for CSS property `background` */
92
100
  bg?: WithResponsive<ColorScheme | CSS['background']>;
93
101
  /** Shorthand for CSS property `backgroundColor` */
@@ -132,6 +140,38 @@ export interface CSSSystemProps {
132
140
  bc?: WithResponsive<ColorScheme | CSS['borderColor']>;
133
141
  /** Shorthand for CSS property `borderWidth` */
134
142
  bw?: WithResponsive<CSS['borderWidth']>;
143
+ /** Shorthand for CSS property `borderTop` */
144
+ bdt?: WithResponsive<CSS['borderTop']>;
145
+ /** Shorthand for CSS property `borderBottom` */
146
+ bdb?: WithResponsive<CSS['borderBottom']>;
147
+ /** Shorthand for CSS property `borderLeft` */
148
+ bdl?: WithResponsive<CSS['borderLeft']>;
149
+ /** Shorthand for CSS property `borderRight` */
150
+ bdr?: WithResponsive<CSS['borderRight']>;
151
+ /** Shorthand for CSS property `borderTopStyle` */
152
+ bdts?: WithResponsive<CSS['borderTopStyle']>;
153
+ /** Shorthand for CSS property `borderBottomStyle` */
154
+ bdbs?: WithResponsive<CSS['borderBottomStyle']>;
155
+ /** Shorthand for CSS property `borderLeftStyle` */
156
+ bdls?: WithResponsive<CSS['borderLeftStyle']>;
157
+ /** Shorthand for CSS property `borderRightStyle` */
158
+ bdrs?: WithResponsive<CSS['borderRightStyle']>;
159
+ /** Shorthand for CSS property `borderTopColor` */
160
+ bdtc?: WithResponsive<ColorScheme | CSS['borderTopColor']>;
161
+ /** Shorthand for CSS property `borderBottomColor` */
162
+ bdbc?: WithResponsive<ColorScheme | CSS['borderBottomColor']>;
163
+ /** Shorthand for CSS property `borderLeftColor` */
164
+ bdlc?: WithResponsive<ColorScheme | CSS['borderLeftColor']>;
165
+ /** Shorthand for CSS property `borderRightColor` */
166
+ bdrc?: WithResponsive<ColorScheme | CSS['borderRightColor']>;
167
+ /** Shorthand for CSS property `borderTopWidth` */
168
+ bdtw?: WithResponsive<CSS['borderTopWidth']>;
169
+ /** Shorthand for CSS property `borderBottomWidth` */
170
+ bdbw?: WithResponsive<CSS['borderBottomWidth']>;
171
+ /** Shorthand for CSS property `borderLeftWidth` */
172
+ bdlw?: WithResponsive<CSS['borderLeftWidth']>;
173
+ /** Shorthand for CSS property `borderRightWidth` */
174
+ bdrw?: WithResponsive<CSS['borderRightWidth']>;
135
175
  /** Shorthand for CSS property `borderRadius` */
136
176
  rounded?: WithResponsive<Size | CSS['borderRadius'] | 'full'>;
137
177
  /** Shorthand for CSS property `boxShadow` */
@@ -150,5 +190,19 @@ export interface CSSSystemProps {
150
190
  align?: WithResponsive<CSS['alignItems']>;
151
191
  /** Shorthand for CSS property `justifyContent` */
152
192
  justify?: WithResponsive<CSS['justifyContent']>;
193
+ /** Shorthand for CSS property `alignSelf` */
194
+ self?: WithResponsive<CSS['alignSelf']>;
195
+ /** Shorthand for CSS property `flexBasis` */
196
+ basis?: WithResponsive<CSS['flexBasis']>;
197
+ /** Shorthand for CSS property `flex` */
198
+ flex?: WithResponsive<CSS['flex']>;
199
+ /** Shorthand for CSS property `flexGrow` */
200
+ grow?: WithResponsive<CSS['flexGrow']>;
201
+ /** Shorthand for CSS property `order` */
202
+ order?: WithResponsive<CSS['order']>;
203
+ /** Shorthand for CSS property `flexShrink` */
204
+ shrink?: WithResponsive<CSS['flexShrink']>;
205
+ /** Shorthand for CSS property `flexDirection` */
206
+ direction?: WithResponsive<CSS['flexDirection']>;
153
207
  }
154
208
  export {};
@@ -5,7 +5,7 @@ import { useIsomorphicLayoutEffect } from "../hooks/index.js";
5
5
  import { isCSSProperty } from "../utils/index.js";
6
6
  import { CustomContext } from "../Provider/CustomContext.js";
7
7
  import { breakpointValues, isResponsiveValue } from "./responsive.js";
8
- import { cssPropertyMap } from "./css-property.js";
8
+ import { cssSystemPropAlias } from "./css-alias.js";
9
9
  import { StyleManager } from "./style-manager.js";
10
10
 
11
11
  /**
@@ -85,7 +85,7 @@ export function useStyled(options) {
85
85
  const propName = varName.startsWith(cssVarPrefix) ? varName.substring(cssVarPrefix.length) : varName;
86
86
 
87
87
  // Check if the property has a corresponding CSS property mapping
88
- const cssProperty = cssPropertyMap[propName];
88
+ const cssProperty = cssSystemPropAlias[propName];
89
89
  if (cssProperty) {
90
90
  basePropRules += `${cssProperty.property}: var(${varName}); `;
91
91
  } else if (isCSSProperty(propName)) {
@@ -136,7 +136,7 @@ export function useStyled(options) {
136
136
  const propName = varName.startsWith(cssVarPrefix) ? varName.substring(cssVarPrefix.length) : varName;
137
137
 
138
138
  // Check if the property has a corresponding CSS property mapping
139
- const cssProperty = cssPropertyMap[propName];
139
+ const cssProperty = cssSystemPropAlias[propName];
140
140
  if (cssProperty) {
141
141
  breakpointPropRules[bp] += `${cssProperty}: var(${varName}); `;
142
142
  } else if (isCSSProperty(propName)) {
@@ -2,20 +2,20 @@ import React from 'react';
2
2
  /** React element with optional props and HTML attributes. */
3
3
  export type ReactElement<P = any> = React.ReactElement<P & React.HTMLAttributes<any>>;
4
4
  /** Removes 'onSelect' property from the given type. */
5
- export type PropsWithoutSelect<T> = Omit<T, 'onSelect'>;
5
+ export type PropsWithoutSelect<T> = Omit<T, 'onSelect' | 'color'>;
6
6
  /** Removes 'onChange' property from the given type. */
7
- export type PropsWithoutChange<T> = Omit<T, 'onChange'>;
7
+ export type PropsWithoutChange<T> = Omit<T, 'onChange' | 'color'>;
8
8
  export type PropsWithout<T, K extends keyof T> = Omit<T, K>;
9
9
  /** HTML props excluding 'onSelect' attribute. */
10
10
  export type HTMLPropsWithoutSelect<T extends HTMLElement = HTMLElement, P extends Record<string, any> = React.HTMLAttributes<T>> = PropsWithoutSelect<P>;
11
11
  /** HTML props excluding 'onChange' attribute. */
12
12
  export type HTMLPropsWithoutChange<T extends HTMLElement = HTMLElement, P extends Record<string, any> = React.HTMLAttributes<T>> = PropsWithoutChange<P>;
13
13
  /** Input props with 'onChange' and 'size' attributes removed. */
14
- export type SanitizedInputProps = PropsWithout<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size'>;
14
+ export type SanitizedInputProps = PropsWithout<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size' | 'color'>;
15
15
  /** Textarea props with 'onChange' attribute removed. */
16
- export type SanitizedTextareaProps = PropsWithout<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>;
16
+ export type SanitizedTextareaProps = PropsWithout<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'color'>;
17
17
  /** HTML props excluding 'title', 'onToggle', and 'onSelect' attributes. */
18
- export type SanitizedHTMListProps<T extends HTMLElement = HTMLElement, P extends Record<string, any> = React.HTMLAttributes<T>> = PropsWithout<P, 'title' | 'onToggle' | 'onSelect'>;
19
- export type WithoutChildren<T> = Omit<T, 'children'>;
18
+ export type SanitizedHTMListProps<T extends HTMLElement = HTMLElement, P extends Record<string, any> = React.HTMLAttributes<T>> = PropsWithout<P, 'title' | 'onToggle' | 'onSelect' | 'color'>;
19
+ export type WithoutChildren<T> = Omit<T, 'children' | 'color'>;
20
20
  export type CSSVariables = Partial<Record<`--${string}`, string | number | undefined>>;
21
21
  export type StyleProperties = React.CSSProperties | CSSVariables;