@majoo-ui/react 1.63.0-rc.2 → 1.63.0-rc.3

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 (2) hide show
  1. package/index.esm.js +16 -0
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -1250,6 +1250,22 @@ function ThemeProvider({
1250
1250
  theme,
1251
1251
  children
1252
1252
  }) {
1253
+ // Apply theme class to document.body so that Radix Portal content
1254
+ // (which renders outside this ThemeProvider div) also inherits
1255
+ // the active theme's CSS variables.
1256
+ React__default.useEffect(() => {
1257
+ if (typeof document === 'undefined') return;
1258
+ const body = document.body;
1259
+ const themeClass = theme?.className || String(theme || '');
1260
+ if (themeClass) {
1261
+ body.classList.add(themeClass);
1262
+ }
1263
+ return () => {
1264
+ if (themeClass) {
1265
+ body.classList.remove(themeClass);
1266
+ }
1267
+ };
1268
+ }, [theme]);
1253
1269
  return /*#__PURE__*/React__default.createElement("div", {
1254
1270
  id: name,
1255
1271
  className: theme
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.63.0-rc.2",
3
+ "version": "1.63.0-rc.3",
4
4
  "main": "./index.esm.js",
5
5
  "exports": {
6
6
  ".": {