@zydon/common 2.6.57 → 2.6.60
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.
- package/dist/chunk-USODO2K6.js +32 -0
- package/dist/chunk-XCFVMVLQ.js +7 -0
- package/dist/components/Common/index.js +2 -2
- package/dist/components/ToggleTheme/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/theme/theme-provider.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-6SAPVUB2.js +0 -32
- package/dist/chunk-VXXEMZWX.js +0 -7
|
@@ -0,0 +1,32 @@
|
|
|
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-XCFVMVLQ.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 { a as a$7 } from './chunk-S7QQBC4I.js';
|
|
11
|
+
import { useRef, useEffect, useMemo, useState } from 'react';
|
|
12
|
+
import O from '@mui/material/CssBaseline';
|
|
13
|
+
import { experimental_extendTheme, lighten, darken, Experimental_CssVarsProvider } from '@mui/material/styles';
|
|
14
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
15
|
+
|
|
16
|
+
function B(){let[o,r]=useState(!0);return a$7(()=>{let e=()=>r(!0),m=()=>r(!1);return window.addEventListener("focus",e),window.addEventListener("blur",m),()=>{window.removeEventListener("focus",e),window.removeEventListener("blur",m);}}),o}var A=B;var s={modeStorageKey:"mui-mode",defaultMode:"light"},z=`
|
|
17
|
+
(function() {
|
|
18
|
+
const modeStorageKey = '${s.modeStorageKey}';
|
|
19
|
+
const defaultMode = '${s.defaultMode}';
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
const storedMode = localStorage.getItem(modeStorageKey) || defaultMode;
|
|
23
|
+
const mode = ['light', 'dark'].includes(storedMode) ? storedMode : defaultMode;
|
|
24
|
+
|
|
25
|
+
document.documentElement.setAttribute('data-mui-color-scheme', mode);
|
|
26
|
+
} catch (e) {
|
|
27
|
+
document.documentElement.setAttribute('data-mui-color-scheme', defaultMode);
|
|
28
|
+
}
|
|
29
|
+
})();
|
|
30
|
+
`;var I=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=I(r$1.primaryColor);a(p,"dark.palette.primary",m),a(p,"light.palette.primary",m);let i={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:R},t=a$3(i,r$1),a$4={};return experimental_extendTheme(t,o,b(r$1),a$4)}function R(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(c=>a?.includes(c))}return o.some(t=>e?.includes(t))}var H=({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]),i=useMemo(()=>({theme:m,mode:e.colorScheme,defaultMode:e.colorScheme,defaultColorScheme:e.colorScheme,modeStorageKey:s.modeStorageKey,colorSchemeStorageKey:s.modeStorageKey}),[m,e.colorScheme]);return jsxs(Experimental_CssVarsProvider,{...i,children:[jsx(O,{}),o]})},J=({children:o,cssVarPrefix:r="app",primaryColor:e="#4E5BEC",fontFamily:m="Public Sans",compactLayout:i=!0,contrast:t="default",navColor:a="integrate",navLayout:c="vertical",colorScheme:n="light"})=>{let _=A(),[S,p]=a$4(s.modeStorageKey,n,{serializer:u=>u.replaceAll('"',""),deserializer:u=>u.replaceAll('"',"")});a$4(`${s.modeStorageKey}-light`,"light"),a$4(`${s.modeStorageKey}-dark`,"dark");let y=useRef();return useEffect(()=>{y.current!==n&&(a$5(n),p(n)),y.current=n;},[p,n,S,_]),jsx(c$1,{primaryColor:e,fontFamily:m,compactLayout:i,contrast:t,navColor:a,navLayout:c,colorScheme:S,setColorScheme:p,children:jsx(H,{cssVarPrefix:r,children:o})})},Se=J;
|
|
31
|
+
|
|
32
|
+
export { s as a, z as b, E as c, Se as d };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b } from './chunk-FT5VGKNM.js';
|
|
2
|
+
import { useCallback, useEffect } from 'react';
|
|
3
|
+
import { useColorScheme } from '@mui/material/styles';
|
|
4
|
+
|
|
5
|
+
var u=t=>{typeof document<"u"&&document.documentElement.setAttribute("data-mui-color-scheme",t);};var a=()=>{let{mode:t,setMode:m}=useColorScheme(),{settings:{setColorScheme:c,colorScheme:e}}=b(),o=useCallback(r=>{m(r),c(r),u(r);},[m,c]);useEffect(()=>{e!==t&&o(e);},[e,t,o]);let h=useCallback(()=>{o(e==="light"?"dark":"light");},[e,o]);return {colorScheme:e,isDark:e==="dark",toggleTheme:h,setColorScheme:o}};
|
|
6
|
+
|
|
7
|
+
export { u as a, a as b };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { a } from '../../chunk-5OJQUX2T.js';
|
|
2
2
|
import '../../chunk-SHNFHORM.js';
|
|
3
|
-
import { d as d$1 } from '../../chunk-
|
|
3
|
+
import { d as d$1 } from '../../chunk-USODO2K6.js';
|
|
4
4
|
import '../../chunk-SO64ZYQB.js';
|
|
5
5
|
import '../../chunk-H7GUTAKH.js';
|
|
6
6
|
import '../../chunk-AIB3I5MO.js';
|
|
7
7
|
import '../../chunk-CFVUZ4S5.js';
|
|
8
8
|
import '../../chunk-HTXWJ57Q.js';
|
|
9
9
|
import '../../chunk-GUFT6XPG.js';
|
|
10
|
-
import '../../chunk-
|
|
10
|
+
import '../../chunk-XCFVMVLQ.js';
|
|
11
11
|
import '../../chunk-FT5VGKNM.js';
|
|
12
12
|
import { j } from '../../chunk-V2UHZWRE.js';
|
|
13
13
|
import '../../chunk-QQDMA4TE.js';
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { d as ThemeProvider, c as createTheme } from './chunk-
|
|
1
|
+
export { d as ThemeProvider, c as createTheme } from './chunk-USODO2K6.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';
|
|
5
5
|
import './chunk-CFVUZ4S5.js';
|
|
6
6
|
export { l as action, k as background, m as basePalette, p as colorSchemes, i as common, a as components, q as createShadowColor, r as customShadows, o as darkPalette, h as error, b as grey, e as info, n as lightPalette, c as primary, d as secondary, f as success, j as text, g as warning } from './chunk-HTXWJ57Q.js';
|
|
7
7
|
import './chunk-GUFT6XPG.js';
|
|
8
|
-
export { b as useThemeToggle } from './chunk-
|
|
8
|
+
export { b as useThemeToggle } from './chunk-XCFVMVLQ.js';
|
|
9
9
|
export { c as SettingsProvider, b as useSettingsContext } from './chunk-FT5VGKNM.js';
|
|
10
10
|
export { p as bgBlur, o as bgGradient, n as borderGradient, i as createPaletteChannel, g as hexToRgbChannel, h as hexToRgbaChannel, k as hideScrollX, l as hideScrollY, q as maxLine, b as mediaQueries, s as menuItem, r as paper, e as pxToRem, d as remToPx, f as responsiveFontSizes, c as setFont, a as stylesMode, m as textGradient, j as varAlpha } from './chunk-V2UHZWRE.js';
|
|
11
11
|
import './chunk-QQDMA4TE.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
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-USODO2K6.js';
|
|
2
2
|
import '../chunk-SO64ZYQB.js';
|
|
3
3
|
import '../chunk-H7GUTAKH.js';
|
|
4
4
|
import '../chunk-AIB3I5MO.js';
|
|
5
5
|
import '../chunk-CFVUZ4S5.js';
|
|
6
6
|
import '../chunk-HTXWJ57Q.js';
|
|
7
7
|
import '../chunk-GUFT6XPG.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-XCFVMVLQ.js';
|
|
9
9
|
export { b as useSettingsContext } from '../chunk-FT5VGKNM.js';
|
|
10
10
|
import '../chunk-V2UHZWRE.js';
|
|
11
11
|
import '../chunk-QQDMA4TE.js';
|
package/package.json
CHANGED
package/dist/chunk-6SAPVUB2.js
DELETED
|
@@ -1,32 +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$6 } from './chunk-GUFT6XPG.js';
|
|
6
|
-
import { a as a$5 } from './chunk-VXXEMZWX.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 { a as a$7 } from './chunk-S7QQBC4I.js';
|
|
11
|
-
import { useRef, useEffect, useMemo, useState } from 'react';
|
|
12
|
-
import O from '@mui/material/CssBaseline';
|
|
13
|
-
import { experimental_extendTheme, lighten, darken, Experimental_CssVarsProvider } from '@mui/material/styles';
|
|
14
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
15
|
-
|
|
16
|
-
function B(){let[o,r]=useState(!0);return a$7(()=>{let e=()=>r(!0),m=()=>r(!1);return window.addEventListener("focus",e),window.addEventListener("blur",m),()=>{window.removeEventListener("focus",e),window.removeEventListener("blur",m);}}),o}var V=B;var i={modeStorageKey:"mui-mode",defaultMode:"light"},z=`
|
|
17
|
-
(function() {
|
|
18
|
-
const modeStorageKey = '${i.modeStorageKey}';
|
|
19
|
-
const defaultMode = '${i.defaultMode}';
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
const storedMode = localStorage.getItem(modeStorageKey) || defaultMode;
|
|
23
|
-
const mode = ['light', 'dark'].includes(storedMode) ? storedMode : defaultMode;
|
|
24
|
-
|
|
25
|
-
document.documentElement.setAttribute('data-mui-color-scheme', mode);
|
|
26
|
-
} catch (e) {
|
|
27
|
-
document.documentElement.setAttribute('data-mui-color-scheme', defaultMode);
|
|
28
|
-
}
|
|
29
|
-
})();
|
|
30
|
-
`;var I=o=>({lighter:lighten(o,.815),light:lighten(o,.225),main:o,dark:darken(o,.15),darker:darken(o,.35),contrastText:"#000"});function W(o,r$1,e$1=""){let m=I(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:R},t=a$3(n,r$1),s={};return experimental_extendTheme(t,o,b(r$1),s)}function R(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],s=m[t]||m.global;return o.some(c=>s?.includes(c))}return o.some(t=>e?.includes(t))}var H=({children:o,cssVarPrefix:r})=>{let{settings:e}=b$1(),m=useMemo(()=>{let t=W(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),s=t.colorSchemes?.[e.colorScheme]?.palette;return s?t.palette=s:(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(O,{}),o]})},J=({children:o,cssVarPrefix:r="app",primaryColor:e="#4E5BEC",fontFamily:m="Public Sans",compactLayout:n=!0,contrast:t="default",navColor:s="integrate",navLayout:c="vertical",colorScheme:a="light"})=>{let S=V(),[d,p]=a$4(i.modeStorageKey,a,{serializer:u=>u.replaceAll('"',""),deserializer:u=>u.replaceAll('"',"")}),y=useRef();return useEffect(()=>{y.current!==a&&(console.log(`\u{1F3A8} update palette config: ${a}`,`* last value: ${d}`,`* is focused: ${S}`),a$5(a),p(a)),y.current=a;},[p,a,d,S]),jsx(c$1,{primaryColor:e,fontFamily:m,compactLayout:n,contrast:t,navColor:s,navLayout:c,colorScheme:d,setColorScheme:p,children:jsx(H,{cssVarPrefix:r,children:o})})},Se=J;
|
|
31
|
-
|
|
32
|
-
export { i as a, z as b, W as c, Se as d };
|
package/dist/chunk-VXXEMZWX.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { b } from './chunk-FT5VGKNM.js';
|
|
2
|
-
import { useCallback, useEffect } from 'react';
|
|
3
|
-
import { useColorScheme } from '@mui/material/styles';
|
|
4
|
-
|
|
5
|
-
var S=t=>{typeof document<"u"&&document.documentElement.setAttribute("data-mui-color-scheme",t);};var a=()=>{let{mode:t,setMode:m}=useColorScheme(),{settings:{setColorScheme:r,colorScheme:e}}=b(),o=useCallback(c=>{r(c),m(c);},[m,r]);useEffect(()=>{e!==t&&o(e);},[e,t,o]);let h=useCallback(()=>{o(e==="light"?"dark":"light");},[e,o]);return {colorScheme:e,isDark:e==="dark",toggleTheme:h,setColorScheme:o}};
|
|
6
|
-
|
|
7
|
-
export { S as a, a as b };
|