@atomazing-org/design-system 1.0.22 → 1.0.24

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
@@ -72,6 +72,31 @@ interface ThemeContextProps {
72
72
  */
73
73
  type SystemTheme = "light" | "dark" | "unknown";
74
74
 
75
+ interface TypographyVariants {
76
+ text_xl_regular: {
77
+ font: string;
78
+ };
79
+ text_lg_regular: {
80
+ font: string;
81
+ };
82
+ }
83
+ declare module "@mui/material/styles" {
84
+ interface TypographyVariants {
85
+ text_xl_regular: React.CSSProperties;
86
+ text_lg_regular: React.CSSProperties;
87
+ }
88
+ interface TypographyVariantsOptions {
89
+ text_xl_regular?: React.CSSProperties;
90
+ text_lg_regular?: React.CSSProperties;
91
+ }
92
+ }
93
+ declare module "@mui/material/Typography" {
94
+ interface TypographyPropsVariantOverrides {
95
+ text_xl_regular: true;
96
+ text_lg_regular: true;
97
+ }
98
+ }
99
+
75
100
  declare const useThemeSettings: () => ThemeContextProps;
76
101
 
77
102
  declare const ThemeProviderWrapper: FC<PropsWithChildren>;
@@ -247,145 +272,6 @@ declare const themeConfig: Record<string, {
247
272
  secondaryColor?: string;
248
273
  }>;
249
274
 
250
- /**
251
- * Default MUI Typography variant-to-element mapping.
252
- * Custom variants are mapped to HTML tags like <p>, <h1>, etc.
253
- */
254
- declare const typographyProps: {
255
- MuiTypography: {
256
- defaultProps: {
257
- variantMapping: {
258
- display_2xl_regular: string;
259
- display_xl_regular: string;
260
- display_lg_regular: string;
261
- display_md_regular: string;
262
- display_sm_regular: string;
263
- display_xs_regular: string;
264
- display_2xl_bold: string;
265
- display_xl_bold: string;
266
- display_lg_bold: string;
267
- display_md_bold: string;
268
- display_sm_bold: string;
269
- display_xs_bold: string;
270
- };
271
- };
272
- };
273
- };
274
- /**
275
- * Custom typography variants.
276
- * Defines font-weight, size, line-height and optionally fallback font.
277
- */
278
- declare const typographyVariants: {
279
- text_xl_regular: {
280
- font: string;
281
- };
282
- text_lg_regular: {
283
- font: string;
284
- };
285
- text_md_regular: {
286
- font: string;
287
- };
288
- text_sm_regular: {
289
- font: string;
290
- };
291
- text_xs_regular: {
292
- font: string;
293
- };
294
- text_2xs_regular: {
295
- font: string;
296
- };
297
- text_xl_bold: {
298
- font: string;
299
- };
300
- text_lg_bold: {
301
- font: string;
302
- };
303
- text_md_bold: {
304
- font: string;
305
- };
306
- text_sm_bold: {
307
- font: string;
308
- };
309
- text_xs_bold: {
310
- font: string;
311
- };
312
- text_2xs_bold: {
313
- font: string;
314
- };
315
- text_xl_semibold: {
316
- font: string;
317
- };
318
- text_lg_semibold: {
319
- font: string;
320
- };
321
- text_md_semibold: {
322
- font: string;
323
- };
324
- text_sm_semibold: {
325
- font: string;
326
- };
327
- text_xs_semibold: {
328
- font: string;
329
- };
330
- text_2xs_semibold: {
331
- font: string;
332
- };
333
- text_xl_thin: {
334
- font: string;
335
- };
336
- text_lg_thin: {
337
- font: string;
338
- };
339
- text_md_thin: {
340
- font: string;
341
- };
342
- text_sm_thin: {
343
- font: string;
344
- };
345
- text_xs_thin: {
346
- font: string;
347
- };
348
- text_2xs_thin: {
349
- font: string;
350
- };
351
- display_2xl_regular: {
352
- font: string;
353
- };
354
- display_xl_regular: {
355
- font: string;
356
- };
357
- display_lg_regular: {
358
- font: string;
359
- };
360
- display_md_regular: {
361
- font: string;
362
- };
363
- display_sm_regular: {
364
- font: string;
365
- };
366
- display_xs_regular: {
367
- font: string;
368
- };
369
- display_2xl_bold: {
370
- font: string;
371
- };
372
- display_xl_bold: {
373
- font: string;
374
- };
375
- display_lg_bold: {
376
- font: string;
377
- };
378
- display_md_bold: {
379
- font: string;
380
- };
381
- display_sm_bold: {
382
- font: string;
383
- };
384
- display_xs_bold: {
385
- font: string;
386
- };
387
- };
388
-
389
275
  /**
390
276
  * Returns a greeting based on the current time.
391
277
  * @returns {string} The appropriate greeting.
@@ -437,4 +323,4 @@ declare const useResponsiveDisplay: (breakpoint?: number) => boolean;
437
323
  */
438
324
  declare const useSystemTheme: () => SystemTheme;
439
325
 
440
- 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 };
326
+ export { type AppSettings, ColorPalette, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, PathName, type SystemTheme, type ThemeContextProps, ThemeProviderWrapper, type TypographyVariants, commonComponentProps, createCustomTheme, displayGreeting, fadeIn, fadeInLeft, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, slideIn, slideInBottom, systemInfo, themeConfig, themes, timeAgo, timeAgoFromStart, useResponsiveDisplay, useSystemTheme, useThemeSettings };
package/dist/index.d.ts CHANGED
@@ -72,6 +72,31 @@ interface ThemeContextProps {
72
72
  */
73
73
  type SystemTheme = "light" | "dark" | "unknown";
74
74
 
75
+ interface TypographyVariants {
76
+ text_xl_regular: {
77
+ font: string;
78
+ };
79
+ text_lg_regular: {
80
+ font: string;
81
+ };
82
+ }
83
+ declare module "@mui/material/styles" {
84
+ interface TypographyVariants {
85
+ text_xl_regular: React.CSSProperties;
86
+ text_lg_regular: React.CSSProperties;
87
+ }
88
+ interface TypographyVariantsOptions {
89
+ text_xl_regular?: React.CSSProperties;
90
+ text_lg_regular?: React.CSSProperties;
91
+ }
92
+ }
93
+ declare module "@mui/material/Typography" {
94
+ interface TypographyPropsVariantOverrides {
95
+ text_xl_regular: true;
96
+ text_lg_regular: true;
97
+ }
98
+ }
99
+
75
100
  declare const useThemeSettings: () => ThemeContextProps;
76
101
 
77
102
  declare const ThemeProviderWrapper: FC<PropsWithChildren>;
@@ -247,145 +272,6 @@ declare const themeConfig: Record<string, {
247
272
  secondaryColor?: string;
248
273
  }>;
249
274
 
250
- /**
251
- * Default MUI Typography variant-to-element mapping.
252
- * Custom variants are mapped to HTML tags like <p>, <h1>, etc.
253
- */
254
- declare const typographyProps: {
255
- MuiTypography: {
256
- defaultProps: {
257
- variantMapping: {
258
- display_2xl_regular: string;
259
- display_xl_regular: string;
260
- display_lg_regular: string;
261
- display_md_regular: string;
262
- display_sm_regular: string;
263
- display_xs_regular: string;
264
- display_2xl_bold: string;
265
- display_xl_bold: string;
266
- display_lg_bold: string;
267
- display_md_bold: string;
268
- display_sm_bold: string;
269
- display_xs_bold: string;
270
- };
271
- };
272
- };
273
- };
274
- /**
275
- * Custom typography variants.
276
- * Defines font-weight, size, line-height and optionally fallback font.
277
- */
278
- declare const typographyVariants: {
279
- text_xl_regular: {
280
- font: string;
281
- };
282
- text_lg_regular: {
283
- font: string;
284
- };
285
- text_md_regular: {
286
- font: string;
287
- };
288
- text_sm_regular: {
289
- font: string;
290
- };
291
- text_xs_regular: {
292
- font: string;
293
- };
294
- text_2xs_regular: {
295
- font: string;
296
- };
297
- text_xl_bold: {
298
- font: string;
299
- };
300
- text_lg_bold: {
301
- font: string;
302
- };
303
- text_md_bold: {
304
- font: string;
305
- };
306
- text_sm_bold: {
307
- font: string;
308
- };
309
- text_xs_bold: {
310
- font: string;
311
- };
312
- text_2xs_bold: {
313
- font: string;
314
- };
315
- text_xl_semibold: {
316
- font: string;
317
- };
318
- text_lg_semibold: {
319
- font: string;
320
- };
321
- text_md_semibold: {
322
- font: string;
323
- };
324
- text_sm_semibold: {
325
- font: string;
326
- };
327
- text_xs_semibold: {
328
- font: string;
329
- };
330
- text_2xs_semibold: {
331
- font: string;
332
- };
333
- text_xl_thin: {
334
- font: string;
335
- };
336
- text_lg_thin: {
337
- font: string;
338
- };
339
- text_md_thin: {
340
- font: string;
341
- };
342
- text_sm_thin: {
343
- font: string;
344
- };
345
- text_xs_thin: {
346
- font: string;
347
- };
348
- text_2xs_thin: {
349
- font: string;
350
- };
351
- display_2xl_regular: {
352
- font: string;
353
- };
354
- display_xl_regular: {
355
- font: string;
356
- };
357
- display_lg_regular: {
358
- font: string;
359
- };
360
- display_md_regular: {
361
- font: string;
362
- };
363
- display_sm_regular: {
364
- font: string;
365
- };
366
- display_xs_regular: {
367
- font: string;
368
- };
369
- display_2xl_bold: {
370
- font: string;
371
- };
372
- display_xl_bold: {
373
- font: string;
374
- };
375
- display_lg_bold: {
376
- font: string;
377
- };
378
- display_md_bold: {
379
- font: string;
380
- };
381
- display_sm_bold: {
382
- font: string;
383
- };
384
- display_xs_bold: {
385
- font: string;
386
- };
387
- };
388
-
389
275
  /**
390
276
  * Returns a greeting based on the current time.
391
277
  * @returns {string} The appropriate greeting.
@@ -437,4 +323,4 @@ declare const useResponsiveDisplay: (breakpoint?: number) => boolean;
437
323
  */
438
324
  declare const useSystemTheme: () => SystemTheme;
439
325
 
440
- 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 };
326
+ export { type AppSettings, ColorPalette, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, PathName, type SystemTheme, type ThemeContextProps, ThemeProviderWrapper, type TypographyVariants, commonComponentProps, createCustomTheme, displayGreeting, fadeIn, fadeInLeft, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, slideIn, slideInBottom, systemInfo, themeConfig, themes, timeAgo, timeAgoFromStart, useResponsiveDisplay, useSystemTheme, useThemeSettings };
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";var ke=Object.create;var b=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Te=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Se=(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 ve(r))!Me.call(e,i)&&i!==t&&b(e,i,{get:()=>r[i],enumerable:!(o=we(r,i))||o.enumerable});return e};var h=(e,r,t)=>(t=e!=null?ke(Te(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={};Se(Oe,{ColorPalette:()=>s,DialogBtn:()=>N,ErrorBoundary:()=>_,GlobalStyles:()=>K,Loading:()=>G,PathName:()=>j,ThemeProviderWrapper:()=>_e,commonComponentProps:()=>T,createCustomTheme:()=>y,displayGreeting:()=>me,fadeIn:()=>re,fadeInLeft:()=>ee,getDayIdentifier:()=>fe,getFontColor:()=>x,installAppAnimation:()=>le,isDarkMode:()=>M,isFontLight:()=>Q,isHexColor:()=>$,logoutAnimation:()=>se,progressPulse:()=>ae,pulseAnimation:()=>ne,scale:()=>ie,slideIn:()=>te,slideInBottom:()=>oe,systemInfo:()=>xe,themeConfig:()=>v,themes:()=>u,timeAgo:()=>ue,timeAgoFromStart:()=>he,typographyProps:()=>pe,typographyVariants:()=>de,useResponsiveDisplay:()=>ge,useSystemTheme:()=>E,useThemeSettings:()=>J});module.exports=Pe(Oe);var W=h(require("@emotion/styled")),H=require("@mui/material"),N=(0,W.default)(H.Button)`
1
+ "use strict";var Ce=Object.create;var b=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var ve=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var Me=(e,r)=>{for(var o in r)b(e,o,{get:r[o],enumerable:!0})},W=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of we(r))!Te.call(e,n)&&n!==o&&b(e,n,{get:()=>r[n],enumerable:!(t=ke(r,n))||t.enumerable});return e};var g=(e,r,o)=>(o=e!=null?Ce(ve(e)):{},W(r||!e||!e.__esModule?b(o,"default",{value:e,enumerable:!0}):o,e)),Se=e=>W(b({},"__esModule",{value:!0}),e);var Ie={};Me(Ie,{ColorPalette:()=>s,DialogBtn:()=>N,ErrorBoundary:()=>C,GlobalStyles:()=>V,Loading:()=>G,PathName:()=>j,ThemeProviderWrapper:()=>ye,commonComponentProps:()=>M,createCustomTheme:()=>y,displayGreeting:()=>de,fadeIn:()=>re,fadeInLeft:()=>ee,getDayIdentifier:()=>me,getFontColor:()=>u,installAppAnimation:()=>le,isDarkMode:()=>S,isFontLight:()=>Q,isHexColor:()=>$,logoutAnimation:()=>se,progressPulse:()=>ie,pulseAnimation:()=>ae,scale:()=>ne,slideIn:()=>oe,slideInBottom:()=>te,systemInfo:()=>ce,themeConfig:()=>T,themes:()=>h,timeAgo:()=>fe,timeAgoFromStart:()=>ue,useResponsiveDisplay:()=>he,useSystemTheme:()=>E,useThemeSettings:()=>J});module.exports=Se(Ie);var _=g(require("@emotion/styled")),H=require("@mui/material"),N=(0,_.default)(H.Button)`
2
2
  padding: 10px 16px;
3
3
  border-radius: 16px;
4
4
  font-size: 16px;
5
5
  margin: 8px;
6
- `;var Y=h(require("react")),L=h(require("@emotion/styled")),O=h(require("@mui/icons-material/ErrorOutlineRounded")),g=require("@mui/material"),l=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,l.jsxs)(De,{children:[(0,l.jsx)(Ee,{children:(0,l.jsx)(g.Box,{children:"\u041E\u0448\u0438\u0431\u043A\u0430.\xA0"})}),(0,l.jsxs)("h3",{children:[(0,l.jsxs)(g.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,l.jsx)(O.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","ERROR:"]})," ",(0,l.jsxs)(g.Box,{translate:"no",children:["[",(o=r.error)==null?void 0:o.name,"] ",(i=r.error)==null?void 0:i.message]}),(0,l.jsxs)(g.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,l.jsx)(O.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","Stack:"]})," ",(0,l.jsxs)(g.Box,{translate:"no",children:["[",(n=r.error)==null?void 0:n.stack,"]"]})]})]}):t.children}},De=L.default.div`
6
+ `;var Y=g(require("react")),B=g(require("@emotion/styled")),L=g(require("@mui/icons-material/ErrorOutlineRounded")),x=require("@mui/material"),l=require("react/jsx-runtime"),C=class extends Y.default.Component{constructor(r){super(r),this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,o){console.error("Error:",r),console.error("Error Info:",o)}render(){var t,n,a;let{state:r,props:o}=this;return r.hasError?(0,l.jsxs)(Pe,{children:[(0,l.jsx)(De,{children:(0,l.jsx)(x.Box,{children:"\u041E\u0448\u0438\u0431\u043A\u0430.\xA0"})}),(0,l.jsxs)("h3",{children:[(0,l.jsxs)(x.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,l.jsx)(L.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","ERROR:"]})," ",(0,l.jsxs)(x.Box,{translate:"no",children:["[",(t=r.error)==null?void 0:t.name,"] ",(n=r.error)==null?void 0:n.message]}),(0,l.jsxs)(x.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,l.jsx)(L.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","Stack:"]})," ",(0,l.jsxs)(x.Box,{translate:"no",children:["[",(a=r.error)==null?void 0:a.stack,"]"]})]})]}):o.children}},Pe=B.default.div`
7
7
  margin: 0 8vw;
8
8
  @media (max-width: 768px) {
9
9
  margin: 0;
10
10
  }
11
- `,Ee=L.default.h1`
11
+ `,De=B.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 C=require("react"),U=h(require("@emotion/styled")),k=require("@mui/material"),c=require("react/jsx-runtime"),G=()=>{let[e,r]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{let t=setTimeout(()=>{r(!0)},100);return()=>clearTimeout(t)},[]),(0,c.jsx)(Re,{children:e&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(k.CircularProgress,{"aria-label":"loading",size:80,thickness:4}),(0,c.jsx)("h3",{style:{opacity:.8},children:"Loading Page..."})]})})},Re=(0,U.default)(k.Box)`
27
+ `;var k=require("react"),U=g(require("@emotion/styled")),w=require("@mui/material"),f=require("react/jsx-runtime"),G=()=>{let[e,r]=(0,k.useState)(!1);return(0,k.useEffect)(()=>{let o=setTimeout(()=>{r(!0)},100);return()=>clearTimeout(o)},[]),(0,f.jsx)(Re,{children:e&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(w.CircularProgress,{"aria-label":"loading",size:80,thickness:4}),(0,f.jsx)("h3",{style:{opacity:.8},children:"Loading Page..."})]})})},Re=(0,U.default)(w.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 X=h(require("@emotion/styled")),j=X.default.code`
38
+ `;var X=g(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 w=require("react"),B=(0,w.createContext)(void 0),J=()=>{let e=(0,w.useContext)(B);if(!e)throw new Error("useThemeSettings must be used within ThemeProviderWrapper");return e};var f=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"},v={Lanit:{primaryColor:"#33ccff",secondaryColor:"#f7f7f7"},BPM:{primaryColor:"#203959",secondaryColor:"#ffffff"},Pampa:{primaryColor:"#ffe22e",secondaryColor:"#fafafa"},Hurma:{primaryColor:"#f6883d",secondaryColor:"#ffffff"},"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 $=e=>/^#([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$/.test(e),x=e=>{if(!$(e))return console.error("Invalid hex color provided:",e),s.fontDark;let r=e.slice(1),t=r.length===3?r.split("").map(p=>p+p).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},Q=e=>x(e)===s.fontLight;var T={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:{root:({theme:e})=>({borderRadius:e.shape.borderRadius}),elevation8:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiMenuItem:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiBottomNavigationAction:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius,padding:"12px",margin:0,maxHeight:"none"})}},MuiIcon:{styleOverrides:{root:{borderRadius:"100%"}}},MuiDialogContent:{styleOverrides:{root:{padding:0}}},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"}}},MuiTab:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiAccordion:{styleOverrides:{root:{"&::before":{display:"none"}}}}};var V=require("@mui/material");var y=(e,r="#232e58",t="dark")=>(0,V.createTheme)({palette:{primary:{main:e},secondary:{main:r},warning:{main:t==="dark"?s.orange:s.orangeDark},error:{main:s.red},mode:t},components:{...T,MuiTypography:{defaultProps:{variantMapping:{text_xl_regular:"p",text_lg_regular:"p"}}}},typography:{text_xl_regular:{font:"400 20px/30px inherit inherit"},text_lg_regular:{font:"400 18px/28px inherit inherit"}},shape:{borderRadius:24}}),u=Object.entries(v).map(([e,r])=>({name:e,MuiTheme:y(r.primaryColor,r.secondaryColor)})),M=(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"),S=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)(S.Global,{styles:S.css`
43
+ `;var v=require("react"),A=(0,v.createContext)(void 0),J=()=>{let e=(0,v.useContext)(A);if(!e)throw new Error("useThemeSettings must be used within ThemeProviderWrapper");return e};var c=require("react"),ge=require("@emotion/react"),xe=require("@mui/material/styles");var s={fontDark:"#101727",fontLight:"#f0f0f0",darkMode:"#383838",lightMode:"#ffffff",purple:"#b624ff",red:"#ff3131",orange:"#ff9318",orangeDark:"#ff9500"},T={Lanit:{primaryColor:"#33ccff",secondaryColor:"#f7f7f7"},BPM:{primaryColor:"#203959",secondaryColor:"#ffffff"},Pampa:{primaryColor:"#ffe22e",secondaryColor:"#fafafa"},Hurma:{primaryColor:"#f6883d",secondaryColor:"#ffffff"},"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 $=e=>/^#([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$/.test(e),u=e=>{if(!$(e))return console.error("Invalid hex color provided:",e),s.fontDark;let r=e.slice(1),o=r.length===3?r.split("").map(d=>d+d).join(""):r,t=Number.parseInt(o.slice(0,2),16),n=Number.parseInt(o.slice(2,4),16),a=Number.parseInt(o.slice(4,6),16);return Math.round((t*299+n*587+a*114)/1e3)>128?s.fontDark:s.fontLight},Q=e=>u(e)===s.fontLight;var M={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:{root:({theme:e})=>({borderRadius:e.shape.borderRadius}),elevation8:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiMenuItem:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiBottomNavigationAction:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius,padding:"12px",margin:0,maxHeight:"none"})}},MuiIcon:{styleOverrides:{root:{borderRadius:"100%"}}},MuiDialogContent:{styleOverrides:{root:{padding:0}}},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"}}},MuiTab:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiAccordion:{styleOverrides:{root:{"&::before":{display:"none"}}}}};var q=require("@mui/material");var y=(e,r="#232e58",o="dark")=>(0,q.createTheme)({palette:{primary:{main:e},secondary:{main:r},warning:{main:o==="dark"?s.orange:s.orangeDark},error:{main:s.red},mode:o},components:{...M,MuiTypography:{defaultProps:{variantMapping:{text_xl_regular:"p",text_lg_regular:"p"}}}},typography:{text_xl_regular:{font:"400 20px/30px inherit inherit"},text_lg_regular:{font:"400 18px/28px inherit inherit"}},shape:{borderRadius:24}}),h=Object.entries(T).map(([e,r])=>({name:e,MuiTheme:y(r.primaryColor,r.secondaryColor)})),S=(e,r,o)=>{switch(e){case"light":return!1;case"dark":return!0;case"system":return r==="dark";case"auto":return u(o)===s.fontLight;default:return!1}};var z=require("react"),P=require("@emotion/react"),K=require("@mui/material/styles");var Z=require("react/jsx-runtime"),V=()=>{let e=(0,K.useTheme)(),r=e.palette.mode==="dark",o=e.palette.primary.main,t=e.palette.secondary.main,n=(0,z.useMemo)(()=>u(o),[o]),a=(0,z.useMemo)(()=>u(t),[t]);return(0,Z.jsx)(P.Global,{styles:P.css`
44
44
  * {
45
45
  font-family: "Poppins", sans-serif !important;
46
46
  -webkit-tap-highlight-color: transparent;
47
47
  &::selection {
48
- background-color: ${`${t}e1`};
49
- color: ${i};
48
+ background-color: ${`${o}e1`};
49
+ color: ${n};
50
50
  }
51
51
  }
52
52
 
@@ -56,7 +56,7 @@
56
56
  line-height: 1.5;
57
57
  font-weight: 400;
58
58
  color-scheme: ${r?"dark":"light"};
59
- color: ${n};
59
+ color: ${a};
60
60
  font-synthesis: none;
61
61
  text-rendering: optimizeLegibility;
62
62
  -webkit-font-smoothing: antialiased;
@@ -71,25 +71,25 @@
71
71
  margin: 0;
72
72
  height: 100%;
73
73
  touch-action: manipulation;
74
- background: ${o};
74
+ background: ${t};
75
75
  background-attachment: fixed;
76
76
  background-size: cover;
77
77
  transition: 0.3s background;
78
78
 
79
79
  ::-webkit-scrollbar {
80
80
  width: 8px;
81
- background-color: ${o};
81
+ background-color: ${t};
82
82
  }
83
83
  ::-webkit-scrollbar-thumb {
84
- background-color: ${t};
84
+ background-color: ${o};
85
85
  border-radius: 64px;
86
86
  }
87
87
  ::-webkit-scrollbar-thumb:hover {
88
- background-color: ${`${t}d8`};
88
+ background-color: ${`${o}d8`};
89
89
  }
90
90
  ::-webkit-scrollbar-track {
91
91
  border-radius: 64px;
92
- background-color: ${o};
92
+ background-color: ${t};
93
93
  }
94
94
  }
95
95
 
@@ -161,7 +161,7 @@
161
161
  margin-top: 3px;
162
162
  }
