@atomazing-org/design-system 1.0.7 → 1.0.9

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/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _emotion_styled from '@emotion/styled';
2
2
  import * as _emotion_react from '@emotion/react';
3
3
  import * as React$1 from 'react';
4
- import React__default, { ErrorInfo, FC } from 'react';
4
+ import React__default, { ErrorInfo, FC, PropsWithChildren } from 'react';
5
5
  import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
6
6
  import * as _mui_material from '@mui/material';
7
7
  import { Theme, PaletteMode } from '@mui/material';
@@ -36,36 +36,6 @@ declare const PathName: _emotion_styled.StyledComponent<{
36
36
  as?: React.ElementType;
37
37
  }, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
38
38
 
39
- /**
40
- * Validates whether a given string is a valid 3- or 6-digit hex color code (e.g., "#fff" or "#ffffff").
41
- *
42
- * @param value - The string to check.
43
- * @returns `true` if the string is a valid hex color; otherwise, `false`.
44
- */
45
- declare const isHexColor: (value: string) => boolean;
46
- /**
47
- * Determines the ideal font color (white or black) for contrast against a given background color.
48
- *
49
- * Uses luminance calculation (YIQ) to ensure accessibility and visual clarity.
50
- *
51
- * @param backgroundColor - A valid hex color (e.g., "#ffffff").
52
- * @returns A hex color string (`fontLight` or `fontDark`) suitable for overlay text.
53
- */
54
- declare const getFontColor: (backgroundColor: string) => string;
55
- /**
56
- * Determines whether the ideal font color for a background is light (i.e., white).
57
- *
58
- * @param color - The background color in hex.
59
- * @returns `true` if white text is recommended; otherwise, `false`.
60
- */
61
- declare const isFontLight: (color: string) => boolean;
62
-
63
- /**
64
- * Common component style overrides and default props shared across the design system.
65
- * This object should be spread into the `components` field of the MUI theme.
66
- */
67
- declare const commonComponentProps: Theme["components"];
68
-
69
39
  /**
70
40
  * Available options for dark mode configuration.
71
41
  * - `system`: Follows the operating system preference.
@@ -88,6 +58,12 @@ interface AppSettings {
88
58
  */
89
59
  darkMode: DarkModeOptions;
90
60
  }
61
+ interface ThemeContextProps {
62
+ theme: string;
63
+ darkMode: DarkModeOptions;
64
+ setTheme: (theme: string) => void;
65
+ setDarkMode: (mode: DarkModeOptions) => void;
66
+ }
91
67
 
92
68
  /**
93
69
  * Represents the theme mode as reported by the operating system or browser.
@@ -97,6 +73,40 @@ interface AppSettings {
97
73
  */
98
74
  type SystemTheme = "light" | "dark" | "unknown";
99
75
 
76
+ declare const useThemeSettings: () => ThemeContextProps;
77
+
78
+ declare const ThemeProviderWrapper: FC<PropsWithChildren>;
79
+
80
+ /**
81
+ * Validates whether a given string is a valid 3- or 6-digit hex color code (e.g., "#fff" or "#ffffff").
82
+ *
83
+ * @param value - The string to check.
84
+ * @returns `true` if the string is a valid hex color; otherwise, `false`.
85
+ */
86
+ declare const isHexColor: (value: string) => boolean;
87
+ /**
88
+ * Determines the ideal font color (white or black) for contrast against a given background color.
89
+ *
90
+ * Uses luminance calculation (YIQ) to ensure accessibility and visual clarity.
91
+ *
92
+ * @param backgroundColor - A valid hex color (e.g., "#ffffff").
93
+ * @returns A hex color string (`fontLight` or `fontDark`) suitable for overlay text.
94
+ */
95
+ declare const getFontColor: (backgroundColor: string) => string;
96
+ /**
97
+ * Determines whether the ideal font color for a background is light (i.e., white).
98
+ *
99
+ * @param color - The background color in hex.
100
+ * @returns `true` if white text is recommended; otherwise, `false`.
101
+ */
102
+ declare const isFontLight: (color: string) => boolean;
103
+
104
+ /**
105
+ * Common component style overrides and default props shared across the design system.
106
+ * This object should be spread into the `components` field of the MUI theme.
107
+ */
108
+ declare const commonComponentProps: Theme["components"];
109
+
100
110
  /**
101
111
  * Generates a custom MUI theme using a primary color, background color, and color mode.
102
112
  *
@@ -294,4 +304,10 @@ declare const timeAgoFromStart: (date: Date, lang?: string) => string;
294
304
  */
295
305
  declare const useResponsiveDisplay: (breakpoint?: number) => boolean;
296
306
 
297
- export { type AppSettings, ColorPalette, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, PathName, type SystemTheme, commonComponentProps, createCustomTheme, displayGreeting, fadeIn, fadeInLeft, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, slideIn, slideInBottom, systemInfo, themeConfig, themes, timeAgo, timeAgoFromStart, typographyProps, typographyVariants, useResponsiveDisplay };
307
+ /**
308
+ * A React hook to detect the system theme preference.
309
+ * @returns The current system theme ('light', 'dark', or 'unknown').
310
+ */
311
+ declare const useSystemTheme: () => SystemTheme;
312
+
313
+ export { type AppSettings, ColorPalette, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, PathName, type SystemTheme, type ThemeContextProps, ThemeProviderWrapper, commonComponentProps, createCustomTheme, displayGreeting, fadeIn, fadeInLeft, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, slideIn, slideInBottom, systemInfo, themeConfig, themes, timeAgo, timeAgoFromStart, typographyProps, typographyVariants, useResponsiveDisplay, useSystemTheme, useThemeSettings };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _emotion_styled from '@emotion/styled';
2
2
  import * as _emotion_react from '@emotion/react';
3
3
  import * as React$1 from 'react';
4
- import React__default, { ErrorInfo, FC } from 'react';
4
+ import React__default, { ErrorInfo, FC, PropsWithChildren } from 'react';
5
5
  import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
6
6
  import * as _mui_material from '@mui/material';
7
7
  import { Theme, PaletteMode } from '@mui/material';
