@atomazing-org/design-system 1.0.72 → 1.0.74
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/README.MD +78 -10
- package/dist/index.d.mts +15 -27
- package/dist/index.d.ts +15 -27
- package/dist/index.js +27 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +68 -68
package/README.MD
CHANGED
|
@@ -46,33 +46,101 @@ export function App() {
|
|
|
46
46
|
If `themes` is not provided, the provider falls back to a single "Default" theme using the current palette brand color.
|
|
47
47
|
|
|
48
48
|
Provider Props
|
|
49
|
-
- `themes?:
|
|
49
|
+
- `themes?: ThemesProp` (single theme may omit `name`, multiple themes require `name`)
|
|
50
50
|
- `fontFamily?: string`
|
|
51
51
|
- `colorPaletteOverride?: Partial<ColorPaletteType>`
|
|
52
|
+
`ThemeOptions` is the MUI theme options type from `@mui/material/styles`.
|
|
53
|
+
|
|
54
|
+
Theme Names
|
|
55
|
+
Single theme can omit `name` (defaults to `"Default"`). Multiple themes require a non-empty `name` for each theme.
|
|
56
|
+
|
|
57
|
+
Before (single theme required a name):
|
|
58
|
+
```tsx
|
|
59
|
+
<ThemeProviderWrapper
|
|
60
|
+
themes={[
|
|
61
|
+
{
|
|
62
|
+
name: 'Blue',
|
|
63
|
+
palette: { primary: { main: '#3B82F6' } },
|
|
64
|
+
},
|
|
65
|
+
]}
|
|
66
|
+
/>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
After (single theme name omitted):
|
|
70
|
+
```tsx
|
|
71
|
+
<ThemeProviderWrapper
|
|
72
|
+
themes={[
|
|
73
|
+
{
|
|
74
|
+
palette: { primary: { main: '#3B82F6' } },
|
|
75
|
+
},
|
|
76
|
+
]}
|
|
77
|
+
/>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Multiple themes (name required):
|
|
81
|
+
```tsx
|
|
82
|
+
<ThemeProviderWrapper
|
|
83
|
+
themes={[
|
|
84
|
+
{
|
|
85
|
+
name: 'BrandA',
|
|
86
|
+
palette: { primary: { main: '#00A3FF' } },
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'BrandB',
|
|
90
|
+
palette: { primary: { main: '#10B981' } },
|
|
91
|
+
},
|
|
92
|
+
]}
|
|
93
|
+
/>
|
|
94
|
+
```
|
|
52
95
|
|
|
53
96
|
Dynamic Themes (array)
|
|
54
|
-
Provide a fully dynamic list of
|
|
97
|
+
Provide a fully dynamic list of `ThemeOptions` overrides. Names are required when supplying multiple themes. Provider-controlled `palette.mode` always wins.
|
|
98
|
+
|
|
99
|
+
Minimal example (primary color only):
|
|
100
|
+
```tsx
|
|
101
|
+
<ThemeProviderWrapper
|
|
102
|
+
themes={[
|
|
103
|
+
{
|
|
104
|
+
name: 'Blue',
|
|
105
|
+
palette: {
|
|
106
|
+
primary: { main: '#3B82F6' },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
]}
|
|
110
|
+
>
|
|
111
|
+
{/* ... */}
|
|
112
|
+
</ThemeProviderWrapper>
|
|
113
|
+
```
|
|
55
114
|
|
|
115
|
+
Advanced example (palette + components overrides):
|
|
56
116
|
```tsx
|
|
57
117
|
<ThemeProviderWrapper
|
|
58
118
|
themes={[
|
|
59
|
-
{ name: 'Blue', primaryColor: '#3B82F6' },
|
|
60
119
|
{
|
|
61
|
-
name: '
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
120
|
+
name: 'BrandA',
|
|
121
|
+
palette: {
|
|
122
|
+
primary: { main: '#00A3FF' },
|
|
123
|
+
background: { default: '#F7FAFF', paper: '#FFFFFF' },
|
|
124
|
+
},
|
|
125
|
+
components: {
|
|
126
|
+
MuiButton: {
|
|
127
|
+
styleOverrides: {
|
|
128
|
+
root: { textTransform: 'none' },
|
|
129
|
+
},
|
|
130
|
+
},
|
|
67
131
|
},
|
|
68
132
|
},
|
|
69
|
-
{ name: 'Gray', primaryColor: '#64748B' },
|
|
70
133
|
]}
|
|
71
134
|
>
|
|
72
135
|
{/* ... */}
|
|
73
136
|
</ThemeProviderWrapper>
|
|
74
137
|
```
|
|
75
138
|
|
|
139
|
+
Migration Notes (breaking)
|
|
140
|
+
- Legacy `themes` shape (`primaryColor`, `secondaryColor`, `background`) removed.
|
|
141
|
+
- `themeOverrides` prop removed.
|
|
142
|
+
- Use `themes: ThemesProp` for customization (single theme may omit `name`, multiple themes require `name`).
|
|
143
|
+
|
|
76
144
|
Theme Switching (UI)
|
|
77
145
|
Use the theme context to read and change the active theme.
|
|
78
146
|
|
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
|
*/
|
|
@@ -235,36 +239,23 @@ declare const defaultColorPalette: ColorPaletteType;
|
|
|
235
239
|
|
|
236
240
|
declare const useThemeSettings: () => ThemeContextProps;
|
|
237
241
|
|
|
242
|
+
type Theme1 = ThemeOptions$1 & {
|
|
243
|
+
name?: string;
|
|
244
|
+
};
|
|
245
|
+
type ThemeN = ThemeOptions$1 & {
|
|
246
|
+
name: string;
|
|
247
|
+
};
|
|
248
|
+
type ThemesProp = [Theme1] | [ThemeN, ...ThemeN[]];
|
|
238
249
|
type ThemeProviderWrapperProps = PropsWithChildren<{
|
|
239
250
|
/** Optional font stack to apply across the app. */
|
|
240
251
|
fontFamily?: string;
|
|
241
252
|
/**
|
|
242
253
|
* Optional dynamic list of themes.
|
|
243
|
-
*
|
|
254
|
+
* Each theme is a full ThemeOptions object.
|
|
244
255
|
*/
|
|
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
|
-
}[];
|
|
256
|
+
themes?: ThemesProp;
|
|
260
257
|
/** Optional color palette override (e.g., fontLight/fontDark/accent colors). */
|
|
261
258
|
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.
|
|
266
|
-
*/
|
|
267
|
-
themeOverrides?: ThemeOptions;
|
|
268
259
|
}>;
|
|
269
260
|
declare const ThemeProviderWrapper: FC<ThemeProviderWrapperProps>;
|
|
270
261
|
|
|
@@ -274,10 +265,7 @@ declare const ThemeProviderWrapper: FC<ThemeProviderWrapperProps>;
|
|
|
274
265
|
*/
|
|
275
266
|
declare const commonComponentProps: Theme["components"];
|
|
276
267
|
|
|
277
|
-
declare const createCustomTheme: (
|
|
278
|
-
default?: string;
|
|
279
|
-
paper?: string;
|
|
280
|
-
}, themeOverrides?: ThemeOptions) => Theme;
|
|
268
|
+
declare const createCustomTheme: (mode?: PaletteMode, overrides?: ThemeOptions) => Theme;
|
|
281
269
|
|
|
282
270
|
/**
|
|
283
271
|
* Injects global styles into the document using Emotion.
|
|
@@ -479,4 +467,4 @@ declare const useResponsiveDisplay: (breakpoint?: number) => boolean;
|
|
|
479
467
|
*/
|
|
480
468
|
declare const useSystemTheme: () => SystemTheme;
|
|
481
469
|
|
|
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 };
|
|
470
|
+
export { type AppSettings, ColorPalette, type ColorPaletteType, 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, defaultColorPalette, displayGreeting, fadeIn, fadeInLeft, getColorPalette, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, setColorPaletteOverride, 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
|
*/
|
|
@@ -235,36 +239,23 @@ declare const defaultColorPalette: ColorPaletteType;
|
|
|
235
239
|
|
|
236
240
|
declare const useThemeSettings: () => ThemeContextProps;
|
|
237
241
|
|
|
242
|
+
type Theme1 = ThemeOptions$1 & {
|
|
243
|
+
name?: string;
|
|
244
|
+
};
|
|
245
|
+
type ThemeN = ThemeOptions$1 & {
|
|
246
|
+
name: string;
|
|
247
|
+
};
|
|
248
|
+
type ThemesProp = [Theme1] | [ThemeN, ...ThemeN[]];
|
|
238
249
|
type ThemeProviderWrapperProps = PropsWithChildren<{
|
|
239
250
|
/** Optional font stack to apply across the app. */
|
|
240
251
|
fontFamily?: string;
|
|
241
252
|
/**
|
|
242
253
|
* Optional dynamic list of themes.
|
|
243
|
-
*
|
|
254
|
+
* Each theme is a full ThemeOptions object.
|
|
244
255
|
*/
|
|
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
|
-
}[];
|
|
256
|
+
themes?: ThemesProp;
|
|
260
257
|
/** Optional color palette override (e.g., fontLight/fontDark/accent colors). */
|
|
261
258
|
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.
|
|
266
|
-
*/
|
|
267
|
-
themeOverrides?: ThemeOptions;
|
|
268
259
|
}>;
|
|
269
260
|
declare const ThemeProviderWrapper: FC<ThemeProviderWrapperProps>;
|
|
270
261
|
|
|
@@ -274,10 +265,7 @@ declare const ThemeProviderWrapper: FC<ThemeProviderWrapperProps>;
|
|
|
274
265
|
*/
|
|
275
266
|
declare const commonComponentProps: Theme["components"];
|
|
276
267
|
|
|
277
|
-
declare const createCustomTheme: (
|
|
278
|
-
default?: string;
|
|
279
|
-
paper?: string;
|
|
280
|
-
}, themeOverrides?: ThemeOptions) => Theme;
|
|
268
|
+
declare const createCustomTheme: (mode?: PaletteMode, overrides?: ThemeOptions) => Theme;
|
|
281
269
|
|
|
282
270
|
/**
|
|
283
271
|
* Injects global styles into the document using Emotion.
|
|
@@ -479,4 +467,4 @@ declare const useResponsiveDisplay: (breakpoint?: number) => boolean;
|
|
|
479
467
|
*/
|
|
480
468
|
declare const useSystemTheme: () => SystemTheme;
|
|
481
469
|
|
|
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 };
|
|
470
|
+
export { type AppSettings, ColorPalette, type ColorPaletteType, 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, defaultColorPalette, displayGreeting, fadeIn, fadeInLeft, getColorPalette, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, setColorPaletteOverride, 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
|
|
1
|
+
"use strict";var Ae=Object.create;var S=Object.defineProperty;var $e=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var Be=Object.getPrototypeOf,ze=Object.prototype.hasOwnProperty;var Ne=(e,t)=>{for(var n in t)S(e,n,{get:t[n],enumerable:!0})},V=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Le(t))!ze.call(e,o)&&o!==n&&S(e,o,{get:()=>t[o],enumerable:!(r=$e(t,o))||r.enumerable});return e};var h=(e,t,n)=>(n=e!=null?Ae(Be(e)):{},V(t||!e||!e.__esModule?S(n,"default",{value:e,enumerable:!0}):n,e)),We=e=>V(S({},"__esModule",{value:!0}),e);var Je={};Ne(Je,{ColorPalette:()=>se,DialogBtn:()=>Q,ErrorBoundary:()=>P,GlobalStyles:()=>W,Loading:()=>q,PathName:()=>ee,ThemeProviderWrapper:()=>De,commonComponentProps:()=>D,createCustomTheme:()=>A,darkModeOptions:()=>ie,defaultColorPalette:()=>k,displayGreeting:()=>de,fadeIn:()=>Te,fadeInLeft:()=>_e,getColorPalette:()=>x,getDayIdentifier:()=>he,getFontColor:()=>C,installAppAnimation:()=>Me,isDarkMode:()=>$,isFontLight:()=>me,isHexColor:()=>Y,logoutAnimation:()=>Pe,progressPulse:()=>Se,pulseAnimation:()=>Ce,scale:()=>ke,setColorPaletteOverride:()=>F,slideIn:()=>ve,slideInBottom:()=>we,systemInfo:()=>ce,timeAgo:()=>fe,timeAgoFromStart:()=>ue,useResponsiveDisplay:()=>xe,useSystemTheme:()=>z,useThemeSettings:()=>ae});module.exports=We(Je);var X=h(require("@emotion/styled")),J=require("@mui/material"),Q=(0,X.default)(J.Button)`
|
|
2
2
|
padding: 10px 16px;
|
|
3
3
|
border-radius: 16px;
|
|
4
4
|
font-size: 16px;
|
|
5
5
|
margin: 8px;
|
|
6
|
-
`;var
|
|
6
|
+
`;var j=h(require("react")),G=h(require("@emotion/styled")),U=h(require("@mui/icons-material/ErrorOutlineRounded")),T=require("@mui/material"),p=require("react/jsx-runtime"),P=class extends j.default.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Error:",t),console.error("Error Info:",n)}render(){var r,o,i;let{state:t,props:n}=this;return t.hasError?(0,p.jsxs)(Ue,{children:[(0,p.jsx)(Ge,{children:(0,p.jsx)(T.Box,{children:"Something went wrong.\xA0"})}),(0,p.jsxs)("h3",{children:[(0,p.jsxs)(T.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,p.jsx)(U.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","ERROR:"]})," ",(0,p.jsxs)(T.Box,{translate:"no",children:["[",(r=t.error)==null?void 0:r.name,"] ",(o=t.error)==null?void 0:o.message]}),(0,p.jsxs)(T.Box,{style:{color:"#ff3131",display:"inline-block"},children:[(0,p.jsx)(U.default,{sx:{verticalAlign:"middle",mb:"4px"}})," ","Stack:"]})," ",(0,p.jsxs)(T.Box,{translate:"no",children:["[",(i=t.error)==null?void 0:i.stack,"]"]})]})]}):n.children}},Ue=G.default.div`
|
|
7
7
|
margin: 0 8vw;
|
|
8
8
|
@media (max-width: 768px) {
|
|
9
9
|
margin: 0;
|
|
10
10
|
}
|
|
11
|
-
`,
|
|
11
|
+
`,Ge=G.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
|
|
27
|
+
`;var M=require("react"),Z=h(require("@emotion/styled")),O=require("@mui/material"),u=require("react/jsx-runtime"),q=()=>{let[e,t]=(0,M.useState)(!1);return(0,M.useEffect)(()=>{let n=setTimeout(()=>{t(!0)},100);return()=>clearTimeout(n)},[]),(0,u.jsx)(He,{"aria-live":"polite",role:"status",children:e&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(O.CircularProgress,{"aria-label":"loading",size:80,thickness:4}),(0,u.jsx)("h3",{style:{opacity:.8},children:"Loading Page..."})]})})},He=(0,Z.default)(O.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
|
|
38
|
+
`;var K=h(require("@emotion/styled")),ee=K.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 te=h(require("@mui/icons-material/BrightnessAutoRounded")),re=h(require("@mui/icons-material/DarkModeRounded")),oe=h(require("@mui/icons-material/LightModeRounded")),ne=h(require("@mui/icons-material/PersonalVideoRounded")),w=require("react/jsx-runtime"),R=32,ie=[{label:"Auto",value:"auto",icon:(0,w.jsx)(te.default,{color:"inherit",sx:{fontSize:R}})},{label:"System",value:"system",icon:(0,w.jsx)(ne.default,{color:"inherit",sx:{fontSize:R}})},{label:"Light",value:"light",icon:(0,w.jsx)(oe.default,{color:"inherit",sx:{fontSize:R}})},{label:"Dark",value:"dark",icon:(0,w.jsx)(re.default,{color:"inherit",sx:{fontSize:R}})}];var k={fontDark:"#101727",fontLight:"#f0f0f0",brand:"#9FA9EA",accent:"#F3503A",muted:"#64748B",success:"#2E7D32",info:"#0288D1",warning:"#ED6C02",error:"#D32F2F",neutral:"#64748B"};var E=require("react"),H=(0,E.createContext)(void 0),ae=()=>{let e=(0,E.useContext)(H);if(!e)throw new Error("useThemeSettings must be used within ThemeProviderWrapper");return e};var l=require("react"),Re=require("@emotion/react"),Ee=require("@mui/material/styles");var D={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 I=require("@mui/material");var m={...k},x=()=>m,F=e=>{m={...k,...e}},se={get fontDark(){return m.fontDark},get fontLight(){return m.fontLight},get brand(){return m.brand},get accent(){return m.accent},get muted(){return m.muted},get success(){return m.success},get info(){return m.info},get warning(){return m.warning},get error(){return m.error},get neutral(){return m.neutral}};var le={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"}}},pe={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="light",t)=>{let n=e==="dark",r=(0,I.createTheme)({palette:{mode:e}}),o=x(),i=o.brand,s={palette:{primary:{...r.palette.primary,main:i},brand:r.palette.augmentColor({color:{main:i}}),neutral:r.palette.augmentColor({color:{main:o.neutral}}),accent:r.palette.augmentColor({color:{main:o.accent}}),muted:r.palette.augmentColor({color:{main:o.muted}}),error:{...r.palette.error,main:o.error},warning:{...r.palette.warning,main:o.warning},success:{...r.palette.success,main:o.success},info:{...r.palette.info,main:o.info},background:(()=>{let g=n?{default:"#1C1C1E",paper:"#2C2C2E"}:{default:"#F2F2F7",paper:"#FFFFFF"};return{...r.palette.background,...g}})(),divider:n?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.12)"},components:{...D,MuiTypography:le},typography:{...pe,fontFamily:'var(--app-font-family, "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif)'},shape:{borderRadius:24}},a=(0,I.createTheme)(r,s,t!=null?t:{}),d=a.palette.primary.main;return(0,I.createTheme)(a,{palette:{mode:e,brand:a.palette.augmentColor({color:{main:d}})}})};var ge=require("react"),N=require("@emotion/react"),be=require("@mui/material/styles");var Y=e=>/^#([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$/.test(e),C=e=>{if(!Y(e))return console.error("Invalid hex color provided:",e),x().fontDark;let t=e.slice(1),n=t.length===3?t.split("").map(d=>d+d).join(""):t,r=Number.parseInt(n.slice(0,2),16),o=Number.parseInt(n.slice(2,4),16),i=Number.parseInt(n.slice(4,6),16),s=Math.round((r*299+o*587+i*114)/1e3),a=x();return s>128?a.fontDark:a.fontLight},me=e=>C(e)===x().fontLight;var de=()=>{let e=new Date().getHours();return e>=5&&e<12?"Good morning":e>12&&e<18?"Good afternoon":"Good evening"};var he=e=>{let t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`};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"},ce={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 fe=(e,t)=>{let n=t!=null?t:typeof navigator=="undefined"?"en-US":navigator.language,r=new Date;e=new Date(e);let o=Math.floor((r.getTime()-e.getTime())/1e3),i=new Intl.RelativeTimeFormat(n,{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 s=Math.floor(o/86400);return i.format(-s,"day")},ue=(e,t)=>{let n=t!=null?t:typeof navigator=="undefined"?"en-US":navigator.language,r=new Date;e=new Date(e);let o=(e.getTime()-r.getTime())/1e3,i=Math.floor(o/(60*60)),s=Math.floor((o-60*60*i)/60),a=Math.floor(o-60*60*i-60*s),d=new Intl.RelativeTimeFormat(n,{numeric:"auto"});if(s===0&&a<60)return d.format(a,"second");if(i===0&&s<60)return d.format(s,"minute");if(i<24){let b=`${new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(i,"hour")}`,y=` ${new Intl.RelativeTimeFormat(n,{localeMatcher:"lookup",numeric:"always",style:"long"}).format(s,"minute")}`.replace(/^\D+/,"");return`${b} ${y}`}let g=Math.floor(a/86400);return d.format(g,"day")};var L=require("react"),xe=(e=768)=>{let[t,n]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{let r=()=>{n(window.innerWidth<e)};r();let o=()=>r();return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[e]),t};var B=require("react"),z=()=>{let[e,t]=(0,B.useState)("unknown");return(0,B.useEffect)(()=>{let n=o=>{t(o.matches?"dark":"light")},r=globalThis.matchMedia("(prefers-color-scheme: dark)");return t(r.matches?"dark":"light"),r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}},[]),e};var ye=require("react/jsx-runtime"),W=({fontFamily:e})=>{let t=(0,be.useTheme)(),n=t.palette.mode==="dark",r=t.palette.primary.main,o=t.palette.background.default,i=t.palette.background.paper,s=(0,ge.useMemo)(()=>C(r),[r]);return(0,ye.jsx)(N.Global,{styles:N.css`
|
|
44
44
|
/* Allow application to control font via CSS var or prop */
|
|
45
45
|
:root {
|
|
46
46
|
${e?`--app-font-family: ${e};`:""}
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
sans-serif !important;
|
|
60
60
|
-webkit-tap-highlight-color: transparent;
|
|
61
61
|
&::selection {
|
|
62
|
-
background-color: ${`${
|
|
63
|
-
color: ${
|
|
62
|
+
background-color: ${`${r}e1`};
|
|
63
|
+
color: ${s};
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
sans-serif;
|
|
88
88
|
line-height: 1.5;
|
|
89
89
|
font-weight: 400;
|
|
90
|
-
color-scheme: ${
|
|
90
|
+
color-scheme: ${n?"dark":"light"};
|
|
91
91
|
font-synthesis: none;
|
|
92
92
|
text-rendering: optimizeLegibility;
|
|
93
93
|
-webkit-font-smoothing: antialiased;
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
background-size: cover;
|
|
106
106
|
transition: 0.3s background;
|
|
107
107
|
/* Firefox */
|
|
108
|
-
scrollbar-color: ${
|
|
108
|
+
scrollbar-color: ${r} ${o};
|
|
109
109
|
scrollbar-width: thin;
|
|
110
110
|
|
|
111
111
|
::-webkit-scrollbar {
|
|
@@ -113,11 +113,11 @@
|
|
|
113
113
|
background-color: ${o};
|
|
114
114
|
}
|
|
115
115
|
::-webkit-scrollbar-thumb {
|
|
116
|
-
background-color: ${
|
|
116
|
+
background-color: ${r};
|
|
117
117
|
border-radius: 64px;
|
|
118
118
|
}
|
|
119
119
|
::-webkit-scrollbar-thumb:hover {
|
|
120
|
-
background-color: ${`${
|
|
120
|
+
background-color: ${`${r}d8`};
|
|
121
121
|
}
|
|
122
122
|
::-webkit-scrollbar-track {
|
|
123
123
|
border-radius: 64px;
|
|
@@ -153,22 +153,22 @@
|
|
|
153
153
|
.customScrollbar,
|
|
154
154
|
textarea {
|
|
155
155
|
/* Firefox */
|
|
156
|
-
scrollbar-color: ${
|
|
156
|
+
scrollbar-color: ${r} ${i};
|
|
157
157
|
scrollbar-width: thin;
|
|
158
158
|
::-webkit-scrollbar {
|
|
159
159
|
width: 8px;
|
|
160
|
-
background-color: ${
|
|
160
|
+
background-color: ${i};
|
|
161
161
|
}
|
|
162
162
|
::-webkit-scrollbar-thumb {
|
|
163
|
-
background-color: ${
|
|
163
|
+
background-color: ${r};
|
|
164
164
|
border-radius: 64px;
|
|
165
165
|
}
|
|
166
166
|
::-webkit-scrollbar-thumb:hover {
|
|
167
|
-
background-color: ${`${
|
|
167
|
+
background-color: ${`${r}d8`};
|
|
168
168
|
}
|
|
169
169
|
::-webkit-scrollbar-track {
|
|
170
170
|
border-radius: 64px;
|
|
171
|
-
background-color: ${
|
|
171
|
+
background-color: ${i};
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
border-radius: 42px 42px 0 0;
|
|
178
178
|
z-index: 9999999;
|
|
179
179
|
}
|
|
180
|
-
`})};var
|
|
180
|
+
`})};var c=require("@emotion/react"),_e=c.keyframes`
|
|
181
181
|
from {
|
|
182
182
|
opacity: 0;
|
|
183
183
|
transform: translateX(-40px);
|
|
@@ -186,35 +186,35 @@
|
|
|
186
186
|
opacity: 1;
|
|
187
187
|
transform: translateX(0);
|
|
188
188
|
}
|
|
189
|
-
`,
|
|
189
|
+
`,Te=c.keyframes`
|
|
190
190
|
from {
|
|
191
191
|
opacity: 0;
|
|
192
192
|
}
|
|
193
193
|
to {
|
|
194
194
|
opacity: 1;
|
|
195
195
|
}
|
|
196
|
-
`,
|
|
196
|
+
`,ve=c.keyframes`
|
|
197
197
|
from {
|
|
198
198
|
transform: translateX(-100%);
|
|
199
199
|
}
|
|
200
200
|
to {
|
|
201
201
|
transform: translateX(0);
|
|
202
202
|
}
|
|
203
|
-
`,
|
|
203
|
+
`,we=c.keyframes`
|
|
204
204
|
from {
|
|
205
205
|
transform: translateY(100%);
|
|
206
206
|
}
|
|
207
207
|
to {
|
|
208
208
|
transform: translateY(0);
|
|
209
209
|
}
|
|
210
|
-
`,
|
|
210
|
+
`,ke=c.keyframes`
|
|
211
211
|
from {
|
|
212
212
|
transform: scale(0);
|
|
213
213
|
}
|
|
214
214
|
to {
|
|
215
215
|
transform: scale(1);
|
|
216
216
|
}
|
|
217
|
-
`,
|
|
217
|
+
`,Ce=(e,t=12)=>c.keyframes`
|
|
218
218
|
0% {
|
|
219
219
|
transform: scale(0.95);
|
|
220
220
|
box-shadow: 0 0 0 0 ${e}b2;
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
transform: scale(0.95);
|
|
228
228
|
box-shadow: 0 0 0 0 ${e}00;
|
|
229
229
|
}
|
|
230
|
-
`,
|
|
230
|
+
`,Se=e=>c.keyframes`
|
|
231
231
|
0% {
|
|
232
232
|
filter: none;
|
|
233
233
|
}
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
100% {
|
|
238
238
|
filter: none;
|
|
239
239
|
}
|
|
240
|
-
`,
|
|
240
|
+
`,Pe=c.keyframes`
|
|
241
241
|
0% {
|
|
242
242
|
transform: scale(1);
|
|
243
243
|
opacity: 1;
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
transform: scale(1);
|
|
251
251
|
opacity: 1;
|
|
252
252
|
}
|
|
253
|
-
`,
|
|
253
|
+
`,Me=c.keyframes`
|
|
254
254
|
0% {
|
|
255
255
|
transform: translateY(0);
|
|
256
256
|
}
|
|
@@ -266,5 +266,5 @@
|
|
|
266
266
|
100% {
|
|
267
267
|
transform: translateY(0);
|
|
268
268
|
}
|
|
269
|
-
`;var v=require("react/jsx-runtime"),Oe=({children:e,fontFamily:t,themes:
|
|
269
|
+
`;var v=require("react/jsx-runtime"),Oe="Default",Xe=e=>{if(!e||e.length===0)return[{name:Oe}];if(e.length===1){let t=e[0],n=t.name&&t.name.trim().length>0?t.name:Oe;return[{...t,name:n}]}for(let t of e)if(!("name"in t)||!t.name||t.name.trim().length===0)throw new Error("ThemeProviderWrapper: when providing multiple themes, each theme must include a non-empty `name`.");return e},De=({children:e,fontFamily:t,themes:n,colorPaletteOverride:r})=>{let o=z();(0,l.useEffect)(()=>{F(r)},[r]);let[i,s]=(0,l.useState)("system"),[a,d]=(0,l.useState)("auto");(0,l.useEffect)(()=>{if(globalThis.window!==void 0)try{let f=globalThis.localStorage.getItem("appSettings");if(f){let _=JSON.parse(f);_.theme&&s(_.theme),_.darkMode&&d(_.darkMode)}}catch(f){}},[]);let g=(0,l.useMemo)(()=>Xe(n),[n]),b=(0,l.useMemo)(()=>g.find(f=>f.name===i)||g[0],[i,g]);(0,l.useEffect)(()=>{if(globalThis.window!==void 0)try{globalThis.localStorage.setItem("appSettings",JSON.stringify({theme:b.name,darkMode:a}))}catch(f){}},[b.name,a]);let y=(0,l.useMemo)(()=>$(a,o)?"dark":"light",[a,o]),Fe=(0,l.useMemo)(()=>{let{name:f,..._}=b;if(!f)throw new Error("ThemeProviderWrapper: selected theme must include a non-empty `name`.");return A(y,_)},[b,y]),Ie=(0,l.useMemo)(()=>({darkMode:y==="dark"}),[y]);return(0,v.jsx)(H.Provider,{value:{theme:i,darkMode:a,setTheme:s,setDarkMode:d},children:(0,v.jsx)(Ee.ThemeProvider,{theme:Fe,children:(0,v.jsxs)(Re.ThemeProvider,{theme:Ie,children:[(0,v.jsx)(W,{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});
|
|
270
270
|
//# sourceMappingURL=index.js.map
|