163
163
  }
164
- `})};var m=require("@emotion/react"),ee=m.keyframes`
164
+ `})};var p=require("@emotion/react"),ee=p.keyframes`
165
165
  from {
166
166
  opacity: 0;
167
167
  transform: translateX(-40px);
@@ -170,35 +170,35 @@
170
170
  opacity: 1;
171
171
  transform: translateX(0);
172
172
  }
173
- `,re=m.keyframes`
173
+ `,re=p.keyframes`
174
174
  from {
175
175
  opacity: 0;
176
176
  }
177
177
  to {
178
178
  opacity: 1;
179
179
  }
180
- `,te=m.keyframes`
180
+ `,oe=p.keyframes`
181
181
  from {
182
182
  transform: translateX(-100%);
183
183
  }
184
184
  to {
185
185
  transform: translateX(0);
186
186
  }
187
- `,oe=m.keyframes`
187
+ `,te=p.keyframes`
188
188
  from {
189
189
  transform: translateY(100%);
190
190
  }
191
191
  to {
192
192
  transform: translateY(0);
193
193
  }
194
- `,ie=m.keyframes`
194
+ `,ne=p.keyframes`
195
195
  from {
196
196
  transform: scale(0);
197
197
  }
198
198
  to {
199
199
  transform: scale(1);
200
200
  }