@@ -36,36 +36,6 @@ declare const PathName: _emotion_styled.StyledComponent<{
36
36
  as?: React.ElementType;
37
37
  }, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
38
38
 
39
- /**
40
- * Validates whether a given string is a valid 3- or 6-digit hex color code (e.g., "#fff" or "#ffffff").
41
- *
42
- * @param value - The string to check.
43
- * @returns `true` if the string is a valid hex color; otherwise, `false`.
44
- */
45
- declare const isHexColor: (value: string) => boolean;
46
- /**
47
- * Determines the ideal font color (white or black) for contrast against a given background color.
48
- *
49
- * Uses luminance calculation (YIQ) to ensure accessibility and visual clarity.
50
- *
51
- * @param backgroundColor - A valid hex color (e.g., "#ffffff").
52
- * @returns A hex color string (`fontLight` or `fontDark`) suitable for overlay text.
53
- */
54
- declare const getFontColor: (backgroundColor: string) => string;
55
- /**
56
- * Determines whether the ideal font color for a background is light (i.e., white).
57
- *
58
- * @param color - The background color in hex.
59
- * @returns `true` if white text is recommended; otherwise, `false`.
60
- */
61
- declare const isFontLight: (color: string) => boolean;
62
-
63
- /**
64
- * Common component style overrides and default props shared across the design system.
65
- * This object should be spread into the `components` field of the MUI theme.
66
- */
67
- declare const commonComponentProps: Theme["components"];
68
-
69
39
  /**
70
40
  * Available options for dark mode configuration.
71
41
  * - `system`: Follows the operating system preference.
@@ -88,6 +58,12 @@ interface AppSettings {
88
58
  */
89
59
  darkMode: DarkModeOptions;
90
60
  }
61
+ interface ThemeContextProps {
62
+ theme: string;
63
+ darkMode: DarkModeOptions;
64
+ setTheme: (theme: string) => void;
65
+ setDarkMode: (mode: DarkModeOptions) => void;
66
+ }
91
67
 
92
68
  /**
93
69
  * Represents the theme mode as reported by the operating system or browser.
@@ -97,6 +73,40 @@ interface AppSettings {
97
73
  */
98
74
  type SystemTheme = "light" | "dark" | "unknown";
99
75
 
76
+ declare const useThemeSettings: () => ThemeContextProps;
77
+
78
+ declare const ThemeProviderWrapper: FC<PropsWithChildren>;
79
+
80
+ /**
81
+ * Validates whether a given string is a valid 3- or 6-digit hex color code (e.g., "#fff" or "#ffffff").
82
+ *
83
+ * @param value - The string to check.
84
+ * @returns `true` if the string is a valid hex color; otherwise, `false`.
85
+ */
86
+ declare const isHexColor: (value: string) => boolean;
87
+ /**
88
+ * Determines the ideal font color (white or black) for contrast against a given background color.
89
+ *
90
+ * Uses luminance calculation (YIQ) to ensure accessibility and visual clarity.
91
+ *
92
+ * @param backgroundColor - A valid hex color (e.g., "#ffffff").
93
+ * @returns A hex color string (`fontLight` or `fontDark`) suitable for overlay text.
94
+ */
95
+ declare const getFontColor: (backgroundColor: string) => string;
96
+ /**
97
+ * Determines whether the ideal font color for a background is light (i.e., white).
98
+ *
99
+ * @param color - The background color in hex.
100
+ * @returns `true` if white text is recommended; otherwise, `false`.
101
+ */
102
+ declare const isFontLight: (color: string) => boolean;
103
+
104
+ /**
105
+ * Common component style overrides and default props shared across the design system.
106
+ * This object should be spread into the `components` field of the MUI theme.
107
+ */
108
+ declare const commonComponentProps: Theme["components"];
109
+
100
110
  /**
101
111
  * Generates a custom MUI theme using a primary color, background color, and color mode.
102
112
  *
@@ -294,4 +304,10 @@ declare const timeAgoFromStart: (date: Date, lang?: string) => string;
294
304
  */
295
305
  declare const useResponsiveDisplay: (breakpoint?: number) => boolean;
296
306
 
