@zydon/common 2.6.51 → 2.6.53
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.
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { a } from './chunk-SO64ZYQB.js';
|
|
2
|
+
import { a as a$1, e } from './chunk-H7GUTAKH.js';
|
|
3
|
+
import { a as a$3, b } from './chunk-AIB3I5MO.js';
|
|
4
|
+
import { p, r, a as a$2 } from './chunk-HTXWJ57Q.js';
|
|
5
|
+
import { a as a$6 } from './chunk-GUFT6XPG.js';
|
|
6
|
+
import { a as a$5 } from './chunk-UQVGZSLE.js';
|
|
7
|
+
import { c as c$1, b as b$1 } from './chunk-FT5VGKNM.js';
|
|
8
|
+
import { c } from './chunk-V2UHZWRE.js';
|
|
9
|
+
import { a as a$4 } from './chunk-QQDMA4TE.js';
|
|
10
|
+
import { useRef, useEffect, useMemo } from 'react';
|
|
11
|
+
import R from '@mui/material/CssBaseline';
|
|
12
|
+
import { experimental_extendTheme, lighten, darken, Experimental_CssVarsProvider } from '@mui/material/styles';
|
|
13
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
|
+
|
|
15
|
+
var i={modeStorageKey:"mui-mode",defaultMode:"light"},w=`
|
|
16
|
+
(function() {
|
|
17
|
+
const modeStorageKey = '${i.modeStorageKey}';
|
|
18
|
+
const defaultMode = '${i.defaultMode}';
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
const storedMode = localStorage.getItem(modeStorageKey) || defaultMode;
|
|
22
|
+
const mode = ['light', 'dark'].includes(storedMode) ? storedMode : defaultMode;
|
|
23
|
+
|
|
24
|
+
document.documentElement.setAttribute('data-mui-color-scheme', mode);
|
|
25
|
+
} catch (e) {
|
|
26
|
+
document.documentElement.setAttribute('data-mui-color-scheme', defaultMode);
|
|
27
|
+
}
|
|
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 L(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:z},t=a$3(n,r$1),a$4={};return experimental_extendTheme(t,o,b(r$1),a$4)}function z(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=L(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(R,{}),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[F,p]=a$4(i.modeStorageKey,s,{serializer:d=>d.replaceAll('"',""),deserializer:d=>d.replaceAll('"',"")}),g=useRef();return useEffect(()=>{g.current!==s&&(console.log("\u{1F3A8} palette config:",s),a$5(s),p(s)),g.current=s;},[p,s]),jsx(c$1,{primaryColor:e,fontFamily:m,compactLayout:n,contrast:t,navColor:a,navLayout:l,colorScheme:F,setColorScheme:p,children:jsx(D,{cssVarPrefix:r,children:o})})},ne=I;
|
|
30
|
+
|
|
31
|
+
export { i as a, w as b, L 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-UNF4VP5E.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-UNF4VP5E.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-UNF4VP5E.js';
|
|
2
2
|
import '../chunk-SO64ZYQB.js';
|
|
3
3
|
import '../chunk-H7GUTAKH.js';
|
|
4
4
|
import '../chunk-AIB3I5MO.js';
|
package/package.json
CHANGED
package/dist/chunk-OVGPTG6H.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-SO64ZYQB.js';
|
|
2
|
-
import { a as a$1, e } from './chunk-H7GUTAKH.js';
|
|
3
|
-
import { a as a$3, b } from './chunk-AIB3I5MO.js';
|
|
4
|
-
import { p, r, a as a$2 } from './chunk-HTXWJ57Q.js';
|
|
5
|
-
import { a as a$5 } from './chunk-GUFT6XPG.js';
|
|
6
|
-
import { a as a$6 } from './chunk-UQVGZSLE.js';
|
|
7
|
-
import { c as c$2, b as b$1 } from './chunk-FT5VGKNM.js';
|
|
8
|
-
import { c as c$1 } from './chunk-V2UHZWRE.js';
|
|
9
|
-
import { a as a$4 } from './chunk-QQDMA4TE.js';
|
|
10
|
-
import { useMemo, useEffect } from 'react';
|
|
11
|
-
import B from '@mui/material/CssBaseline';
|
|
12
|
-
import { experimental_extendTheme, lighten, darken, Experimental_CssVarsProvider } from '@mui/material/styles';
|
|
13
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
|
-
|
|
15
|
-
var c={modeStorageKey:"mui-mode",defaultMode:"light"},F=`
|
|
16
|
-
(function() {
|
|
17
|
-
const modeStorageKey = '${c.modeStorageKey}';
|
|
18
|
-
const defaultMode = '${c.defaultMode}';
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
const storedMode = localStorage.getItem(modeStorageKey) || defaultMode;
|
|
22
|
-
const mode = ['light', 'dark'].includes(storedMode) ? storedMode : defaultMode;
|
|
23
|
-
|
|
24
|
-
document.documentElement.setAttribute('data-mui-color-scheme', mode);
|
|
25
|
-
} catch (e) {
|
|
26
|
-
document.documentElement.setAttribute('data-mui-color-scheme', defaultMode);
|
|
27
|
-
}
|
|
28
|
-
})();
|
|
29
|
-
`;var W=o=>({lighter:lighten(o,.815),light:lighten(o,.225),main:o,dark:darken(o,.15),darker:darken(o,.35),contrastText:"#000"});function V(o,r$1,e$1=""){let m=W(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:_},a$4=a$3(s,r$1),i={};return experimental_extendTheme(a$4,o,b(r$1),i)}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 a=o[1],i=m[a]||m.global;return o.some(t=>i?.includes(t))}return o.some(a=>e?.includes(a))}var $=({children:o,cssVarPrefix:r})=>{let{settings:e}=b$1(),{setColorScheme:m,colorScheme:s}=e,a=useMemo(()=>{let t=V(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),n=t.colorSchemes?.[e.colorScheme]?.palette;return n?t.palette=n:(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(()=>{console.log("\u{1F3A8} palette config:",s),m(s),a$6(s);},[s,m]),jsxs(Experimental_CssVarsProvider,{...i,children:[jsx(B,{}),o]})},D=({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:n="light"})=>{let[L,E]=a$4(c.modeStorageKey,n,{serializer:p=>p.replaceAll('"',""),deserializer:p=>p.replaceAll('"',"")});return jsx(c$2,{primaryColor:e,fontFamily:m,compactLayout:s,contrast:a,navColor:i,navLayout:t,colorScheme:L,setColorScheme:E,children:jsx($,{cssVarPrefix:r,children:o})})},se=D;
|
|
30
|
-
|
|
31
|
-
export { c as a, F as b, V as c, se as d };
|