@atomazing-org/design-system 1.0.73 → 1.0.75

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
@@ -6,6 +6,7 @@ import * as _mui_material_OverridableComponent from '@mui/material/OverridableCo
6
6
  import * as _mui_material from '@mui/material';
7
7
  import { ThemeOptions, Theme, PaletteMode } from '@mui/material';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
+ import { ThemeOptions as ThemeOptions$1 } from '@mui/material/styles';
9
10
 
10
11
  declare const DialogBtn: _emotion_styled.StyledComponent<_mui_material.ButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "className" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "href" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "size" | "startIcon" | "variant"> & {
11
12
  theme?: _emotion_react.Theme;
@@ -48,6 +49,9 @@ interface OptionItem {
48
49
  value: DarkModeOptions;
49
50
  icon: ReactNode;
50
51
  }
52
+ type NamedThemeOptions = ThemeOptions & {
53
+ name: string;
54
+ };
51
55
  /**
52
56
  * Represents user-specific theme preferences stored in the application.
53
57
  */
@@ -216,55 +220,26 @@ declare module "@mui/material/Typography" {
216
220
  }
217
221
  }
218
222
 
219
- interface ColorPaletteType {
220
- fontDark: string;
221
- fontLight: string;
222
- brand: string;
223
- accent: string;
224
- muted: string;
225
- success: string;
226
- info: string;
227
- warning: string;
228
- error: string;
229
- neutral: string;
230
- }
231
-
232
223
  declare const darkModeOptions: OptionItem[];
233
224
 
234
- declare const defaultColorPalette: ColorPaletteType;
235
-
236
225
  declare const useThemeSettings: () => ThemeContextProps;
237
226
 
227
+ type Theme1 = ThemeOptions$1 & {
228
+ name?: string;
229
+ };
230
+ type ThemeN = ThemeOptions$1 & {
231
+ name: string;
232
+ };
233
+ type ThemesProp = [Theme1] | [ThemeN, ...ThemeN[]];
234
+
238
235
  type ThemeProviderWrapperProps = PropsWithChildren<{
239
236
  /** Optional font stack to apply across the app. */
240
237
  fontFamily?: string;
241
238
  /**
242
239
  * Optional dynamic list of themes.
243
- * Takes precedence over static defaults when provided.
244
- */
245
- themes?: {
246
- name: string;
247
- primaryColor: string;
248
- secondaryColor?: string;
249
- background?: {
250
- light?: {
251
- default?: string;
252
- paper?: string;
253
- };
254
- dark?: {
255
- default?: string;
256
- paper?: string;
257
- };
258
- };
259
- }[];
260
- /** Optional color palette override (e.g., fontLight/fontDark/accent colors). */
261
- colorPaletteOverride?: Partial<ColorPaletteType>;
262
- /**
263
- * Optional MUI theme overrides to customize design system styles.
264
- * Allows external consumers to override any part of the theme (components, palette, typography, etc.).
265
- * Applied after the design system theme, so it takes precedence.
240
+ * Each theme is a full ThemeOptions object.
266
241
  */
267
- themeOverrides?: ThemeOptions;
242
+ themes?: ThemesProp;
268
243
  }>;
269
244
  declare const ThemeProviderWrapper: FC<ThemeProviderWrapperProps>;
270
245
 
@@ -274,10 +249,7 @@ declare const ThemeProviderWrapper: FC<ThemeProviderWrapperProps>;
274
249
  */
275
250
  declare const commonComponentProps: Theme["components"];
276
251
 
277
- declare const createCustomTheme: (primaryColor: string, mode?: PaletteMode, secondaryColor?: string, background?: {
278
- default?: string;
279
- paper?: string;
280
- }, themeOverrides?: ThemeOptions) => Theme;
252
+ declare const createCustomTheme: (mode?: PaletteMode, customTheme?: ThemeOptions) => Theme;
281
253
 
282
254
  /**
283
255
  * Injects global styles into the document using Emotion.
@@ -383,16 +355,6 @@ declare const installAppAnimation: {
383
355
  toString: () => string;
384
356
  } & string;
385
357
 
386
- /** Returns the active color palette, allowing app-level overrides. */
387
- declare const getColorPalette: () => ColorPaletteType;
388
- /**
389
- * Overrides the active color palette with app-provided values.
390
- * Pass `undefined` or empty to reset to defaults.
391
- */
392
- declare const setColorPaletteOverride: (override?: Partial<ColorPaletteType>) => void;
393
- /** Backward-compatible live view of the active palette. */
394
- declare const ColorPalette: Readonly<ColorPaletteType>;
395
-
396
358
  /**
397
359
  * Validates whether a given string is a valid 3- or 6-digit hex color code (e.g., "#fff" or "#ffffff").
398
360
  *
@@ -400,22 +362,6 @@ declare const ColorPalette: Readonly<ColorPaletteType>;
400
362
  * @returns `true` if the string is a valid hex color; otherwise, `false`.
401
363
  */
402
364
  declare const isHexColor: (value: string) => boolean;
403
- /**
404
- * Determines the ideal font color (white or black) for contrast against a given background color.
405
- *
406
- * Uses luminance calculation (YIQ) to ensure accessibility and visual clarity.
407
- *
408
- * @param backgroundColor - A valid hex color (e.g., "#ffffff").
409
- * @returns A hex color string (`fontLight` or `fontDark`) suitable for overlay text.
410
- */
411
- declare const getFontColor: (backgroundColor: string) => string;
412
- /**
413
- * Determines whether the ideal font color for a background is light (i.e., white).
414
- *
415
- * @param color - The background color in hex.
416
- * @returns `true` if white text is recommended; otherwise, `false`.
417
- */
418
- declare const isFontLight: (color: string) => boolean;
419
365
 
420
366
  /**
421
367
  * Returns a greeting based on the current time.
@@ -479,4 +425,4 @@ declare const useResponsiveDisplay: (breakpoint?: number) => boolean;
479
425
  */
480
426
  declare const useSystemTheme: () => SystemTheme;
481
427
 