297
- export { type AppSettings, ColorPalette, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, PathName, type SystemTheme, commonComponentProps, createCustomTheme, displayGreeting, fadeIn, fadeInLeft, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, slideIn, slideInBottom, systemInfo, themeConfig, themes, timeAgo, timeAgoFromStart, typographyProps, typographyVariants, useResponsiveDisplay };
307
+ /**
308
+ * A React hook to detect the system theme preference.
309
+ * @returns The current system theme ('light', 'dark', or 'unknown').
310
+ */
311
+ declare const useSystemTheme: () => SystemTheme;
312
+
313
+ export { type AppSettings, ColorPalette, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, PathName, type SystemTheme, type ThemeContextProps, ThemeProviderWrapper, commonComponentProps, createCustomTheme, displayGreeting, fadeIn, fadeInLeft, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, slideIn, slideInBottom, systemInfo, themeConfig, themes, timeAgo, timeAgoFromStart, typographyProps, typographyVariants, useResponsiveDisplay, useSystemTheme, useThemeSettings };
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";var mr=Object.create;var u=Object.defineProperty;var fr=Object.getOwnPropertyDescriptor;var cr=Object.getOwnPropertyNames;var xr=Object.getPrototypeOf,ur=Object.prototype.hasOwnProperty;var hr=(r,t)=>{for(var e in t)u(r,e,{get:t[e],enumerable:!0})},F=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of cr(t))!ur.call(r,n)&&n!==e&&u(r,n,{get:()=>t[n],enumerable:!(o=fr(t,n))||o.enumerable});return r};var c=(r,t,e)=>(e=r!=null?mr(xr(r)):{},F(t||!r||!r.__esModule?u(e,"default",{value:r,enumerable:!0}):e,r)),gr=r=>F(u({},"__esModule",{value:!0}),r);var wr={};hr(wr,{ColorPalette:()=>a,DialogBtn:()=>P,ErrorBoundary:()=>h,GlobalStyles:()=>N,Loading:()=>I,PathName:()=>A,commonComponentProps:()=>_,createCustomTheme:()=>S,displayGreeting:()=>tr,fadeIn:()=>j,fadeInLeft:()=>W,getDayIdentifier:()=>er,getFontColor:()=>m,installAppAnimation:()=>Q,isDarkMode:()=>H,isFontLight:()=>L,isHexColor:()=>M,logoutAnimation:()=>K,progressPulse:()=>J,pulseAnimation:()=>q,scale:()=>V,slideIn:()=>G,slideInBottom:()=>X,systemInfo:()=>nr,themeConfig:()=>b,themes:()=>z,timeAgo:()=>ir,timeAgoFromStart:()=>ar,typographyProps:()=>Z,typographyVariants:()=>rr,useResponsiveDisplay:()=>sr});module.exports=gr(wr);var T=c(require("@emotion/styled")),E=require("@mui/material"),P=(0,T.default)(E.Button)`
1
+ "use strict";var Ce=Object.create;var b=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Se=Object.getPrototypeOf,ve=Object.prototype.hasOwnProperty;var Me=(e,r)=>{for(var t in r)b(e,t,{get:r[t],enumerable:!0})},z=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of we(r))!ve.call(e,i)&&i!==t&&b(e,i,{get:()=>r[i],enumerable:!(o=Te(r,i))||o.enumerable});return e};var u=(e,r,t)=>(t=e!=null?Ce(Se(e)):{},z(r||!e||!e.__esModule?b(t,"default",{value:e,enumerable:!0}):t,e)),Pe=e=>z(b({},"__esModule",{value:!0}),e);var Oe={};Me(Oe,{ColorPalette:()=>s,DialogBtn:()=>H,ErrorBoundary:()=>_,GlobalStyles:()=>K,Loading:()=>G,PathName:()=>j,ThemeProviderWrapper:()=>_e,commonComponentProps:()=>S,createCustomTheme:()=>y,displayGreeting:()=>de,fadeIn:()=>re,fadeInLeft:()=>ee,getDayIdentifier:()=>ce,getFontColor:()=>x,installAppAnimation:()=>pe,isDarkMode:()=>v,isFontLight:()=>J,isHexColor:()=>B,logoutAnimation:()=>se,progressPulse:()=>ae,pulseAnimation:()=>ne,scale:()=>ie,slideIn:()=>te,slideInBottom:()=>oe,systemInfo:()=>xe,themeConfig:()=>w,themes:()=>h,timeAgo:()=>he,timeAgoFromStart:()=>ue,typographyProps:()=>le,typographyVariants:()=>me,useResponsiveDisplay:()=>ge,useSystemTheme:()=>E,useThemeSettings:()=>V});module.exports=Pe(Oe);var W=u(require("@emotion/styled")),N=require("@mui/material"),H=(0,W.default)(N.Button)`
2
2
  padding: 10px 16px;
3
3
  border-radius: 16px;
4
4
  font-size: 16px;
5
5
  margin: 8px;
6
- `;var $=c(require("react")),v=c(require("@emotion/styled")),w=c(require("@mui/icons-material/ErrorOutlineRounded")),x=require("@mui/material"),s=require("react/jsx-runtime"),h=class extends $.default.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,e){console.error("Error:",t),console.error("Error Info:",e)}render(){var o,n,i;let{state:t,props:e}=this;return t.hasError?(0,s.jsxs)(yr,{children:[(0,s.jsx)(br,{children:(0,s.jsx)(x.Box,{children:"\u041E\u0448\u0438\u0431\u043A\u0430.\xA0"})}),(0,s.jsxs)("h3",{children:[(0,s.jsxs)(x.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,s.jsx)(w.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","ERROR:"]})," ",(0,s.jsxs)(x.Box,{translate:"no",children:["[",(o=t.error)==null?void 0:o.name,"] ",(n=t.error)==null?void 0:n.message]}),(0,s.jsxs)(x.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,s.jsx)(w.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","Stack:"]})," ",(0,s.jsxs)(x.Box,{translate:"no",children:["[",(i=t.error)==null?void 0:i.stack,"]"]})]})]}):e.children}},yr=v.default.div`
6
+ `;var Y=u(require("react")),L=u(require("@emotion/styled")),O=u(require("@mui/icons-material/ErrorOutlineRounded")),g=require("@mui/material"),p=require("react/jsx-runtime"),_=class extends Y.default.Component{constructor(r){super(r),this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,t){console.error("Error:",r),console.error("Error Info:",t)}render(){var o,i,n;let{state:r,props:t}=this;return r.hasError?(0,p.jsxs)(De,{children:[(0,p.jsx)(Ee,{children:(0,p.jsx)(g.Box,{children:"\u041E\u0448\u0438\u0431\u043A\u0430.\xA0"})}),(0,p.jsxs)("h3",{children:[(0,p.jsxs)(g.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,p.jsx)(O.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","ERROR:"]})," ",(0,p.jsxs)(g.Box,{translate:"no",children:["[",(o=r.error)==null?void 0:o.name,"] ",(i=r.error)==null?void 0:i.message]}),(0,p.jsxs)(g.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,p.jsx)(O.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","Stack:"]})," ",(0,p.jsxs)(g.Box,{translate:"no",children:["[",(n=r.error)==null?void 0:n.stack,"]"]})]})]}):t.children}},De=L.default.div`
7
7
  margin: 0 8vw;
8
8
  @media (max-width: 768px) {
9
9
  margin: 0;
10
10
  }
11
- `,br=v.default.h1`
11
+ `,Ee=L.default.h1`
12
12
  margin-top: 32px;
13
13
  margin-bottom: 32px;
14
14
  font-size: 36px;
@@ -24,7 +24,7 @@
24
24
  margin-top: 0;
25
25
  margin-bottom: 0;
26
26
  }
27
- `;var g=require("react"),B=c(require("@emotion/styled")),y=require("@mui/material"),d=require("react/jsx-runtime"),I=()=>{let[r,t]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{let e=setTimeout(()=>{t(!0)},100);return()=>clearTimeout(e)},[]),(0,d.jsx)(_r,{children:r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.CircularProgress,{"aria-label":"loading",size:80,thickness:4}),(0,d.jsx)("h3",{style:{opacity:.8},children:"Loading Page..."})]})})},_r=(0,B.default)(y.Box)`
27
+ `;var k=require("react"),U=u(require("@emotion/styled")),C=require("@mui/material"),f=require("react/jsx-runtime"),G=()=>{let[e,r]=(0,k.useState)(!1);return(0,k.useEffect)(()=>{let t=setTimeout(()=>{r(!0)},100);return()=>clearTimeout(t)},[]),(0,f.jsx)(Fe,{children:e&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(C.CircularProgress,{"aria-label":"loading",size:80,thickness:4}),(0,f.jsx)("h3",{style:{opacity:.8},children:"Loading Page..."})]})})},Fe=(0,U.default)(C.Box)`
28
28
  position: absolute;
29
29
  top: 50%;
30
30
  left: 50%;
@@ -35,18 +35,18 @@
35
35
  flex-direction: column;
36
36
  text-align: center;
37
37
  gap: 8px;
38
- `;var O=c(require("@emotion/styled")),A=O.default.code`
38
+ `;var X=u(require("@emotion/styled")),j=X.default.code`
39
39
  background: #000000c8;
40
40
  color: white;
41
41
  padding: 4px 6px;
42
42
  border-radius: 8px;
43
- `;var a={fontDark:"#101727",fontLight:"#f0f0f0",darkMode:"#383838",lightMode:"#ffffff",purple:"#b624ff",red:"#ff3131",orange:"#ff9318",orangeDark:"#ff9500"},b={"Dark Purple":{primaryColor:a.purple},"Light Purple":{primaryColor:a.purple,secondaryColor:"#edeef6"},"Dark Blue":{primaryColor:"#106cff",secondaryColor:"#090815"},"Light Blue":{primaryColor:"#278ad2",secondaryColor:"#dddaf6"},"Dark Pink":{primaryColor:"#f2369d",secondaryColor:"#191218"},"Light Pink":{primaryColor:"#e5369a",secondaryColor:"#ffe3ff"},"Blush Blossom":{primaryColor:"#EC407A",secondaryColor:"#FCE4EC"},Cheesecake:{primaryColor:"#E14C94",secondaryColor:"#FDF0D5"},"Mystic Coral":{primaryColor:"#ff7b9c",secondaryColor:"#4a2333"},"Dark Orange":{primaryColor:"#FF5631",secondaryColor:"#0D0D0D"},"Light Orange":{primaryColor:"#F26E56",secondaryColor:"#F6F6F6"},Aurora:{primaryColor:"#00e952",secondaryColor:"#011926"}};var M=r=>/^#([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$/.test(r),m=r=>{if(!M(r))return console.error("Invalid hex color provided:",r),a.fontDark;let t=r.slice(1),e=t.length===3?t.split("").map(f=>f+f).join(""):t,o=Number.parseInt(e.slice(0,2),16),n=Number.parseInt(e.slice(2,4),16),i=Number.parseInt(e.slice(4,6),16);return Math.round((o*299+n*587+i*114)/1e3)>128?a.fontDark:a.fontLight},L=r=>m(r)===a.fontLight;var _={MuiTooltip:{defaultProps:{disableInteractive:!0},styleOverrides:{tooltip:({theme:r})=>({color:r.palette.mode==="dark"?"#fff":"#000",backgroundColor:r.palette.mode==="dark"?"#141431dd":"#ededf3dd",backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)",padding:"8px 16px",borderRadius:"8px",fontSize:"12px"})}},MuiButton:{styleOverrides:{root:{padding:"12px 24px",borderRadius:"14px"},contained:{boxShadow:"none"}}},MuiSkeleton:{styleOverrides:{root:{borderRadius:"24px"}}},MuiSelect:{styleOverrides:{root:{borderRadius:"18px"},select:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px"}}},MuiDialog:{defaultProps:{slotProps:{paper:{style:{padding:"12px",borderRadius:"24px",minWidth:"400px"}}}},styleOverrides:{root:{"& .MuiDialog-container":{backdropFilter:"blur(4px)"}}}},MuiAvatar:{styleOverrides:{root:{fontWeight:500,color:"#fff"}}},MuiAlert:{styleOverrides:{root:{borderRadius:"16px"}}},MuiTextField:{styleOverrides:{root:{"& .MuiInputBase-root":{borderRadius:"16px"}}}},MuiPaper:{styleOverrides:{elevation8:{borderRadius:"16px"}}},MuiBottomNavigationAction:{styleOverrides:{root:{padding:"12px",margin:0,maxHeight:"none"}}},MuiSlider:{styleOverrides:{valueLabel:({theme:r})=>({borderRadius:"10px",padding:"6px 14px",color:r.palette.mode==="dark"?"#fff":"#000",backgroundColor:r.palette.mode==="dark"?"#141431dd":"#ededf3dd","&::before, &::after":{display:"none"}})}},MuiCircularProgress:{styleOverrides:{circle:{strokeLinecap:"round"}}},MuiAccordion:{styleOverrides:{root:{"&::before":{display:"none"}}}}};var R=require("@mui/material");var S=(r,t="#232e58",e="dark")=>(0,R.createTheme)({palette:{primary:{main:r},secondary:{main:t},warning:{main:e==="dark"?a.orange:a.orangeDark},error:{main:a.red},mode:e},components:{..._}}),z=Object.entries(b).map(([r,t])=>({name:r,MuiTheme:S(t.primaryColor,t.secondaryColor)})),H=(r,t,e)=>{switch(r){case"light":return!1;case"dark":return!0;case"system":return t==="dark";case"auto":return m(e)===a.fontLight;default:return!1}};var D=require("react"),k=require("@emotion/react"),Y=require("@mui/material/styles");var U=require("react/jsx-runtime"),N=()=>{let r=(0,Y.useTheme)(),t=r.palette.mode==="dark",e=r.palette.primary.main,o=r.palette.secondary.main,n=(0,D.useMemo)(()=>m(e),[e]),i=(0,D.useMemo)(()=>m(o),[o]);return(0,U.jsx)(k.Global,{styles:k.css`
43
+ `;var T=require("react"),$=(0,T.createContext)(void 0),V=()=>{let e=(0,T.useContext)($);if(!e)throw new Error("useThemeSettings must be used within ThemeProviderWrapper");return e};var c=require("react"),ye=require("@emotion/react"),be=require("@mui/material/styles");var s={fontDark:"#101727",fontLight:"#f0f0f0",darkMode:"#383838",lightMode:"#ffffff",purple:"#b624ff",red:"#ff3131",orange:"#ff9318",orangeDark:"#ff9500"},w={"Dark Purple":{primaryColor:s.purple},"Light Purple":{primaryColor:s.purple,secondaryColor:"#edeef6"},"Dark Blue":{primaryColor:"#106cff",secondaryColor:"#090815"},"Light Blue":{primaryColor:"#278ad2",secondaryColor:"#dddaf6"},"Dark Pink":{primaryColor:"#f2369d",secondaryColor:"#191218"},"Light Pink":{primaryColor:"#e5369a",secondaryColor:"#ffe3ff"},"Blush Blossom":{primaryColor:"#EC407A",secondaryColor:"#FCE4EC"},Cheesecake:{primaryColor:"#E14C94",secondaryColor:"#FDF0D5"},"Mystic Coral":{primaryColor:"#ff7b9c",secondaryColor:"#4a2333"},"Dark Orange":{primaryColor:"#FF5631",secondaryColor:"#0D0D0D"},"Light Orange":{primaryColor:"#F26E56",secondaryColor:"#F6F6F6"},Aurora:{primaryColor:"#00e952",secondaryColor:"#011926"}};var B=e=>/^#([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$/.test(e),x=e=>{if(!B(e))return console.error("Invalid hex color provided:",e),s.fontDark;let r=e.slice(1),t=r.length===3?r.split("").map(l=>l+l).join(""):r,o=Number.parseInt(t.slice(0,2),16),i=Number.parseInt(t.slice(2,4),16),n=Number.parseInt(t.slice(4,6),16);return Math.round((o*299+i*587+n*114)/1e3)>128?s.fontDark:s.fontLight},J=e=>x(e)===s.fontLight;var S={MuiTooltip:{defaultProps:{disableInteractive:!0},styleOverrides:{tooltip:({theme:e})=>({color:e.palette.mode==="dark"?"#fff":"#000",backgroundColor:e.palette.mode==="dark"?"#141431dd":"#ededf3dd",backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)",padding:"8px 16px",borderRadius:e.shape.borderRadius,fontSize:"12px"})}},MuiButton:{styleOverrides:{root:({theme:e})=>({padding:"12px 24px",borderRadius:e.shape.borderRadius}),contained:{boxShadow:"none"}}},MuiSkeleton:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiSelect:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius}),select:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px"}}},MuiDialog:{defaultProps:{slotProps:{paper:{style:{padding:"12px",borderRadius:24,minWidth:"400px"}}}},styleOverrides:{root:{"& .MuiDialog-container":{backdropFilter:"blur(4px)"}}}},MuiAvatar:{styleOverrides:{root:{fontWeight:500,color:"#fff"}}},MuiAlert:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiTextField:{styleOverrides:{root:({theme:e})=>({"& .MuiInputBase-root":{borderRadius:e.shape.borderRadius}})}},MuiPaper:{styleOverrides:{elevation8:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiBottomNavigationAction:{styleOverrides:{root:{padding:"12px",margin:0,maxHeight:"none"}}},MuiSlider:{styleOverrides:{valueLabel:({theme:e})=>({borderRadius:e.shape.borderRadius,padding:"6px 14px",color:e.palette.mode==="dark"?"#fff":"#000",backgroundColor:e.palette.mode==="dark"?"#141431dd":"#ededf3dd","&::before, &::after":{display:"none"}})}},MuiCircularProgress:{styleOverrides:{circle:{strokeLinecap:"round"}}},MuiAccordion:{styleOverrides:{root:{"&::before":{display:"none"}}}}};var Q=require("@mui/material");var y=(e,r="#232e58",t="dark")=>(0,Q.createTheme)({palette:{primary:{main:e},secondary:{main:r},warning:{main:t==="dark"?s.orange:s.orangeDark},error:{main:s.red},mode:t},components:{...S},shape:{borderRadius:24}}),h=Object.entries(w).map(([e,r])=>({name:e,MuiTheme:y(r.primaryColor,r.secondaryColor)})),v=(e,r,t)=>{switch(e){case"light":return!1;case"dark":return!0;case"system":return r==="dark";case"auto":return x(t)===s.fontLight;default:return!1}};var A=require("react"),M=require("@emotion/react"),q=require("@mui/material/styles");var Z=require("react/jsx-runtime"),K=()=>{let e=(0,q.useTheme)(),r=e.palette.mode==="dark",t=e.palette.primary.main,o=e.palette.secondary.main,i=(0,A.useMemo)(()=>x(t),[t]),n=(0,A.useMemo)(()=>x(o),[o]);return(0,Z.jsx)(M.Global,{styles:M.css`
44
44
  * {
45
45
  font-family: "Poppins", sans-serif !important;
46
46
  -webkit-tap-highlight-color: transparent;
47
47
  &::selection {
48
- background-color: ${`${e}e1`};
49
- color: ${n};
48
+ background-color: ${`${t}e1`};
49
+ color: ${i};
50
50
  }
51
51
  }
