@mui/system 5.15.15 → 6.0.0-alpha.1

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 (436) hide show
  1. package/Box/Box.js +11 -17
  2. package/Box/boxClasses.js +3 -10
  3. package/Box/index.js +3 -35
  4. package/Box/package.json +2 -2
  5. package/CHANGELOG.md +169 -3
  6. package/Container/Container.d.ts +1 -1
  7. package/Container/Container.js +12 -17
  8. package/Container/ContainerProps.js +1 -5
  9. package/Container/containerClasses.js +6 -14
  10. package/Container/createContainer.js +34 -43
  11. package/Container/index.js +3 -35
  12. package/Container/package.json +2 -2
  13. package/GlobalStyles/GlobalStyles.js +11 -19
  14. package/GlobalStyles/index.js +2 -25
  15. package/GlobalStyles/package.json +2 -2
  16. package/README.md +2 -2
  17. package/RtlProvider/index.js +13 -23
  18. package/RtlProvider/package.json +2 -2
  19. package/Stack/Stack.d.ts +1 -1
  20. package/Stack/Stack.js +11 -17
  21. package/Stack/StackProps.js +1 -5
  22. package/Stack/createStack.d.ts +2 -2
  23. package/Stack/createStack.js +40 -51
  24. package/Stack/index.js +5 -55
  25. package/Stack/package.json +2 -2
  26. package/Stack/stackClasses.js +6 -14
  27. package/ThemeProvider/ThemeProvider.js +22 -30
  28. package/ThemeProvider/index.js +1 -12
  29. package/ThemeProvider/package.json +2 -2
  30. package/Unstable_Grid/Grid.d.ts +1 -1
  31. package/Unstable_Grid/Grid.js +25 -31
  32. package/Unstable_Grid/GridProps.js +1 -5
  33. package/Unstable_Grid/createGrid.d.ts +2 -2
  34. package/Unstable_Grid/createGrid.js +59 -70
  35. package/Unstable_Grid/gridClasses.js +6 -14
  36. package/Unstable_Grid/gridGenerator.js +24 -43
  37. package/Unstable_Grid/index.js +6 -63
  38. package/Unstable_Grid/package.json +2 -2
  39. package/Unstable_Grid/traverseBreakpoints.d.ts +1 -1
  40. package/Unstable_Grid/traverseBreakpoints.js +3 -11
  41. package/borders/borders.d.ts +14 -0
  42. package/{esm → borders}/borders.js +5 -5
  43. package/borders/index.d.ts +2 -0
  44. package/borders/index.js +4 -0
  45. package/borders/package.json +6 -0
  46. package/{breakpoints.d.ts → breakpoints/breakpoints.d.ts} +13 -3
  47. package/{modern → breakpoints}/breakpoints.js +1 -1
  48. package/breakpoints/index.d.ts +2 -0
  49. package/breakpoints/index.js +4 -0
  50. package/breakpoints/package.json +6 -0
  51. package/colorManipulator/index.d.ts +1 -0
  52. package/colorManipulator/index.js +3 -0
  53. package/colorManipulator/package.json +6 -0
  54. package/compose/compose.d.ts +5 -0
  55. package/{modern → compose}/compose.js +1 -1
  56. package/compose/index.d.ts +1 -0
  57. package/compose/index.js +3 -0
  58. package/compose/package.json +6 -0
  59. package/{createBox.d.ts → createBox/createBox.d.ts} +2 -2
  60. package/{modern → createBox}/createBox.js +2 -2
  61. package/createBox/index.d.ts +1 -0
  62. package/createBox/index.js +3 -0
  63. package/createBox/package.json +6 -0
  64. package/{createStyled.d.ts → createStyled/createStyled.d.ts} +2 -2
  65. package/{modern → createStyled}/createStyled.js +2 -2
  66. package/createStyled/index.d.ts +2 -0
  67. package/createStyled/index.js +4 -0
  68. package/createStyled/package.json +6 -0
  69. package/createTheme/applyStyles.js +1 -7
  70. package/createTheme/createBreakpoints.d.ts +4 -4
  71. package/createTheme/createBreakpoints.js +7 -15
  72. package/createTheme/createSpacing.d.ts +2 -2
  73. package/createTheme/createSpacing.js +8 -14
  74. package/createTheme/createTheme.js +20 -27
  75. package/createTheme/index.js +3 -27
  76. package/createTheme/package.json +2 -2
  77. package/createTheme/shape.js +1 -7
  78. package/cssGrid/cssGrid.d.ts +3 -0
  79. package/{esm → cssGrid}/cssGrid.js +5 -5
  80. package/cssGrid/index.d.ts +2 -0
  81. package/cssGrid/index.js +4 -0
  82. package/cssGrid/package.json +6 -0
  83. package/cssVars/createCssVarsProvider.d.ts +0 -8
  84. package/cssVars/createCssVarsProvider.js +70 -110
  85. package/cssVars/createCssVarsTheme.d.ts +2 -7
  86. package/cssVars/createCssVarsTheme.js +10 -20
  87. package/cssVars/createGetCssVar.js +1 -7
  88. package/cssVars/cssVarsParser.js +6 -15
  89. package/cssVars/getInitColorSchemeScript.js +7 -16
  90. package/cssVars/index.js +4 -33
  91. package/cssVars/package.json +2 -2
  92. package/cssVars/prepareCssVars.d.ts +5 -9
  93. package/cssVars/prepareCssVars.js +60 -41
  94. package/cssVars/useCurrentColorScheme.js +16 -26
  95. package/display/display.d.ts +3 -0
  96. package/{esm → display}/display.js +2 -2
  97. package/display/index.d.ts +2 -0
  98. package/display/index.js +4 -0
  99. package/display/package.json +6 -0
  100. package/flexbox/flexbox.d.ts +3 -0
  101. package/{modern → flexbox}/flexbox.js +2 -2
  102. package/flexbox/index.d.ts +2 -0
  103. package/flexbox/index.js +4 -0
  104. package/flexbox/package.json +6 -0
  105. package/getThemeValue/getThemeValue.d.ts +1 -0
  106. package/{esm → getThemeValue}/getThemeValue.js +10 -10
  107. package/getThemeValue/index.d.ts +2 -0
  108. package/getThemeValue/index.js +4 -0
  109. package/getThemeValue/package.json +6 -0
  110. package/index.d.ts +22 -83
  111. package/index.js +61 -579
  112. package/legacy/{borders.js → borders/borders.js} +5 -5
  113. package/legacy/borders/index.js +4 -0
  114. package/legacy/{breakpoints.js → breakpoints/breakpoints.js} +1 -1
  115. package/legacy/breakpoints/index.js +4 -0
  116. package/legacy/colorManipulator/index.js +3 -0
  117. package/legacy/{compose.js → compose/compose.js} +1 -1
  118. package/legacy/compose/index.js +3 -0
  119. package/legacy/{createBox.js → createBox/createBox.js} +2 -2
  120. package/legacy/createBox/index.js +3 -0
  121. package/legacy/{createStyled.js → createStyled/createStyled.js} +2 -2
  122. package/legacy/createStyled/index.js +4 -0
  123. package/legacy/createTheme/createSpacing.js +3 -7
  124. package/legacy/{cssGrid.js → cssGrid/cssGrid.js} +5 -5
  125. package/legacy/cssGrid/index.js +4 -0
  126. package/legacy/cssVars/createCssVarsProvider.js +36 -62
  127. package/legacy/cssVars/createCssVarsTheme.js +7 -7
  128. package/legacy/cssVars/cssVarsParser.js +3 -2
  129. package/legacy/cssVars/prepareCssVars.js +45 -25
  130. package/legacy/{display.js → display/display.js} +2 -2
  131. package/legacy/display/index.js +4 -0
  132. package/legacy/{flexbox.js → flexbox/flexbox.js} +2 -2
  133. package/legacy/flexbox/index.js +4 -0
  134. package/legacy/{getThemeValue.js → getThemeValue/getThemeValue.js} +10 -10
  135. package/legacy/getThemeValue/index.js +4 -0
  136. package/legacy/index.js +1 -1
  137. package/legacy/memoize/index.js +3 -0
  138. package/legacy/merge/index.js +3 -0
  139. package/legacy/palette/index.js +4 -0
  140. package/legacy/{palette.js → palette/palette.js} +2 -2
  141. package/legacy/positions/index.js +4 -0
  142. package/legacy/{positions.js → positions/positions.js} +2 -2
  143. package/legacy/propsToClassKey/index.js +3 -0
  144. package/legacy/responsivePropType/index.js +3 -0
  145. package/legacy/shadows/index.js +3 -0
  146. package/legacy/{shadows.js → shadows/shadows.js} +1 -1
  147. package/legacy/sizing/index.js +4 -0
  148. package/legacy/{sizing.js → sizing/sizing.js} +3 -3
  149. package/legacy/spacing/index.js +4 -0
  150. package/legacy/{spacing.js → spacing/spacing.js} +29 -26
  151. package/legacy/style/index.js +4 -0
  152. package/legacy/{style.js → style/style.js} +2 -2
  153. package/legacy/styled/index.js +3 -0
  154. package/legacy/styled/styled.js +3 -0
  155. package/legacy/typography/index.js +4 -0
  156. package/legacy/{typography.js → typography/typography.js} +2 -2
  157. package/legacy/useTheme/index.js +4 -0
  158. package/legacy/{useTheme.js → useTheme/useTheme.js} +2 -2
  159. package/legacy/useThemeWithoutDefault/index.js +3 -0
  160. package/memoize/index.d.ts +1 -0
  161. package/memoize/index.js +3 -0
  162. package/memoize/memoize.d.ts +3 -0
  163. package/memoize/package.json +6 -0
  164. package/merge/index.d.ts +1 -0
  165. package/merge/index.js +3 -0
  166. package/merge/package.json +6 -0
  167. package/modern/{borders.js → borders/borders.js} +5 -5
  168. package/modern/borders/index.js +4 -0
  169. package/{esm → modern/breakpoints}/breakpoints.js +2 -3
  170. package/modern/breakpoints/index.js +4 -0
  171. package/modern/colorManipulator/index.js +3 -0
  172. package/{esm → modern/compose}/compose.js +1 -1
  173. package/modern/compose/index.js +3 -0
  174. package/{esm → modern/createBox}/createBox.js +2 -2
  175. package/modern/createBox/index.js +3 -0
  176. package/{esm → modern/createStyled}/createStyled.js +5 -6
  177. package/modern/createStyled/index.js +4 -0
  178. package/modern/createTheme/createSpacing.js +7 -8
  179. package/modern/{cssGrid.js → cssGrid/cssGrid.js} +5 -5
  180. package/modern/cssGrid/index.js +4 -0
  181. package/modern/cssVars/createCssVarsProvider.js +29 -60
  182. package/modern/cssVars/createCssVarsTheme.js +7 -10
  183. package/modern/cssVars/cssVarsParser.js +3 -2
  184. package/modern/cssVars/prepareCssVars.js +49 -21
  185. package/modern/{display.js → display/display.js} +2 -2
  186. package/modern/display/index.js +4 -0
  187. package/{esm → modern/flexbox}/flexbox.js +2 -2
  188. package/modern/flexbox/index.js +4 -0
  189. package/modern/{getThemeValue.js → getThemeValue/getThemeValue.js} +10 -10
  190. package/modern/getThemeValue/index.js +4 -0
  191. package/modern/index.js +1 -1
  192. package/modern/memoize/index.js +3 -0
  193. package/modern/merge/index.js +3 -0
  194. package/modern/palette/index.js +4 -0
  195. package/{esm → modern/palette}/palette.js +2 -2
  196. package/modern/positions/index.js +4 -0
  197. package/modern/{positions.js → positions/positions.js} +2 -2
  198. package/modern/propsToClassKey/index.js +3 -0
  199. package/modern/responsivePropType/index.js +3 -0
  200. package/modern/shadows/index.js +3 -0
  201. package/{esm → modern/shadows}/shadows.js +1 -1
  202. package/modern/sizing/index.js +4 -0
  203. package/modern/{sizing.js → sizing/sizing.js} +3 -3
  204. package/modern/spacing/index.js +4 -0
  205. package/{esm → modern/spacing}/spacing.js +29 -27
  206. package/modern/style/index.js +4 -0
  207. package/modern/{style.js → style/style.js} +2 -2
  208. package/modern/styled/index.js +3 -0
  209. package/modern/styled/styled.js +3 -0
  210. package/modern/typography/index.js +4 -0
  211. package/modern/{typography.js → typography/typography.js} +2 -2
  212. package/modern/useTheme/index.js +4 -0
  213. package/{esm → modern/useTheme}/useTheme.js +2 -2
  214. package/modern/useThemeWithoutDefault/index.js +3 -0
  215. package/node/Box/Box.js +36 -0
  216. package/node/Box/boxClasses.js +10 -0
  217. package/node/Box/index.js +37 -0
  218. package/{esm → node}/Container/Container.js +17 -12
  219. package/node/Container/ContainerProps.js +5 -0
  220. package/node/Container/containerClasses.js +15 -0
  221. package/node/Container/createContainer.js +152 -0
  222. package/node/Container/index.js +37 -0
  223. package/node/GlobalStyles/GlobalStyles.js +45 -0
  224. package/node/GlobalStyles/index.js +27 -0
  225. package/node/RtlProvider/index.js +35 -0
  226. package/{esm → node}/Stack/Stack.js +17 -11
  227. package/node/Stack/StackProps.js +5 -0
  228. package/node/Stack/createStack.js +184 -0
  229. package/node/Stack/index.js +57 -0
  230. package/node/Stack/stackClasses.js +15 -0
  231. package/{esm → node}/ThemeProvider/ThemeProvider.js +30 -22
  232. package/node/ThemeProvider/index.js +14 -0
  233. package/{esm → node}/Unstable_Grid/Grid.js +31 -25
  234. package/node/Unstable_Grid/GridProps.js +5 -0
  235. package/node/Unstable_Grid/createGrid.js +180 -0
  236. package/{esm → node}/Unstable_Grid/gridClasses.js +14 -6
  237. package/{esm → node}/Unstable_Grid/gridGenerator.js +39 -22
  238. package/node/Unstable_Grid/index.js +65 -0
  239. package/{esm → node}/Unstable_Grid/traverseBreakpoints.js +11 -3
  240. package/{borders.js → node/borders/borders.js} +5 -5
  241. package/node/borders/index.js +27 -0
  242. package/{breakpoints.js → node/breakpoints/breakpoints.js} +1 -1
  243. package/node/breakpoints/index.js +27 -0
  244. package/node/colorManipulator/index.js +17 -0
  245. package/{compose.js → node/compose/compose.js} +1 -1
  246. package/node/compose/index.js +14 -0
  247. package/{createBox.js → node/createBox/createBox.js} +3 -3
  248. package/node/createBox/index.js +14 -0
  249. package/{createStyled.js → node/createStyled/createStyled.js} +3 -3
  250. package/node/createStyled/index.js +27 -0
  251. package/{esm → node}/createTheme/applyStyles.js +7 -1
  252. package/{esm → node}/createTheme/createBreakpoints.js +15 -7
  253. package/{esm → node}/createTheme/createSpacing.js +13 -9
  254. package/node/createTheme/createTheme.js +50 -0
  255. package/node/createTheme/index.js +27 -0
  256. package/node/createTheme/shape.js +10 -0
  257. package/{cssGrid.js → node/cssGrid/cssGrid.js} +5 -5
  258. package/node/cssGrid/index.js +27 -0
  259. package/{esm → node}/cssVars/createCssVarsProvider.js +79 -99
  260. package/node/cssVars/createCssVarsTheme.js +20 -0
  261. package/{esm → node}/cssVars/createGetCssVar.js +7 -1
  262. package/{esm → node}/cssVars/cssVarsParser.js +16 -5
  263. package/node/cssVars/getInitColorSchemeScript.js +53 -0
  264. package/node/cssVars/index.js +35 -0
  265. package/node/cssVars/prepareCssVars.js +106 -0
  266. package/{esm → node}/cssVars/useCurrentColorScheme.js +24 -14
  267. package/{display.js → node/display/display.js} +2 -2
  268. package/node/display/index.js +27 -0
  269. package/{flexbox.js → node/flexbox/flexbox.js} +2 -2
  270. package/node/flexbox/index.js +27 -0
  271. package/{getThemeValue.js → node/getThemeValue/getThemeValue.js} +10 -10
  272. package/node/getThemeValue/index.js +27 -0
  273. package/node/index.js +590 -0
  274. package/node/memoize/index.js +14 -0
  275. package/node/merge/index.js +14 -0
  276. package/node/palette/index.js +27 -0
  277. package/{palette.js → node/palette/palette.js} +2 -2
  278. package/node/positions/index.js +27 -0
  279. package/{positions.js → node/positions/positions.js} +2 -2
  280. package/node/propsToClassKey/index.js +14 -0
  281. package/node/responsivePropType/index.js +14 -0
  282. package/node/shadows/index.js +14 -0
  283. package/{shadows.js → node/shadows/shadows.js} +1 -1
  284. package/node/sizing/index.js +27 -0
  285. package/{sizing.js → node/sizing/sizing.js} +3 -3
  286. package/node/spacing/index.js +27 -0
  287. package/{spacing.js → node/spacing/spacing.js} +29 -26
  288. package/node/style/index.js +27 -0
  289. package/{style.js → node/style/style.js} +2 -2
  290. package/{esm → node}/styleFunctionSx/defaultSxConfig.js +71 -65
  291. package/node/styleFunctionSx/extendSxProp.js +55 -0
  292. package/node/styleFunctionSx/index.js +35 -0
  293. package/{esm → node}/styleFunctionSx/styleFunctionSx.js +26 -18
  294. package/node/styled/index.js +14 -0
  295. package/{styled.js → node/styled/styled.js} +1 -1
  296. package/node/typography/index.js +27 -0
  297. package/{typography.js → node/typography/typography.js} +2 -2
  298. package/node/useMediaQuery/index.js +26 -0
  299. package/{esm → node}/useMediaQuery/useMediaQuery.js +16 -9
  300. package/node/useTheme/index.js +27 -0
  301. package/{useTheme.js → node/useTheme/useTheme.js} +2 -2
  302. package/node/useThemeProps/getThemeProps.js +19 -0
  303. package/node/useThemeProps/index.js +21 -0
  304. package/node/useThemeProps/useThemeProps.js +27 -0
  305. package/node/useThemeWithoutDefault/index.js +14 -0
  306. package/{useThemeWithoutDefault.js → node/useThemeWithoutDefault/useThemeWithoutDefault.js} +1 -1
  307. package/package.json +8 -8
  308. package/palette/index.d.ts +2 -0
  309. package/palette/index.js +4 -0
  310. package/palette/package.json +6 -0
  311. package/palette/palette.d.ts +5 -0
  312. package/{modern → palette}/palette.js +2 -2
  313. package/positions/index.d.ts +2 -0
  314. package/positions/index.js +4 -0
  315. package/positions/package.json +6 -0
  316. package/positions/positions.d.ts +3 -0
  317. package/{esm → positions}/positions.js +2 -2
  318. package/propsToClassKey/index.d.ts +1 -0
  319. package/propsToClassKey/index.js +3 -0
  320. package/propsToClassKey/package.json +6 -0
  321. package/responsivePropType/index.d.ts +1 -0
  322. package/responsivePropType/index.js +3 -0
  323. package/responsivePropType/package.json +6 -0
  324. package/shadows/index.d.ts +1 -0
  325. package/shadows/index.js +3 -0
  326. package/shadows/package.json +6 -0
  327. package/shadows/shadows.d.ts +3 -0
  328. package/{modern → shadows}/shadows.js +1 -1
  329. package/sizing/index.d.ts +2 -0
  330. package/sizing/index.js +4 -0
  331. package/sizing/package.json +6 -0
  332. package/sizing/sizing.d.ts +12 -0
  333. package/{esm → sizing}/sizing.js +5 -6
  334. package/spacing/index.d.ts +2 -0
  335. package/spacing/index.js +4 -0
  336. package/spacing/package.json +6 -0
  337. package/{spacing.d.ts → spacing/spacing.d.ts} +1 -1
  338. package/{modern → spacing}/spacing.js +29 -26
  339. package/style/index.d.ts +2 -0
  340. package/style/index.js +4 -0
  341. package/style/package.json +6 -0
  342. package/{style.d.ts → style/style.d.ts} +1 -1
  343. package/{esm → style}/style.js +2 -2
  344. package/styleFunctionSx/defaultSxConfig.js +65 -71
  345. package/styleFunctionSx/extendSxProp.js +11 -19
  346. package/styleFunctionSx/index.js +4 -35
  347. package/styleFunctionSx/package.json +2 -2
  348. package/styleFunctionSx/styleFunctionSx.js +18 -27
  349. package/styled/index.d.ts +1 -0
  350. package/styled/index.js +3 -0
  351. package/styled/package.json +6 -0
  352. package/{styled.d.ts → styled/styled.d.ts} +1 -1
  353. package/styled/styled.js +3 -0
  354. package/typography/index.d.ts +2 -0
  355. package/typography/index.js +4 -0
  356. package/typography/package.json +6 -0
  357. package/typography/typography.d.ts +12 -0
  358. package/{esm → typography}/typography.js +2 -2
  359. package/useMediaQuery/index.js +2 -26
  360. package/useMediaQuery/package.json +2 -2
  361. package/useMediaQuery/useMediaQuery.js +9 -16
  362. package/useTheme/index.d.ts +2 -0
  363. package/useTheme/index.js +4 -0
  364. package/useTheme/package.json +6 -0
  365. package/{useTheme.d.ts → useTheme/useTheme.d.ts} +1 -1
  366. package/{modern → useTheme}/useTheme.js +2 -2
  367. package/useThemeProps/getThemeProps.js +3 -10
  368. package/useThemeProps/index.js +2 -19
  369. package/useThemeProps/package.json +2 -2
  370. package/useThemeProps/useThemeProps.js +5 -11
  371. package/useThemeWithoutDefault/index.d.ts +1 -0
  372. package/useThemeWithoutDefault/index.js +3 -0
  373. package/useThemeWithoutDefault/package.json +6 -0
  374. package/esm/Box/Box.js +0 -30
  375. package/esm/Box/boxClasses.js +0 -3
  376. package/esm/Box/index.js +0 -5
  377. package/esm/Container/ContainerProps.js +0 -1
  378. package/esm/Container/containerClasses.js +0 -7
  379. package/esm/Container/createContainer.js +0 -143
  380. package/esm/Container/index.js +0 -5
  381. package/esm/GlobalStyles/GlobalStyles.js +0 -37
  382. package/esm/GlobalStyles/index.js +0 -4
  383. package/esm/RtlProvider/index.js +0 -25
  384. package/esm/Stack/StackProps.js +0 -1
  385. package/esm/Stack/createStack.js +0 -173
  386. package/esm/Stack/index.js +0 -7
  387. package/esm/Stack/stackClasses.js +0 -7
  388. package/esm/ThemeProvider/index.js +0 -3
  389. package/esm/Unstable_Grid/GridProps.js +0 -1
  390. package/esm/Unstable_Grid/createGrid.js +0 -171
  391. package/esm/Unstable_Grid/index.js +0 -8
  392. package/esm/createTheme/createTheme.js +0 -43
  393. package/esm/createTheme/index.js +0 -3
  394. package/esm/createTheme/shape.js +0 -4
  395. package/esm/cssVars/createCssVarsTheme.js +0 -16
  396. package/esm/cssVars/getInitColorSchemeScript.js +0 -44
  397. package/esm/cssVars/index.js +0 -6
  398. package/esm/cssVars/prepareCssVars.js +0 -73
  399. package/esm/index.js +0 -65
  400. package/esm/styleFunctionSx/extendSxProp.js +0 -48
  401. package/esm/styleFunctionSx/index.js +0 -4
  402. package/esm/styled.js +0 -3
  403. package/esm/useMediaQuery/index.js +0 -2
  404. package/esm/useThemeProps/getThemeProps.js +0 -12
  405. package/esm/useThemeProps/index.js +0 -4
  406. package/esm/useThemeProps/useThemeProps.js +0 -21
  407. package/legacy/styled.js +0 -3
  408. package/modern/styled.js +0 -3
  409. /package/{colorManipulator.d.ts → colorManipulator/colorManipulator.d.ts} +0 -0
  410. /package/{esm → colorManipulator}/colorManipulator.js +0 -0
  411. /package/legacy/{colorManipulator.js → colorManipulator/colorManipulator.js} +0 -0
  412. /package/legacy/{memoize.js → memoize/memoize.js} +0 -0
  413. /package/{esm → legacy/merge}/merge.js +0 -0
  414. /package/legacy/{propsToClassKey.js → propsToClassKey/propsToClassKey.js} +0 -0
  415. /package/legacy/{responsivePropType.js → responsivePropType/responsivePropType.js} +0 -0
  416. /package/legacy/{useThemeWithoutDefault.js → useThemeWithoutDefault/useThemeWithoutDefault.js} +0 -0
  417. /package/{esm → memoize}/memoize.js +0 -0
  418. /package/{merge.d.ts → merge/merge.d.ts} +0 -0
  419. /package/{legacy → merge}/merge.js +0 -0
  420. /package/modern/{colorManipulator.js → colorManipulator/colorManipulator.js} +0 -0
  421. /package/modern/{memoize.js → memoize/memoize.js} +0 -0
  422. /package/modern/{merge.js → merge/merge.js} +0 -0
  423. /package/{esm → modern/propsToClassKey}/propsToClassKey.js +0 -0
  424. /package/{esm → modern/responsivePropType}/responsivePropType.js +0 -0
  425. /package/{esm → modern/useThemeWithoutDefault}/useThemeWithoutDefault.js +0 -0
  426. /package/{colorManipulator.js → node/colorManipulator/colorManipulator.js} +0 -0
  427. /package/{memoize.js → node/memoize/memoize.js} +0 -0
  428. /package/{merge.js → node/merge/merge.js} +0 -0
  429. /package/{propsToClassKey.js → node/propsToClassKey/propsToClassKey.js} +0 -0
  430. /package/{responsivePropType.js → node/responsivePropType/responsivePropType.js} +0 -0
  431. /package/{propsToClassKey.d.ts → propsToClassKey/propsToClassKey.d.ts} +0 -0
  432. /package/{modern → propsToClassKey}/propsToClassKey.js +0 -0
  433. /package/{responsivePropType.d.ts → responsivePropType/responsivePropType.d.ts} +0 -0
  434. /package/{modern → responsivePropType}/responsivePropType.js +0 -0
  435. /package/{useThemeWithoutDefault.d.ts → useThemeWithoutDefault/useThemeWithoutDefault.d.ts} +0 -0
  436. /package/{modern → useThemeWithoutDefault}/useThemeWithoutDefault.js +0 -0
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/spacing/index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -1,4 +1,4 @@
1
- import { SimpleStyleFunction, spacing, PropsFor } from './Box';
1
+ import { SimpleStyleFunction, spacing, PropsFor } from '../Box';
2
2
 