201
- `,ne=(e,r=12)=>m.keyframes`
201
+ `,ae=(e,r=12)=>p.keyframes`
202
202
  0% {
203
203
  transform: scale(0.95);
204
204
  box-shadow: 0 0 0 0 ${e}b2;
@@ -211,7 +211,7 @@
211
211
  transform: scale(0.95);
212
212
  box-shadow: 0 0 0 0 ${e}00;
213
213
  }
214
- `,ae=e=>m.keyframes`
214
+ `,ie=e=>p.keyframes`
215
215
  0% {
216
216
  filter: none;
217
217
  }
@@ -221,7 +221,7 @@
221
221
  100% {
222
222
  filter: none;
223
223
  }
224
- `,se=m.keyframes`
224
+ `,se=p.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
- `,le=m.keyframes`
237
+ `,le=p.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 pe={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"}}}},de={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 me=()=>{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 fe=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:ce}=globalThis.navigator,Fe=()=>{let e=ce.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=ce.toLowerCase();return e.includes("edg")?"Edge":e.includes("chrome")?"Chrome":e.includes("firefox")?"Firefox":e.includes("safari")?"Safari":"Unknown"},xe={os:Fe(),browser:Ie()};var ue=(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")},he=(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),p=new Intl.RelativeTimeFormat(r,{numeric:"auto"});if(n===0&&a<60)return p.format(a,"second");if(i===0&&n<60)return p.format(n,"minute");if(i<24){let I=`${new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(i,"hour")}`,d=` ${new Intl.RelativeTimeFormat(r,{localeMatcher:"lookup",numeric:"always",style:"long"}).format(n,"minute")}`.replace(/^\D+/,"");return`${I} ${d}`}let F=Math.floor(a/86400);return p.format(F,"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 R=require("react/jsx-runtime"),_e=({children:e})=>{let r=E(),[t,o]=(0,f.useState)(()=>{let d=localStorage.getItem("appSettings");return d&&JSON.parse(d).theme||"system"}),[i,n]=(0,f.useState)(()=>{let d=localStorage.getItem("appSettings");return d&&JSON.parse(d).darkMode||"auto"});(0,f.useEffect)(()=>{localStorage.setItem("appSettings",JSON.stringify({theme:t,darkMode:i}))},[t,i]);let a=(0,f.useMemo)(()=>{var d;return r==="unknown"?u[0].MuiTheme:t==="system"?r==="dark"?u[0].MuiTheme:u[1].MuiTheme:((d=u.find(Ce=>Ce.name===t))==null?void 0:d.MuiTheme)||u[0].MuiTheme},[r,t]),p=(0,f.useMemo)(()=>M(i,r,a.palette.secondary.main)?"dark":"light",[i,r,a]),F=(0,f.useMemo)(()=>y(a.palette.primary.main,a.palette.secondary.main,p),[a,p]),I=(0,f.useMemo)(()=>({darkMode:p==="dark"}),[p]);return(0,R.jsx)(B.Provider,{value:{theme:t,darkMode:i,setTheme:o,setDarkMode:n},children:(0,R.jsx)(be.ThemeProvider,{theme:F,children:(0,R.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});
253
+ `;var de=()=>{let r=new Date().getHours(),o;return r<12&&r>=5?o="\u0414\u043E\u0431\u0440\u043E\u0435 \u0443\u0442\u0440\u043E,":r<18&&r>12?o="\u0414\u043E\u0431\u0440\u044B\u0439 \u0434\u0435\u043D\u044C,":o="\u0414\u043E\u0431\u0440\u044B\u0439 \u0432\u0435\u0447\u0435\u0440,",o};var me=e=>{let r=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0");return`${r}-${o}-${t}`};var{userAgent:pe}=globalThis.navigator,Ee=()=>{let e=pe.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"},Fe=()=>{let e=pe.toLowerCase();return e.includes("edg")?"Edge":e.includes("chrome")?"Chrome":e.includes("firefox")?"Firefox":e.includes("safari")?"Safari":"Unknown"},ce={os:Ee(),browser:Fe()};var fe=(e,r=navigator.language||"en-US")=>{let o=new Date;e=new Date(e);let t=Math.floor((o.getTime()-e.getTime())/1e3),n=new Intl.RelativeTimeFormat(r,{numeric:"auto"});if(t<60)return n.format(-t,"second");if(t<3600){let i=Math.floor(t/60);return n.format(-i,"minute")}if(t<86400){let i=Math.floor(t/3600);return n.format(-i,"hour")}let a=Math.floor(t/86400);return n.format(-a,"day")},ue=(e,r=navigator.language||"en-US")=>{let o=new Date;e=new Date(e);let t=(e.getTime()-o.getTime())/1e3,n=Math.floor(t/(60*60)),a=Math.floor((t-60*60*n)/60),i=Math.floor(t-60*60*n-60*a),d=new Intl.RelativeTimeFormat(r,{numeric:"auto"});if(a===0&&i<60)return d.format(i,"second");if(n===0&&a<60)return d.format(a,"minute");if(n<24){let O=`${new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(n,"hour")}`,m=` ${new Intl.RelativeTimeFormat(r,{localeMatcher:"lookup",numeric:"always",style:"long"}).format(a,"minute")}`.replace(/^\D+/,"");return`${O} ${m}`}let I=Math.floor(i/86400);return d.format(I,"day")};var D=require("react"),he=(e=768)=>{let[r,o]=(0,D.useState)(!1);return(0,D.useEffect)(()=>{let t=()=>{o(window.innerWidth<e)};t();let n=()=>t();return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[e]),r};var R=require("react"),E=()=>{let[e,r]=(0,R.useState)("unknown");return(0,R.useEffect)(()=>{let o=n=>{r(n.matches?"dark":"light")},t=globalThis.matchMedia("(prefers-color-scheme: dark)");return r(t.matches?"dark":"light"),t.addEventListener("change",o),()=>{t.removeEventListener("change",o)}},[]),e};var F=require("react/jsx-runtime"),ye=({children:e})=>{let r=E(),[o,t]=(0,c.useState)(()=>{let m=localStorage.getItem("appSettings");return m&&JSON.parse(m).theme||"system"}),[n,a]=(0,c.useState)(()=>{let m=localStorage.getItem("appSettings");return m&&JSON.parse(m).darkMode||"auto"});(0,c.useEffect)(()=>{localStorage.setItem("appSettings",JSON.stringify({theme:o,darkMode:n}))},[o,n]);let i=(0,c.useMemo)(()=>{var m;return r==="unknown"?h[0].MuiTheme:o==="system"?r==="dark"?h[0].MuiTheme:h[1].MuiTheme:((m=h.find(be=>be.name===o))==null?void 0:m.MuiTheme)||h[0].MuiTheme},[r,o]),d=(0,c.useMemo)(()=>S(n,r,i.palette.secondary.main)?"dark":"light",[n,r,i]),I=(0,c.useMemo)(()=>y(i.palette.primary.main,i.palette.secondary.main,d),[i,d]),O=(0,c.useMemo)(()=>({darkMode:d==="dark"}),[d]);return(0,F.jsx)(A.Provider,{value:{theme:o,darkMode:n,setTheme:t,setDarkMode:a},children:(0,F.jsx)(xe.ThemeProvider,{theme:I,children:(0,F.jsx)(ge.ThemeProvider,{theme:O,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,useResponsiveDisplay,useSystemTheme,useThemeSettings});
254
254
  //# sourceMappingURL=index.js.map