52
52
 
@@ -55,8 +55,8 @@
55
55
  font-family: "Poppins", sans-serif;
56
56
  line-height: 1.5;
57
57
  font-weight: 400;
58
- color-scheme: ${t?"dark":"light"};
59
- color: ${i};
58
+ color-scheme: ${r?"dark":"light"};
59
+ color: ${n};
60
60
  font-synthesis: none;
61
61
  text-rendering: optimizeLegibility;
62
62
  -webkit-font-smoothing: antialiased;
@@ -64,7 +64,7 @@
64
64
  -webkit-text-size-adjust: 100%;
65
65
 
66
66
  --rsbs-backdrop-bg: rgba(0, 0, 0, 0.3);
67
- --rsbs-bg: ${t?"#383838":"#ffffff"};
67
+ --rsbs-bg: ${r?"#383838":"#ffffff"};
68
68
  }
69
69
 
70
70
  body {
@@ -81,11 +81,11 @@
81
81
  background-color: ${o};
82
82
  }
83
83
  ::-webkit-scrollbar-thumb {
84
- background-color: ${e};
84
+ background-color: ${t};
85
85
  border-radius: 64px;
86
86
  }
87
87
  ::-webkit-scrollbar-thumb:hover {
88
- background-color: ${`${e}d8`};
88
+ background-color: ${`${t}d8`};
89
89
  }
