datastake-daf 0.6.528 → 0.6.530

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.
@@ -7074,22 +7074,33 @@ function AppLayout({
7074
7074
  });
7075
7075
  };
7076
7076
 
7077
- // Apply theme CSS custom properties
7078
- const layoutStyle = o.useMemo(() => ({
7079
- display: 'flex',
7080
- flexDirection: 'row',
7081
- width: '100vw',
7082
- height: '100dvh',
7083
- maxHeight: '100dvh',
7084
- '--layout-primary-bg': theme.layoutPrimaryBg,
7085
- '--layout-secondary-bg': theme.layoutSecondaryBg,
7086
- '--layout-border-color': theme.layoutBorderColor,
7087
- '--layout-text-primary': theme.layoutTextPrimary,
7088
- '--layout-text-secondary': theme.layoutTextSecondary,
7089
- '--layout-hover-bg': theme.layoutHoverBg
7090
- }), [theme]);
7077
+ // Apply theme CSS custom properties to document root
7078
+ o.useEffect(() => {
7079
+ if (theme.layoutPrimaryBg) document.documentElement.style.setProperty('--layout-primary-bg', theme.layoutPrimaryBg);
7080
+ if (theme.layoutSecondaryBg) document.documentElement.style.setProperty('--layout-secondary-bg', theme.layoutSecondaryBg);
7081
+ if (theme.layoutBorderColor) document.documentElement.style.setProperty('--layout-border-color', theme.layoutBorderColor);
7082
+ if (theme.layoutTextPrimary) document.documentElement.style.setProperty('--layout-text-primary', theme.layoutTextPrimary);
7083
+ if (theme.layoutTextSecondary) document.documentElement.style.setProperty('--layout-text-secondary', theme.layoutTextSecondary);
7084
+ if (theme.layoutHoverBg) document.documentElement.style.setProperty('--layout-hover-bg', theme.layoutHoverBg);
7085
+
7086
+ // Cleanup on unmount
7087
+ return () => {
7088
+ document.documentElement.style.removeProperty('--layout-primary-bg');
7089
+ document.documentElement.style.removeProperty('--layout-secondary-bg');
7090
+ document.documentElement.style.removeProperty('--layout-border-color');
7091
+ document.documentElement.style.removeProperty('--layout-text-primary');
7092
+ document.documentElement.style.removeProperty('--layout-text-secondary');
7093
+ document.documentElement.style.removeProperty('--layout-hover-bg');
7094
+ };
7095
+ }, [theme]);
7091
7096
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
7092
- style: layoutStyle,
7097
+ style: {
7098
+ display: 'flex',
7099
+ flexDirection: 'row',
7100
+ width: '100vw',
7101
+ height: '100dvh',
7102
+ maxHeight: '100dvh'
7103
+ },
7093
7104
  className: "components-layout",
7094
7105
  children: [!isAppNavigation ? /*#__PURE__*/jsxRuntime.jsxs("div", {
7095
7106
  className: formatClassname([isCollapsed ? 'sidenav-sider-collapsed sidenav-sider desktop-sider' : 'sidenav-sider sidenav-sider-opened desktop-sider', appName]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.528",
3
+ "version": "0.6.530",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -218,24 +218,35 @@ function AppLayout({
218
218
  changeNotificationState({ onYes: () => goTo(getRedirectLink('/app')) });
219
219
  };
220
220
 
221
- // Apply theme CSS custom properties
222
- const layoutStyle = useMemo(() => ({
223
- display: 'flex',
224
- flexDirection: 'row',
225
- width: '100vw',
226
- height: '100dvh',
227
- maxHeight: '100dvh',
228
- '--layout-primary-bg': theme.layoutPrimaryBg,
229
- '--layout-secondary-bg': theme.layoutSecondaryBg,
230
- '--layout-border-color': theme.layoutBorderColor,
231
- '--layout-text-primary': theme.layoutTextPrimary,
232
- '--layout-text-secondary': theme.layoutTextSecondary,
233
- '--layout-hover-bg': theme.layoutHoverBg,
234
- }), [theme]);
221
+ // Apply theme CSS custom properties to document root
222
+ useEffect(() => {
223
+ if (theme.layoutPrimaryBg) document.documentElement.style.setProperty('--layout-primary-bg', theme.layoutPrimaryBg);
224
+ if (theme.layoutSecondaryBg) document.documentElement.style.setProperty('--layout-secondary-bg', theme.layoutSecondaryBg);
225
+ if (theme.layoutBorderColor) document.documentElement.style.setProperty('--layout-border-color', theme.layoutBorderColor);
226
+ if (theme.layoutTextPrimary) document.documentElement.style.setProperty('--layout-text-primary', theme.layoutTextPrimary);
227
+ if (theme.layoutTextSecondary) document.documentElement.style.setProperty('--layout-text-secondary', theme.layoutTextSecondary);
228
+ if (theme.layoutHoverBg) document.documentElement.style.setProperty('--layout-hover-bg', theme.layoutHoverBg);
229
+
230
+ // Cleanup on unmount
231
+ return () => {
232
+ document.documentElement.style.removeProperty('--layout-primary-bg');
233
+ document.documentElement.style.removeProperty('--layout-secondary-bg');
234
+ document.documentElement.style.removeProperty('--layout-border-color');
235
+ document.documentElement.style.removeProperty('--layout-text-primary');
236
+ document.documentElement.style.removeProperty('--layout-text-secondary');
237
+ document.documentElement.style.removeProperty('--layout-hover-bg');
238
+ };
239
+ }, [theme]);
235
240
 
236
241
  return (
237
242
  <div
238
- style={layoutStyle}
243
+ style={{
244
+ display: 'flex',
245
+ flexDirection: 'row',
246
+ width: '100vw',
247
+ height: '100dvh',
248
+ maxHeight: '100dvh'
249
+ }}
239
250
  className="components-layout"
240
251
  >
241
252
  {!isAppNavigation ? (
@@ -0,0 +1 @@
1
+