3
3
  export type SpacingValueType = string | number | null | undefined;
4
4
  export type SpacingProps = PropsFor<typeof spacing>;
@@ -1,8 +1,8 @@
1
- import responsivePropType from './responsivePropType';
2
- import { handleBreakpoints } from './breakpoints';
3
- import { getPath } from './style';
4
- import merge from './merge';
5
- import memoize from './memoize';
1
+ import responsivePropType from '../responsivePropType';
2
+ import { handleBreakpoints } from '../breakpoints';
3
+ import { getPath } from '../style';
4
+ import merge from '../merge';
5
+ import memoize from '../memoize';
6
6
  const properties = {
7
7
  m: 'margin',
8
8
  p: 'padding'
@@ -43,25 +43,29 @@ export const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'm
43
43
  export const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];
44
44
  const spacingKeys = [...marginKeys, ...paddingKeys];
45
45
  export function createUnaryUnit(theme, themeKey, defaultValue, propName) {
46
- const themeSpacing = getPath(theme, themeKey, false) ?? defaultValue;
47
- if (typeof themeSpacing === 'number') {
48
- return abs => {
49
- if (typeof abs === 'string') {
50
- return abs;
46
+ const themeSpacing = getPath(theme, themeKey, true) ?? defaultValue;
47
+ if (typeof themeSpacing === 'number' || typeof themeSpacing === 'string') {
48
+ return val => {
49
+ if (typeof val === 'string') {
50
+ return val;
51
51
  }
52
52
  if (process.env.NODE_ENV !== 'production') {
53
- if (typeof abs !== 'number') {
54
- console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
53
+ if (typeof val !== 'number') {
54
+ console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${val}.`);
55
55
  }
56
56
  }
57
- return themeSpacing * abs;
57
+ if (typeof themeSpacing === 'string') {
58
+ return `calc(${val} * ${themeSpacing})`;
59
+ }
60
+ return themeSpacing * val;
58
61
  };
59
62
  }
60
63
  if (Array.isArray(themeSpacing)) {
61
- return abs => {
62
- if (typeof abs === 'string') {
63
- return abs;
64
+ return val => {
65
+ if (typeof val === 'string') {
66
+ return val;
64
67
  }
68
+ const abs = Math.abs(val);
65
69
  if (process.env.NODE_ENV !== 'production') {
66
70
  if (!Number.isInteger(abs)) {
67
71
  console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
@@ -69,7 +73,14 @@ export function createUnaryUnit(theme, themeKey, defaultValue, propName) {
69
73
  console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
70
74
  }
71
75
  }
72
- return themeSpacing[abs];
76
+ const transformed = themeSpacing[abs];
77
+ if (val >= 0) {
78
+ return transformed;
79
+ }
80
+ if (typeof transformed === 'number') {
81
+ return -transformed;
82
+ }
83
+ return `-${transformed}`;
73
84
  };
74
85
  }
75
86
  if (typeof themeSpacing === 'function') {
@@ -87,15 +98,7 @@ export function getValue(transformer, propValue) {
87
98
  if (typeof propValue === 'string' || propValue == null) {
88
99
  return propValue;
89
100
  }
90
- const abs = Math.abs(propValue);
91
- const transformed = transformer(abs);
92
- if (propValue >= 0) {
93
- return transformed;
94
- }
95
- if (typeof transformed === 'number') {
96
- return -transformed;
97
- }
98
- return `-${transformed}`;
101
+ return transformer(propValue);
99
102
  }
100
103
  export function getStyleFromPropValue(cssProperties, transformer) {
101
104
  return propValue => cssProperties.reduce((acc, cssProperty) => {
@@ -0,0 +1,2 @@
1
+ export { default } from './style';
2
+ export * from './style';
package/style/index.js ADDED
@@ -0,0 +1,4 @@
1
+ 'use client';
2
+
3
+ export { default } from './style';
4
+ export * from './style';
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/style/index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -1,5 +1,5 @@
1
1
  import { CSSObject } from '@mui/styled-engine';
2
- import { StyleFunction } from './Box';
2
+ import { StyleFunction } from '../Box';
3
3
 
4
4
  export type TransformFunction = (
5
5
  cssValue: unknown,
@@ -1,6 +1,6 @@
1
1
  import capitalize from '@mui/utils/capitalize';
2
- import responsivePropType from './responsivePropType';
3
- import { handleBreakpoints } from './breakpoints';
2
+ import responsivePropType from '../responsivePropType';
3
+ import { handleBreakpoints } from '../breakpoints';
4
4
  export function getPath(obj, path, checkVars = true) {
5
5
  if (!path || typeof path !== 'string') {
6
6
  return null;
@@ -1,35 +1,29 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _spacing = require("../spacing");
8
- var _borders = require("../borders");
9
- var _cssGrid = require("../cssGrid");
10
- var _palette = require("../palette");
11
- var _sizing = require("../sizing");
1
+ import { padding, margin } from '../spacing';
2
+ import { borderRadius, borderTransform } from '../borders';
3
+ import { gap, rowGap, columnGap } from '../cssGrid';
4
+ import { paletteTransform } from '../palette';
5
+ import { maxWidth, sizingTransform } from '../sizing';
12
6
  const defaultSxConfig = {
13
7
  // borders
14
8
  border: {
15
9
  themeKey: 'borders',
16
- transform: _borders.borderTransform
10
+ transform: borderTransform
17
11
  },
18
12
  borderTop: {
19
13
  themeKey: 'borders',
20
- transform: _borders.borderTransform
14
+ transform: borderTransform
21
15
  },
22
16
  borderRight: {
23
17
  themeKey: 'borders',
24
- transform: _borders.borderTransform
18
+ transform: borderTransform
25
19
  },
26
20
  borderBottom: {
27
21
  themeKey: 'borders',
28
- transform: _borders.borderTransform
22
+ transform: borderTransform
29
23
  },
30
24
  borderLeft: {
31
25
  themeKey: 'borders',
32
- transform: _borders.borderTransform
26
+ transform: borderTransform
33
27
  },
34
28
  borderColor: {
35
29
  themeKey: 'palette'
@@ -48,149 +42,149 @@ const defaultSxConfig = {
48
42
  },
49
43
  outline: {
50
44
  themeKey: 'borders',
51
- transform: _borders.borderTransform
45
+ transform: borderTransform
52
46
  },
53
47
  outlineColor: {
54
48
  themeKey: 'palette'
55
49
  },
56
50
  borderRadius: {
57
51
  themeKey: 'shape.borderRadius',
58
- style: _borders.borderRadius
52
+ style: borderRadius
59
53
  },
60
54
  // palette
61
55
  color: {
62
56
  themeKey: 'palette',
63
- transform: _palette.paletteTransform
57
+ transform: paletteTransform
64
58
  },
65
59
  bgcolor: {
66
60
  themeKey: 'palette',
67
61
  cssProperty: 'backgroundColor',
68
- transform: _palette.paletteTransform
62
+ transform: paletteTransform
69
63
  },
70
64
  backgroundColor: {
71
65
  themeKey: 'palette',
72
- transform: _palette.paletteTransform
66
+ transform: paletteTransform
73
67
  },
74
68
  // spacing
75
69
  p: {
76
- style: _spacing.padding
70
+ style: padding
77
71
  },
78
72
  pt: {
79
- style: _spacing.padding
73
+ style: padding
80
74
  },
81
75
  pr: {
82
- style: _spacing.padding
76
+ style: padding
83
77
  },
84
78
  pb: {
85
- style: _spacing.padding
79
+ style: padding
86
80
  },
87
81
  pl: {
88
- style: _spacing.padding
82
+ style: padding
89
83
  },
90
84
  px: {
91
- style: _spacing.padding
85
+ style: padding
92
86
  },
93
87
  py: {
94
- style: _spacing.padding
88
+ style: padding
95
89
  },
96
90
  padding: {
97
- style: _spacing.padding
91
+ style: padding
98
92
  },
99
93
  paddingTop: {
100
- style: _spacing.padding
94
+ style: padding
101
95
  },
102
96
  paddingRight: {
103
- style: _spacing.padding
97
+ style: padding
104
98
  },
105
99
  paddingBottom: {
106
- style: _spacing.padding
100
+ style: padding
107
101
  },
108
102
  paddingLeft: {
109
- style: _spacing.padding
103
+ style: padding
110
104
  },
111
105
  paddingX: {
112
- style: _spacing.padding
106
+ style: padding
113
107
  },
114
108
  paddingY: {
115
- style: _spacing.padding
109
+ style: padding
116
110
  },
117
111
  paddingInline: {
118
- style: _spacing.padding
112
+ style: padding
119
113
  },
120
114
  paddingInlineStart: {
121
- style: _spacing.padding
115
+ style: padding
122
116
  },
123
117
  paddingInlineEnd: {
124
- style: _spacing.padding
118
+ style: padding
125
119
  },
126
120
  paddingBlock: {
127
- style: _spacing.padding
121
+ style: padding
128
122
  },
129
123
  paddingBlockStart: {
130
- style: _spacing.padding
124
+ style: padding
131
125
  },
132
126
  paddingBlockEnd: {
133
- style: _spacing.padding
127
+ style: padding
134
128
  },
135
129
  m: {
136
- style: _spacing.margin
130
+ style: margin
137
131
  },
138
132
  mt: {
139
- style: _spacing.margin
133
+ style: margin
140
134
  },
141
135
  mr: {
142
- style: _spacing.margin
136
+ style: margin
143
137
  },
144
138
  mb: {
145
- style: _spacing.margin
139
+ style: margin
146
140
  },
147
141
  ml: {
148
- style: _spacing.margin
142
+ style: margin
149
143
  },
150
144
  mx: {
151
- style: _spacing.margin
145
+ style: margin
152
146
  },
153
147
  my: {
154
- style: _spacing.margin
148
+ style: margin
155
149
  },
156
150
  margin: {
157
- style: _spacing.margin
151
+ style: margin
158
152
  },
159
153
  marginTop: {
160
- style: _spacing.margin
154
+ style: margin
161
155
  },
162
156
  marginRight: {
163
- style: _spacing.margin
157
+ style: margin
164
158
  },
165
159
  marginBottom: {
166
- style: _spacing.margin
160
+ style: margin
167
161
  },
168
162
  marginLeft: {
169
- style: _spacing.margin
163
+ style: margin
170
164
  },
171
165
  marginX: {
172
- style: _spacing.margin
166
+ style: margin
173
167
  },
174
168
  marginY: {
175
- style: _spacing.margin
169
+ style: margin
176
170
  },
177
171
  marginInline: {
178
- style: _spacing.margin
172
+ style: margin
179
173
  },
180
174
  marginInlineStart: {
181
- style: _spacing.margin
175
+ style: margin
182
176
  },
183
177
  marginInlineEnd: {
184
- style: _spacing.margin
178
+ style: margin
185
179
  },
186
180
  marginBlock: {
187
- style: _spacing.margin
181
+ style: margin
188
182
  },
189
183
  marginBlockStart: {
190
- style: _spacing.margin
184
+ style: margin
191
185
  },
192
186
  marginBlockEnd: {
193
- style: _spacing.margin
187
+ style: margin
194
188
  },
195
189
  // display
196
190
  displayPrint: {
@@ -222,13 +216,13 @@ const defaultSxConfig = {
222
216
  justifySelf: {},
223
217
  // grid
224
218
  gap: {
225
- style: _cssGrid.gap
219
+ style: gap
226
220
  },
227
221
  rowGap: {
228
- style: _cssGrid.rowGap
222
+ style: rowGap
229
223
  },
230
224
  columnGap: {
231
- style: _cssGrid.columnGap
225
+ style: columnGap
232
226
  },
233
227
  gridColumn: {},
234
228
  gridRow: {},
@@ -254,22 +248,22 @@ const defaultSxConfig = {
254
248
  },
255
249
  // sizing
256
250
  width: {
257
- transform: _sizing.sizingTransform
251
+ transform: sizingTransform
258
252
  },
259
253
  maxWidth: {
260
- style: _sizing.maxWidth
254
+ style: maxWidth
261
255
  },
262
256
  minWidth: {
263
- transform: _sizing.sizingTransform
257
+ transform: sizingTransform
264
258
  },
265
259
  height: {
266
- transform: _sizing.sizingTransform
260
+ transform: sizingTransform
267
261
  },
268
262
  maxHeight: {
269
- transform: _sizing.sizingTransform
263
+ transform: sizingTransform
270
264
  },
271
265
  minHeight: {
272
- transform: _sizing.sizingTransform
266
+ transform: sizingTransform
273
267
  },
274
268
  boxSizing: {},
275
269
  // typography
@@ -294,4 +288,4 @@ const defaultSxConfig = {
294
288
  themeKey: 'typography'
295
289
  }
296
290
  };
297
- var _default = exports.default = defaultSxConfig;
291
+ export default defaultSxConfig;
@@ -1,22 +1,14 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = extendSxProp;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
- var _deepmerge = require("@mui/utils/deepmerge");
11
- var _defaultSxConfig = _interopRequireDefault(require("./defaultSxConfig"));
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
12
3
  const _excluded = ["sx"];
4
+ import { isPlainObject } from '@mui/utils/deepmerge';
5
+ import defaultSxConfig from './defaultSxConfig';
13
6
  const splitProps = props => {
14
- var _props$theme$unstable, _props$theme;
15
7
  const result = {
16
8
  systemProps: {},
17
9
  otherProps: {}
18
10
  };
19
- const config = (_props$theme$unstable = props == null || (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : _defaultSxConfig.default;
11
+ const config = props?.theme?.unstable_sxConfig ?? defaultSxConfig;
20
12
  Object.keys(props).forEach(prop => {
21
13
  if (config[prop]) {
22
14
  result.systemProps[prop] = props[prop];
@@ -26,11 +18,11 @@ const splitProps = props => {
26
18
  });
27
19
  return result;
28
20
  };
29
- function extendSxProp(props) {
21
+ export default function extendSxProp(props) {
30
22
  const {
31
23
  sx: inSx
32
24
  } = props,
33
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
25
+ other = _objectWithoutPropertiesLoose(props, _excluded);
34
26
  const {
35
27
  systemProps,
36
28
  otherProps
@@ -41,15 +33,15 @@ function extendSxProp(props) {
41
33
  } else if (typeof inSx === 'function') {
42
34
  finalSx = (...args) => {
43
35
  const result = inSx(...args);
44
- if (!(0, _deepmerge.isPlainObject)(result)) {
36
+ if (!isPlainObject(result)) {
45
37
  return systemProps;
46
38
  }
47
- return (0, _extends2.default)({}, systemProps, result);
39
+ return _extends({}, systemProps, result);
48
40
  };
49
41
  } else {
50
- finalSx = (0, _extends2.default)({}, systemProps, inSx);
42
+ finalSx = _extends({}, systemProps, inSx);
51
43
  }
52
- return (0, _extends2.default)({}, otherProps, {
44
+ return _extends({}, otherProps, {
53
45
  sx: finalSx
54
46
  });
55
47
  }
@@ -1,35 +1,4 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function () {
10
- return _styleFunctionSx.default;
11
- }
12
- });
13
- Object.defineProperty(exports, "extendSxProp", {
14
- enumerable: true,
15
- get: function () {
16
- return _extendSxProp.default;
17
- }
18
- });
19
- Object.defineProperty(exports, "unstable_createStyleFunctionSx", {
20
- enumerable: true,
21
- get: function () {
22
- return _styleFunctionSx.unstable_createStyleFunctionSx;
23
- }
24
- });
25
- Object.defineProperty(exports, "unstable_defaultSxConfig", {
26
- enumerable: true,
27
- get: function () {
28
- return _defaultSxConfig.default;
29
- }
30
- });
31
- var _styleFunctionSx = _interopRequireWildcard(require("./styleFunctionSx"));
32
- var _extendSxProp = _interopRequireDefault(require("./extendSxProp"));
33
- var _defaultSxConfig = _interopRequireDefault(require("./defaultSxConfig"));
34
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
35
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
1
+ export { default } from './styleFunctionSx';
2
+ export { unstable_createStyleFunctionSx } from './styleFunctionSx';
3
+ export { default as extendSxProp } from './extendSxProp';
4
+ export { default as unstable_defaultSxConfig } from './defaultSxConfig';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "sideEffects": false,
3
- "module": "../esm/styleFunctionSx/index.js",
4
- "main": "./index.js",
3
+ "module": "./index.js",
4
+ "main": "../node/styleFunctionSx/index.js",
5
5
  "types": "./index.d.ts"
6
6
  }
@@ -1,16 +1,8 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- exports.unstable_createStyleFunctionSx = unstable_createStyleFunctionSx;
9
- var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
10
- var _merge = _interopRequireDefault(require("../merge"));
11
- var _style = require("../style");
12
- var _breakpoints = require("../breakpoints");
13
- var _defaultSxConfig = _interopRequireDefault(require("./defaultSxConfig"));
1
+ import capitalize from '@mui/utils/capitalize';
2
+ import merge from '../merge';
3
+ import { getPath, getStyleValue as getValue } from '../style';
4
+ import { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from '../breakpoints';
5
+ import defaultSxConfig from './defaultSxConfig';
14
6
  function objectsHaveSameKeys(...objects) {
15
7
  const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);
16
8
  const union = new Set(allKeys);
@@ -21,7 +13,7 @@ function callIfFn(maybeFn, arg) {
21
13
  }
22
14
 
23
15
  // eslint-disable-next-line @typescript-eslint/naming-convention
24
- function unstable_createStyleFunctionSx() {
16
+ export function unstable_createStyleFunctionSx() {
25
17
  function getThemeValue(prop, val, theme, config) {
26
18
  const props = {
27
19
  [prop]: val,
@@ -49,15 +41,15 @@ function unstable_createStyleFunctionSx() {
49
41
  [prop]: val
50
42
  };
51
43
  }
52
- const themeMapping = (0, _style.getPath)(theme, themeKey) || {};
44
+ const themeMapping = getPath(theme, themeKey) || {};
53
45
  if (style) {
54
46
  return style(props);
55
47
  }
56
48
  const styleFromPropValue = propValueFinal => {
57
- let value = (0, _style.getStyleValue)(themeMapping, transform, propValueFinal);
49
+ let value = getValue(themeMapping, transform, propValueFinal);
58
50
  if (propValueFinal === value && typeof propValueFinal === 'string') {
59
51
  // Haven't found value
60
- value = (0, _style.getStyleValue)(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : (0, _capitalize.default)(propValueFinal)}`, propValueFinal);
52
+ value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);
61
53
  }
62
54
  if (cssProperty === false) {
63
55
  return value;
@@ -66,10 +58,9 @@ function unstable_createStyleFunctionSx() {
66
58
  [cssProperty]: value
67
59
  };
68
60
  };
69
- return (0, _breakpoints.handleBreakpoints)(props, val, styleFromPropValue);
61
+ return handleBreakpoints(props, val, styleFromPropValue);
70
62
  }
71
63
  function styleFunctionSx(props) {
72
- var _theme$unstable_sxCon;
73
64
  const {
74
65
  sx,
75
66
  theme = {}
@@ -77,7 +68,7 @@ function unstable_createStyleFunctionSx() {
77
68
  if (!sx) {
78
69
  return null; // Emotion & styled-components will neglect null
79
70
  }
80
- const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : _defaultSxConfig.default;
71
+ const config = theme.unstable_sxConfig ?? defaultSxConfig;
81
72
 
82
73
  /*
83
74
  * Receive `sxInput` as object or callback
@@ -95,7 +86,7 @@ function unstable_createStyleFunctionSx() {
95
86
  if (!sxObject) {
96
87
  return null;
97
88
  }
98
- const emptyBreakpoints = (0, _breakpoints.createEmptyBreakpointObject)(theme.breakpoints);
89
+ const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);
99
90
  const breakpointsKeys = Object.keys(emptyBreakpoints);
100
91
  let css = emptyBreakpoints;
101
92
  Object.keys(sxObject).forEach(styleKey => {
@@ -103,9 +94,9 @@ function unstable_createStyleFunctionSx() {
103
94
  if (value !== null && value !== undefined) {
104
95
  if (typeof value === 'object') {
105
96
  if (config[styleKey]) {
106
- css = (0, _merge.default)(css, getThemeValue(styleKey, value, theme, config));
97
+ css = merge(css, getThemeValue(styleKey, value, theme, config));
107
98
  } else {
108
- const breakpointsValues = (0, _breakpoints.handleBreakpoints)({
99
+ const breakpointsValues = handleBreakpoints({
109
100
  theme
110
101
  }, value, x => ({
111
102
  [styleKey]: x
@@ -116,15 +107,15 @@ function unstable_createStyleFunctionSx() {
116
107
  theme
117
108
  });
118
109
  } else {
119
- css = (0, _merge.default)(css, breakpointsValues);
110
+ css = merge(css, breakpointsValues);
120
111
  }
121
112
  }
122
113
  } else {
123
- css = (0, _merge.default)(css, getThemeValue(styleKey, value, theme, config));
114
+ css = merge(css, getThemeValue(styleKey, value, theme, config));
124
115
  }
125
116
  }
126
117
  });
127
- return (0, _breakpoints.removeUnusedBreakpoints)(breakpointsKeys, css);
118
+ return removeUnusedBreakpoints(breakpointsKeys, css);
128
119
  }
129
120
  return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
130
121
  }
@@ -132,4 +123,4 @@ function unstable_createStyleFunctionSx() {
132
123
  }
133
124
  const styleFunctionSx = unstable_createStyleFunctionSx();
134
125
  styleFunctionSx.filterProps = ['sx'];
135
- var _default = exports.default = styleFunctionSx;
126
+ export default styleFunctionSx;
@@ -0,0 +1 @@
1
+ export { default } from './styled';
@@ -0,0 +1,3 @@
1
+ 'use client';
2
+
3
+ export { default } from './styled';
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/styled/index.js",
5
+ "types": "./index.d.ts"
6
+ }