90
90
  ::-webkit-scrollbar-track {
91
91
  border-radius: 64px;
@@ -157,11 +157,11 @@
157
157
  width: 60px;
158
158
  height: 6px;
159
159
  border-radius: 100px;
160
- background: ${t?"#717171":"#cfcfcf"};
160
+ background: ${r?"#717171":"#cfcfcf"};
161
161
  margin-top: 3px;
162
162
  }
163
163
  }
164
- `})};var l=require("@emotion/react"),W=l.keyframes`
164
+ `})};var d=require("@emotion/react"),ee=d.keyframes`
165
165
  from {
166
166
  opacity: 0;
167
167
  transform: translateX(-40px);
@@ -170,58 +170,58 @@
170
170
  opacity: 1;
171
171
  transform: translateX(0);
172
172
  }
173
- `,j=l.keyframes`
173
+ `,re=d.keyframes`
174
174
  from {
175
175
  opacity: 0;
176
176
  }
177
177
  to {
178
178
  opacity: 1;
179
179
  }
180
- `,G=l.keyframes`
180
+ `,te=d.keyframes`
181
181
  from {
182
182
  transform: translateX(-100%);
183
183
  }
184
184
  to {
185
185
  transform: translateX(0);
186
186
  }
187
- `,X=l.keyframes`
187
+ `,oe=d.keyframes`
188
188
  from {
189
189
  transform: translateY(100%);
190
190
  }
