@atomazing-org/design-system 1.0.62 → 1.0.64
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 +268 -0
- package/dist/index.d.mts +86 -60
- package/dist/index.d.ts +86 -60
- package/dist/index.js +54 -67
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -66
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -2
- package/README.MD +0 -227
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import V from"@emotion/styled";import{Button as X}from"@mui/material";var J=V(X)`
|
|
2
2
|
padding: 10px 16px;
|
|
3
3
|
border-radius: 16px;
|
|
4
4
|
font-size: 16px;
|
|
5
5
|
margin: 8px;
|
|
6
|
-
`;import
|
|
6
|
+
`;import Q from"react";import B from"@emotion/styled";import $ from"@mui/icons-material/ErrorOutlineRounded";import{Box as y}from"@mui/material";import{jsx as v,jsxs as x}from"react/jsx-runtime";var S=class extends Q.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?x(j,{children:[v(Z,{children:v(y,{children:"Something went wrong.\xA0"})}),x("h3",{children:[x(y,{style:{color:"#ff3131",display:"inline-block"},children:[v($,{sx:{verticalAlign:"middle",mb:"4px"}})," ","ERROR:"]})," ",x(y,{translate:"no",children:["[",(n=r.error)==null?void 0:n.name,"] ",(t=r.error)==null?void 0:t.message]}),x(y,{style:{color:"#ff3131",display:"inline-block"},children:[v($,{sx:{verticalAlign:"middle",mb:"4px"}})," ","Stack:"]})," ",x(y,{translate:"no",children:["[",(i=r.error)==null?void 0:i.stack,"]"]})]})]}):o.children}},j=B.div`
|
|
7
7
|
margin: 0 8vw;
|
|
8
8
|
@media (max-width: 768px) {
|
|
9
9
|
margin: 0;
|
|
10
10
|
}
|
|
11
|
-
`,
|
|
11
|
+
`,Z=B.h1`
|
|
12
12
|
margin-top: 32px;
|
|
13
13
|
margin-bottom: 32px;
|
|
14
14
|
font-size: 36px;
|
|
@@ -24,7 +24,7 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
24
24
|
margin-top: 0;
|
|
25
25
|
margin-bottom: 0;
|
|
26
26
|
}
|
|
27
|
-
`;import{useEffect as
|
|
27
|
+
`;import{useEffect as q,useState as K}from"react";import ee from"@emotion/styled";import{Box as te,CircularProgress as re}from"@mui/material";import{Fragment as ie,jsx as M,jsxs as ae}from"react/jsx-runtime";var oe=()=>{let[e,r]=K(!1);return q(()=>{let o=setTimeout(()=>{r(!0)},100);return()=>clearTimeout(o)},[]),M(ne,{"aria-live":"polite",role:"status",children:e&&ae(ie,{children:[M(re,{"aria-label":"loading",size:80,thickness:4}),M("h3",{style:{opacity:.8},children:"Loading Page..."})]})})},ne=ee(te)`
|
|
28
28
|
position: absolute;
|
|
29
29
|
top: 50%;
|
|
30
30
|
left: 50%;
|
|
@@ -35,24 +35,31 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
35
35
|
flex-direction: column;
|
|
36
36
|
text-align: center;
|
|
37
37
|
gap: 8px;
|
|
38
|
-
`;import
|
|
38
|
+
`;import se from"@emotion/styled";var le=se.code`
|
|
39
39
|
background: #000000c8;
|
|
40
40
|
color: white;
|
|
41
41
|
padding: 4px 6px;
|
|
42
42
|
border-radius: 8px;
|
|
43
|
-
`;import{createContext as oe,useContext as ie}from"react";var S=oe(void 0),ne=()=>{let e=ie(S);if(!e)throw new Error("useThemeSettings must be used within ThemeProviderWrapper");return e};import{useMemo as y,useState as $,useEffect as $e}from"react";import{ThemeProvider as ze}from"@emotion/react";import{ThemeProvider as Ne}from"@mui/material/styles";var l={fontDark:"#101727",fontLight:"#f0f0f0",purple:"#440850",lavender:"#9FA9EA",carrot:"#F3503A",pistachio:"#62ED97"},w={Main:{primaryColor:"#9FA9EA",secondaryColor:"#f2f2f2"}};var D=e=>/^#([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$/.test(e),x=e=>{if(!D(e))return console.error("Invalid hex color provided:",e),l.fontDark;let r=e.slice(1),t=r.length===3?r.split("").map(s=>s+s).join(""):r,o=Number.parseInt(t.slice(0,2),16),i=Number.parseInt(t.slice(2,4),16),n=Number.parseInt(t.slice(4,6),16);return Math.round((o*299+i*587+n*114)/1e3)>128?l.fontDark:l.fontLight},ae=e=>x(e)===l.fontLight;var M={MuiTooltip:{defaultProps:{disableInteractive:!0},styleOverrides:{tooltip:({theme:e})=>({color:e.palette.mode==="dark"?"#fff":"#000",backgroundColor:e.palette.mode==="dark"?"#141431dd":"#ededf3dd",backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)",padding:"8px 16px",borderRadius:e.shape.borderRadius,fontSize:"12px"})}},MuiButton:{styleOverrides:{root:({theme:e})=>({padding:"12px 24px",borderRadius:e.shape.borderRadius}),contained:{boxShadow:"none"}}},MuiSkeleton:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiSelect:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius}),select:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px"}}},MuiDialog:{defaultProps:{slotProps:{paper:{style:{padding:"12px",borderRadius:24,minWidth:"400px"}}}},styleOverrides:{root:{"& .MuiDialog-container":{backdropFilter:"blur(4px)"}}}},MuiAvatar:{styleOverrides:{root:{fontWeight:500,color:"#fff"}}},MuiAlert:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiTextField:{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",color:e.palette.mode==="dark"?"#fff":"#000",backgroundColor:e.palette.mode==="dark"?"#141431dd":"#ededf3dd","&::before, &::after":{display:"none"}})}},MuiCircularProgress:{styleOverrides:{circle:{strokeLinecap:"round"}}},MuiTab:{styleOverrides:{root:({theme:e})=>({borderRadius:e.shape.borderRadius})}},MuiAccordion:{styleOverrides:{root:{"&::before":{display:"none"}}}}};import{createTheme as L}from"@mui/material";var F={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"}}},A={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 48px/60px inherit inherit"},header_xl_regular:{font:"400 42px/54px inherit inherit"},header_lg_regular:{font:"400 36px/46px inherit inherit"},header_md_regular:{font:"400 30px/38px inherit inherit"},header_sm_regular:{font:"400 26px/34px inherit inherit"},header_xs_regular:{font:"400 22px/30px inherit inherit"},header_2xl_bold:{font:"700 48px/60px inherit inherit"},header_xl_bold:{font:"700 42px/54px inherit inherit"},header_lg_bold:{font:"700 36px/46px inherit inherit"},header_md_bold:{font:"700 30px/38px inherit inherit"},header_sm_bold:{font:"700 26px/34px inherit inherit"},header_xs_bold:{font:"700 22px/30px inherit inherit"}};var f=(e,r="dark")=>{let t=r==="dark",o=L({palette:{mode:r}});return L(o,{palette:{primary:{...o.palette.primary,main:e},error:{...o.palette.error,main:l.carrot},warning:{...o.palette.warning,main:l.carrot},background:t?{...o.palette.background,default:"#1C1C1E",paper:"#2C2C2E"}:{...o.palette.background,default:"#F2F2F7",paper:"#FFFFFF"},divider:t?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.12)"},components:{...M,MuiTypography:F},typography:A,shape:{borderRadius:24}})},m=Object.entries(w).map(([e,r])=>({name:e,MuiTheme:f(r.primaryColor)})),C=(e,r)=>{switch(e){case"light":return!1;case"dark":return!0;case"system":return r==="dark";default:return!1}};import se from"@mui/icons-material/BrightnessAutoRounded";import pe from"@mui/icons-material/DarkModeRounded";import le from"@mui/icons-material/LightModeRounded";import de from"@mui/icons-material/PersonalVideoRounded";import{jsx as b}from"react/jsx-runtime";var g=32,me=[{label:"Auto",value:"auto",icon:b(se,{color:"inherit",sx:{fontSize:g}})},{label:"System",value:"system",icon:b(de,{color:"inherit",sx:{fontSize:g}})},{label:"Light",value:"light",icon:b(le,{color:"inherit",sx:{fontSize:g}})},{label:"Dark",value:"dark",icon:b(pe,{color:"inherit",sx:{fontSize:g}})}];import{useMemo as ce}from"react";import{Global as ue,css as he}from"@emotion/react";import{useTheme as xe}from"@mui/material/styles";import{jsx as fe}from"react/jsx-runtime";var R=()=>{let e=xe(),r=e.palette.mode==="dark",t=e.palette.primary.main,o=e.palette.background.default,i=ce(()=>x(t),[t]);return fe(ue,{styles:he`
|
|
43
|
+
`;import pe from"@mui/icons-material/BrightnessAutoRounded";import de from"@mui/icons-material/DarkModeRounded";import me from"@mui/icons-material/LightModeRounded";import ue from"@mui/icons-material/PersonalVideoRounded";import{jsx as w}from"react/jsx-runtime";var k=32,ce=[{label:"Auto",value:"auto",icon:w(pe,{color:"inherit",sx:{fontSize:k}})},{label:"System",value:"system",icon:w(ue,{color:"inherit",sx:{fontSize:k}})},{label:"Light",value:"light",icon:w(me,{color:"inherit",sx:{fontSize:k}})},{label:"Dark",value:"dark",icon:w(de,{color:"inherit",sx:{fontSize:k}})}];var T={fontDark:"#101727",fontLight:"#f0f0f0",brand:"#9FA9EA",accent:"#F3503A",muted:"#64748B",success:"#2E7D32",info:"#0288D1",warning:"#ED6C02",error:"#D32F2F",neutral:"#64748B"};import{createContext as fe,useContext as he}from"react";var P=fe(void 0),xe=()=>{let e=he(P);if(!e)throw new Error("useThemeSettings must be used within ThemeProviderWrapper");return e};import{useMemo as _,useState as U,useEffect as E}from"react";import{ThemeProvider as Ye}from"@emotion/react";import{ThemeProvider as Ve}from"@mui/material/styles";var R={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"}}}}};import{createTheme as G}from"@mui/material";var d={...T},s=()=>d,D=e=>{d={...T,...e}},ge={get fontDark(){return d.fontDark},get fontLight(){return d.fontLight},get brand(){return d.brand},get accent(){return d.accent},get muted(){return d.muted},get success(){return d.success},get info(){return d.info},get warning(){return d.warning},get error(){return d.error},get neutral(){return d.neutral}};var z={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"}}},W={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 48px/60px inherit inherit"},header_xl_regular:{font:"400 42px/54px inherit inherit"},header_lg_regular:{font:"400 36px/46px inherit inherit"},header_md_regular:{font:"400 30px/38px inherit inherit"},header_sm_regular:{font:"400 26px/34px inherit inherit"},header_xs_regular:{font:"400 22px/30px inherit inherit"},header_2xl_bold:{font:"700 48px/60px inherit inherit"},header_xl_bold:{font:"700 42px/54px inherit inherit"},header_lg_bold:{font:"700 36px/46px inherit inherit"},header_md_bold:{font:"700 30px/38px inherit inherit"},header_sm_bold:{font:"700 26px/34px inherit inherit"},header_xs_bold:{font:"700 22px/30px inherit inherit"}};var b=(e,r="light",o)=>{let n=r==="dark",t=G({palette:{mode:r}});return G(t,{palette:{primary:{...t.palette.primary,main:e},brand:t.palette.augmentColor({color:{main:e}}),neutral:t.palette.augmentColor({color:{main:s().neutral}}),accent:t.palette.augmentColor({color:{main:s().accent}}),muted:t.palette.augmentColor({color:{main:s().muted}}),...o?{secondary:{...t.palette.secondary,main:o}}:{},error:{...t.palette.error,main:s().error},warning:{...t.palette.warning,main:s().warning},success:{...t.palette.success,main:s().success},info:{...t.palette.info,main:s().info},background:n?{...t.palette.background,default:"#1C1C1E",paper:"#2C2C2E"}:{...t.palette.background,default:"#F2F2F7",paper:"#FFFFFF"},divider:n?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.12)"},components:{...R,MuiTypography:z},typography:{...W,fontFamily:'var(--app-font-family, "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif)'},shape:{borderRadius:24}})};import{useMemo as Oe}from"react";import{Global as Fe,css as Ie}from"@emotion/react";import{useTheme as Ee}from"@mui/material/styles";var N=e=>/^#([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$/.test(e),C=e=>{if(!N(e))return console.error("Invalid hex color provided:",e),s().fontDark;let r=e.slice(1),o=r.length===3?r.split("").map(u=>u+u).join(""):r,n=Number.parseInt(o.slice(0,2),16),t=Number.parseInt(o.slice(2,4),16),i=Number.parseInt(o.slice(4,6),16),p=Math.round((n*299+t*587+i*114)/1e3),a=s();return p>128?a.fontDark:a.fontLight},ye=e=>C(e)===s().fontLight;var be=()=>{let e=new Date().getHours();return e>=5&&e<12?"Good morning":e>12&&e<18?"Good afternoon":"Good evening"};var _e=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 ve=()=>{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"},ke=()=>{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"},we={os:typeof navigator=="undefined"?"Unknown":ve(),browser:typeof navigator=="undefined"?"Unknown":ke()};var O=(e,r)=>{switch(e){case"light":return!1;case"dark":return!0;case"system":return r==="dark";default:return!1}};var Te=(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 p=Math.floor(t/86400);return i.format(-p,"day")},Ce=(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)),p=Math.floor((t-60*60*i)/60),a=Math.floor(t-60*60*i-60*p),u=new Intl.RelativeTimeFormat(o,{numeric:"auto"});if(p===0&&a<60)return u.format(a,"second");if(i===0&&p<60)return u.format(p,"minute");if(i<24){let g=`${new Intl.RelativeTimeFormat(o,{numeric:"auto"}).format(i,"hour")}`,h=` ${new Intl.RelativeTimeFormat(o,{localeMatcher:"lookup",numeric:"always",style:"long"}).format(p,"minute")}`.replace(/^\D+/,"");return`${g} ${h}`}let f=Math.floor(a/86400);return u.format(f,"day")};import{useEffect as Se,useState as Me}from"react";var Pe=(e=768)=>{let[r,o]=Me(!1);return Se(()=>{let n=()=>{o(window.innerWidth<e)};n();let t=()=>n();return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),r};import{useState as Re,useEffect as De}from"react";var F=()=>{let[e,r]=Re("unknown");return De(()=>{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};import{jsx as Ae}from"react/jsx-runtime";var I=({fontFamily:e})=>{let r=Ee(),o=r.palette.mode==="dark",n=r.palette.primary.main,t=r.palette.background.default,i=Oe(()=>C(n),[n]);return Ae(Fe,{styles:Ie`
|
|
44
|
+
/* Allow application to control font via CSS var or prop */
|
|
45
|
+
:root {
|
|
46
|
+
${e?`--app-font-family: ${e};`:""}
|
|
47
|
+
}
|
|
44
48
|
* {
|
|
45
49
|
font-family:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
var(
|
|
51
|
+
--app-font-family,
|
|
52
|
+
"Mulish",
|
|
53
|
+
system-ui,
|
|
54
|
+
-apple-system,
|
|
55
|
+
"Segoe UI",
|
|
56
|
+
Roboto,
|
|
57
|
+
Arial
|
|
58
|
+
),
|
|
52
59
|
sans-serif !important;
|
|
53
60
|
-webkit-tap-highlight-color: transparent;
|
|
54
61
|
&::selection {
|
|
55
|
-
background-color: ${`${
|
|
62
|
+
background-color: ${`${n}e1`};
|
|
56
63
|
color: ${i};
|
|
57
64
|
}
|
|
58
65
|
}
|
|
@@ -66,27 +73,26 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
66
73
|
|
|
67
74
|
:root {
|
|
68
75
|
height: 100%;
|
|
69
|
-
--font-family
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
/* default fallback font; apps can override via --app-font-family */
|
|
77
|
+
font-family: var(
|
|
78
|
+
--app-font-family,
|
|
79
|
+
"Mulish",
|
|
80
|
+
system-ui,
|
|
81
|
+
-apple-system,
|
|
82
|
+
"Segoe UI",
|
|
83
|
+
Roboto,
|
|
84
|
+
Arial,
|
|
85
|
+
sans-serif
|
|
86
|
+
)
|
|
79
87
|
sans-serif;
|
|
80
88
|
line-height: 1.5;
|
|
81
89
|
font-weight: 400;
|
|
82
|
-
color-scheme: ${
|
|
90
|
+
color-scheme: ${o?"dark":"light"};
|
|
83
91
|
font-synthesis: none;
|
|
84
92
|
text-rendering: optimizeLegibility;
|
|
85
93
|
-webkit-font-smoothing: antialiased;
|
|
86
94
|
-moz-osx-font-smoothing: grayscale;
|
|
87
95
|
-webkit-text-size-adjust: 100%;
|
|
88
|
-
--rsbs-backdrop-bg: rgba(0, 0, 0, 0.3);
|
|
89
|
-
--rsbs-bg: ${r?"#383838":"#ffffff"};
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
body {
|
|
@@ -94,25 +100,25 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
94
100
|
height: 100%;
|
|
95
101
|
overflow: auto;
|
|
96
102
|
touch-action: manipulation;
|
|
97
|
-
background: ${
|
|
103
|
+
background: ${t};
|
|
98
104
|
background-attachment: fixed;
|
|
99
105
|
background-size: cover;
|
|
100
106
|
transition: 0.3s background;
|
|
101
107
|
|
|
102
108
|
::-webkit-scrollbar {
|
|
103
109
|
width: 8px;
|
|
104
|
-
background-color: ${
|
|
110
|
+
background-color: ${t};
|
|
105
111
|
}
|
|
106
112
|
::-webkit-scrollbar-thumb {
|
|
107
|
-
background-color: ${
|
|
113
|
+
background-color: ${n};
|
|
108
114
|
border-radius: 64px;
|
|
109
115
|
}
|
|
110
116
|
::-webkit-scrollbar-thumb:hover {
|
|
111
|
-
background-color: ${`${
|
|
117
|
+
background-color: ${`${n}d8`};
|
|
112
118
|
}
|
|
113
119
|
::-webkit-scrollbar-track {
|
|
114
120
|
border-radius: 64px;
|
|
115
|
-
background-color: ${
|
|
121
|
+
background-color: ${t};
|
|
116
122
|
}
|
|
117
123
|
}
|
|
118
124
|
|
|
@@ -134,8 +140,6 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
134
140
|
}
|
|
135
141
|
|
|
136
142
|
pre {
|
|
137
|
-
background-color: #000000d7;
|
|
138
|
-
color: white;
|
|
139
143
|
padding: 16px;
|
|
140
144
|
border-radius: 18px;
|
|
141
145
|
overflow-x: auto;
|
|
@@ -147,19 +151,18 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
147
151
|
textarea {
|
|
148
152
|
::-webkit-scrollbar {
|
|
149
153
|
width: 8px;
|
|
150
|
-
|
|
151
|
-
background-color: #84848415;
|
|
154
|
+
background-color: ${t};
|
|
152
155
|
}
|
|
153
156
|
::-webkit-scrollbar-thumb {
|
|
154
|
-
background-color:
|
|
155
|
-
border-radius:
|
|
157
|
+
background-color: ${n};
|
|
158
|
+
border-radius: 64px;
|
|
156
159
|
}
|
|
157
160
|
::-webkit-scrollbar-thumb:hover {
|
|
158
|
-
background-color:
|
|
161
|
+
background-color: ${`${n}d8`};
|
|
159
162
|
}
|
|
160
163
|
::-webkit-scrollbar-track {
|
|
161
|
-
border-radius:
|
|
162
|
-
background-color:
|
|
164
|
+
border-radius: 64px;
|
|
165
|
+
background-color: ${t};
|
|
163
166
|
}
|
|
164
167
|
}
|
|
165
168
|
|
|
@@ -168,23 +171,7 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
168
171
|
border-radius: 42px 42px 0 0;
|
|
169
172
|
z-index: 9999999;
|
|
170
173
|
}
|
|
171
|
-
|
|
172
|
-
div[data-rsbs-backdrop] {
|
|
173
|
-
z-index: 999;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
div[data-rsbs-header] {
|
|
177
|
-
z-index: 999999;
|
|
178
|
-
box-shadow: none;
|
|
179
|
-
&::before {
|
|
180
|
-
width: 60px;
|
|
181
|
-
height: 6px;
|
|
182
|
-
border-radius: 100px;
|
|
183
|
-
background: ${r?"#717171":"#cfcfcf"};
|
|
184
|
-
margin-top: 3px;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
`})};import{keyframes as d}from"@emotion/react";var ge=d`
|
|
174
|
+
`})};import{keyframes as c}from"@emotion/react";var Le=c`
|
|
188
175
|
from {
|
|
189
176
|
opacity: 0;
|
|
190
177
|
transform: translateX(-40px);
|
|
@@ -193,35 +180,35 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
193
180
|
opacity: 1;
|
|
194
181
|
transform: translateX(0);
|
|
195
182
|
}
|
|
196
|
-
|
|
183
|
+
`,$e=c`
|
|
197
184
|
from {
|
|
198
185
|
opacity: 0;
|
|
199
186
|
}
|
|
200
187
|
to {
|
|
201
188
|
opacity: 1;
|
|
202
189
|
}
|
|
203
|
-
`,
|
|
190
|
+
`,Be=c`
|
|
204
191
|
from {
|
|
205
192
|
transform: translateX(-100%);
|
|
206
193
|
}
|
|
207
194
|
to {
|
|
208
195
|
transform: translateX(0);
|
|
209
196
|
}
|
|
210
|
-
`,
|
|
197
|
+
`,ze=c`
|
|
211
198
|
from {
|
|
212
199
|
transform: translateY(100%);
|
|
213
200
|
}
|
|
214
201
|
to {
|
|
215
202
|
transform: translateY(0);
|
|
216
203
|
}
|
|
217
|
-
`,
|
|
204
|
+
`,We=c`
|
|
218
205
|
from {
|
|
219
206
|
transform: scale(0);
|
|
220
207
|
}
|
|
221
208
|
to {
|
|
222
209
|
transform: scale(1);
|
|
223
210
|
}
|
|
224
|
-
`,
|
|
211
|
+
`,Ge=(e,r=12)=>c`
|
|
225
212
|
0% {
|
|
226
213
|
transform: scale(0.95);
|
|
227
214
|
box-shadow: 0 0 0 0 ${e}b2;
|
|
@@ -234,7 +221,7 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
234
221
|
transform: scale(0.95);
|
|
235
222
|
box-shadow: 0 0 0 0 ${e}00;
|
|
236
223
|
}
|
|
237
|
-
`,
|
|
224
|
+
`,Ne=e=>c`
|
|
238
225
|
0% {
|
|
239
226
|
filter: none;
|
|
240
227
|
}
|
|
@@ -244,7 +231,7 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
244
231
|
100% {
|
|
245
232
|
filter: none;
|
|
246
233
|
}
|
|
247
|
-
`,
|
|
234
|
+
`,Ue=c`
|
|
248
235
|
0% {
|
|
249
236
|
transform: scale(1);
|
|
250
237
|
opacity: 1;
|
|
@@ -257,7 +244,7 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
257
244
|
transform: scale(1);
|
|
258
245
|
opacity: 1;
|
|
259
246
|
}
|
|
260
|
-
`,
|
|
247
|
+
`,He=c`
|
|
261
248
|
0% {
|
|
262
249
|
transform: translateY(0);
|
|
263
250
|
}
|
|
@@ -273,5 +260,5 @@ import N from"@emotion/styled";import{Button as W}from"@mui/material";var H=N(W)
|
|
|
273
260
|
100% {
|
|
274
261
|
transform: translateY(0);
|
|
275
262
|
}
|
|
276
|
-
`;
|
|
263
|
+
`;import{jsx as A,jsxs as Je}from"react/jsx-runtime";var Xe=({children:e,fontFamily:r,themes:o,colorPaletteOverride:n})=>{let t=F();E(()=>{D(n)},[n]);let[i,p]=U("system"),[a,u]=U("auto");E(()=>{if(globalThis.window!==void 0)try{let m=globalThis.localStorage.getItem("appSettings");if(m){let l=JSON.parse(m);l.theme&&p(l.theme),l.darkMode&&u(l.darkMode)}}catch(m){}},[]),E(()=>{if(globalThis.window!==void 0)try{globalThis.localStorage.setItem("appSettings",JSON.stringify({theme:i,darkMode:a}))}catch(m){}},[i,a]);let f=_(()=>{if(o&&o.length>0)return o.map(l=>({name:l.name,MuiTheme:b(l.primaryColor,"light",l.secondaryColor)}));let m=s().brand;return[{name:"Default",MuiTheme:b(m,"light")}]},[o]),g=_(()=>{var m;return i==="system"||t==="unknown"?f[0].MuiTheme:((m=f.find(l=>l.name===i))==null?void 0:m.MuiTheme)||f[0].MuiTheme},[t,i,f]),h=_(()=>O(a,t)?"dark":"light",[a,t]),H=_(()=>{var l,L;let m=(L=(l=g.palette)==null?void 0:l.secondary)==null?void 0:L.main;return b(g.palette.primary.main,h,m)},[g,h]),Y=_(()=>({darkMode:h==="dark"}),[h]);return A(P.Provider,{value:{theme:i,darkMode:a,setTheme:p,setDarkMode:u},children:A(Ve,{theme:H,children:Je(Ye,{theme:Y,children:[A(I,{fontFamily:r}),e]})})})};export{ge as ColorPalette,J as DialogBtn,S as ErrorBoundary,I as GlobalStyles,oe as Loading,le as PathName,Xe as ThemeProviderWrapper,R as commonComponentProps,b as createCustomTheme,ce as darkModeOptions,T as defaultColorPalette,be as displayGreeting,$e as fadeIn,Le as fadeInLeft,s as getColorPalette,_e as getDayIdentifier,C as getFontColor,He as installAppAnimation,O as isDarkMode,ye as isFontLight,N as isHexColor,Ue as logoutAnimation,Ne as progressPulse,Ge as pulseAnimation,We as scale,D as setColorPaletteOverride,Be as slideIn,ze as slideInBottom,we as systemInfo,Te as timeAgo,Ce as timeAgoFromStart,Pe as useResponsiveDisplay,F as useSystemTheme,xe as useThemeSettings};
|
|
277
264
|
//# sourceMappingURL=index.mjs.map
|