@zydon/common 2.6.53 → 2.6.54
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.
|
@@ -8,7 +8,7 @@ import { c as c$1, b as b$1 } from './chunk-FT5VGKNM.js';
|
|
|
8
8
|
import { c } from './chunk-V2UHZWRE.js';
|
|
9
9
|
import { a as a$4 } from './chunk-QQDMA4TE.js';
|
|
10
10
|
import { useRef, useEffect, useMemo } from 'react';
|
|
11
|
-
import
|
|
11
|
+
import G from '@mui/material/CssBaseline';
|
|
12
12
|
import { experimental_extendTheme, lighten, darken, Experimental_CssVarsProvider } from '@mui/material/styles';
|
|
13
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
14
|
|
|
@@ -26,6 +26,6 @@ var i={modeStorageKey:"mui-mode",defaultMode:"light"},w=`
|
|
|
26
26
|
document.documentElement.setAttribute('data-mui-color-scheme', defaultMode);
|
|
27
27
|
}
|
|
28
28
|
})();
|
|
29
|
-
`;var _=o=>({lighter:lighten(o,.815),light:lighten(o,.225),main:o,dark:darken(o,.15),darker:darken(o,.35),contrastText:"#000"});function
|
|
29
|
+
`;var _=o=>({lighter:lighten(o,.815),light:lighten(o,.225),main:o,dark:darken(o,.15),darker:darken(o,.35),contrastText:"#000"});function E(o,r$1,e$1=""){let m=_(r$1.primaryColor);a(p,"dark.palette.primary",m),a(p,"light.palette.primary",m);let n={colorSchemes:p,shadows:a$1(r$1.colorScheme),customShadows:r(r$1.colorScheme,m.main),shape:{borderRadius:8},components:a$2,typography:{...e,fontFamily:c(r$1.fontFamily)},cssVarPrefix:e$1,shouldSkipGeneratingVar:$},t=a$3(n,r$1),a$4={};return experimental_extendTheme(t,o,b(r$1),a$4)}function $(o,r){let e=["mixins","overlays","direction","breakpoints","cssVarPrefix","unstable_sxConfig","typography","colorSchemes"],m={global:["tonalOffset","dividerChannel","contrastThreshold"],grey:["A100","A200","A400","A700"],text:["icon"]};if(o[0]==="palette"){let t=o[1],a=m[t]||m.global;return o.some(l=>a?.includes(l))}return o.some(t=>e?.includes(t))}var D=({children:o,cssVarPrefix:r})=>{let{settings:e}=b$1(),m=useMemo(()=>{let t=E(a$6[1].systemValue,{primaryColor:e.primaryColor,colorScheme:e.colorScheme,contrast:e.contrast,navLayout:e.navLayout,navColor:e.navColor,compactLayout:e.compactLayout,fontFamily:e.fontFamily,setColorScheme:e.setColorScheme},r),a=t.colorSchemes?.[e.colorScheme]?.palette;return a?t.palette=a:(t.palette=t.colorSchemes?.light?.palette||t.colorSchemes?.dark?.palette,t.palette.mode=e.colorScheme),t},[e,r]),n=useMemo(()=>({theme:m,mode:e.colorScheme,defaultMode:e.colorScheme,defaultColorScheme:e.colorScheme,modeStorageKey:i.modeStorageKey,colorSchemeStorageKey:i.modeStorageKey}),[m,e.colorScheme]);return jsxs(Experimental_CssVarsProvider,{...n,children:[jsx(G,{}),o]})},I=({children:o,cssVarPrefix:r="app",primaryColor:e="#4E5BEC",fontFamily:m="Public Sans",compactLayout:n=!0,contrast:t="default",navColor:a="integrate",navLayout:l="vertical",colorScheme:s="light"})=>{let[p,d]=a$4(i.modeStorageKey,s,{serializer:h=>h.replaceAll('"',""),deserializer:h=>h.replaceAll('"',"")}),y=useRef();return useEffect(()=>{y.current!==s&&(console.log(`\u{1F3A8} update palette config: ${s}`,`\u27A1\uFE0F last value: ${p}`),a$5(s),d(s)),y.current=s;},[d,s,p]),jsx(c$1,{primaryColor:e,fontFamily:m,compactLayout:n,contrast:t,navColor:a,navLayout:l,colorScheme:p,setColorScheme:d,children:jsx(D,{cssVarPrefix:r,children:o})})},ne=I;
|
|
30
30
|
|
|
31
|
-
export { i as a, w as b,
|
|
31
|
+
export { i as a, w as b, E as c, ne as d };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a } from '../../chunk-57SLJCEV.js';
|
|
2
2
|
import '../../chunk-HKVUI2U7.js';
|
|
3
|
-
import { d as d$1 } from '../../chunk-
|
|
3
|
+
import { d as d$1 } from '../../chunk-MN5HK6BY.js';
|
|
4
4
|
import '../../chunk-SO64ZYQB.js';
|
|
5
5
|
import '../../chunk-H7GUTAKH.js';
|
|
6
6
|
import '../../chunk-AIB3I5MO.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as ThemeProvider, c as createTheme } from './chunk-
|
|
1
|
+
export { d as ThemeProvider, c as createTheme } from './chunk-MN5HK6BY.js';
|
|
2
2
|
import './chunk-SO64ZYQB.js';
|
|
3
3
|
export { b as defaultFont, c as primaryFont, d as secondaryFont, a as shadows, e as typography } from './chunk-H7GUTAKH.js';
|
|
4
4
|
import './chunk-AIB3I5MO.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as colorSchemeScript, d as default, a as schemeConfig } from '../chunk-
|
|
1
|
+
export { b as colorSchemeScript, d as default, a as schemeConfig } from '../chunk-MN5HK6BY.js';
|
|
2
2
|
import '../chunk-SO64ZYQB.js';
|
|
3
3
|
import '../chunk-H7GUTAKH.js';
|
|
4
4
|
import '../chunk-AIB3I5MO.js';
|