191
191
  to {
192
192
  transform: translateY(0);
193
193
  }
194
- `,V=l.keyframes`
194
+ `,ie=d.keyframes`
195
195
  from {
196
196
  transform: scale(0);
197
197
  }
198
198
  to {
199
199
  transform: scale(1);
200
200
  }
201
- `,q=(r,t=12)=>l.keyframes`
201
+ `,ne=(e,r=12)=>d.keyframes`
202
202
  0% {
203
203
  transform: scale(0.95);
204
- box-shadow: 0 0 0 0 ${r}b2;
204
+ box-shadow: 0 0 0 0 ${e}b2;
205
205
  }
206
206
  70% {
207
207
  transform: scale(1);
208
- box-shadow: 0 0 0 ${t}px ${r}00;
208
+ box-shadow: 0 0 0 ${r}px ${e}00;
209
209
  }
210
210
  100% {
211
211
  transform: scale(0.95);
212
- box-shadow: 0 0 0 0 ${r}00;
212
+ box-shadow: 0 0 0 0 ${e}00;
213
213
  }
214
- `,J=r=>l.keyframes`
214
+ `,ae=e=>d.keyframes`
215
215
  0% {
216
216
  filter: none;
217
217
  }
218
218
  50% {
219
- filter: drop-shadow(0 0 10px ${r}78);
219
+ filter: drop-shadow(0 0 10px ${e}78);
220
220
  }
221
221
  100% {
222
222
  filter: none;
223
223
  }
224
- `,K=l.keyframes`
224
+ `,se=d.keyframes`
225
225
  0% {
226
226
  transform: scale(1);
227
227
  opacity: 1;
@@ -234,7 +234,7 @@
234
234
  transform: scale(1);
235
235
  opacity: 1;
236
236
  }
237
- `,Q=l.keyframes`
237
+ `,pe=d.keyframes`
238
238
  0% {
239
239
  transform: translateY(0);
240
240
  }
@@ -250,5 +250,5 @@
250
250
  100% {
251
251
  transform: translateY(0);
252
252
  }
