@zydon/common 2.6.50 → 2.6.52
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.
|
@@ -7,12 +7,12 @@ import { a as a$6 } from './chunk-UQVGZSLE.js';
|
|
|
7
7
|
import { c as c$2, b as b$1 } from './chunk-FT5VGKNM.js';
|
|
8
8
|
import { c as c$1 } from './chunk-V2UHZWRE.js';
|
|
9
9
|
import { a as a$4 } from './chunk-QQDMA4TE.js';
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
10
|
+
import { useRef, useEffect, useMemo } from 'react';
|
|
11
|
+
import R 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
|
|
|
15
|
-
var c={modeStorageKey:"mui-mode",defaultMode:"light"},
|
|
15
|
+
var c={modeStorageKey:"mui-mode",defaultMode:"light"},W=`
|
|
16
16
|
(function() {
|
|
17
17
|
const modeStorageKey = '${c.modeStorageKey}';
|
|
18
18
|
const defaultMode = '${c.defaultMode}';
|
|
@@ -26,6 +26,6 @@ var c={modeStorageKey:"mui-mode",defaultMode:"light"},F=`
|
|
|
26
26
|
document.documentElement.setAttribute('data-mui-color-scheme', defaultMode);
|
|
27
27
|
}
|
|
28
28
|
})();
|
|
29
|
-
`;var
|
|
29
|
+
`;var z=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=z(r$1.primaryColor);a(p,"dark.palette.primary",m),a(p,"light.palette.primary",m);let s={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$1(r$1.fontFamily)},cssVarPrefix:e$1,shouldSkipGeneratingVar:B},a$4=a$3(s,r$1),i={};return experimental_extendTheme(a$4,o,b(r$1),i)}function B(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 a=o[1],i=m[a]||m.global;return o.some(t=>i?.includes(t))}return o.some(a=>e?.includes(a))}var D=({children:o,cssVarPrefix:r})=>{let{settings:e}=b$1(),{setColorScheme:m,colorScheme:s}=e,a=useMemo(()=>{let t=E(a$5[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),l=t.colorSchemes?.[e.colorScheme]?.palette;return l?t.palette=l:(t.palette=t.colorSchemes?.light?.palette||t.colorSchemes?.dark?.palette,t.palette.mode=e.colorScheme),t},[e,r]),i=useMemo(()=>({theme:a,mode:e.colorScheme,defaultMode:e.colorScheme,defaultColorScheme:e.colorScheme,modeStorageKey:c.modeStorageKey,colorSchemeStorageKey:c.modeStorageKey}),[a,e.colorScheme]);return useEffect(()=>{m(s),a$6(s);},[s,m]),jsxs(Experimental_CssVarsProvider,{...i,children:[jsx(R,{}),o]})},I=({children:o,cssVarPrefix:r="app",primaryColor:e="#4E5BEC",fontFamily:m="Public Sans",compactLayout:s=!0,contrast:a="default",navColor:i="integrate",navLayout:t="vertical",colorScheme:l="light"})=>{let[n,h]=a$4(c.modeStorageKey,l,{serializer:d=>d.replaceAll('"',""),deserializer:d=>d.replaceAll('"',"")}),g=useRef();return useEffect(()=>{g.current!==n&&(console.log("\u{1F3A8} palette config:",n),h(n)),g.current=n;},[n,h]),jsx(c$2,{primaryColor:e,fontFamily:m,compactLayout:s,contrast:a,navColor:i,navLayout:t,colorScheme:n,setColorScheme:h,children:jsx(D,{cssVarPrefix:r,children:o})})},ce=I;
|
|
30
30
|
|
|
31
|
-
export { c as a,
|
|
31
|
+
export { c as a, W as b, E as c, ce 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-473WIK7J.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-473WIK7J.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-473WIK7J.js';
|
|
2
2
|
import '../chunk-SO64ZYQB.js';
|
|
3
3
|
import '../chunk-H7GUTAKH.js';
|
|
4
4
|
import '../chunk-AIB3I5MO.js';
|