482
- export { type AppSettings, ColorPalette, type ColorPaletteType, type CustomTypographyVariants, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, type OptionItem, PathName, type SystemTheme, type ThemeContextProps, ThemeProviderWrapper, commonComponentProps, createCustomTheme, darkModeOptions, defaultColorPalette, displayGreeting, fadeIn, fadeInLeft, getColorPalette, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, setColorPaletteOverride, slideIn, slideInBottom, systemInfo, timeAgo, timeAgoFromStart, useResponsiveDisplay, useSystemTheme, useThemeSettings };
428
+ export { type AppSettings, type CustomTypographyVariants, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, type NamedThemeOptions, type OptionItem, PathName, type SystemTheme, type Theme1, type ThemeContextProps, type ThemeN, ThemeProviderWrapper, type ThemesProp, commonComponentProps, createCustomTheme, darkModeOptions, displayGreeting, fadeIn, fadeInLeft, getDayIdentifier, installAppAnimation, isDarkMode, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, slideIn, slideInBottom, systemInfo, timeAgo, timeAgoFromStart, useResponsiveDisplay, useSystemTheme, useThemeSettings };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ import * as _mui_material_OverridableComponent from '@mui/material/OverridableCo
6
6
  import * as _mui_material from '@mui/material';
7
7
  import { ThemeOptions, Theme, PaletteMode } from '@mui/material';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
+ import { ThemeOptions as ThemeOptions$1 } from '@mui/material/styles';
9
10
 
10
11
  declare const DialogBtn: _emotion_styled.StyledComponent<_mui_material.ButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "className" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "href" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "size" | "startIcon" | "variant"> & {
11
12
  theme?: _emotion_react.Theme;
@@ -48,6 +49,9 @@ interface OptionItem {
48
49
  value: DarkModeOptions;
49
50
  icon: ReactNode;
50
51
  }
52
+ type NamedThemeOptions = ThemeOptions & {
53
+ name: string;
54
+ };
51
55
  /**
52
56
  * Represents user-specific theme preferences stored in the application.
53
57
  */
@@ -216,55 +220,26 @@ declare module "@mui/material/Typography" {
216
220
  }
217
221
  }
218
222
 
219
- interface ColorPaletteType {
220
- fontDark: string;
221
- fontLight: string;
222
- brand: string;
223
- accent: string;
224
- muted: string;
225
- success: string;
226
- info: string;
227
- warning: string;
228
- error: string;
229
- neutral: string;
230
- }
231
-
232
223
  declare const darkModeOptions: OptionItem[];
233
224
 
234
- declare const defaultColorPalette: ColorPaletteType;
235
-
236
225
  declare const useThemeSettings: () => ThemeContextProps;
237
226
 
227
+ type Theme1 = ThemeOptions$1 & {
228
+ name?: string;
229
+ };
230
+ type ThemeN = ThemeOptions$1 & {
231
+ name: string;
232
+ };
233
+ type ThemesProp = [Theme1] | [ThemeN, ...ThemeN[]];
234
+
238
235
  type ThemeProviderWrapperProps = PropsWithChildren<{
239
236
  /** Optional font stack to apply across the app. */
240
237
  fontFamily?: string;
241
238
  /**
242
239
  * Optional dynamic list of themes.
243
- * Takes precedence over static defaults when provided.
244
- */
245
- themes?: {
246
- name: string;
247
- primaryColor: string;
248
- secondaryColor?: string;
249
- background?: {
250
- light?: {
251
- default?: string;
252
- paper?: string;
253
- };
254
- dark?: {
255
- default?: string;
256
- paper?: string;
257
- };
258
- };
259
- }[];
260
- /** Optional color palette override (e.g., fontLight/fontDark/accent colors). */
261
- colorPaletteOverride?: Partial<ColorPaletteType>;
262
- /**
263
- * Optional MUI theme overrides to customize design system styles.
264
- * Allows external consumers to override any part of the theme (components, palette, typography, etc.).
265
- * Applied after the design system theme, so it takes precedence.
240
+ * Each theme is a full ThemeOptions object.
266
241
  */
267
- themeOverrides?: ThemeOptions;
242
+ themes?: ThemesProp;
268
243
  }>;
269
244
  declare const ThemeProviderWrapper: FC<ThemeProviderWrapperProps>;
270
245
 
@@ -274,10 +249,7 @@ declare const ThemeProviderWrapper: FC<ThemeProviderWrapperProps>;
274
249
  */
275
250
  declare const commonComponentProps: Theme["components"];
276
251
 
277
- declare const createCustomTheme: (primaryColor: string, mode?: PaletteMode, secondaryColor?: string, background?: {
278
- default?: string;
279
- paper?: string;
280
- }, themeOverrides?: ThemeOptions) => Theme;
252
+ declare const createCustomTheme: (mode?: PaletteMode, customTheme?: ThemeOptions) => Theme;
281
253
 
282
254
  /**
283
255
  * Injects global styles into the document using Emotion.
@@ -383,16 +355,6 @@ declare const installAppAnimation: {
383
355
  toString: () => string;
384
356
  } & string;
385
357
 
386
- /** Returns the active color palette, allowing app-level overrides. */
387
- declare const getColorPalette: () => ColorPaletteType;
388
- /**
389
- * Overrides the active color palette with app-provided values.
390
- * Pass `undefined` or empty to reset to defaults.
391
- */
392
- declare const setColorPaletteOverride: (override?: Partial<ColorPaletteType>) => void;
393
- /** Backward-compatible live view of the active palette. */
394
- declare const ColorPalette: Readonly<ColorPaletteType>;
395
-
396
358
  /**
397
359
  * Validates whether a given string is a valid 3- or 6-digit hex color code (e.g., "#fff" or "#ffffff").
398
360
  *
@@ -400,22 +362,6 @@ declare const ColorPalette: Readonly<ColorPaletteType>;
400
362
  * @returns `true` if the string is a valid hex color; otherwise, `false`.
401
363
  */
402
364
  declare const isHexColor: (value: string) => boolean;