253
- `;var Z={MuiTypography:{defaultProps:{variantMapping:{...Object.fromEntries(["xl","lg","md","sm","xs","2xs"].flatMap(r=>[[`text_${r}_regular`,"p"],[`text_${r}_bold`,"p"],[`text_${r}_semibold`,"p"],[`text_${r}_thin`,"p"]])),display_2xl_regular:"h1",display_xl_regular:"h2",display_lg_regular:"h3",display_md_regular:"h4",display_sm_regular:"h5",display_xs_regular:"h6",display_2xl_bold:"h1",display_xl_bold:"h2",display_lg_bold:"h3",display_md_bold:"h4",display_sm_bold:"h5",display_xs_bold:"h6"}}}},rr={text_xl_regular:{font:"400 20px/30px inherit inherit"},text_lg_regular:{font:"400 18px/28px inherit inherit"},text_md_regular:{font:"400 16px/24px inherit inherit"},text_sm_regular:{font:"400 14px/20px inherit inherit"},text_xs_regular:{font:"400 12px/18px inherit inherit"},text_2xs_regular:{font:"400 10px/14px inherit inherit"},text_xl_bold:{font:"600 20px/30px inherit inherit"},text_lg_bold:{font:"700 18px/28px inherit inherit"},text_md_bold:{font:"700 16px/24px inherit inherit"},text_sm_bold:{font:"700 14px/20px inherit inherit"},text_xs_bold:{font:"700 12px/18px inherit inherit"},text_2xs_bold:{font:"700 10px/14px inherit inherit"},text_xl_semibold:{font:"600 20px/30px inherit inherit"},text_lg_semibold:{font:"600 18px/28px inherit inherit"},text_md_semibold:{font:"600 16px/24px inherit inherit"},text_sm_semibold:{font:"600 14px/20px inherit inherit"},text_xs_semibold:{font:"600 12px/18px inherit inherit"},text_2xs_semibold:{font:"600 10px/14px inherit inherit"},text_xl_thin:{font:"100 20px/30px inherit inherit"},text_lg_thin:{font:"100 18px/28px inherit inherit"},text_md_thin:{font:"100 16px/24px inherit inherit"},text_sm_thin:{font:"100 14px/20px inherit inherit"},text_xs_thin:{font:"100 12px/18px inherit inherit"},text_2xs_thin:{font:"100 10px/14px inherit inherit"},display_2xl_regular:{font:"400 72px/90px inherit inherit"},display_xl_regular:{font:"400 60px/72px inherit inherit"},display_lg_regular:{font:"400 48px/60px inherit inherit"},display_md_regular:{font:"400 36px/44px inherit inherit"},display_sm_regular:{font:"400 30px/38px inherit inherit"},display_xs_regular:{font:"400 24px/32px inherit inherit"},display_2xl_bold:{font:"700 72px/90px inherit inherit"},display_xl_bold:{font:"700 60px/72px inherit inherit"},display_lg_bold:{font:"700 48px/60px inherit inherit"},display_md_bold:{font:"700 36px/44px inherit inherit"},display_sm_bold:{font:"700 30px/38px inherit inherit"},display_xs_bold:{font:"700 24px/32px inherit inherit"}};var tr=()=>{let t=new Date().getHours(),e;return t<12&&t>=5?e="\u0414\u043E\u0431\u0440\u043E\u0435 \u0443\u0442\u0440\u043E,":t<18&&t>12?e="\u0414\u043E\u0431\u0440\u044B\u0439 \u0434\u0435\u043D\u044C,":e="\u0414\u043E\u0431\u0440\u044B\u0439 \u0432\u0435\u0447\u0435\u0440,",e};var er=r=>{let t=r.getFullYear(),e=String(r.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0");return`${t}-${e}-${o}`};var{userAgent:or}=globalThis.navigator,kr=()=>{let r=or.toLowerCase();return r.includes("windows nt")?"Windows":r.includes("iphone")||r.includes("ipad")||r.includes("ipod")?"iOS":r.includes("mac")?"macOS":r.includes("android")?"Android":r.includes("linux")?"Linux":"Unknown"},Cr=()=>{let r=or.toLowerCase();return r.includes("edg")?"Edge":r.includes("chrome")?"Chrome":r.includes("firefox")?"Firefox":r.includes("safari")?"Safari":"Unknown"},nr={os:kr(),browser:Cr()};var ir=(r,t=navigator.language||"en-US")=>{let e=new Date;r=new Date(r);let o=Math.floor((e.getTime()-r.getTime())/1e3),n=new Intl.RelativeTimeFormat(t,{numeric:"auto"});if(o<60)return n.format(-o,"second");if(o<3600){let p=Math.floor(o/60);return n.format(-p,"minute")}if(o<86400){let p=Math.floor(o/3600);return n.format(-p,"hour")}let i=Math.floor(o/86400);return n.format(-i,"day")},ar=(r,t=navigator.language||"en-US")=>{let e=new Date;r=new Date(r);let o=(r.getTime()-e.getTime())/1e3,n=Math.floor(o/(60*60)),i=Math.floor((o-60*60*n)/60),p=Math.floor(o-60*60*n-60*i),f=new Intl.RelativeTimeFormat(t,{numeric:"auto"});if(i===0&&p<60)return f.format(p,"second");if(n===0&&i<60)return f.format(i,"minute");if(n<24){let pr=`${new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(n,"hour")}`,dr=` ${new Intl.RelativeTimeFormat(t,{localeMatcher:"lookup",numeric:"always",style:"long"}).format(i,"minute")}`.replace(/^\D+/,"");return`${pr} ${dr}`}let lr=Math.floor(p/86400);return f.format(lr,"day")};var C=require("react"),sr=(r=768)=>{let[t,e]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{let o=()=>{e(window.innerWidth<r)};o();let n=()=>o();return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[r]),t};0&&(module.exports={ColorPalette,DialogBtn,ErrorBoundary,GlobalStyles,Loading,PathName,commonComponentProps,createCustomTheme,displayGreeting,fadeIn,fadeInLeft,getDayIdentifier,getFontColor,installAppAnimation,isDarkMode,isFontLight,isHexColor,logoutAnimation,progressPulse,pulseAnimation,scale,slideIn,slideInBottom,systemInfo,themeConfig,themes,timeAgo,timeAgoFromStart,typographyProps,typographyVariants,useResponsiveDisplay});
253
+ `;var le={MuiTypography:{defaultProps:{variantMapping:{...Object.fromEntries(["xl","lg","md","sm","xs","2xs"].flatMap(e=>[[`text_${e}_regular`,"p"],[`text_${e}_bold`,"p"],[`text_${e}_semibold`,"p"],[`text_${e}_thin`,"p"]])),display_2xl_regular:"h1",display_xl_regular:"h2",display_lg_regular:"h3",display_md_regular:"h4",display_sm_regular:"h5",display_xs_regular:"h6",display_2xl_bold:"h1",display_xl_bold:"h2",display_lg_bold:"h3",display_md_bold:"h4",display_sm_bold:"h5",display_xs_bold:"h6"}}}},me={text_xl_regular:{font:"400 20px/30px inherit inherit"},text_lg_regular:{font:"400 18px/28px inherit inherit"},text_md_regular:{font:"400 16px/24px inherit inherit"},text_sm_regular:{font:"400 14px/20px inherit inherit"},text_xs_regular:{font:"400 12px/18px inherit inherit"},text_2xs_regular:{font:"400 10px/14px inherit inherit"},text_xl_bold:{font:"600 20px/30px inherit inherit"},text_lg_bold:{font:"700 18px/28px inherit inherit"},text_md_bold:{font:"700 16px/24px inherit inherit"},text_sm_bold:{font:"700 14px/20px inherit inherit"},text_xs_bold:{font:"700 12px/18px inherit inherit"},text_2xs_bold:{font:"700 10px/14px inherit inherit"},text_xl_semibold:{font:"600 20px/30px inherit inherit"},text_lg_semibold:{font:"600 18px/28px inherit inherit"},text_md_semibold:{font:"600 16px/24px inherit inherit"},text_sm_semibold:{font:"600 14px/20px inherit inherit"},text_xs_semibold:{font:"600 12px/18px inherit inherit"},text_2xs_semibold:{font:"600 10px/14px inherit inherit"},text_xl_thin:{font:"100 20px/30px inherit inherit"},text_lg_thin:{font:"100 18px/28px inherit inherit"},text_md_thin:{font:"100 16px/24px inherit inherit"},text_sm_thin:{font:"100 14px/20px inherit inherit"},text_xs_thin:{font:"100 12px/18px inherit inherit"},text_2xs_thin:{font:"100 10px/14px inherit inherit"},display_2xl_regular:{font:"400 72px/90px inherit inherit"},display_xl_regular:{font:"400 60px/72px inherit inherit"},display_lg_regular:{font:"400 48px/60px inherit inherit"},display_md_regular:{font:"400 36px/44px inherit inherit"},display_sm_regular:{font:"400 30px/38px inherit inherit"},display_xs_regular:{font:"400 24px/32px inherit inherit"},display_2xl_bold:{font:"700 72px/90px inherit inherit"},display_xl_bold:{font:"700 60px/72px inherit inherit"},display_lg_bold:{font:"700 48px/60px inherit inherit"},display_md_bold:{font:"700 36px/44px inherit inherit"},display_sm_bold:{font:"700 30px/38px inherit inherit"},display_xs_bold:{font:"700 24px/32px inherit inherit"}};var de=()=>{let r=new Date().getHours(),t;return r<12&&r>=5?t="\u0414\u043E\u0431\u0440\u043E\u0435 \u0443\u0442\u0440\u043E,":r<18&&r>12?t="\u0414\u043E\u0431\u0440\u044B\u0439 \u0434\u0435\u043D\u044C,":t="\u0414\u043E\u0431\u0440\u044B\u0439 \u0432\u0435\u0447\u0435\u0440,",t};var ce=e=>{let r=e.getFullYear(),t=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${r}-${t}-${o}`};var{userAgent:fe}=globalThis.navigator,Re=()=>{let e=fe.toLowerCase();return e.includes("windows nt")?"Windows":e.includes("iphone")||e.includes("ipad")||e.includes("ipod")?"iOS":e.includes("mac")?"macOS":e.includes("android")?"Android":e.includes("linux")?"Linux":"Unknown"},Ie=()=>{let e=fe.toLowerCase();return e.includes("edg")?"Edge":e.includes("chrome")?"Chrome":e.includes("firefox")?"Firefox":e.includes("safari")?"Safari":"Unknown"},xe={os:Re(),browser:Ie()};var he=(e,r=navigator.language||"en-US")=>{let t=new Date;e=new Date(e);let o=Math.floor((t.getTime()-e.getTime())/1e3),i=new Intl.RelativeTimeFormat(r,{numeric:"auto"});if(o<60)return i.format(-o,"second");if(o<3600){let a=Math.floor(o/60);return i.format(-a,"minute")}if(o<86400){let a=Math.floor(o/3600);return i.format(-a,"hour")}let n=Math.floor(o/86400);return i.format(-n,"day")},ue=(e,r=navigator.language||"en-US")=>{let t=new Date;e=new Date(e);let o=(e.getTime()-t.getTime())/1e3,i=Math.floor(o/(60*60)),n=Math.floor((o-60*60*i)/60),a=Math.floor(o-60*60*i-60*n),l=new Intl.RelativeTimeFormat(r,{numeric:"auto"});if(n===0&&a<60)return l.format(a,"second");if(i===0&&n<60)return l.format(n,"minute");if(i<24){let I=`${new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(i,"hour")}`,m=` ${new Intl.RelativeTimeFormat(r,{localeMatcher:"lookup",numeric:"always",style:"long"}).format(n,"minute")}`.replace(/^\D+/,"");return`${I} ${m}`}let R=Math.floor(a/86400);return l.format(R,"day")};var P=require("react"),ge=(e=768)=>{let[r,t]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{let o=()=>{t(window.innerWidth<e)};o();let i=()=>o();return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[e]),r};var D=require("react"),E=()=>{let[e,r]=(0,D.useState)("unknown");return(0,D.useEffect)(()=>{let t=i=>{r(i.matches?"dark":"light")},o=globalThis.matchMedia("(prefers-color-scheme: dark)");return r(o.matches?"dark":"light"),o.addEventListener("change",t),()=>{o.removeEventListener("change",t)}},[]),e};var F=require("react/jsx-runtime"),_e=({children:e})=>{let r=E(),[t,o]=(0,c.useState)(()=>{let m=localStorage.getItem("appSettings");return m&&JSON.parse(m).theme||"system"}),[i,n]=(0,c.useState)(()=>{let m=localStorage.getItem("appSettings");return m&&JSON.parse(m).darkMode||"auto"});(0,c.useEffect)(()=>{localStorage.setItem("appSettings",JSON.stringify({theme:t,darkMode:i}))},[t,i]);let a=(0,c.useMemo)(()=>{var m;return r==="unknown"?h[0].MuiTheme:t==="system"?r==="dark"?h[0].MuiTheme:h[1].MuiTheme:((m=h.find(ke=>ke.name===t))==null?void 0:m.MuiTheme)||h[0].MuiTheme},[r,t]),l=(0,c.useMemo)(()=>v(i,r,a.palette.secondary.main)?"dark":"light",[i,r,a]),R=(0,c.useMemo)(()=>y(a.palette.primary.main,a.palette.secondary.main,l),[a,l]),I=(0,c.useMemo)(()=>({darkMode:l==="dark"}),[l]);return(0,F.jsx)($.Provider,{value:{theme:t,darkMode:i,setTheme:o,setDarkMode:n},children:(0,F.jsx)(be.ThemeProvider,{theme:R,children:(0,F.jsx)(ye.ThemeProvider,{theme:I,children:e})})})};0&&(module.exports={ColorPalette,DialogBtn,ErrorBoundary,GlobalStyles,Loading,PathName,ThemeProviderWrapper,commonComponentProps,createCustomTheme,displayGreeting,fadeIn,fadeInLeft,getDayIdentifier,getFontColor,installAppAnimation,isDarkMode,isFontLight,isHexColor,logoutAnimation,progressPulse,pulseAnimation,scale,slideIn,slideInBottom,systemInfo,themeConfig,themes,timeAgo,timeAgoFromStart,typographyProps,typographyVariants,useResponsiveDisplay,useSystemTheme,useThemeSettings});
254
254
  //# sourceMappingURL=index.js.map