@zydon/common 2.5.68 → 2.5.69
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-42S2A5ST.js +7 -0
- package/dist/chunk-5FUXMHIG.js +9 -0
- package/dist/chunk-FHG3IGXY.js +10 -0
- package/dist/components/Common/index.js +3 -2
- package/dist/components/ThemeToggle/index.d.ts +15 -0
- package/dist/components/ThemeToggle/index.js +16 -0
- package/dist/components/upload/index.js +1 -1
- package/dist/settings-aa329cfb.d.ts +11 -0
- package/dist/theme/enhanced-theme-provider.d.ts +21 -0
- package/dist/theme/enhanced-theme-provider.js +22 -0
- package/dist/theme/settings-provider.d.ts +27 -0
- package/dist/theme/settings-provider.js +5 -0
- package/dist/theme/styles/index.d.ts +1 -1
- package/dist/theme/theme-provider.js +3 -2
- package/dist/theme/with-settings/index.d.ts +1 -10
- package/package.json +13 -1
- package/dist/chunk-IB2EDGUN.js +0 -13
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a } from './chunk-QQDMA4TE.js';
|
|
2
|
+
import { createContext, useContext, useCallback, useMemo } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var x=createContext(void 0),b=()=>{let a=useContext(x);if(!a)throw new Error("useSettingsContext deve ser usado dentro de um SettingsProvider");return a},R=({children:a$1,defaultSettings:i,storageKey:P="theme-settings"})=>{let[r,t]=a(P,i),g=useCallback(()=>typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),d=useCallback(()=>{let e=r.colorScheme==="light"?"dark":"light";t(o=>({...o,colorScheme:e}));},[r.colorScheme,t]),s=useCallback(e=>{t(o=>({...o,colorScheme:e}));},[t]),h=useCallback(e=>{t(o=>({...o,primaryColor:e}));},[t]),l=useCallback(e=>{t(o=>({...o,contrast:e}));},[t]),m=useCallback(e=>{t(o=>({...o,fontFamily:e}));},[t]),C=useCallback(e=>{t(o=>({...o,navLayout:e}));},[t]),u=useCallback(e=>{t(o=>({...o,navColor:e}));},[t]),S=useCallback(e=>{t(o=>({...o,compactLayout:e}));},[t]),p=useCallback(()=>{t(i);},[i,t]),v=useMemo(()=>JSON.stringify(r)!==JSON.stringify(i),[r,i]),y=useCallback(()=>{let e=g();r.colorScheme!==e&&s(e);},[g,r.colorScheme,s]),f=useCallback(()=>{if(typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>y();return e.addEventListener("change",o),()=>e.removeEventListener("change",o)}return ()=>{}},[y]);useMemo(()=>f(),[f]);let L=useMemo(()=>({settings:r,onToggleMode:d,onChangeMode:s,onChangePrimaryColor:h,onChangeContrast:l,onChangeFontFamily:m,onChangeNavLayout:C,onChangeNavColor:u,onChangeCompactLayout:S,onResetSettings:p,canReset:v}),[r,d,s,h,l,m,C,u,S,p,v]);return jsx(x.Provider,{value:L,children:a$1})};
|
|
6
|
+
|
|
7
|
+
export { x as a, b, R as c };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { b, a as a$1 } from './chunk-FHG3IGXY.js';
|
|
2
|
+
import { a } from './chunk-GUFT6XPG.js';
|
|
3
|
+
import l from '@mui/material/CssBaseline';
|
|
4
|
+
import { Experimental_CssVarsProvider } from '@mui/material/styles';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var h=({primaryColor:o,children:m,colorScheme:i="light",contrast:a$2="default",cssVarPrefix:s})=>{let p=b(a[1].systemValue,{primaryColor:o,colorScheme:i,contrast:a$2,navLayout:"vertical",navColor:"integrate",compactLayout:!0,fontFamily:"Public Sans"},s);return jsxs(Experimental_CssVarsProvider,{theme:p,defaultMode:"light",defaultColorScheme:"light",modeStorageKey:a$1.modeStorageKey,children:[jsx(l,{}),m]})},c=h;
|
|
8
|
+
|
|
9
|
+
export { c as a };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { a } from './chunk-SO64ZYQB.js';
|
|
2
|
+
import { a as a$1, e } from './chunk-BH5YHBAI.js';
|
|
3
|
+
import { a as a$3, b as b$1 } from './chunk-OSDHZZEM.js';
|
|
4
|
+
import { q, s, a as a$2 } from './chunk-FDP5MHVS.js';
|
|
5
|
+
import { c } from './chunk-D27ND54J.js';
|
|
6
|
+
import { experimental_extendTheme, lighten, darken } from '@mui/material/styles';
|
|
7
|
+
|
|
8
|
+
var k={modeStorageKey:"theme-mode",defaultMode:"light"};var g={};var C=e=>({lighter:lighten(e,.815),light:lighten(e,.225),main:e,dark:darken(e,.15),darker:darken(e,.35),contrastText:"#000"});function G(e$1,t,m=""){let o=C(t.primaryColor);a(q,"dark.palette.primary",o),a(q,"light.palette.primary",o);let s$1={colorSchemes:q,shadows:a$1(t.colorScheme),customShadows:s(t.colorScheme,o.main),shape:{borderRadius:8},components:a$2,typography:{...e,fontFamily:c(t.fontFamily)},cssVarPrefix:m,shouldSkipGeneratingVar:b},r=a$3(s$1,t);return experimental_extendTheme(r,e$1,b$1(t),g)}function b(e,t){let m=["mixins","overlays","direction","breakpoints","cssVarPrefix","unstable_sxConfig","typography"],o={global:["tonalOffset","dividerChannel","contrastThreshold"],grey:["A100","A200","A400","A700"],text:["icon"]};if(e[0]==="palette"){let r=e[1],a=o[r]||o.global;return e.some(S=>a?.includes(S))}return e.some(r=>m?.includes(r))}
|
|
9
|
+
|
|
10
|
+
export { k as a, G as b };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { a } from '../../chunk-
|
|
1
|
+
import { a } from '../../chunk-5FUXMHIG.js';
|
|
2
|
+
import '../../chunk-FHG3IGXY.js';
|
|
2
3
|
import '../../chunk-SO64ZYQB.js';
|
|
3
|
-
import '../../chunk-GUFT6XPG.js';
|
|
4
4
|
import '../../chunk-BH5YHBAI.js';
|
|
5
5
|
import '../../chunk-OSDHZZEM.js';
|
|
6
6
|
import '../../chunk-CFVUZ4S5.js';
|
|
7
7
|
import '../../chunk-FDP5MHVS.js';
|
|
8
|
+
import '../../chunk-GUFT6XPG.js';
|
|
8
9
|
import { i } from '../../chunk-D27ND54J.js';
|
|
9
10
|
import { a as a$1 } from '../../chunk-P26W2RT7.js';
|
|
10
11
|
import '../../chunk-QGFD5EQE.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
type ThemeToggleVariant = 'iconButton' | 'switch' | 'fab';
|
|
4
|
+
interface ThemeToggleProps {
|
|
5
|
+
variant?: ThemeToggleVariant;
|
|
6
|
+
size?: 'small' | 'medium' | 'large';
|
|
7
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'default';
|
|
8
|
+
tooltip?: boolean;
|
|
9
|
+
tooltipTitle?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const ThemeToggle: react.ForwardRefExoticComponent<ThemeToggleProps & react.RefAttributes<HTMLElement>>;
|
|
14
|
+
|
|
15
|
+
export { ThemeToggle, ThemeToggle as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { b } from '../../chunk-42S2A5ST.js';
|
|
2
|
+
import '../../chunk-QQDMA4TE.js';
|
|
3
|
+
import '../../chunk-Z2TDWMRU.js';
|
|
4
|
+
import '../../chunk-4INDXVIX.js';
|
|
5
|
+
import '../../chunk-3APKMSVD.js';
|
|
6
|
+
import { forwardRef } from 'react';
|
|
7
|
+
import w from '@mui/material/Fab';
|
|
8
|
+
import L from '@mui/material/IconButton';
|
|
9
|
+
import { useTheme } from '@mui/material/styles';
|
|
10
|
+
import B from '@mui/material/Switch';
|
|
11
|
+
import C from '@mui/material/Tooltip';
|
|
12
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
var h=()=>jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M12 18c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6zm0-10c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zM12 4c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM12 24c-.6 0-1-.4-1-1v-2c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM5.6 6.6c-.3 0-.6-.1-.8-.3L3.4 4.9c-.4-.4-.4-1 0-1.4s1-.4 1.4 0L6.2 4.9c.4.4.4 1 0 1.4-.2.2-.4.3-.6.3zM19.8 20.8c-.3 0-.6-.1-.8-.3L17.6 19.1c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.4 1.4c.4.4.4 1 0 1.4-.2.2-.4.3-.6.3zM3 13H1c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM23 13h-2c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM4.2 20.8c-.3 0-.6-.1-.8-.3-.4-.4-.4-1 0-1.4L4.8 17.7c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-1.4 1.4c-.2.2-.4.3-.6.3zM18.4 6.6c-.3 0-.6-.1-.8-.3-.4-.4-.4-1 0-1.4L19 3.5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L19 6.3c-.2.2-.4.3-.6.3z"})}),p=()=>jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M12.1 22c-5.5 0-10-4.5-10-10 0-5.3 4.1-9.7 9.4-10-.4.6-.6 1.3-.6 2 0 2.2 1.8 4 4 4 .7 0 1.4-.2 2-.6-.3 5.3-4.7 9.4-10 9.4-.3 0-.6 0-.8 0z"})}),u=forwardRef(({variant:l="iconButton",size:e="medium",color:t="inherit",tooltip:f=!0,tooltipTitle:T,className:i,disabled:s=!1,...a},m)=>{let r=useTheme(),{settings:M,onToggleMode:c}=b(),n=M.colorScheme==="dark",z=T||(n?"Alternar para modo claro":"Alternar para modo escuro"),g=(()=>{switch(l){case"switch":return jsx(B,{checked:n,onChange:c,size:e==="large"?"medium":e,color:t==="inherit"?"primary":t,disabled:s,className:i,...a});case"fab":return jsx(w,{ref:m,size:e,color:t==="inherit"?"primary":t,onClick:c,disabled:s,className:i,sx:{transition:r.transitions.create(["transform","background-color"],{duration:r.transitions.duration.shorter}),"&:hover":{transform:"scale(1.05)"}},...a,children:n?jsx(h,{}):jsx(p,{})});case"iconButton":default:return jsx(L,{ref:m,size:e,color:t,onClick:c,disabled:s,className:i,sx:{transition:r.transitions.create(["transform","color"],{duration:r.transitions.duration.shorter}),"&:hover":{transform:"rotate(180deg)"}},...a,children:n?jsx(h,{}):jsx(p,{})})}})();return f&&l!=="switch"?jsx(C,{title:z,arrow:!0,children:g}):g});u.displayName="ThemeToggle";var V=u;
|
|
15
|
+
|
|
16
|
+
export { u as ThemeToggle, V as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-F7LZTG5Z.js';
|
|
2
1
|
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-L6LOPBWU.js';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-F7LZTG5Z.js';
|
|
3
3
|
import { o } from '../../chunk-ISYQXE75.js';
|
|
4
4
|
export { p as RejectionFiles } from '../../chunk-ISYQXE75.js';
|
|
5
5
|
import '../../chunk-H5L4ARDB.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type SettingsState = {
|
|
2
|
+
primaryColor: string;
|
|
3
|
+
fontFamily: string;
|
|
4
|
+
compactLayout: boolean;
|
|
5
|
+
colorScheme: 'light' | 'dark';
|
|
6
|
+
contrast: 'default' | 'hight';
|
|
7
|
+
navColor: 'integrate' | 'apparent';
|
|
8
|
+
navLayout: 'vertical' | 'horizontal' | 'mini';
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { SettingsState as S };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { S as SettingsState } from '../settings-aa329cfb.js';
|
|
4
|
+
export { useSettingsContext } from './settings-provider.js';
|
|
5
|
+
|
|
6
|
+
type EnhancedThemeProviderProps = PropsWithChildren<{
|
|
7
|
+
defaultSettings?: Partial<SettingsState>;
|
|
8
|
+
storageKey?: string;
|
|
9
|
+
cssVarPrefix?: string;
|
|
10
|
+
enableSystemTheme?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
declare const EnhancedThemeProvider: ({ children, defaultSettings, storageKey, cssVarPrefix, enableSystemTheme, }: EnhancedThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare const CompatibleThemeProvider: ({ primaryColor, children, colorScheme, contrast, cssVarPrefix, }: PropsWithChildren<{
|
|
15
|
+
primaryColor: string;
|
|
16
|
+
colorScheme?: "dark" | "light" | undefined;
|
|
17
|
+
contrast?: "default" | "hight" | undefined;
|
|
18
|
+
cssVarPrefix?: string | undefined;
|
|
19
|
+
}>) => react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
export { CompatibleThemeProvider, EnhancedThemeProvider };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { c, b } from '../chunk-42S2A5ST.js';
|
|
2
|
+
export { b as useSettingsContext } from '../chunk-42S2A5ST.js';
|
|
3
|
+
import { b as b$1, a as a$1 } from '../chunk-FHG3IGXY.js';
|
|
4
|
+
import '../chunk-SO64ZYQB.js';
|
|
5
|
+
import '../chunk-BH5YHBAI.js';
|
|
6
|
+
import '../chunk-OSDHZZEM.js';
|
|
7
|
+
import '../chunk-CFVUZ4S5.js';
|
|
8
|
+
import '../chunk-FDP5MHVS.js';
|
|
9
|
+
import { a } from '../chunk-GUFT6XPG.js';
|
|
10
|
+
import '../chunk-D27ND54J.js';
|
|
11
|
+
import '../chunk-QQDMA4TE.js';
|
|
12
|
+
import '../chunk-Z2TDWMRU.js';
|
|
13
|
+
import '../chunk-4INDXVIX.js';
|
|
14
|
+
import '../chunk-3APKMSVD.js';
|
|
15
|
+
import { useMemo } from 'react';
|
|
16
|
+
import d from '@mui/material/CssBaseline';
|
|
17
|
+
import { Experimental_CssVarsProvider } from '@mui/material/styles';
|
|
18
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
19
|
+
|
|
20
|
+
var u=({children:a$2,cssVarPrefix:t,enableSystemTheme:r=!0})=>{let{settings:e}=b(),o=useMemo(()=>b$1(a[1].systemValue,{primaryColor:e.primaryColor,colorScheme:e.colorScheme,contrast:e.contrast,navLayout:e.navLayout,navColor:e.navColor,compactLayout:e.compactLayout,fontFamily:e.fontFamily},t),[e,t]),i=useMemo(()=>({theme:o,defaultMode:r?"system":e.colorScheme,defaultColorScheme:e.colorScheme,modeStorageKey:a$1.modeStorageKey,...r&&{colorSchemeStorageKey:`${a$1.modeStorageKey}-scheme`}}),[o,e.colorScheme,r]);return jsxs(Experimental_CssVarsProvider,{...i,children:[jsx(d,{}),a$2]})},f=({children:a,defaultSettings:t,storageKey:r="b2b-theme-settings",cssVarPrefix:e,enableSystemTheme:o=!0})=>{let i=useMemo(()=>({primaryColor:"#4E5BEC",fontFamily:"Public Sans",compactLayout:!0,colorScheme:"light",contrast:"default",navColor:"integrate",navLayout:"vertical",...t}),[t]);return jsx(c,{defaultSettings:i,storageKey:r,children:jsx(u,{cssVarPrefix:e,enableSystemTheme:o,children:a})})},E=({primaryColor:a,children:t,colorScheme:r="light",contrast:e="default",cssVarPrefix:o})=>jsx(f,{defaultSettings:{primaryColor:a,colorScheme:r,contrast:e},cssVarPrefix:o,enableSystemTheme:!1,children:t});
|
|
21
|
+
|
|
22
|
+
export { E as CompatibleThemeProvider, f as EnhancedThemeProvider };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
import { S as SettingsState } from '../settings-aa329cfb.js';
|
|
5
|
+
|
|
6
|
+
type SettingsContextValue = {
|
|
7
|
+
settings: SettingsState;
|
|
8
|
+
onToggleMode: () => void;
|
|
9
|
+
onChangeMode: (mode: 'light' | 'dark') => void;
|
|
10
|
+
onChangePrimaryColor: (color: string) => void;
|
|
11
|
+
onChangeContrast: (contrast: 'default' | 'hight') => void;
|
|
12
|
+
onChangeFontFamily: (fontFamily: string) => void;
|
|
13
|
+
onChangeNavLayout: (layout: 'vertical' | 'horizontal' | 'mini') => void;
|
|
14
|
+
onChangeNavColor: (color: 'integrate' | 'apparent') => void;
|
|
15
|
+
onChangeCompactLayout: (compact: boolean) => void;
|
|
16
|
+
onResetSettings: () => void;
|
|
17
|
+
canReset: boolean;
|
|
18
|
+
};
|
|
19
|
+
declare const SettingsContext: react.Context<SettingsContextValue | undefined>;
|
|
20
|
+
declare const useSettingsContext: () => SettingsContextValue;
|
|
21
|
+
type SettingsProviderProps = PropsWithChildren<{
|
|
22
|
+
defaultSettings: SettingsState;
|
|
23
|
+
storageKey?: string;
|
|
24
|
+
}>;
|
|
25
|
+
declare const SettingsProvider: ({ children, defaultSettings, storageKey, }: SettingsProviderProps) => react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { SettingsContext, SettingsContextValue, SettingsProvider, useSettingsContext };
|
|
@@ -443,7 +443,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
443
443
|
wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
|
|
444
444
|
writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
|
|
445
445
|
zIndex?: csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto")[] | undefined;
|
|
446
|
-
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly (
|
|
446
|
+
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
|
|
447
447
|
all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
|
|
448
448
|
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "auto" | "none" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
449
449
|
animationRange?: csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | readonly (string | (string & {}))[] | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { a as default } from '../chunk-
|
|
1
|
+
export { a as default } from '../chunk-5FUXMHIG.js';
|
|
2
|
+
import '../chunk-FHG3IGXY.js';
|
|
2
3
|
import '../chunk-SO64ZYQB.js';
|
|
3
|
-
import '../chunk-GUFT6XPG.js';
|
|
4
4
|
import '../chunk-BH5YHBAI.js';
|
|
5
5
|
import '../chunk-OSDHZZEM.js';
|
|
6
6
|
import '../chunk-CFVUZ4S5.js';
|
|
7
7
|
import '../chunk-FDP5MHVS.js';
|
|
8
|
+
import '../chunk-GUFT6XPG.js';
|
|
8
9
|
import '../chunk-D27ND54J.js';
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import * as _mui_material_styles from '@mui/material/styles';
|
|
2
2
|
import { Components, Theme } from '@mui/material/styles';
|
|
3
|
+
import { S as SettingsState } from '../../settings-aa329cfb.js';
|
|
3
4
|
import { a as ThemeUpdateOptions } from '../../types-dd2ed906.js';
|
|
4
5
|
import '@mui/material/styles/createTypography';
|
|
5
6
|
|
|
6
|
-
type SettingsState = {
|
|
7
|
-
primaryColor: string;
|
|
8
|
-
fontFamily: string;
|
|
9
|
-
compactLayout: boolean;
|
|
10
|
-
colorScheme: 'light' | 'dark';
|
|
11
|
-
contrast: 'default' | 'hight';
|
|
12
|
-
navColor: 'integrate' | 'apparent';
|
|
13
|
-
navLayout: 'vertical' | 'horizontal' | 'mini';
|
|
14
|
-
};
|
|
15
|
-
|
|
16
7
|
/**
|
|
17
8
|
* [1] settings @primaryColor
|
|
18
9
|
* [2] settings @contrast
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zydon/common",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.69",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -47,6 +47,18 @@
|
|
|
47
47
|
"import": "./dist/hooks/*.js",
|
|
48
48
|
"types": "./dist/hooks/*.d.ts"
|
|
49
49
|
},
|
|
50
|
+
"./theme/*": {
|
|
51
|
+
"import": "./dist/theme/*.js",
|
|
52
|
+
"types": "./dist/theme/*.d.ts"
|
|
53
|
+
},
|
|
54
|
+
"./theme/enhanced-theme-provider": {
|
|
55
|
+
"import": "./dist/theme/enhanced-theme-provider.js",
|
|
56
|
+
"types": "./dist/theme/enhanced-theme-provider.d.ts"
|
|
57
|
+
},
|
|
58
|
+
"./theme/settings-provider": {
|
|
59
|
+
"import": "./dist/theme/settings-provider.js",
|
|
60
|
+
"types": "./dist/theme/settings-provider.d.ts"
|
|
61
|
+
},
|
|
50
62
|
"./theme/ThemeProvider": {
|
|
51
63
|
"import": "./dist/theme/theme-provider.js",
|
|
52
64
|
"types": "./dist/theme/theme-provider.d.ts"
|
package/dist/chunk-IB2EDGUN.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-SO64ZYQB.js';
|
|
2
|
-
import { a } from './chunk-GUFT6XPG.js';
|
|
3
|
-
import { a as a$2, e } from './chunk-BH5YHBAI.js';
|
|
4
|
-
import { a as a$4, b as b$1 } from './chunk-OSDHZZEM.js';
|
|
5
|
-
import { q, s, a as a$3 } from './chunk-FDP5MHVS.js';
|
|
6
|
-
import { c } from './chunk-D27ND54J.js';
|
|
7
|
-
import A from '@mui/material/CssBaseline';
|
|
8
|
-
import { Experimental_CssVarsProvider, experimental_extendTheme, lighten, darken } from '@mui/material/styles';
|
|
9
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
-
|
|
11
|
-
var g={modeStorageKey:"theme-mode",defaultMode:"light"};var C={};var b=e=>({lighter:lighten(e,.815),light:lighten(e,.225),main:e,dark:darken(e,.15),darker:darken(e,.35),contrastText:"#000"});function S(e$1,t,m=""){let o=b(t.primaryColor);a$1(q,"dark.palette.primary",o),a$1(q,"light.palette.primary",o);let i={colorSchemes:q,shadows:a$2(t.colorScheme),customShadows:s(t.colorScheme,o.main),shape:{borderRadius:8},components:a$3,typography:{...e,fontFamily:c(t.fontFamily)},cssVarPrefix:m,shouldSkipGeneratingVar:k},r=a$4(i,t);return experimental_extendTheme(r,e$1,b$1(t),C)}function k(e,t){let m=["mixins","overlays","direction","breakpoints","cssVarPrefix","unstable_sxConfig","typography"],o={global:["tonalOffset","dividerChannel","contrastThreshold"],grey:["A100","A200","A400","A700"],text:["icon"]};if(e[0]==="palette"){let r=e[1],n=o[r]||o.global;return e.some(x=>n?.includes(x))}return e.some(r=>m?.includes(r))}var V=({primaryColor:e,children:t,colorScheme:m="light",contrast:o="default",cssVarPrefix:i})=>{let r=S(a[1].systemValue,{primaryColor:e,colorScheme:m,contrast:o,navLayout:"vertical",navColor:"integrate",compactLayout:!0,fontFamily:"Public Sans"},i);return jsxs(Experimental_CssVarsProvider,{theme:r,defaultMode:"light",defaultColorScheme:"light",modeStorageKey:g.modeStorageKey,children:[jsx(A,{}),t]})},H=V;
|
|
12
|
-
|
|
13
|
-
export { H as a };
|