@zydon/common 2.8.13 → 2.8.15
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/{chunk-EDWQYAWG.js → chunk-7OV7UPWM.js} +2 -2
- package/dist/chunk-7OV7UPWM.js.map +1 -0
- package/dist/{chunk-NB6Z5G2Q.js → chunk-T6UNWMMX.js} +2 -2
- package/dist/components/AvatarButton/index.js +2 -2
- package/dist/components/MoreMenu/index.d.ts +1 -1
- package/dist/components/NotFound/index.js.map +1 -1
- package/dist/components/ToggleTheme/index.js +2 -2
- package/dist/components/form/Webhook/index.d.ts +3 -1
- package/dist/components/form/Webhook/index.js +7 -7
- package/dist/components/form/Webhook/index.js.map +1 -1
- package/dist/hooks/useSnackbar.d.ts +7 -7
- package/dist/hooks/useThemeToggle.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/theme/core/index.d.ts +1 -1
- package/dist/theme/styles/index.d.ts +12 -12
- package/package.json +1 -1
- package/dist/chunk-EDWQYAWG.js.map +0 -1
- package/dist/{chunk-NB6Z5G2Q.js.map → chunk-T6UNWMMX.js.map} +0 -0
- package/dist/{index-c8f1e6e7.d.ts → index-5a5e5dc8.d.ts} +12 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { b } from './chunk-BX2DSNRV.js';
|
|
2
|
-
import { useColorScheme } from '@mui/material';
|
|
2
|
+
import { useColorScheme } from '@mui/material/styles';
|
|
3
3
|
|
|
4
4
|
var S=()=>{let{setMode:m}=useColorScheme(),{settings:c,updateSettings:h}=b(),e=c.colorScheme!=="light"?"dark":"light",t=o=>{m(o),h({colorScheme:o});};return {colorScheme:e,mode:e,isDark:e==="dark",toggleTheme:()=>{t(e==="light"?"dark":"light");},setColorScheme:t}};
|
|
5
5
|
|
|
6
6
|
export { S as a };
|
|
7
7
|
//# sourceMappingURL=out.js.map
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-7OV7UPWM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useThemeToggle.ts"],"names":["useColorScheme","useThemeToggle","setMode","settings","updateSettings","useSettingsContext","colorScheme","handleSetColorScheme","scheme"],"mappings":"wCAAA,OAAS,kBAAAA,MAAsB,uBAaxB,IAAMC,EAAiB,IAA4B,CACxD,GAAM,CAAE,QAAAC,CAAQ,EAAIF,EAAe,EAC7B,CAAE,SAAAG,EAAU,eAAAC,CAAe,EAAIC,EAAmB,EAClDC,EAAcH,EAAS,cAAgB,QAAU,OAAS,QAE1DI,EAAwBC,GAAwB,CACpDN,EAAQM,CAAM,EACdJ,EAAe,CAAE,YAAaI,CAAO,CAAC,CACxC,EAOA,MAAO,CACL,YAAAF,EACA,KAAMA,EACN,OAAQA,IAAgB,OACxB,YATkB,IAAM,CAExBC,EADkBD,IAAgB,QAAU,OAAS,OACvB,CAChC,EAOE,eAAgBC,CAClB,CACF","sourcesContent":["import { useColorScheme } from '@mui/material/styles';\n\nimport { useSettingsContext } from 'theme/theme-provider';\nimport { ColorScheme } from 'types/settings';\n\nexport interface UseThemeToggleReturn {\n colorScheme: ColorScheme;\n mode: ColorScheme;\n isDark: boolean;\n toggleTheme: () => void;\n setColorScheme: (scheme: ColorScheme) => void;\n}\n\nexport const useThemeToggle = (): UseThemeToggleReturn => {\n const { setMode } = useColorScheme();\n const { settings, updateSettings } = useSettingsContext();\n const colorScheme = settings.colorScheme !== 'light' ? 'dark' : 'light';\n\n const handleSetColorScheme = (scheme: ColorScheme) => {\n setMode(scheme);\n updateSettings({ colorScheme: scheme });\n };\n\n const toggleTheme = () => {\n const newScheme = colorScheme === 'light' ? 'dark' : 'light';\n handleSetColorScheme(newScheme);\n };\n\n return {\n colorScheme,\n mode: colorScheme,\n isDark: colorScheme === 'dark',\n toggleTheme,\n setColorScheme: handleSetColorScheme,\n };\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
1
|
+
import { a } from './chunk-7OV7UPWM.js';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import r from '@mui/material/Box';
|
|
4
4
|
import { styled, alpha } from '@mui/material/styles';
|
|
@@ -8,4 +8,4 @@ var n=styled(r)(({theme:o})=>({display:"flex",alignItems:"center",gap:o.spacing(
|
|
|
8
8
|
|
|
9
9
|
export { T as a };
|
|
10
10
|
//# sourceMappingURL=out.js.map
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-T6UNWMMX.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as a$4 } from '../../chunk-5EKUS6HX.js';
|
|
2
|
-
import { a as a$5 } from '../../chunk-
|
|
2
|
+
import { a as a$5 } from '../../chunk-T6UNWMMX.js';
|
|
3
3
|
import { a } from '../../chunk-CO2KQFUN.js';
|
|
4
4
|
import { a as a$2 } from '../../chunk-VR3K2Y2C.js';
|
|
5
5
|
import { a as a$3 } from '../../chunk-LLUCRZEC.js';
|
|
6
6
|
import '../../chunk-KZNXD4RG.js';
|
|
7
7
|
import { a as a$1 } from '../../chunk-LQRRMVFN.js';
|
|
8
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-7OV7UPWM.js';
|
|
9
9
|
import '../../chunk-BJ5IDN65.js';
|
|
10
10
|
import '../../chunk-373WGZZL.js';
|
|
11
11
|
import '../../chunk-FTYHXGXC.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { TooltipProps } from '@mui/material';
|
|
4
3
|
import { IconButtonProps } from '@mui/material/IconButton';
|
|
4
|
+
import { TooltipProps } from '@mui/material/Tooltip';
|
|
5
5
|
|
|
6
6
|
interface MoreMenuProps extends IconButtonProps {
|
|
7
7
|
actions: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/NotFound/NotFound.tsx","../../../src/assets/illustrations/NotFoundIllustration.tsx","../../../src/components/NotFound/styles.ts","../../../src/components/NotFound/index.ts"],"names":["memo","Stack","Typography","jsx","jsxs","NotFoundIllustration","NotFoundIllustration_default","Button","styled","NotFoundContainer","theme","NotFoundIllustrationContainer","NotFoundButton","ButtonIcon","Icon_default","NotFound","goBack","loading","handleGoHome","NotFound_default"],"mappings":"4EAAA,OAAS,QAAAA,MAAY,QACrB,OAAOC,MAAW,sBAClB,OAAOC,MAAgB,2BCDrB,OACE,OAAAC,EADF,QAAAC,MAAA,oBADF,IAAMC,EAAuB,IAC3BD,EAAC,OAAI,MAAM,6BAA6B,KAAK,OAAO,QAAQ,cAC1D,UAAAD,EAAC,QACC,KAAK,UACL,EAAE,4HACJ,EACAA,EAAC,QACC,KAAK,UACL,EAAE,qFACJ,EACAA,EAAC,QACC,KAAK,UACL,EAAE,sFACJ,EACAA,EAAC,QAAK,KAAK,OAAO,EAAE,mCAAmC,EACvDA,EAAC,QACC,KAAK,UACL,EAAE,k/BACJ,GACF,EAGKG,EAAQD,ECtBf,OAAOE,MAAY,uBACnB,OAAON,MAAW,sBAClB,OAAS,UAAAO,MAAc,uBAIhB,IAAMC,EAAoBD,EAAOP,CAAK,EAAE,CAAC,CAAE,MAAAS,CAAM,KAAO,CAC7D,QAASA,EAAM,QAAQ,CAAC,EACxB,OAAQ,OACR,SAAU,IACV,MAAO,OACP,YAAa,QAEb,UAAW,SACX,CAACA,EAAM,YAAY,KAAK,IAAI,CAAC,EAAG,CAC9B,QAASA,EAAM,QAAQ,CAAC,CAC1B,CACF,EAAE,EAEWC,EAAgCH,EAAO,KAAK,EAAE,CACzD,MAAO,IACP,OAAQ,IACR,SAAU,IACV,SAAU,SACV,SAAU,OACV,OAAQ,SAER,QAAS,CACP,MAAO,OACP,OAAQ,OACR,YAAa,CACf,CACF,CAAC,EAEYI,EAAiBJ,EAAOD,CAAM,EAAE,CAC3C,SAAU,QACV,OAAQ,SACR,QAAS,OACT,WAAY,QACd,CAAC,EAEYM,EAAaL,EAAOM,CAAI,EAAE,CAAC,CAAE,MAAAJ,CAAM,KAAO,CACrD,UAAW,iBACX,YAAaA,EAAM,QAAQ,CAAC,CAC9B,EAAE,EFtBM,cAAAP,EAaA,QAAAC,MAbA,oBARR,IAAMW,EAAW,CAAC,CAAE,OAAAC,EAAQ,QAAAC,CAAQ,IAAqB,CACvD,IAAMC,EAAe,IAAMF,IAAS,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/NotFound/NotFound.tsx","../../../src/assets/illustrations/NotFoundIllustration.tsx","../../../src/components/NotFound/styles.ts","../../../src/components/NotFound/index.ts"],"names":["memo","Stack","Typography","jsx","jsxs","NotFoundIllustration","NotFoundIllustration_default","Button","styled","NotFoundContainer","theme","NotFoundIllustrationContainer","NotFoundButton","ButtonIcon","Icon_default","NotFound","goBack","loading","handleGoHome","NotFound_default"],"mappings":"4EAAA,OAAS,QAAAA,MAAY,QACrB,OAAOC,MAAW,sBAClB,OAAOC,MAAgB,2BCDrB,OACE,OAAAC,EADF,QAAAC,MAAA,oBADF,IAAMC,EAAuB,IAC3BD,EAAC,OAAI,MAAM,6BAA6B,KAAK,OAAO,QAAQ,cAC1D,UAAAD,EAAC,QACC,KAAK,UACL,EAAE,4HACJ,EACAA,EAAC,QACC,KAAK,UACL,EAAE,qFACJ,EACAA,EAAC,QACC,KAAK,UACL,EAAE,sFACJ,EACAA,EAAC,QAAK,KAAK,OAAO,EAAE,mCAAmC,EACvDA,EAAC,QACC,KAAK,UACL,EAAE,k/BACJ,GACF,EAGKG,EAAQD,ECtBf,OAAOE,MAAY,uBACnB,OAAON,MAAW,sBAClB,OAAS,UAAAO,MAAc,uBAIhB,IAAMC,EAAoBD,EAAOP,CAAK,EAAE,CAAC,CAAE,MAAAS,CAAM,KAAO,CAC7D,QAASA,EAAM,QAAQ,CAAC,EACxB,OAAQ,OACR,SAAU,IACV,MAAO,OACP,YAAa,QAEb,UAAW,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nimport Typography from '@mui/material/Typography';\n\nimport NotFoundIllustration from 'assets/illustrations/NotFoundIllustration';\n\nimport { NotFoundProps } from './props';\nimport {\n ButtonIcon,\n NotFoundButton,\n NotFoundContainer,\n NotFoundIllustrationContainer,\n} from './styles';\n\nconst NotFound = ({ goBack, loading }: NotFoundProps) => {\n const handleGoHome = () => goBack?.();\n\n if (loading) return null;\n\n return (\n <NotFoundContainer>\n <NotFoundIllustrationContainer>\n <NotFoundIllustration />\n </NotFoundIllustrationContainer>\n <Typography component=\"h1\" variant=\"h5\" color=\"text.secondary\" mt={4}>\n OOPS! PÁGINA NÃO ENCONTRADA!\n </Typography>\n <Typography color=\"text.secondary\" variant=\"body1\" mt={4}>\n Parece que você se perdeu no caminho! A página que você está procurando\n não existe ou foi movida para outro lugar.\n </Typography>\n <Typography color=\"text.disabled\" variant=\"body2\" mt={2}>\n Mas não se preocupe, vamos te levar de volta ao lugar certo!\n </Typography>\n <Stack mt={4} alignItems=\"center\">\n <NotFoundButton\n onClick={handleGoHome}\n size=\"large\"\n variant=\"contained\"\n fullWidth\n >\n <ButtonIcon icon=\"ARROW_RIGHT\" />\n Voltar para a página anterior\n </NotFoundButton>\n </Stack>\n </NotFoundContainer>\n );\n};\n\nexport default memo(NotFound);\n","const NotFoundIllustration = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 300 267\">\n <path\n fill=\"#989898\"\n d=\"M150.33 267.28C67.3 267.28 0 263.27 0 258.32s67.3-8.97 150.33-8.97c83.02 0 150.33 4.02 150.33 8.97s-67.3 8.96-150.33 8.96\"\n />\n <path\n fill=\"#cfcfcf\"\n d=\"M3.7 175.24V206c0 2.95 2.4 5.35 5.34 5.35h282.58c2.95 0 5.35-2.4 5.35-5.35v-30.76z\"\n />\n <path\n fill=\"#989898\"\n d=\"M296.97 5.35c0-2.95-2.4-5.35-5.35-5.35H9.04a5.36 5.36 0 0 0-5.35 5.35v169.9h293.28Z\"\n />\n <path fill=\"#fff\" d=\"M18.85 15.25h263.01v144.32h-263Z\" />\n <path\n fill=\"#e7e7e7\"\n d=\"M124.82 45.93a3.35 3.35 0 0 0-4.74 0L106.52 59.5a3.35 3.35 0 0 1-4.74 0L88.22 45.93a3.35 3.35 0 0 0-4.74 0l-2.58 2.58a3.35 3.35 0 0 0 0 4.74l13.56 13.57a3.35 3.35 0 0 1 0 4.74L80.9 85.12a3.35 3.35 0 0 0 0 4.74l2.58 2.58a3.35 3.35 0 0 0 4.74 0l13.56-13.56a3.35 3.35 0 0 1 4.74 0l13.56 13.56a3.35 3.35 0 0 0 4.74 0l2.58-2.58a3.35 3.35 0 0 0 0-4.74l-13.56-13.56a3.35 3.35 0 0 1 0-4.74l13.57-13.57a3.35 3.35 0 0 0 0-4.74zm94.94 7.32a3.35 3.35 0 0 0 0-4.74l-2.58-2.58a3.35 3.35 0 0 0-4.74 0L198.88 59.5a3.35 3.35 0 0 1-4.74 0l-13.57-13.57a3.35 3.35 0 0 0-4.74 0l-2.58 2.58a3.35 3.35 0 0 0 0 4.74l13.56 13.57a3.35 3.35 0 0 1 0 4.74l-13.56 13.56a3.35 3.35 0 0 0 0 4.74l2.58 2.58a3.35 3.35 0 0 0 4.74 0l13.57-13.56a3.35 3.35 0 0 1 4.74 0l13.56 13.56a3.35 3.35 0 0 0 4.74 0l2.58-2.58a3.35 3.35 0 0 0 0-4.74L206.2 71.56a3.35 3.35 0 0 1 0-4.74zm-27.68 82.59a4.7 4.7 0 0 1-6.3 1.25c-30.43-18.37-60.38-5.48-70.77.16a4.9 4.9 0 0 1-6.37-1.4 4.06 4.06 0 0 1 1.27-5.97c11.28-6.23 45.9-21.68 80.95-.16a4.3 4.3 0 0 1 1.22 6.12\"\n />\n </svg>\n);\n\nexport default NotFoundIllustration;\n","import Button from '@mui/material/Button';\nimport Stack from '@mui/material/Stack';\nimport { styled } from '@mui/material/styles';\n\nimport Icon from 'components/Icon';\n\nexport const NotFoundContainer = styled(Stack)(({ theme }) => ({\n padding: theme.spacing(4),\n margin: 'auto',\n maxWidth: 600,\n width: '100%',\n aspectRatio: '1 / 1',\n\n textAlign: 'center',\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(2),\n },\n}));\n\nexport const NotFoundIllustrationContainer = styled('div')({\n width: 270,\n height: 270,\n minWidth: 270,\n overflow: 'hidden',\n maxWidth: '100%',\n margin: '0 auto',\n\n '& svg': {\n width: '100%',\n height: '100%',\n aspectRatio: 1,\n },\n});\n\nexport const NotFoundButton = styled(Button)({\n maxWidth: '450px',\n margin: '0 auto',\n display: 'flex',\n alignItems: 'center',\n});\n\nexport const ButtonIcon = styled(Icon)(({ theme }) => ({\n transform: 'rotate(180deg)',\n marginRight: theme.spacing(1),\n}));\n","import NotFound from './NotFound';\n\nexport default NotFound;\nexport type { NotFoundProps } from './props';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-T6UNWMMX.js';
|
|
2
|
+
import '../../chunk-7OV7UPWM.js';
|
|
3
3
|
import '../../chunk-BJ5IDN65.js';
|
|
4
4
|
import '../../chunk-373WGZZL.js';
|
|
5
5
|
import '../../chunk-FTYHXGXC.js';
|
|
@@ -5,8 +5,10 @@ interface WebhookProps {
|
|
|
5
5
|
webhookData?: WebhookType;
|
|
6
6
|
isEditing?: boolean;
|
|
7
7
|
haveTip?: boolean;
|
|
8
|
+
hasFilter?: boolean;
|
|
9
|
+
hasType?: boolean;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
declare const Webhook: ({ webhookData, isEditing, haveTip, }: WebhookProps) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare const Webhook: ({ webhookData, isEditing, haveTip, hasFilter, hasType, }: WebhookProps) => react_jsx_runtime.JSX.Element;
|
|
11
13
|
|
|
12
14
|
export { Webhook as default };
|
|
@@ -5,17 +5,17 @@ import '../../../chunk-2EFGHFZH.js';
|
|
|
5
5
|
import { a as a$1 } from '../../../chunk-LLUCRZEC.js';
|
|
6
6
|
import '../../../chunk-KZNXD4RG.js';
|
|
7
7
|
import { useFormContext, useFieldArray } from 'react-hook-form';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import D from '@mui/material/Divider';
|
|
9
|
+
import W from '@mui/material/IconButton';
|
|
10
|
+
import _ from '@mui/material/InputAdornment';
|
|
11
11
|
import n from '@mui/material/Stack';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import x from '@mui/material/Typography';
|
|
13
|
+
import I from '@mui/material/Alert';
|
|
14
14
|
import { styled, alpha } from '@mui/material/styles';
|
|
15
15
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
16
16
|
|
|
17
|
-
var s=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],c=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}];var T=styled(
|
|
17
|
+
var s=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],c=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}];var T=styled(W)(({theme:o})=>({svg:{color:`${o.palette.primary.main} !important`}})),b=styled(x)(()=>({textDecoration:"underline",fontWeight:"600",cursor:"pointer"})),y=styled(I)(({theme:o})=>({backgroundColor:`${alpha(o.palette.primary.main,.03)}`,border:`1px solid ${alpha(o.palette.primary.main,.4)}`,flexDirection:"row",alignItems:"center",padding:"2px 12px",gap:8,borderRadius:8,marginBottom:16,"& svg":{color:o.palette.primary.main}}));var L=()=>{let o=()=>{let a="https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks";window.open(a,"_blank");};return jsx(y,{severity:"info",children:jsxs(x,{color:"grey",variant:"caption",children:["Webhooks permitem que servi\xE7os externos sejam notificados quando determinados eventos acontecem. Saiba mais"," ",jsx(b,{variant:"caption",color:"primary",onClick:()=>o(),children:"acessando a documenta\xE7\xE3o do Webhook"})]})})},f=L;var F=({webhookData:o,isEditing:a$4=!1,haveTip:v=!1,hasFilter:S=!0,hasType:k=!0})=>{let{control:E}=useFormContext(),{fields:A,append:C,remove:P}=useFieldArray({name:"headers",control:E}),O=()=>{C({value:"",name:""});};return jsxs(Fragment,{children:[v&&jsx(f,{}),a$4&&jsx(a,{name:"name",label:"Nome do webhook"}),jsxs(n,{direction:"row",gap:2,children:[jsx(a,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url \xE9 obrigat\xF3rio"}}}),S&&jsx(a,{name:"filter",label:"Filtro"})]}),a$4&&o&&jsxs(Fragment,{children:[jsx(a,{variant:"filled",name:"solution",label:"Solu\xE7\xE3o",disabled:!0}),jsxs(n,{direction:"row",gap:2,children:[jsx(a,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),jsx(a,{variant:"filled",name:"resource_id",label:"ID origem",disabled:!0,InputProps:{endAdornment:jsx(_,{position:"end",children:jsx(T,{onClick:()=>navigator.clipboard.writeText(o.resource_id),children:jsx(a$1,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),jsx(a,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),jsxs(n,{direction:"row",gap:2,alignItems:"center",children:[k&&jsx(a$2,{fullWidth:!0,options:s,name:"content_type",label:"Tipo de conte\xFAdo",required:!0,rules:{required:{value:!0,message:"Campo Tipo de conte\xFAdo \xE9 obrigat\xF3rio"}}}),jsx(a$2,{fullWidth:!0,options:c,name:"http_method",label:"M\xE9todo HTTP",required:!0,rules:{required:{value:!0,message:"Campo M\xE9todo HTTP \xE9 obrigat\xF3rio"}}})]}),jsx(x,{variant:"overline",color:"grey",children:"Cabe\xE7alho"}),A?.map((B,l)=>jsxs(n,{direction:"row",gap:2,alignItems:"center",children:[jsx(a,{name:`headers.${l}.name`,label:"Chave",required:!0,rules:{required:{value:!0,message:""}}}),jsx(a,{name:`headers.${l}.value`,label:"Valor"}),jsx(W,{color:"error",onClick:()=>P(l),children:jsx(a$1,{icon:"DELETE_MARK_BUTTON_02"})})]},B.id)),jsx(a$3,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>O(),children:"Adicionar novo cabe\xE7alho"}),jsx(D,{})]})},ce=F;
|
|
18
18
|
|
|
19
|
-
export {
|
|
19
|
+
export { ce as default };
|
|
20
20
|
//# sourceMappingURL=out.js.map
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/Webhook/index.tsx","../../../../src/components/form/Webhook/props.ts","../../../../src/components/form/Webhook/styles.ts","../../../../src/components/form/Webhook/WebhookAlert.tsx"],"names":["useFieldArray","useFormContext","Divider","IconButton","InputAdornment","Stack","Typography","ContentTypeOptions","HttpMethodOptions","Alert","alpha","styled","SyledIconButton","theme","StyledTypography","StyledAlert","jsx","jsxs","WebhookAlert","handleLinkClick","url","WebhookAlert_default","Fragment","Webhook","webhookData","isEditing","haveTip","control","headers","append","remove","handleCreateField","Field_default","Icon_default","Autocomplete_default","item","index","ActionButton_default","Webhook_default"],"mappings":"kQAAA,OAAS,iBAAAA,EAAe,kBAAAC,MAAsB,kBAC9C,OAAOC,MAAa,wBACpB,OAAOC,MAAgB,2BACvB,OAAOC,MAAoB,+BAC3B,OAAOC,MAAW,sBAClB,OAAOC,MAAgB,2BCgBhB,IAAMC,EAAqB,CAChC,CACE,MAAO,MACP,MAAO,KACT,EACA,CACE,MAAO,OACP,MAAO,MACT,EACA,CACE,MAAO,QACP,MAAO,OACT,CACF,EAEaC,EAAoB,CAC/B,CACE,MAAO,MACP,MAAO,KACT,EACA,CACE,MAAO,OACP,MAAO,MACT,EACA,CACE,MAAO,SACP,MAAO,QACT,EACA,CACE,MAAO,MACP,MAAO,KACT,CACF,ECrDA,OAAOC,MAAW,sBAClB,OAAON,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GACR,MAAO,CACL,SAAU,CACR,MAAO,GACP,QAAS,+CACX,CACF,EACF,EACAS,EAACkB,EAAA,CACC,UAAS,GACT,QAAS1B,EACT,KAAK,cACL,MAAM,iBACN,SAAQ,GACR,MAAO,CACL,SAAU,CACR,MAAO,GACP,QAAS,0CACX,CACF,EACF,GACF,EACAQ,EAACV,EAAA,CAAW,QAAQ,WAAW,MAAM,OAAO,wBAE5C,EACCsB,GAAS,IAAI,CAACO,EAAMC,IACnBnB,EAACZ,EAAA,CAAoB,UAAU,MAAM,IAAK,EAAG,WAAW,SACtD,UAAAW,EAACgB,EAAA,CACC,KAAM,WAAWI,SACjB,MAAM,QACN,SAAQ,GACR,MAAO,CACL,SAAU,CACR,MAAO,GACP,QAAS,EACX,CACF,EACF,EACApB,EAACgB,EAAA,CAAM,KAAM,WAAWI,UAAe,MAAM,QAAQ,EACrDpB,EAACb,EAAA,CAAW,MAAM,QAAQ,QAAS,IAAM2B,EAAOM,CAAK,EACnD,SAAApB,EAACiB,EAAA,CAAK,KAAK,wBAAwB,EACrC,IAfUE,EAAK,EAgBjB,CACD,EACDnB,EAACqB,EAAA,CACC,WAAW,MACX,KAAK,QACL,QAAQ,WACR,MAAM,UACN,UAAS,GACT,QAAS,IAAMN,EAAkB,EAClC,uCAED,EACAf,EAACd,EAAA,EAAQ,GACX,CAEJ,EAEOoC,GAAQf","sourcesContent":["import { useFieldArray, useFormContext } from 'react-hook-form';\nimport Divider from '@mui/material/Divider';\nimport IconButton from '@mui/material/IconButton';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport ActionButton from 'components/ActionButton';\nimport Icon from 'components/Icon';\n\nimport Autocomplete from '../Autocomplete';\nimport Field from '../Field';\n\nimport { ContentTypeOptions, HttpMethodOptions, WebhookProps } from './props';\nimport { SyledIconButton } from './styles';\nimport WebhookAlert from './WebhookAlert';\n\nconst Webhook = ({\n webhookData,\n isEditing = false,\n haveTip = false,\n}: WebhookProps) => {\n const { control } = useFormContext();\n\n const {\n fields: headers,\n append,\n remove,\n } = useFieldArray({\n name: 'headers',\n control,\n });\n\n const handleCreateField = () => {\n append({\n value: '',\n name: '',\n });\n };\n\n return (\n <>\n {haveTip && <WebhookAlert />}\n {isEditing && <Field name=\"name\" label=\"Nome do webhook\" />}\n <Stack direction=\"row\" gap={2}>\n <Field\n name=\"url\"\n label=\"URL de endpoint\"\n rules={{ required: { value: true, message: 'Url é obrigatório' } }}\n />\n <Field name=\"filter\" label=\"Filtro\" />\n </Stack>\n {isEditing && webhookData && (\n <>\n <Field variant=\"filled\" name=\"solution\" label=\"Solução\" disabled />\n <Stack direction=\"row\" gap={2}>\n <Field variant=\"filled\" name=\"resource\" label=\"Origem\" disabled />\n <Field\n variant=\"filled\"\n name=\"resource_id\"\n label=\"ID origem\"\n disabled\n InputProps={{\n endAdornment: (\n <InputAdornment position=\"end\">\n <SyledIconButton\n onClick={() =>\n navigator.clipboard.writeText(webhookData.resource_id)\n }\n >\n <Icon className=\"copyIcon\" icon=\"COPY_CONTENT\" />\n </SyledIconButton>\n </InputAdornment>\n ),\n }}\n />\n <Field variant=\"filled\" name=\"event\" label=\"Evento\" disabled />\n </Stack>\n </>\n )}\n <Stack direction=\"row\" gap={2} alignItems=\"center\">\n <Autocomplete\n fullWidth\n options={ContentTypeOptions}\n name=\"content_type\"\n label=\"Tipo de conteúdo\"\n required\n rules={{\n required: {\n value: true,\n message: 'Campo Tipo de conteúdo é obrigatório',\n },\n }}\n />\n <Autocomplete\n fullWidth\n options={HttpMethodOptions}\n name=\"http_method\"\n label=\"Método HTTP\"\n required\n rules={{\n required: {\n value: true,\n message: 'Campo Método HTTP é obrigatório',\n },\n }}\n />\n </Stack>\n <Typography variant=\"overline\" color=\"grey\">\n Cabeçalho\n </Typography>\n {headers?.map((item, index) => (\n <Stack key={item.id} direction=\"row\" gap={2} alignItems=\"center\">\n <Field\n name={`headers.${index}.name`}\n label=\"Chave\"\n required\n rules={{\n required: {\n value: true,\n message: '',\n },\n }}\n />\n <Field name={`headers.${index}.value`} label=\"Valor\" />\n <IconButton color=\"error\" onClick={() => remove(index)}>\n <Icon icon=\"DELETE_MARK_BUTTON_02\" />\n </IconButton>\n </Stack>\n ))}\n <ActionButton\n actionType=\"NEW\"\n size=\"large\"\n variant=\"outlined\"\n color=\"inherit\"\n fullWidth\n onClick={() => handleCreateField()}\n >\n Adicionar novo cabeçalho\n </ActionButton>\n <Divider />\n </>\n );\n};\n\nexport default Webhook;\n","import { WebhookType } from 'types/webhook';\n\nexport interface WebhookProps {\n webhookData?: WebhookType;\n isEditing?: boolean;\n haveTip?: boolean;\n}\nexport enum ContentTypeStatus {\n XML = 'XML',\n JSON = 'JSON',\n BYTEA = 'BYTEA',\n}\n\nexport enum HttpMethodStatus {\n GET = 'GET',\n POST = 'POST',\n PATCH = 'PATCH',\n DELETE = 'DELETE',\n PUT = 'PUT',\n}\n\nexport const ContentTypeOptions = [\n {\n label: ContentTypeStatus.XML,\n value: ContentTypeStatus.XML,\n },\n {\n label: ContentTypeStatus.JSON,\n value: ContentTypeStatus.JSON,\n },\n {\n label: ContentTypeStatus.BYTEA,\n value: ContentTypeStatus.BYTEA,\n },\n];\n\nexport const HttpMethodOptions = [\n {\n label: HttpMethodStatus.GET,\n value: HttpMethodStatus.GET,\n },\n {\n label: HttpMethodStatus.POST,\n value: HttpMethodStatus.POST,\n },\n {\n label: HttpMethodStatus.DELETE,\n value: HttpMethodStatus.DELETE,\n },\n {\n label: HttpMethodStatus.PUT,\n value: HttpMethodStatus.PUT,\n },\n];\n","import Alert from '@mui/material/Alert';\nimport IconButton from '@mui/material/IconButton';\nimport { alpha, styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nexport const SyledIconButton = styled(IconButton)(({ theme }) => ({\n svg: {\n color: `${theme.palette.primary.main} !important`,\n },\n}));\n\nexport const StyledTypography = styled(Typography)(() => ({\n textDecoration: 'underline',\n fontWeight: '600',\n cursor: 'pointer',\n}));\n\nexport const StyledAlert = styled(Alert)(({ theme }) => ({\n backgroundColor: `${alpha(theme.palette.primary.main, 0.03)}`,\n border: `1px solid ${alpha(theme.palette.primary.main, 0.4)}`,\n flexDirection: 'row',\n alignItems: 'center',\n padding: '2px 12px',\n gap: 8,\n borderRadius: 8,\n marginBottom: 16,\n\n '& svg': {\n color: theme.palette.primary.main,\n },\n}));\n","import Typography from '@mui/material/Typography';\n\nimport { StyledAlert, StyledTypography } from './styles';\n\nconst WebhookAlert = () => {\n const handleLinkClick = () => {\n const url =\n 'https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks';\n window.open(url, '_blank');\n };\n\n return (\n <StyledAlert severity=\"info\">\n <Typography color=\"grey\" variant=\"caption\">\n Webhooks permitem que serviços externos sejam notificados quando\n determinados eventos acontecem. Saiba mais{' '}\n <StyledTypography\n variant=\"caption\"\n color=\"primary\"\n onClick={() => handleLinkClick()}\n >\n acessando a documentação do Webhook\n </StyledTypography>\n </Typography>\n </StyledAlert>\n );\n};\n\nexport default WebhookAlert;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/Webhook/index.tsx","../../../../src/components/form/Webhook/props.ts","../../../../src/components/form/Webhook/styles.ts","../../../../src/components/form/Webhook/WebhookAlert.tsx"],"names":["useFieldArray","useFormContext","Divider","IconButton","InputAdornment","Stack","Typography","ContentTypeOptions","HttpMethodOptions","Alert","alpha","styled","SyledIconButton","theme","StyledTypography","StyledAlert","jsx","jsxs","WebhookAlert","handleLinkClick","url","WebhookAlert_default","Fragment","Webhook","webhookData","isEditing","haveTip","hasFilter","hasType","control","headers","append","remove","handleCreateField","Field_default","Icon_default","Autocomplete_default","item","index","ActionButton_default","Webhook_default"],"mappings":"kQAAA,OAAS,iBAAAA,EAAe,kBAAAC,MAAsB,kBAC9C,OAAOC,MAAa,wBACpB,OAAOC,MAAgB,2BACvB,OAAOC,MAAoB,+BAC3B,OAAOC,MAAW,sBAClB,OAAOC,MAAgB,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useFormContext } from 'react-hook-form';\nimport Divider from '@mui/material/Divider';\nimport IconButton from '@mui/material/IconButton';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport ActionButton from 'components/ActionButton';\nimport Icon from 'components/Icon';\n\nimport Autocomplete from '../Autocomplete';\nimport Field from '../Field';\n\nimport { ContentTypeOptions, HttpMethodOptions, WebhookProps } from './props';\nimport { SyledIconButton } from './styles';\nimport WebhookAlert from './WebhookAlert';\n\nconst Webhook = ({\n webhookData,\n isEditing = false,\n haveTip = false,\n hasFilter = true,\n hasType = true,\n}: WebhookProps) => {\n const { control } = useFormContext();\n\n const {\n fields: headers,\n append,\n remove,\n } = useFieldArray({\n name: 'headers',\n control,\n });\n\n const handleCreateField = () => {\n append({\n value: '',\n name: '',\n });\n };\n\n return (\n <>\n {haveTip && <WebhookAlert />}\n {isEditing && <Field name=\"name\" label=\"Nome do webhook\" />}\n <Stack direction=\"row\" gap={2}>\n <Field\n name=\"url\"\n label=\"URL de endpoint\"\n rules={{ required: { value: true, message: 'Url é obrigatório' } }}\n />\n {hasFilter && <Field name=\"filter\" label=\"Filtro\" />}\n </Stack>\n {isEditing && webhookData && (\n <>\n <Field variant=\"filled\" name=\"solution\" label=\"Solução\" disabled />\n <Stack direction=\"row\" gap={2}>\n <Field variant=\"filled\" name=\"resource\" label=\"Origem\" disabled />\n <Field\n variant=\"filled\"\n name=\"resource_id\"\n label=\"ID origem\"\n disabled\n InputProps={{\n endAdornment: (\n <InputAdornment position=\"end\">\n <SyledIconButton\n onClick={() =>\n navigator.clipboard.writeText(webhookData.resource_id)\n }\n >\n <Icon className=\"copyIcon\" icon=\"COPY_CONTENT\" />\n </SyledIconButton>\n </InputAdornment>\n ),\n }}\n />\n <Field variant=\"filled\" name=\"event\" label=\"Evento\" disabled />\n </Stack>\n </>\n )}\n <Stack direction=\"row\" gap={2} alignItems=\"center\">\n {hasType && (\n <Autocomplete\n fullWidth\n options={ContentTypeOptions}\n name=\"content_type\"\n label=\"Tipo de conteúdo\"\n required\n rules={{\n required: {\n value: true,\n message: 'Campo Tipo de conteúdo é obrigatório',\n },\n }}\n />\n )}\n <Autocomplete\n fullWidth\n options={HttpMethodOptions}\n name=\"http_method\"\n label=\"Método HTTP\"\n required\n rules={{\n required: {\n value: true,\n message: 'Campo Método HTTP é obrigatório',\n },\n }}\n />\n </Stack>\n <Typography variant=\"overline\" color=\"grey\">\n Cabeçalho\n </Typography>\n {headers?.map((item, index) => (\n <Stack key={item.id} direction=\"row\" gap={2} alignItems=\"center\">\n <Field\n name={`headers.${index}.name`}\n label=\"Chave\"\n required\n rules={{\n required: {\n value: true,\n message: '',\n },\n }}\n />\n <Field name={`headers.${index}.value`} label=\"Valor\" />\n <IconButton color=\"error\" onClick={() => remove(index)}>\n <Icon icon=\"DELETE_MARK_BUTTON_02\" />\n </IconButton>\n </Stack>\n ))}\n <ActionButton\n actionType=\"NEW\"\n size=\"large\"\n variant=\"outlined\"\n color=\"inherit\"\n fullWidth\n onClick={() => handleCreateField()}\n >\n Adicionar novo cabeçalho\n </ActionButton>\n <Divider />\n </>\n );\n};\n\nexport default Webhook;\n","import { WebhookType } from 'types/webhook';\n\nexport interface WebhookProps {\n webhookData?: WebhookType;\n isEditing?: boolean;\n haveTip?: boolean;\n hasFilter?: boolean;\n hasType?: boolean;\n}\nexport enum ContentTypeStatus {\n XML = 'XML',\n JSON = 'JSON',\n BYTEA = 'BYTEA',\n}\n\nexport enum HttpMethodStatus {\n GET = 'GET',\n POST = 'POST',\n PATCH = 'PATCH',\n DELETE = 'DELETE',\n PUT = 'PUT',\n}\n\nexport const ContentTypeOptions = [\n {\n label: ContentTypeStatus.XML,\n value: ContentTypeStatus.XML,\n },\n {\n label: ContentTypeStatus.JSON,\n value: ContentTypeStatus.JSON,\n },\n {\n label: ContentTypeStatus.BYTEA,\n value: ContentTypeStatus.BYTEA,\n },\n];\n\nexport const HttpMethodOptions = [\n {\n label: HttpMethodStatus.GET,\n value: HttpMethodStatus.GET,\n },\n {\n label: HttpMethodStatus.POST,\n value: HttpMethodStatus.POST,\n },\n {\n label: HttpMethodStatus.DELETE,\n value: HttpMethodStatus.DELETE,\n },\n {\n label: HttpMethodStatus.PUT,\n value: HttpMethodStatus.PUT,\n },\n];\n","import Alert from '@mui/material/Alert';\nimport IconButton from '@mui/material/IconButton';\nimport { alpha, styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nexport const SyledIconButton = styled(IconButton)(({ theme }) => ({\n svg: {\n color: `${theme.palette.primary.main} !important`,\n },\n}));\n\nexport const StyledTypography = styled(Typography)(() => ({\n textDecoration: 'underline',\n fontWeight: '600',\n cursor: 'pointer',\n}));\n\nexport const StyledAlert = styled(Alert)(({ theme }) => ({\n backgroundColor: `${alpha(theme.palette.primary.main, 0.03)}`,\n border: `1px solid ${alpha(theme.palette.primary.main, 0.4)}`,\n flexDirection: 'row',\n alignItems: 'center',\n padding: '2px 12px',\n gap: 8,\n borderRadius: 8,\n marginBottom: 16,\n\n '& svg': {\n color: theme.palette.primary.main,\n },\n}));\n","import Typography from '@mui/material/Typography';\n\nimport { StyledAlert, StyledTypography } from './styles';\n\nconst WebhookAlert = () => {\n const handleLinkClick = () => {\n const url =\n 'https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks';\n window.open(url, '_blank');\n };\n\n return (\n <StyledAlert severity=\"info\">\n <Typography color=\"grey\" variant=\"caption\">\n Webhooks permitem que serviços externos sejam notificados quando\n determinados eventos acontecem. Saiba mais{' '}\n <StyledTypography\n variant=\"caption\"\n color=\"primary\"\n onClick={() => handleLinkClick()}\n >\n acessando a documentação do Webhook\n </StyledTypography>\n </Typography>\n </StyledAlert>\n );\n};\n\nexport default WebhookAlert;\n"]}
|
|
@@ -4,13 +4,13 @@ import * as react from 'react';
|
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const useSnackbar: () => {
|
|
7
|
-
toast: ((message: (() => ReactNode)
|
|
8
|
-
success: (message: string | number | boolean |
|
|
9
|
-
info: (message: string | number | boolean |
|
|
10
|
-
warning: (message: string | number | boolean |
|
|
11
|
-
error: (message: string | number | boolean |
|
|
7
|
+
toast: ((message: ReactNode | (() => ReactNode), data?: ExternalToast | undefined) => string | number) & {
|
|
8
|
+
success: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
9
|
+
info: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
10
|
+
warning: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
11
|
+
error: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
12
12
|
custom: (jsx: (id: string | number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, data?: ExternalToast | undefined) => string | number;
|
|
13
|
-
message: (message: string | number | boolean |
|
|
13
|
+
message: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
14
14
|
promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: ({
|
|
15
15
|
className?: string | undefined;
|
|
16
16
|
style?: react.CSSProperties | undefined;
|
|
@@ -45,7 +45,7 @@ declare const useSnackbar: () => {
|
|
|
45
45
|
unwrap: () => Promise<ToastData>;
|
|
46
46
|
};
|
|
47
47
|
dismiss: (id?: string | number | undefined) => string | number;
|
|
48
|
-
loading: (message: string | number | boolean |
|
|
48
|
+
loading: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
49
49
|
} & {
|
|
50
50
|
getHistory: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
|
51
51
|
getToasts: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CustomShadows } from './index-
|
|
2
|
-
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-
|
|
1
|
+
import { C as CustomShadows } from './index-5a5e5dc8.js';
|
|
2
|
+
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-5a5e5dc8.js';
|
|
3
3
|
export { S as SettingsContextValue, _ as SettingsProvider, T as ThemeProviderProps, u as useSettingsContext } from './settings-provider-38d09283.js';
|
|
4
4
|
export { THEME_CONFIG, default as ThemeProvider } from './theme/theme-provider.js';
|
|
5
5
|
import { S as SettingsState } from './settings-583c107c.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as useThemeToggle } from './chunk-
|
|
1
|
+
export { a as useThemeToggle } from './chunk-7OV7UPWM.js';
|
|
2
2
|
export { b as ThemeProvider, a as createTheme } from './chunk-BJ5IDN65.js';
|
|
3
3
|
import './chunk-373WGZZL.js';
|
|
4
4
|
export { b as defaultFont, c as primaryFont, d as secondaryFont, a as shadows, e as typography } from './chunk-FTYHXGXC.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-
|
|
1
|
+
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-5a5e5dc8.js';
|
|
2
2
|
import '@mui/lab/TimelineConnector';
|
|
3
3
|
import '@mui/system';
|
|
4
4
|
import '@mui/lab/TimelineDot';
|
|
@@ -173,7 +173,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
173
173
|
float?: csstype.Property.Float | readonly NonNullable<csstype.Property.Float | undefined>[] | readonly csstype.Property.Float[] | undefined;
|
|
174
174
|
floodColor?: readonly string[] | csstype.Property.FloodColor | readonly csstype.Property.FloodColor[] | undefined;
|
|
175
175
|
floodOpacity?: readonly ((string & {}) | csstype.Globals)[] | csstype.Property.FloodOpacity | readonly NonNullable<csstype.Property.FloodOpacity | undefined>[] | undefined;
|
|
176
|
-
fontFamily?:
|
|
176
|
+
fontFamily?: csstype.Property.FontFamily | readonly string[] | readonly csstype.Property.FontFamily[] | undefined;
|
|
177
177
|
fontFeatureSettings?: readonly string[] | csstype.Property.FontFeatureSettings | readonly csstype.Property.FontFeatureSettings[] | undefined;
|
|
178
178
|
fontKerning?: csstype.Property.FontKerning | readonly NonNullable<csstype.Property.FontKerning | undefined>[] | readonly csstype.Property.FontKerning[] | undefined;
|
|
179
179
|
fontLanguageOverride?: readonly string[] | csstype.Property.FontLanguageOverride | readonly csstype.Property.FontLanguageOverride[] | undefined;
|
|
@@ -197,7 +197,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
197
197
|
fontVariantNumeric?: readonly string[] | csstype.Property.FontVariantNumeric | readonly csstype.Property.FontVariantNumeric[] | undefined;
|
|
198
198
|
fontVariantPosition?: csstype.Property.FontVariantPosition | readonly NonNullable<csstype.Property.FontVariantPosition | undefined>[] | readonly csstype.Property.FontVariantPosition[] | undefined;
|
|
199
199
|
fontVariationSettings?: readonly string[] | csstype.Property.FontVariationSettings | readonly csstype.Property.FontVariationSettings[] | undefined;
|
|
200
|
-
fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly (
|
|
200
|
+
fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ((string & {}) | csstype.Globals | "bold" | "normal" | "bolder" | "lighter")[] | undefined;
|
|
201
201
|
fontWidth?: readonly string[] | csstype.Property.FontWidth | readonly csstype.Property.FontWidth[] | undefined;
|
|
202
202
|
forcedColorAdjust?: csstype.Property.ForcedColorAdjust | readonly NonNullable<csstype.Property.ForcedColorAdjust | undefined>[] | readonly csstype.Property.ForcedColorAdjust[] | undefined;
|
|
203
203
|
gridAutoColumns?: readonly (string | (string & {}))[] | csstype.Property.GridAutoColumns<string | number> | readonly NonNullable<csstype.Property.GridAutoColumns<string | number> | undefined>[] | undefined;
|
|
@@ -462,7 +462,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
462
462
|
zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
|
|
463
463
|
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
|
|
464
464
|
all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
|
|
465
|
-
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly (
|
|
465
|
+
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
466
466
|
animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
|
|
467
467
|
background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
|
|
468
468
|
border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
|
|
@@ -474,7 +474,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
474
474
|
borderBlockWidth?: readonly (string | (string & {}))[] | csstype.Property.BorderBlockWidth<string | number> | readonly NonNullable<csstype.Property.BorderBlockWidth<string | number> | undefined>[] | undefined;
|
|
475
475
|
borderBottom?: readonly (string | (string & {}))[] | csstype.Property.BorderBottom<string | number> | readonly NonNullable<csstype.Property.BorderBottom<string | number> | undefined>[] | undefined;
|
|
476
476
|
borderColor?: readonly string[] | csstype.Property.BorderColor | readonly csstype.Property.BorderColor[] | undefined;
|
|
477
|
-
borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly (
|
|
477
|
+
borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
478
478
|
borderInline?: readonly (string | (string & {}))[] | csstype.Property.BorderInline<string | number> | readonly NonNullable<csstype.Property.BorderInline<string | number> | undefined>[] | undefined;
|
|
479
479
|
borderInlineColor?: readonly string[] | csstype.Property.BorderInlineColor | readonly csstype.Property.BorderInlineColor[] | undefined;
|
|
480
480
|
borderInlineEnd?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineEnd<string | number> | readonly NonNullable<csstype.Property.BorderInlineEnd<string | number> | undefined>[] | undefined;
|
|
@@ -509,7 +509,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
509
509
|
marginBlock?: readonly (string | (string & {}))[] | csstype.Property.MarginBlock<string | number> | readonly NonNullable<csstype.Property.MarginBlock<string | number> | undefined>[] | undefined;
|
|
510
510
|
marginInline?: readonly (string | (string & {}))[] | csstype.Property.MarginInline<string | number> | readonly NonNullable<csstype.Property.MarginInline<string | number> | undefined>[] | undefined;
|
|
511
511
|
mask?: readonly (string | (string & {}))[] | csstype.Property.Mask<string | number> | readonly NonNullable<csstype.Property.Mask<string | number> | undefined>[] | undefined;
|
|
512
|
-
maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly (
|
|
512
|
+
maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
|
|
513
513
|
motion?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
|
|
514
514
|
offset?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
|
|
515
515
|
outline?: readonly (string | (string & {}))[] | csstype.Property.Outline<string | number> | readonly NonNullable<csstype.Property.Outline<string | number> | undefined>[] | undefined;
|
|
@@ -758,8 +758,8 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
758
758
|
WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
|
|
759
759
|
WebkitUserSelect?: csstype.Property.WebkitUserSelect | readonly NonNullable<csstype.Property.WebkitUserSelect | undefined>[] | readonly csstype.Property.WebkitUserSelect[] | undefined;
|
|
760
760
|
WebkitWritingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
|
|
761
|
-
MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly (
|
|
762
|
-
MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly (
|
|
761
|
+
MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
762
|
+
MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
763
763
|
MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
|
|
764
764
|
MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
|
|
765
765
|
MozOutlineRadius?: readonly (string | (string & {}))[] | csstype.Property.MozOutlineRadius<string | number> | readonly NonNullable<csstype.Property.MozOutlineRadius<string | number> | undefined>[] | undefined;
|
|
@@ -771,16 +771,16 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
771
771
|
msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
|
|
772
772
|
msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
|
|
773
773
|
msTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
|
|
774
|
-
WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly (
|
|
774
|
+
WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
775
775
|
WebkitBorderBefore?: readonly (string | (string & {}))[] | csstype.Property.WebkitBorderBefore<string | number> | readonly NonNullable<csstype.Property.WebkitBorderBefore<string | number> | undefined>[] | undefined;
|
|
776
|
-
WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly (
|
|
776
|
+
WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
777
777
|
WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
|
|
778
778
|
WebkitColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
|
|
779
779
|
WebkitColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
|
|
780
780
|
WebkitFlex?: readonly (string | (string & {}))[] | csstype.Property.Flex<string | number> | readonly NonNullable<csstype.Property.Flex<string | number> | undefined>[] | undefined;
|
|
781
781
|
WebkitFlexFlow?: readonly string[] | csstype.Property.FlexFlow | readonly csstype.Property.FlexFlow[] | undefined;
|
|
782
782
|
WebkitMask?: readonly (string | (string & {}))[] | csstype.Property.WebkitMask<string | number> | readonly NonNullable<csstype.Property.WebkitMask<string | number> | undefined>[] | undefined;
|
|
783
|
-
WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly (
|
|
783
|
+
WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
|
|
784
784
|
WebkitTextEmphasis?: readonly string[] | csstype.Property.TextEmphasis | readonly csstype.Property.TextEmphasis[] | undefined;
|
|
785
785
|
WebkitTextStroke?: readonly (string | (string & {}))[] | csstype.Property.WebkitTextStroke<string | number> | readonly NonNullable<csstype.Property.WebkitTextStroke<string | number> | undefined>[] | undefined;
|
|
786
786
|
WebkitTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
|
|
@@ -861,7 +861,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
861
861
|
MozUserFocus?: csstype.Property.MozUserFocus | readonly NonNullable<csstype.Property.MozUserFocus | undefined>[] | readonly csstype.Property.MozUserFocus[] | undefined;
|
|
862
862
|
MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
|
|
863
863
|
msImeMode?: csstype.Property.ImeMode | readonly NonNullable<csstype.Property.ImeMode | undefined>[] | readonly csstype.Property.ImeMode[] | undefined;
|
|
864
|
-
OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly (
|
|
864
|
+
OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
865
865
|
OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
|
|
866
866
|
OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
|
|
867
867
|
OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;
|
|
@@ -871,7 +871,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
871
871
|
OAnimationPlayState?: readonly string[] | csstype.Property.AnimationPlayState | readonly csstype.Property.AnimationPlayState[] | undefined;
|
|
872
872
|
OAnimationTimingFunction?: readonly string[] | csstype.Property.AnimationTimingFunction | readonly csstype.Property.AnimationTimingFunction[] | undefined;
|
|
873
873
|
OBackgroundSize?: readonly (string | (string & {}))[] | csstype.Property.BackgroundSize<string | number> | readonly NonNullable<csstype.Property.BackgroundSize<string | number> | undefined>[] | undefined;
|
|
874
|
-
OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly (
|
|
874
|
+
OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
875
875
|
OObjectFit?: csstype.Property.ObjectFit | readonly NonNullable<csstype.Property.ObjectFit | undefined>[] | readonly csstype.Property.ObjectFit[] | undefined;
|
|
876
876
|
OObjectPosition?: readonly (string | (string & {}))[] | csstype.Property.ObjectPosition<string | number> | readonly NonNullable<csstype.Property.ObjectPosition<string | number> | undefined>[] | undefined;
|
|
877
877
|
OTabSize?: readonly (string | (string & {}))[] | csstype.Property.TabSize<string | number> | readonly NonNullable<csstype.Property.TabSize<string | number> | undefined>[] | undefined;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useThemeToggle.ts"],"names":["useColorScheme","useThemeToggle","setMode","settings","updateSettings","useSettingsContext","colorScheme","handleSetColorScheme","scheme"],"mappings":"wCAAA,OAAS,kBAAAA,MAAsB,gBAaxB,IAAMC,EAAiB,IAA4B,CACxD,GAAM,CAAE,QAAAC,CAAQ,EAAIF,EAAe,EAC7B,CAAE,SAAAG,EAAU,eAAAC,CAAe,EAAIC,EAAmB,EAClDC,EAAcH,EAAS,cAAgB,QAAU,OAAS,QAE1DI,EAAwBC,GAAwB,CACpDN,EAAQM,CAAM,EACdJ,EAAe,CAAE,YAAaI,CAAO,CAAC,CACxC,EAOA,MAAO,CACL,YAAAF,EACA,KAAMA,EACN,OAAQA,IAAgB,OACxB,YATkB,IAAM,CAExBC,EADkBD,IAAgB,QAAU,OAAS,OACvB,CAChC,EAOE,eAAgBC,CAClB,CACF","sourcesContent":["import { useColorScheme } from '@mui/material';\n\nimport { useSettingsContext } from 'theme/theme-provider';\nimport { ColorScheme } from 'types/settings';\n\nexport interface UseThemeToggleReturn {\n colorScheme: ColorScheme;\n mode: ColorScheme;\n isDark: boolean;\n toggleTheme: () => void;\n setColorScheme: (scheme: ColorScheme) => void;\n}\n\nexport const useThemeToggle = (): UseThemeToggleReturn => {\n const { setMode } = useColorScheme();\n const { settings, updateSettings } = useSettingsContext();\n const colorScheme = settings.colorScheme !== 'light' ? 'dark' : 'light';\n\n const handleSetColorScheme = (scheme: ColorScheme) => {\n setMode(scheme);\n updateSettings({ colorScheme: scheme });\n };\n\n const toggleTheme = () => {\n const newScheme = colorScheme === 'light' ? 'dark' : 'light';\n handleSetColorScheme(newScheme);\n };\n\n return {\n colorScheme,\n mode: colorScheme,\n isDark: colorScheme === 'dark',\n toggleTheme,\n setColorScheme: handleSetColorScheme,\n };\n};\n"]}
|
|
File without changes
|
|
@@ -286,13 +286,10 @@ declare const components: {
|
|
|
286
286
|
MuiTimelineDot: {
|
|
287
287
|
defaultProps?: Partial<_mui_lab_TimelineDot.TimelineDotProps> | undefined;
|
|
288
288
|
styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<keyof _mui_lab_TimelineDot.TimelineDotClasses, "MuiTimelineDot", {
|
|
289
|
-
|
|
290
|
-
zIndex: _mui_material.ZIndex;
|
|
291
|
-
direction: _mui_system.Direction;
|
|
292
|
-
opacity: _mui_material.Opacity;
|
|
293
|
-
typography: _mui_material.TypographyVariants;
|
|
289
|
+
transitions: _mui_material.Transitions;
|
|
294
290
|
palette: _mui_material.Palette;
|
|
295
291
|
colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
|
|
292
|
+
cssVarPrefix: string;
|
|
296
293
|
vars: _mui_material.ThemeVars;
|
|
297
294
|
getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
|
|
298
295
|
getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
|
|
@@ -303,13 +300,16 @@ declare const components: {
|
|
|
303
300
|
spacing: _mui_system.Spacing;
|
|
304
301
|
breakpoints: _mui_system.Breakpoints;
|
|
305
302
|
shape: _mui_system.Shape;
|
|
306
|
-
|
|
303
|
+
typography: _mui_material.TypographyVariants;
|
|
307
304
|
shadows: _mui_material.Shadows;
|
|
308
305
|
mixins: _mui_material.Mixins;
|
|
306
|
+
zIndex: _mui_material.ZIndex;
|
|
307
|
+
direction: _mui_system.Direction;
|
|
309
308
|
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
310
309
|
unstable_sxConfig: _mui_system.SxConfig;
|
|
311
310
|
unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
|
|
312
311
|
applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
|
|
312
|
+
opacity: _mui_material.Opacity;
|
|
313
313
|
overlays: _mui_material.Overlays;
|
|
314
314
|
customShadows: CustomShadows;
|
|
315
315
|
unstable_strictMode?: boolean | undefined;
|
|
@@ -326,13 +326,10 @@ declare const components: {
|
|
|
326
326
|
MuiTimelineConnector: {
|
|
327
327
|
defaultProps?: Partial<_mui_lab_TimelineConnector.TimelineConnectorProps> | undefined;
|
|
328
328
|
styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<"root", "MuiTimelineConnector", {
|
|
329
|
-
|
|
330
|
-
zIndex: _mui_material.ZIndex;
|
|
331
|
-
direction: _mui_system.Direction;
|
|
332
|
-
opacity: _mui_material.Opacity;
|
|
333
|
-
typography: _mui_material.TypographyVariants;
|
|
329
|
+
transitions: _mui_material.Transitions;
|
|
334
330
|
palette: _mui_material.Palette;
|
|
335
331
|
colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
|
|
332
|
+
cssVarPrefix: string;
|
|
336
333
|
vars: _mui_material.ThemeVars;
|
|
337
334
|
getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
|
|
338
335
|
getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
|
|
@@ -343,13 +340,16 @@ declare const components: {
|
|
|
343
340
|
spacing: _mui_system.Spacing;
|
|
344
341
|
breakpoints: _mui_system.Breakpoints;
|
|
345
342
|
shape: _mui_system.Shape;
|
|
346
|
-
|
|
343
|
+
typography: _mui_material.TypographyVariants;
|
|
347
344
|
shadows: _mui_material.Shadows;
|
|
348
345
|
mixins: _mui_material.Mixins;
|
|
346
|
+
zIndex: _mui_material.ZIndex;
|
|
347
|
+
direction: _mui_system.Direction;
|
|
349
348
|
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
350
349
|
unstable_sxConfig: _mui_system.SxConfig;
|
|
351
350
|
unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
|
|
352
351
|
applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
|
|
352
|
+
opacity: _mui_material.Opacity;
|
|
353
353
|
overlays: _mui_material.Overlays;
|
|
354
354
|
customShadows: CustomShadows;
|
|
355
355
|
unstable_strictMode?: boolean | undefined;
|