403
- /**
404
- * Determines the ideal font color (white or black) for contrast against a given background color.
405
- *
406
- * Uses luminance calculation (YIQ) to ensure accessibility and visual clarity.
407
- *
408
- * @param backgroundColor - A valid hex color (e.g., "#ffffff").
409
- * @returns A hex color string (`fontLight` or `fontDark`) suitable for overlay text.
410
- */
411
- declare const getFontColor: (backgroundColor: string) => string;
412
- /**
413
- * Determines whether the ideal font color for a background is light (i.e., white).
414
- *
415
- * @param color - The background color in hex.
416
- * @returns `true` if white text is recommended; otherwise, `false`.
417
- */
418
- declare const isFontLight: (color: string) => boolean;
419
365
 
420
366
  /**
421
367
  * Returns a greeting based on the current time.
@@ -479,4 +425,4 @@ declare const useResponsiveDisplay: (breakpoint?: number) => boolean;
479
425
  */
480
426
  declare const useSystemTheme: () => SystemTheme;
481
427
 
482
- export { type AppSettings, ColorPalette, type ColorPaletteType, type CustomTypographyVariants, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, type OptionItem, PathName, type SystemTheme, type ThemeContextProps, ThemeProviderWrapper, commonComponentProps, createCustomTheme, darkModeOptions, defaultColorPalette, displayGreeting, fadeIn, fadeInLeft, getColorPalette, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, setColorPaletteOverride, slideIn, slideInBottom, systemInfo, timeAgo, timeAgoFromStart, useResponsiveDisplay, useSystemTheme, useThemeSettings };
428
+ export { type AppSettings, type CustomTypographyVariants, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, type NamedThemeOptions, type OptionItem, PathName, type SystemTheme, type Theme1, type ThemeContextProps, type ThemeN, ThemeProviderWrapper, type ThemesProp, commonComponentProps, createCustomTheme, darkModeOptions, displayGreeting, fadeIn, fadeInLeft, getDayIdentifier, installAppAnimation, isDarkMode, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, slideIn, slideInBottom, systemInfo, timeAgo, timeAgoFromStart, useResponsiveDisplay, useSystemTheme, useThemeSettings };
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";var Ae=Object.create;var P=Object.defineProperty;var $e=Object.getOwnPropertyDescriptor;var Be=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,ze=Object.prototype.hasOwnProperty;var We=(e,t)=>{for(var r in t)P(e,r,{get:t[r],enumerable:!0})},X=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Be(t))!ze.call(e,o)&&o!==r&&P(e,o,{get:()=>t[o],enumerable:!(n=$e(t,o))||n.enumerable});return e};var c=(e,t,r)=>(r=e!=null?Ae(Le(e)):{},X(t||!e||!e.__esModule?P(r,"default",{value:e,enumerable:!0}):r,e)),Ge=e=>X(P({},"__esModule",{value:!0}),e);var Xe={};We(Xe,{ColorPalette:()=>le,DialogBtn:()=>j,ErrorBoundary:()=>M,GlobalStyles:()=>G,Loading:()=>K,PathName:()=>te,ThemeProviderWrapper:()=>Oe,commonComponentProps:()=>I,createCustomTheme:()=>A,darkModeOptions:()=>ae,defaultColorPalette:()=>T,displayGreeting:()=>ue,fadeIn:()=>ke,fadeInLeft:()=>ve,getColorPalette:()=>s,getDayIdentifier:()=>ce,getFontColor:()=>C,installAppAnimation:()=>Re,isDarkMode:()=>$,isFontLight:()=>me,isHexColor:()=>V,logoutAnimation:()=>Me,progressPulse:()=>Pe,pulseAnimation:()=>Se,scale:()=>Ce,setColorPaletteOverride:()=>E,slideIn:()=>we,slideInBottom:()=>Te,systemInfo:()=>fe,timeAgo:()=>he,timeAgoFromStart:()=>xe,useResponsiveDisplay:()=>ge,useSystemTheme:()=>z,useThemeSettings:()=>se});module.exports=Ge(Xe);var J=c(require("@emotion/styled")),Q=require("@mui/material"),j=(0,J.default)(Q.Button)`
1
+ "use strict";var Oe=Object.create;var b=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var Ee=Object.getOwnPropertyNames;var De=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var Ce=(e,r)=>{for(var o in r)b(e,o,{get:r[o],enumerable:!0})},z=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Ee(r))!Ie.call(e,t)&&t!==o&&b(e,t,{get:()=>r[t],enumerable:!(n=Re(r,t))||n.enumerable});return e};var d=(e,r,o)=>(o=e!=null?Oe(De(e)):{},z(r||!e||!e.__esModule?b(o,"default",{value:e,enumerable:!0}):o,e)),Ae=e=>z(b({},"__esModule",{value:!0}),e);var Ne={};Ce(Ne,{DialogBtn:()=>G,ErrorBoundary:()=>v,GlobalStyles:()=>O,Loading:()=>Y,PathName:()=>X,ThemeProviderWrapper:()=>Se,commonComponentProps:()=>q,createCustomTheme:()=>M,darkModeOptions:()=>Z,displayGreeting:()=>ce,fadeIn:()=>te,fadeInLeft:()=>oe,getDayIdentifier:()=>fe,installAppAnimation:()=>de,isDarkMode:()=>R,isHexColor:()=>pe,logoutAnimation:()=>le,progressPulse:()=>me,pulseAnimation:()=>se,scale:()=>ae,slideIn:()=>ne,slideInBottom:()=>ie,systemInfo:()=>ue,timeAgo:()=>he,timeAgoFromStart:()=>ge,useResponsiveDisplay:()=>xe,useSystemTheme:()=>I,useThemeSettings:()=>j});module.exports=Ae(Ne);var N=d(require("@emotion/styled")),W=require("@mui/material"),G=(0,N.default)(W.Button)`
2
2
  padding: 10px 16px;
3
3
  border-radius: 16px;
4
4
  font-size: 16px;
5
5
  margin: 8px;
6
- `;var Z=c(require("react")),U=c(require("@emotion/styled")),N=c(require("@mui/icons-material/ErrorOutlineRounded")),_=require("@mui/material"),m=require("react/jsx-runtime"),M=class extends Z.default.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("Error:",t),console.error("Error Info:",r)}render(){var n,o,a;let{state:t,props:r}=this;return t.hasError?(0,m.jsxs)(Ne,{children:[(0,m.jsx)(Ue,{children:(0,m.jsx)(_.Box,{children:"Something went wrong.\xA0"})}),(0,m.jsxs)("h3",{children:[(0,m.jsxs)(_.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,m.jsx)(N.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","ERROR:"]})," ",(0,m.jsxs)(_.Box,{translate:"no",children:["[",(n=t.error)==null?void 0:n.name,"] ",(o=t.error)==null?void 0:o.message]}),(0,m.jsxs)(_.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,m.jsx)(N.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","Stack:"]})," ",(0,m.jsxs)(_.Box,{translate:"no",children:["[",(a=t.error)==null?void 0:a.stack,"]"]})]})]}):r.children}},Ne=U.default.div`
6
+ `;var H=d(require("react")),B=d(require("@emotion/styled")),$=d(require("@mui/icons-material/ErrorOutlineRounded")),g=require("@mui/material"),l=require("react/jsx-runtime"),v=class extends H.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 n,t,i;let{state:r,props:o}=this;return r.hasError?(0,l.jsxs)($e,{children:[(0,l.jsx)(Be,{children:(0,l.jsx)(g.Box,{children:"Something went wrong.\xA0"})}),(0,l.jsxs)("h3",{children:[(0,l.jsxs)(g.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,l.jsx)($.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","ERROR:"]})," ",(0,l.jsxs)(g.Box,{translate:"no",children:["[",(n=r.error)==null?void 0:n.name,"] ",(t=r.error)==null?void 0:t.message]}),(0,l.jsxs)(g.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,l.jsx)($.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","Stack:"]})," ",(0,l.jsxs)(g.Box,{translate:"no",children:["[",(i=r.error)==null?void 0:i.stack,"]"]})]})]}):o.children}},$e=B.default.div`
7
7
  margin: 0 8vw;
8
8
  @media (max-width: 768px) {
9
9
  margin: 0;
10
10
  }
11
- `,Ue=U.default.h1`
11
+ `,Be=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 R=require("react"),q=c(require("@emotion/styled")),D=require("@mui/material"),x=require("react/jsx-runtime"),K=()=>{let[e,t]=(0,R.useState)(!1);return(0,R.useEffect)(()=>{let r=setTimeout(()=>{t(!0)},100);return()=>clearTimeout(r)},[]),(0,x.jsx)(He,{"aria-live":"polite",role:"status",children:e&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(D.CircularProgress,{"aria-label":"loading",size:80,thickness:4}),(0,x.jsx)("h3",{style:{opacity:.8},children:"Loading Page..."})]})})},He=(0,q.default)(D.Box)`
27
+ `;var T=require("react"),U=d(require("@emotion/styled")),k=require("@mui/material"),h=require("react/jsx-runtime"),Y=()=>{let[e,r]=(0,T.useState)(!1);return(0,T.useEffect)(()=>{let o=setTimeout(()=>{r(!0)},100);return()=>clearTimeout(o)},[]),(0,h.jsx)(Fe,{"aria-live":"polite",role:"status",children:e&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(k.CircularProgress,{"aria-label":"loading",size:80,thickness:4}),(0,h.jsx)("h3",{style:{opacity:.8},children:"Loading Page..."})]})})},Fe=(0,U.default)(k.Box)`
28
28
  position: absolute;
29
29
  top: 50%;
30
30
  left: 50%;
@@ -35,12 +35,12 @@
35
35
  flex-direction: column;
36
36
  text-align: center;
37
37
  gap: 8px;
38
- `;var ee=c(require("@emotion/styled")),te=ee.default.code`
38
+ `;var _=d(require("@emotion/styled")),X=_.default.code`
39
39
  background: #000000c8;
40
40
  color: white;
41
41
  padding: 4px 6px;
42
42
  border-radius: 8px;
43
- `;var re=c(require("@mui/icons-material/BrightnessAutoRounded")),oe=c(require("@mui/icons-material/DarkModeRounded")),ne=c(require("@mui/icons-material/LightModeRounded")),ie=c(require("@mui/icons-material/PersonalVideoRounded")),w=require("react/jsx-runtime"),F=32,ae=[{label:"Auto",value:"auto",icon:(0,w.jsx)(re.default,{color:"inherit",sx:{fontSize:F}})},{label:"System",value:"system",icon:(0,w.jsx)(ie.default,{color:"inherit",sx:{fontSize:F}})},{label:"Light",value:"light",icon:(0,w.jsx)(ne.default,{color:"inherit",sx:{fontSize:F}})},{label:"Dark",value:"dark",icon:(0,w.jsx)(oe.default,{color:"inherit",sx:{fontSize:F}})}];var T={fontDark:"#101727",fontLight:"#f0f0f0",brand:"#9FA9EA",accent:"#F3503A",muted:"#64748B",success:"#2E7D32",info:"#0288D1",warning:"#ED6C02",error:"#D32F2F",neutral:"#64748B"};var O=require("react"),H=(0,O.createContext)(void 0),se=()=>{let e=(0,O.useContext)(H);if(!e)throw new Error("useThemeSettings must be used within ThemeProviderWrapper");return e};var d=require("react"),De=require("@emotion/react"),Fe=require("@mui/material/styles");var I={MuiTooltip:{defaultProps:{disableInteractive:!0},styleOverrides:{tooltip:({theme:e})=>({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}}},MuiAlert:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiTextField:{defaultProps:{variant:"outlined"},styleOverrides:{root:({theme:e})=>({"& .MuiInputBase-root":{borderRadius:e.shape.borderRadius}})}},MuiOutlinedInput:{styleOverrides:{root:({theme:e})=>({color:e.palette.primary.main,"& fieldset":{borderColor:e.palette.primary.main},"&:hover fieldset":{borderColor:e.palette.primary.dark},"&.Mui-focused fieldset":{borderColor:e.palette.primary.main}})}},MuiInputLabel:{styleOverrides:{root:({theme:e})=>({color:e.palette.primary.main,"&.Mui-focused":{color:e.palette.primary.main}})}},MuiFormHelperText:{styleOverrides:{root:({theme:e})=>({color:e.palette.error.main})}},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"})}},MuiDialogContent:{styleOverrides:{root:{padding:0}}},MuiSlider:{styleOverrides:{valueLabel:({theme:e})=>({borderRadius:e.shape.borderRadius,padding:"6px 14px","&::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 Y=require("@mui/material");var u={...T},s=()=>u,E=e=>{u={...T,...e}},le={get fontDark(){return u.fontDark},get fontLight(){return u.fontLight},get brand(){return u.brand},get accent(){return u.accent},get muted(){return u.muted},get success(){return u.success},get info(){return u.info},get warning(){return u.warning},get error(){return u.error},get neutral(){return u.neutral}};var pe={defaultProps:{variantMapping:{text_xl_regular:"p",text_lg_regular:"p",text_md_regular:"p",text_sm_regular:"p",text_xs_regular:"p",text_2xs_regular:"p",text_xl_bold:"p",text_lg_bold:"p",text_md_bold:"p",text_sm_bold:"p",text_xs_bold:"p",text_2xs_bold:"p",text_xl_semibold:"p",text_lg_semibold:"p",text_md_semibold:"p",text_sm_semibold:"p",text_xs_semibold:"p",text_2xs_semibold:"p",text_xl_thin:"p",text_lg_thin:"p",text_md_thin:"p",text_sm_thin:"p",text_xs_thin:"p",text_2xs_thin:"p",header_2xl_regular:"h1",header_xl_regular:"h2",header_lg_regular:"h3",header_md_regular:"h4",header_sm_regular:"h5",header_xs_regular:"h6",header_2xl_bold:"h1",header_xl_bold:"h2",header_lg_bold:"h3",header_md_bold:"h4",header_sm_bold:"h5",header_xs_bold:"h6",header_2xl_semibold:"h1",header_xl_semibold:"h2",header_lg_semibold:"h3",header_md_semibold:"h4",header_sm_semibold:"h5",header_xs_semibold:"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:"700 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"},header_2xl_regular:{font:"400 34px/42px inherit inherit"},header_xl_regular:{font:"400 32px/40px inherit inherit"},header_lg_regular:{font:"400 28px/36px inherit inherit"},header_md_regular:{font:"400 24px/32px inherit inherit"},header_sm_regular:{font:"400 20px/28px inherit inherit"},header_xs_regular:{font:"400 18px/26px inherit inherit"},header_2xl_bold:{font:"700 34px/42px inherit inherit"},header_xl_bold:{font:"700 32px/40px inherit inherit"},header_lg_bold:{font:"700 28px/36px inherit inherit"},header_md_bold:{font:"700 24px/32px inherit inherit"},header_sm_bold:{font:"700 20px/28px inherit inherit"},header_xs_bold:{font:"700 18px/26px inherit inherit"},header_2xl_semibold:{font:"600 34px/42px inherit inherit"},header_xl_semibold:{font:"600 32px/40px inherit inherit"},header_lg_semibold:{font:"600 28px/36px inherit inherit"},header_md_semibold:{font:"600 24px/32px inherit inherit"},header_sm_semibold:{font:"600 20px/28px inherit inherit"},header_xs_semibold:{font:"600 18px/26px inherit inherit"}};var A=(e,t="light",r,n,o)=>{let a=t==="dark",i=(0,Y.createTheme)({palette:{mode:t}}),l={palette:{primary:{...i.palette.primary,main:e},brand:i.palette.augmentColor({color:{main:e}}),neutral:i.palette.augmentColor({color:{main:s().neutral}}),accent:i.palette.augmentColor({color:{main:s().accent}}),muted:i.palette.augmentColor({color:{main:s().muted}}),...r?{secondary:{...i.palette.secondary,main:r}}:{},error:{...i.palette.error,main:s().error},warning:{...i.palette.warning,main:s().warning},success:{...i.palette.success,main:s().success},info:{...i.palette.info,main:s().info},background:(()=>{let p=a?{default:"#1C1C1E",paper:"#2C2C2E"}:{default:"#F2F2F7",paper:"#FFFFFF"};return{...i.palette.background,...p,...n}})(),divider:a?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.12)"},components:{...I,MuiTypography:pe},typography:{...de,fontFamily:'var(--app-font-family, "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif)'},shape:{borderRadius:24}};return(0,Y.createTheme)(i,l,o!=null?o:{})};var be=require("react"),W=require("@emotion/react"),ye=require("@mui/material/styles");var V=e=>/^#([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$/.test(e),C=e=>{if(!V(e))return console.error("Invalid hex color provided:",e),s().fontDark;let t=e.slice(1),r=t.length===3?t.split("").map(p=>p+p).join(""):t,n=Number.parseInt(r.slice(0,2),16),o=Number.parseInt(r.slice(2,4),16),a=Number.parseInt(r.slice(4,6),16),i=Math.round((n*299+o*587+a*114)/1e3),l=s();return i>128?l.fontDark:l.fontLight},me=e=>C(e)===s().fontLight;var ue=()=>{let e=new Date().getHours();return e>=5&&e<12?"Good morning":e>12&&e<18?"Good afternoon":"Good evening"};var ce=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};var Ye=()=>{let e=(typeof navigator=="undefined"?"":navigator.userAgent).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"},Ve=()=>{let e=(typeof navigator=="undefined"?"":navigator.userAgent).toLowerCase();return e.includes("edg")?"Edge":e.includes("chrome")?"Chrome":e.includes("firefox")?"Firefox":e.includes("safari")?"Safari":"Unknown"},fe={os:typeof navigator=="undefined"?"Unknown":Ye(),browser:typeof navigator=="undefined"?"Unknown":Ve()};var $=(e,t)=>{switch(e){case"light":return!1;case"dark":return!0;case"system":return t==="dark";default:return!1}};var he=(e,t)=>{let r=t!=null?t:typeof navigator=="undefined"?"en-US":navigator.language,n=new Date;e=new Date(e);let o=Math.floor((n.getTime()-e.getTime())/1e3),a=new Intl.RelativeTimeFormat(r,{numeric:"auto"});if(o<60)return a.format(-o,"second");if(o<3600){let l=Math.floor(o/60);return a.format(-l,"minute")}if(o<86400){let l=Math.floor(o/3600);return a.format(-l,"hour")}let i=Math.floor(o/86400);return a.format(-i,"day")},xe=(e,t)=>{let r=t!=null?t:typeof navigator=="undefined"?"en-US":navigator.language,n=new Date;e=new Date(e);let o=(e.getTime()-n.getTime())/1e3,a=Math.floor(o/(60*60)),i=Math.floor((o-60*60*a)/60),l=Math.floor(o-60*60*a-60*i),p=new Intl.RelativeTimeFormat(r,{numeric:"auto"});if(i===0&&l<60)return p.format(l,"second");if(a===0&&i<60)return p.format(i,"minute");if(a<24){let b=`${new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(a,"hour")}`,y=` ${new Intl.RelativeTimeFormat(r,{localeMatcher:"lookup",numeric:"always",style:"long"}).format(i,"minute")}`.replace(/^\D+/,"");return`${b} ${y}`}let S=Math.floor(l/86400);return p.format(S,"day")};var B=require("react"),ge=(e=768)=>{let[t,r]=(0,B.useState)(!1);return(0,B.useEffect)(()=>{let n=()=>{r(window.innerWidth<e)};n();let o=()=>n();return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[e]),t};var L=require("react"),z=()=>{let[e,t]=(0,L.useState)("unknown");return(0,L.useEffect)(()=>{let r=o=>{t(o.matches?"dark":"light")},n=globalThis.matchMedia("(prefers-color-scheme: dark)");return t(n.matches?"dark":"light"),n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}},[]),e};var _e=require("react/jsx-runtime"),G=({fontFamily:e})=>{let t=(0,ye.useTheme)(),r=t.palette.mode==="dark",n=t.palette.primary.main,o=t.palette.background.default,a=t.palette.background.paper,i=(0,be.useMemo)(()=>C(n),[n]);return(0,_e.jsx)(W.Global,{styles:W.css`
43
+ `;var J=d(require("@mui/icons-material/BrightnessAutoRounded")),Q=d(require("@mui/icons-material/DarkModeRounded")),K=d(require("@mui/icons-material/LightModeRounded")),V=d(require("@mui/icons-material/PersonalVideoRounded")),y=require("react/jsx-runtime"),w=32,Z=[{label:"Auto",value:"auto",icon:(0,y.jsx)(J.default,{color:"inherit",sx:{fontSize:w}})},{label:"System",value:"system",icon:(0,y.jsx)(V.default,{color:"inherit",sx:{fontSize:w}})},{label:"Light",value:"light",icon:(0,y.jsx)(K.default,{color:"inherit",sx:{fontSize:w}})},{label:"Dark",value:"dark",icon:(0,y.jsx)(Q.default,{color:"inherit",sx:{fontSize:w}})}];var S=require("react"),F=(0,S.createContext)(void 0),j=()=>{let e=(0,S.useContext)(F);if(!e)throw new Error("useThemeSettings must be used within ThemeProviderWrapper");return e};var C=require("react"),ke=require("@emotion/react"),we=require("@mui/material/styles");var q={MuiTooltip:{defaultProps:{disableInteractive:!0},styleOverrides:{tooltip:({theme:e})=>({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}}},MuiAlert:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiTextField:{defaultProps:{variant:"outlined"},styleOverrides:{root:({theme:e})=>({"& .MuiInputBase-root":{borderRadius:e.shape.borderRadius}})}},MuiOutlinedInput:{styleOverrides:{root:({theme:e})=>({color:e.palette.primary.main,"& fieldset":{borderColor:e.palette.primary.main},"&:hover fieldset":{borderColor:e.palette.primary.dark},"&.Mui-focused fieldset":{borderColor:e.palette.primary.main}})}},MuiInputLabel:{styleOverrides:{root:({theme:e})=>({color:e.palette.primary.main,"&.Mui-focused":{color:e.palette.primary.main}})}},MuiFormHelperText:{styleOverrides:{root:({theme:e})=>({color:e.palette.error.main})}},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"})}},MuiDialogContent:{styleOverrides:{root:{padding:0}}},MuiSlider:{styleOverrides:{valueLabel:({theme:e})=>({borderRadius:e.shape.borderRadius,padding:"6px 14px","&::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 L=require("@mui/material"),M=(e="light",r)=>{let o=(0,L.createTheme)({palette:{mode:e}});return(0,L.createTheme)(o,r!=null?r:{})};var P=require("@emotion/react"),ee=require("@mui/material/styles"),re=require("react/jsx-runtime"),O=({fontFamily:e})=>{let r=(0,ee.useTheme)(),o=r.palette.mode==="dark",n=r.palette.primary.main,t=r.palette.background.default,i=r.palette.background.paper;return(0,re.jsx)(P.Global,{styles:P.css`
44
44
  /* Allow application to control font via CSS var or prop */
45
45
  :root {
46
46
  ${e?`--app-font-family: ${e};`:""}
@@ -60,7 +60,6 @@
60
60
  -webkit-tap-highlight-color: transparent;
61
61
  &::selection {
62
62
  background-color: ${`${n}e1`};
63
- color: ${i};
64
63
  }
65
64
  }
66
65
 
@@ -87,7 +86,7 @@
87
86
  sans-serif;
88
87
  line-height: 1.5;
89
88
  font-weight: 400;
90
- color-scheme: ${r?"dark":"light"};
89
+ color-scheme: ${o?"dark":"light"};
91
90
  font-synthesis: none;
92
91
  text-rendering: optimizeLegibility;
93
92
  -webkit-font-smoothing: antialiased;
@@ -100,17 +99,17 @@
100
99
  height: 100%;
101
100
  overflow: auto;
102
101
  touch-action: manipulation;
103
- background: ${o};
102
+ background: ${t};
104
103
  background-attachment: fixed;
105
104
  background-size: cover;
106
105
  transition: 0.3s background;
107
106
  /* Firefox */
108
- scrollbar-color: ${n} ${o};
107
+ scrollbar-color: ${n} ${t};
109
108
  scrollbar-width: thin;
110
109
 
111
110
  ::-webkit-scrollbar {
112
111
  width: 8px;
113
- background-color: ${o};
112
+ background-color: ${t};
114
113
  }
115
114
  ::-webkit-scrollbar-thumb {
116
115
  background-color: ${n};
@@ -121,7 +120,7 @@
121
120
  }
122
121
  ::-webkit-scrollbar-track {
123
122
  border-radius: 64px;
124
- background-color: ${o};
123
+ background-color: ${t};
125
124
  }
126
125
  }
127
126
 
@@ -153,11 +152,11 @@
153
152
  .customScrollbar,
154
153
  textarea {
155
154
  /* Firefox */
156
- scrollbar-color: ${n} ${a};
155
+ scrollbar-color: ${n} ${i};
157
156
  scrollbar-width: thin;
158
157
  ::-webkit-scrollbar {
159
158
  width: 8px;
160
- background-color: ${a};
159
+ background-color: ${i};
161
160
  }
162
161
  ::-webkit-scrollbar-thumb {
163
162
  background-color: ${n};
@@ -168,7 +167,7 @@
168
167
  }
169
168
  ::-webkit-scrollbar-track {
170
169
  border-radius: 64px;
171
- background-color: ${a};
170
+ background-color: ${i};
172
171
  }
173
172
  }
174
173
 
@@ -177,7 +176,7 @@
177
176
  border-radius: 42px 42px 0 0;
178
177
  z-index: 9999999;
179
178
  }
180
- `})};var f=require("@emotion/react"),ve=f.keyframes`
179
+ `})};var p=require("@emotion/react"),oe=p.keyframes`
181
180
  from {
182
181
  opacity: 0;
183
182
  transform: translateX(-40px);
@@ -186,48 +185,48 @@
186
185
  opacity: 1;
187
186
  transform: translateX(0);
188
187
  }
189
- `,ke=f.keyframes`
188
+ `,te=p.keyframes`
190
189
  from {
191
190
  opacity: 0;
192
191
  }
193
192
  to {
194
193
  opacity: 1;
195
194
  }
196
- `,we=f.keyframes`
195
+ `,ne=p.keyframes`
197
196
  from {
198
197
  transform: translateX(-100%);
199
198
  }
200
199
  to {
201
200
  transform: translateX(0);
202
201
  }
203
- `,Te=f.keyframes`
202
+ `,ie=p.keyframes`
204
203
  from {
205
204
  transform: translateY(100%);
206
205
  }
207
206
  to {
208
207
  transform: translateY(0);
209
208
  }
210
- `,Ce=f.keyframes`
209
+ `,ae=p.keyframes`
211
210
  from {
212
211
  transform: scale(0);
213
212
  }
214
213
  to {
215
214
  transform: scale(1);
216
215
  }
217
- `,Se=(e,t=12)=>f.keyframes`
216
+ `,se=(e,r=12)=>p.keyframes`
218
217
  0% {
219
218
  transform: scale(0.95);
220
219
  box-shadow: 0 0 0 0 ${e}b2;
221
220
  }
222
221
  70% {
223
222
  transform: scale(1);
224
- box-shadow: 0 0 0 ${t}px ${e}00;
223
+ box-shadow: 0 0 0 ${r}px ${e}00;
225
224
  }
226
225
  100% {
227
226
  transform: scale(0.95);
228
227
  box-shadow: 0 0 0 0 ${e}00;
229
228
  }
230
- `,Pe=e=>f.keyframes`
229
+ `,me=e=>p.keyframes`
231
230
  0% {
232
231
  filter: none;
233
232
  }
@@ -237,7 +236,7 @@
237
236
  100% {
238
237
  filter: none;
239
238
  }
240
- `,Me=f.keyframes`
239
+ `,le=p.keyframes`
241
240
  0% {
242
241
  transform: scale(1);
243
242
  opacity: 1;
@@ -250,7 +249,7 @@
250
249
  transform: scale(1);
251
250
  opacity: 1;
252
251
  }
253
- `,Re=f.keyframes`
252
+ `,de=p.keyframes`
254
253
  0% {
255
254
  transform: translateY(0);
256
255
  }
@@ -266,5 +265,5 @@
266
265
  100% {
267
266
  transform: translateY(0);
268
267
  }
269
- `;var v=require("react/jsx-runtime"),Oe=({children:e,fontFamily:t,themes:r,colorPaletteOverride:n,themeOverrides:o})=>{let a=z();(0,d.useEffect)(()=>{E(n)},[n]);let[i,l]=(0,d.useState)("system"),[p,S]=(0,d.useState)("auto");(0,d.useEffect)(()=>{if(globalThis.window!==void 0)try{let h=globalThis.localStorage.getItem("appSettings");if(h){let g=JSON.parse(h);g.theme&&l(g.theme),g.darkMode&&S(g.darkMode)}}catch(h){}},[]),(0,d.useEffect)(()=>{if(globalThis.window!==void 0)try{globalThis.localStorage.setItem("appSettings",JSON.stringify({theme:i,darkMode:p}))}catch(h){}},[i,p]);let b=(0,d.useMemo)(()=>r&&r.length>0?r:[{name:"Default",primaryColor:s().brand}],[r]),y=(0,d.useMemo)(()=>i==="system"||a==="unknown"?b[0]:b.find(h=>h.name===i)||b[0],[a,i,b]),k=(0,d.useMemo)(()=>$(p,a)?"dark":"light",[p,a]),Ie=(0,d.useMemo)(()=>{var g;let h=(g=y.background)==null?void 0:g[k];return A(y.primaryColor,k,y.secondaryColor,h,o)},[y,k,o]),Ee=(0,d.useMemo)(()=>({darkMode:k==="dark"}),[k]);return(0,v.jsx)(H.Provider,{value:{theme:i,darkMode:p,setTheme:l,setDarkMode:S},children:(0,v.jsx)(Fe.ThemeProvider,{theme:Ie,children:(0,v.jsxs)(De.ThemeProvider,{theme:Ee,children:[(0,v.jsx)(G,{fontFamily:t}),e]})})})};0&&(module.exports={ColorPalette,DialogBtn,ErrorBoundary,GlobalStyles,Loading,PathName,ThemeProviderWrapper,commonComponentProps,createCustomTheme,darkModeOptions,defaultColorPalette,displayGreeting,fadeIn,fadeInLeft,getColorPalette,getDayIdentifier,getFontColor,installAppAnimation,isDarkMode,isFontLight,isHexColor,logoutAnimation,progressPulse,pulseAnimation,scale,setColorPaletteOverride,slideIn,slideInBottom,systemInfo,timeAgo,timeAgoFromStart,useResponsiveDisplay,useSystemTheme,useThemeSettings});
268
+ `;var pe=e=>/^#([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$/.test(e);var ce=()=>{let e=new Date().getHours();return e>=5&&e<12?"Good morning":e>12&&e<18?"Good afternoon":"Good evening"};var fe=e=>{let r=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${r}-${o}-${n}`};var Le=()=>{let e=(typeof navigator=="undefined"?"":navigator.userAgent).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"},ze=()=>{let e=(typeof navigator=="undefined"?"":navigator.userAgent).toLowerCase();return e.includes("edg")?"Edge":e.includes("chrome")?"Chrome":e.includes("firefox")?"Firefox":e.includes("safari")?"Safari":"Unknown"},ue={os:typeof navigator=="undefined"?"Unknown":Le(),browser:typeof navigator=="undefined"?"Unknown":ze()};var R=(e,r)=>{switch(e){case"light":return!1;case"dark":return!0;case"system":return r==="dark";default:return!1}};var he=(e,r)=>{let o=r!=null?r:typeof navigator=="undefined"?"en-US":navigator.language,n=new Date;e=new Date(e);let t=Math.floor((n.getTime()-e.getTime())/1e3),i=new Intl.RelativeTimeFormat(o,{numeric:"auto"});if(t<60)return i.format(-t,"second");if(t<3600){let a=Math.floor(t/60);return i.format(-a,"minute")}if(t<86400){let a=Math.floor(t/3600);return i.format(-a,"hour")}let s=Math.floor(t/86400);return i.format(-s,"day")},ge=(e,r)=>{let o=r!=null?r:typeof navigator=="undefined"?"en-US":navigator.language,n=new Date;e=new Date(e);let t=(e.getTime()-n.getTime())/1e3,i=Math.floor(t/(60*60)),s=Math.floor((t-60*60*i)/60),a=Math.floor(t-60*60*i-60*s),f=new Intl.RelativeTimeFormat(o,{numeric:"auto"});if(s===0&&a<60)return f.format(a,"second");if(i===0&&s<60)return f.format(s,"minute");if(i<24){let u=`${new Intl.RelativeTimeFormat(o,{numeric:"auto"}).format(i,"hour")}`,A=` ${new Intl.RelativeTimeFormat(o,{localeMatcher:"lookup",numeric:"always",style:"long"}).format(s,"minute")}`.replace(/^\D+/,"");return`${u} ${A}`}let m=Math.floor(a/86400);return f.format(m,"day")};var E=require("react"),xe=(e=768)=>{let[r,o]=(0,E.useState)(!1);return(0,E.useEffect)(()=>{let n=()=>{o(window.innerWidth<e)};n();let t=()=>n();return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),r};var D=require("react"),I=()=>{let[e,r]=(0,D.useState)("unknown");return(0,D.useEffect)(()=>{let o=t=>{r(t.matches?"dark":"light")},n=globalThis.matchMedia("(prefers-color-scheme: dark)");return r(n.matches?"dark":"light"),n.addEventListener("change",o),()=>{n.removeEventListener("change",o)}},[]),e};var c=require("react");var ye="Default",be=e=>{if(!e||e.length===0)return[{name:ye}];if(e.length===1){let r=e[0],o=r.name&&r.name.trim().length>0?r.name:ye;return[{...r,name:o}]}for(let r of e)if(!("name"in r)||!r.name||r.name.trim().length===0)throw new Error("ThemeProviderWrapper: when providing multiple themes, each theme must include a non-empty `name`.");return e};var ve="appSettings",Te=({themes:e})=>{let[r,o]=(0,c.useState)("system"),[n,t]=(0,c.useState)("auto"),[i,s]=(0,c.useState)(!1),a=(0,c.useMemo)(()=>be(e),[e]),f=(0,c.useMemo)(()=>a.find(m=>m.name===r)||a[0],[r,a]);return(0,c.useEffect)(()=>{if(globalThis.window!==void 0)try{let m=globalThis.localStorage.getItem(ve);if(m){let u=JSON.parse(m);u.theme&&o(u.theme),u.darkMode&&t(u.darkMode)}}catch(m){}finally{s(!0)}},[]),(0,c.useEffect)(()=>{if(globalThis.window!==void 0&&i)try{globalThis.localStorage.setItem(ve,JSON.stringify({theme:r,darkMode:n}))}catch(m){}},[i,r,n]),{theme:r,setTheme:o,darkMode:n,setDarkMode:t,themesSource:a,selectedTheme:f}};var x=require("react/jsx-runtime"),Se=({children:e,fontFamily:r,themes:o})=>{let n=I(),{theme:t,setTheme:i,darkMode:s,setDarkMode:a,selectedTheme:f}=Te({themes:o}),m=(0,C.useMemo)(()=>R(s,n)?"dark":"light",[s,n]),u=(0,C.useMemo)(()=>{let{name:Me,...Pe}=f;if(!Me)throw new Error("ThemeProviderWrapper: selected theme must include a non-empty `name`.");return M(m,Pe)},[f,m]),A=(0,C.useMemo)(()=>({darkMode:m==="dark"}),[m]);return(0,x.jsx)(F.Provider,{value:{theme:t,darkMode:s,setTheme:i,setDarkMode:a},children:(0,x.jsx)(we.ThemeProvider,{theme:u,children:(0,x.jsxs)(ke.ThemeProvider,{theme:A,children:[(0,x.jsx)(O,{fontFamily:r}),e]})})})};0&&(module.exports={DialogBtn,ErrorBoundary,GlobalStyles,Loading,PathName,ThemeProviderWrapper,commonComponentProps,createCustomTheme,darkModeOptions,displayGreeting,fadeIn,fadeInLeft,getDayIdentifier,installAppAnimation,isDarkMode,isHexColor,logoutAnimation,progressPulse,pulseAnimation,scale,slideIn,slideInBottom,systemInfo,timeAgo,timeAgoFromStart,useResponsiveDisplay,useSystemTheme,useThemeSettings});
270
269
  //# sourceMappingURL=index.js.map