@zydon/common 2.5.70 → 2.5.72

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.
@@ -10,6 +10,6 @@ interface CommonProps {
10
10
  }
11
11
 
12
12
  declare const Common: ({ primaryColor, colorScheme, contrast, children, cssVarPrefix, snackbar, }: PropsWithChildren<CommonProps>) => react_jsx_runtime.JSX.Element;
13
- declare const EnhancedCommon: ({ primaryColor, colorScheme, contrast, children, }: PropsWithChildren<CommonProps>) => react_jsx_runtime.JSX.Element;
13
+ declare const EnhancedCommon: ({ primaryColor, colorScheme, contrast, children, snackbar, }: PropsWithChildren<CommonProps>) => react_jsx_runtime.JSX.Element;
14
14
 
15
15
  export { EnhancedCommon, Common as default };
@@ -1,4 +1,4 @@
1
- import { a as a$1 } from '../../chunk-5FUXMHIG.js';
1
+ import { a as a$2 } from '../../chunk-5FUXMHIG.js';
2
2
  import { a } from '../../chunk-7KQMMZCF.js';
3
3
  import '../../chunk-FHG3IGXY.js';
4
4
  import '../../chunk-SO64ZYQB.js';
@@ -9,7 +9,7 @@ import '../../chunk-FDP5MHVS.js';
9
9
  import '../../chunk-GUFT6XPG.js';
10
10
  import '../../chunk-42S2A5ST.js';
11
11
  import { i } from '../../chunk-D27ND54J.js';
12
- import { a as a$2 } from '../../chunk-P26W2RT7.js';
12
+ import { a as a$1 } from '../../chunk-P26W2RT7.js';
13
13
  import '../../chunk-QGFD5EQE.js';
14
14
  import '../../chunk-QQDMA4TE.js';
15
15
  import '../../chunk-Z2TDWMRU.js';
@@ -17,14 +17,14 @@ import '../../chunk-4INDXVIX.js';
17
17
  import '../../chunk-3APKMSVD.js';
18
18
  import { LazyMotion, domMax } from 'framer-motion';
19
19
  import { jsx, jsxs } from 'react/jsx-runtime';
20
- import S from '@mui/material/Portal';
20
+ import P from '@mui/material/Portal';
21
21
  import { styled } from '@mui/material/styles';
22
22
  import { Toaster } from 'sonner';
23
23
  import 'dayjs/locale/pt-br';
24
- import $ from 'dayjs';
24
+ import S from 'dayjs';
25
25
  import { AdapterDayjs } from '@mui/x-date-pickers-pro/AdapterDayjs';
26
26
  import { LocalizationProvider } from '@mui/x-date-pickers-pro/LocalizationProvider';
27
27
 
28
- var p=({children:t})=>jsx(LazyMotion,{strict:!0,features:domMax,children:t});var o={root:"toaster__root",toast:"toaster__toast",title:"toaster__title",icon:"toaster__icon",iconSvg:"toaster__icon__svg",content:"toaster__content",description:"toaster__description",actionButton:"toaster__action__button",cancelButton:"toaster__cancel__button",closeButton:"toaster__close_button",loadingIcon:"toaster__loading_icon",default:"toaster__default",error:"toaster__error",success:"toaster__success",warning:"toaster__warning",info:"toaster__info",loader:"sonner-loader",loaderVisible:'&[data-visible="true"]',closeBtnVisible:'[data-close-button="true"]'};var u=styled(Toaster)(({theme:t})=>{let r={toastDefault:{padding:t.spacing(1,1,1,1.5),boxShadow:t.customShadows.z8,color:t.vars.palette.background.paper,backgroundColor:t.vars.palette.text.primary},toastColor:{padding:t.spacing(.5,1,.5,.5),boxShadow:t.customShadows.z8,color:t.vars.palette.text.primary,backgroundColor:t.vars.palette.background.paper},toastLoader:{padding:t.spacing(.5,1,.5,.5),boxShadow:t.customShadows.z8,color:t.vars.palette.text.primary,backgroundColor:t.vars.palette.background.paper}},e={top:0,left:0,width:"100%",height:"100%",display:"none",transform:"none",overflow:"hidden",alignItems:"center",position:"relative",borderRadius:"inherit",justifyContent:"center",background:t.vars.palette.background.neutral,[`& .${o.loadingIcon}`]:{zIndex:9,width:24,height:24,borderRadius:"50%",animation:"rotate 3s infinite linear",background:`conic-gradient(${i(t.vars.palette.text.primaryChannel,0)}, ${i(t.vars.palette.text.disabledChannel,.64)})`},[o.loaderVisible]:{display:"flex"}};return {width:300,[`& .${o.toast}`]:{gap:12,width:"100%",minHeight:52,display:"flex",borderRadius:12,alignItems:"center"},[`& .${o.content}`]:{gap:0,flex:"1 1 auto"},[`& .${o.title}`]:{fontSize:t.typography.subtitle2.fontSize},[`& .${o.description}`]:{...t.typography.caption,opacity:.64},[`& .${o.actionButton}`]:{},[`& .${o.cancelButton}`]:{},[`& .${o.closeButton}`]:{top:0,right:0,left:"auto",color:"currentColor",backgroundColor:"transparent",transform:"translate(-6px, 6px)",borderColor:i(t.vars.palette.grey["500Channel"],.16),transition:t.transitions.create(["background-color","border-color"]),"&:hover":{borderColor:i(t.vars.palette.grey["500Channel"],.24),backgroundColor:i(t.vars.palette.grey["500Channel"],.08)}},[`& .${o.icon}`]:{margin:0,width:48,height:48,alignItems:"center",borderRadius:"inherit",justifyContent:"center",alignSelf:"flex-start",[`& .${o.iconSvg}`]:{width:24,height:24,fontSize:0}},"@keyframes rotate":{to:{transform:"rotate(1turn)"}},[`& .${o.default}`]:{...r.toastDefault,[`&:has(${o.closeBtnVisible})`]:{[`& .${o.content}`]:{paddingRight:32}},[`&:has(.${o.loader})`]:r.toastLoader,[`&:has(.${o.loader})`]:r.toastLoader,[`& .${o.loader}`]:e},[`& .${o.error}`]:{...r.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.error.main,backgroundColor:i(t.vars.palette.error.mainChannel,.08)}},[`& .${o.success}`]:{...r.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.success.main,backgroundColor:i(t.vars.palette.success.mainChannel,.08)}},[`& .${o.warning}`]:{...r.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.warning.main,backgroundColor:i(t.vars.palette.warning.mainChannel,.08)}},[`& .${o.info}`]:{...r.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.info.main,backgroundColor:i(t.vars.palette.info.mainChannel,.08)}}}});var g=()=>jsx(S,{container:typeof window<"u"?document.getElementById("snackbar-container-provider"):null,children:jsx(u,{expand:!0,gap:12,closeButton:!0,offset:16,visibleToasts:4,position:"top-right",className:o.root,toastOptions:{unstyled:!0,classNames:{toast:o.toast,icon:o.icon,content:o.content,title:o.title,description:o.description,actionButton:o.actionButton,cancelButton:o.cancelButton,closeButton:o.closeButton,default:o.default,info:o.info,error:o.error,success:o.success,warning:o.warning}},icons:{loading:jsx("span",{className:o.loadingIcon}),info:jsx(a$2,{className:o.iconSvg,icon:"INFO_CIRCLE"}),success:jsx(a$2,{className:o.iconSvg,icon:"CHECK_CIRCLE"}),warning:jsx(a$2,{className:o.iconSvg,icon:"WARNING_TRIANGULE"}),error:jsx(a$2,{className:o.iconSvg,icon:"ALERT_CIRCLE"})}})});var x=({children:t})=>($.locale("pt-br"),jsx(LocalizationProvider,{dateAdapter:AdapterDayjs,adapterLocale:"pt-br",children:t})),m=x;var L=({primaryColor:t,colorScheme:r,contrast:e,children:l,cssVarPrefix:f,snackbar:C=!0})=>jsx(m,{children:jsx(a$1,{primaryColor:t,colorScheme:r,contrast:e,cssVarPrefix:f,children:jsxs(p,{children:[l,C&&jsx(g,{})]})})}),ro=({primaryColor:t,colorScheme:r,contrast:e,children:l})=>jsx(a,{defaultSettings:{primaryColor:t,colorScheme:r,contrast:e},storageKey:"b2b-theme-settings",cssVarPrefix:"app",enableSystemTheme:!0,children:l});var ao=L;
28
+ var d=({children:t})=>jsx(LazyMotion,{strict:!0,features:domMax,children:t});var o={root:"toaster__root",toast:"toaster__toast",title:"toaster__title",icon:"toaster__icon",iconSvg:"toaster__icon__svg",content:"toaster__content",description:"toaster__description",actionButton:"toaster__action__button",cancelButton:"toaster__cancel__button",closeButton:"toaster__close_button",loadingIcon:"toaster__loading_icon",default:"toaster__default",error:"toaster__error",success:"toaster__success",warning:"toaster__warning",info:"toaster__info",loader:"sonner-loader",loaderVisible:'&[data-visible="true"]',closeBtnVisible:'[data-close-button="true"]'};var f=styled(Toaster)(({theme:t})=>{let r={toastDefault:{padding:t.spacing(1,1,1,1.5),boxShadow:t.customShadows.z8,color:t.vars.palette.background.paper,backgroundColor:t.vars.palette.text.primary},toastColor:{padding:t.spacing(.5,1,.5,.5),boxShadow:t.customShadows.z8,color:t.vars.palette.text.primary,backgroundColor:t.vars.palette.background.paper},toastLoader:{padding:t.spacing(.5,1,.5,.5),boxShadow:t.customShadows.z8,color:t.vars.palette.text.primary,backgroundColor:t.vars.palette.background.paper}},i$1={top:0,left:0,width:"100%",height:"100%",display:"none",transform:"none",overflow:"hidden",alignItems:"center",position:"relative",borderRadius:"inherit",justifyContent:"center",background:t.vars.palette.background.neutral,[`& .${o.loadingIcon}`]:{zIndex:9,width:24,height:24,borderRadius:"50%",animation:"rotate 3s infinite linear",background:`conic-gradient(${i(t.vars.palette.text.primaryChannel,0)}, ${i(t.vars.palette.text.disabledChannel,.64)})`},[o.loaderVisible]:{display:"flex"}};return {width:300,[`& .${o.toast}`]:{gap:12,width:"100%",minHeight:52,display:"flex",borderRadius:12,alignItems:"center"},[`& .${o.content}`]:{gap:0,flex:"1 1 auto"},[`& .${o.title}`]:{fontSize:t.typography.subtitle2.fontSize},[`& .${o.description}`]:{...t.typography.caption,opacity:.64},[`& .${o.actionButton}`]:{},[`& .${o.cancelButton}`]:{},[`& .${o.closeButton}`]:{top:0,right:0,left:"auto",color:"currentColor",backgroundColor:"transparent",transform:"translate(-6px, 6px)",borderColor:i(t.vars.palette.grey["500Channel"],.16),transition:t.transitions.create(["background-color","border-color"]),"&:hover":{borderColor:i(t.vars.palette.grey["500Channel"],.24),backgroundColor:i(t.vars.palette.grey["500Channel"],.08)}},[`& .${o.icon}`]:{margin:0,width:48,height:48,alignItems:"center",borderRadius:"inherit",justifyContent:"center",alignSelf:"flex-start",[`& .${o.iconSvg}`]:{width:24,height:24,fontSize:0}},"@keyframes rotate":{to:{transform:"rotate(1turn)"}},[`& .${o.default}`]:{...r.toastDefault,[`&:has(${o.closeBtnVisible})`]:{[`& .${o.content}`]:{paddingRight:32}},[`&:has(.${o.loader})`]:r.toastLoader,[`&:has(.${o.loader})`]:r.toastLoader,[`& .${o.loader}`]:i$1},[`& .${o.error}`]:{...r.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.error.main,backgroundColor:i(t.vars.palette.error.mainChannel,.08)}},[`& .${o.success}`]:{...r.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.success.main,backgroundColor:i(t.vars.palette.success.mainChannel,.08)}},[`& .${o.warning}`]:{...r.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.warning.main,backgroundColor:i(t.vars.palette.warning.mainChannel,.08)}},[`& .${o.info}`]:{...r.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.info.main,backgroundColor:i(t.vars.palette.info.mainChannel,.08)}}}});var p=()=>jsx(P,{container:typeof window<"u"?document.getElementById("snackbar-container-provider"):null,children:jsx(f,{expand:!0,gap:12,closeButton:!0,offset:16,visibleToasts:4,position:"top-right",className:o.root,toastOptions:{unstyled:!0,classNames:{toast:o.toast,icon:o.icon,content:o.content,title:o.title,description:o.description,actionButton:o.actionButton,cancelButton:o.cancelButton,closeButton:o.closeButton,default:o.default,info:o.info,error:o.error,success:o.success,warning:o.warning}},icons:{loading:jsx("span",{className:o.loadingIcon}),info:jsx(a$1,{className:o.iconSvg,icon:"INFO_CIRCLE"}),success:jsx(a$1,{className:o.iconSvg,icon:"CHECK_CIRCLE"}),warning:jsx(a$1,{className:o.iconSvg,icon:"WARNING_TRIANGULE"}),error:jsx(a$1,{className:o.iconSvg,icon:"ALERT_CIRCLE"})}})});var k=({children:t})=>(S.locale("pt-br"),jsx(LocalizationProvider,{dateAdapter:AdapterDayjs,adapterLocale:"pt-br",children:t})),u=k;var z=({primaryColor:t,colorScheme:r,contrast:i,children:l,cssVarPrefix:c,snackbar:b=!0})=>jsx(u,{children:jsx(a$2,{primaryColor:t,colorScheme:r,contrast:i,cssVarPrefix:c,children:jsxs(d,{children:[l,b&&jsx(p,{})]})})}),ro=({primaryColor:t,colorScheme:r,contrast:i,children:l,snackbar:c=!0})=>jsx(u,{children:jsx(a,{defaultSettings:{primaryColor:t,colorScheme:r,contrast:i},storageKey:"b2b-theme-settings",cssVarPrefix:"app",enableSystemTheme:!r,children:jsxs(d,{children:[l,c&&jsx(p,{})]})})});var ao=z;
29
29
 
30
30
  export { ro as EnhancedCommon, ao as default };
@@ -4,13 +4,13 @@ import '../../chunk-Z2TDWMRU.js';
4
4
  import '../../chunk-4INDXVIX.js';
5
5
  import '../../chunk-3APKMSVD.js';
6
6
  import { forwardRef } from 'react';
7
- import w from '@mui/material/Fab';
8
- import L from '@mui/material/IconButton';
7
+ import B from '@mui/material/Fab';
8
+ import C from '@mui/material/IconButton';
9
9
  import { useTheme } from '@mui/material/styles';
10
- import B from '@mui/material/Switch';
11
- import C from '@mui/material/Tooltip';
10
+ import M from '@mui/material/Switch';
11
+ import R from '@mui/material/Tooltip';
12
12
  import { jsx } from 'react/jsx-runtime';
13
13
 
14
- var h=()=>jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M12 18c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6zm0-10c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zM12 4c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM12 24c-.6 0-1-.4-1-1v-2c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM5.6 6.6c-.3 0-.6-.1-.8-.3L3.4 4.9c-.4-.4-.4-1 0-1.4s1-.4 1.4 0L6.2 4.9c.4.4.4 1 0 1.4-.2.2-.4.3-.6.3zM19.8 20.8c-.3 0-.6-.1-.8-.3L17.6 19.1c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.4 1.4c.4.4.4 1 0 1.4-.2.2-.4.3-.6.3zM3 13H1c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM23 13h-2c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM4.2 20.8c-.3 0-.6-.1-.8-.3-.4-.4-.4-1 0-1.4L4.8 17.7c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-1.4 1.4c-.2.2-.4.3-.6.3zM18.4 6.6c-.3 0-.6-.1-.8-.3-.4-.4-.4-1 0-1.4L19 3.5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L19 6.3c-.2.2-.4.3-.6.3z"})}),p=()=>jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M12.1 22c-5.5 0-10-4.5-10-10 0-5.3 4.1-9.7 9.4-10-.4.6-.6 1.3-.6 2 0 2.2 1.8 4 4 4 .7 0 1.4-.2 2-.6-.3 5.3-4.7 9.4-10 9.4-.3 0-.6 0-.8 0z"})}),u=forwardRef(({variant:l="iconButton",size:e="medium",color:t="inherit",tooltip:f=!0,tooltipTitle:T,className:i,disabled:s=!1,...a},m)=>{let r=useTheme(),{settings:M,onToggleMode:c}=b(),n=M.colorScheme==="dark",z=T||(n?"Alternar para modo claro":"Alternar para modo escuro"),g=(()=>{switch(l){case"switch":return jsx(B,{checked:n,onChange:c,size:e==="large"?"medium":e,color:t==="inherit"?"primary":t,disabled:s,className:i,...a});case"fab":return jsx(w,{ref:m,size:e,color:t==="inherit"?"primary":t,onClick:c,disabled:s,className:i,sx:{transition:r.transitions.create(["transform","background-color"],{duration:r.transitions.duration.shorter}),"&:hover":{transform:"scale(1.05)"}},...a,children:n?jsx(h,{}):jsx(p,{})});case"iconButton":default:return jsx(L,{ref:m,size:e,color:t,onClick:c,disabled:s,className:i,sx:{transition:r.transitions.create(["transform","color"],{duration:r.transitions.duration.shorter}),"&:hover":{transform:"rotate(180deg)"}},...a,children:n?jsx(h,{}):jsx(p,{})})}})();return f&&l!=="switch"?jsx(C,{title:z,arrow:!0,children:g}):g});u.displayName="ThemeToggle";var V=u;
14
+ var g=()=>jsx("span",{children:"\u2600\uFE0F"}),u=()=>jsx("span",{children:"\u{1F319}"}),T=forwardRef(({variant:m="iconButton",size:e="medium",color:t="inherit",tooltip:f=!0,tooltipTitle:h,className:a,disabled:i=!1,...s},c)=>{let r=useTheme(),{settings:b$1,onToggleMode:l}=b(),n=b$1.colorScheme==="dark",k=h||(n?"Alternar para modo claro":"Alternar para modo escuro"),p=(()=>{switch(m){case"switch":return jsx(M,{checked:n,onChange:l,size:e==="large"?"medium":e,color:t==="inherit"?"primary":t,disabled:i,className:a,...s});case"fab":return jsx(B,{ref:c,size:e,color:t==="inherit"?"primary":t,onClick:l,disabled:i,className:a,sx:{transition:r.transitions.create(["transform","background-color"],{duration:r.transitions.duration.shorter}),"&:hover":{transform:"scale(1.05)"}},...s,children:n?jsx(g,{}):jsx(u,{})});case"iconButton":default:return jsx(C,{ref:c,size:e,color:t,onClick:l,disabled:i,className:a,sx:{transition:r.transitions.create(["transform","color"],{duration:r.transitions.duration.shorter}),"&:hover":{transform:"rotate(180deg)"}},...s,children:n?jsx(g,{}):jsx(u,{})})}})();return f&&m!=="switch"?jsx(R,{title:k,arrow:!0,children:p}):p});T.displayName="ThemeToggle";var D=T;
15
15
 
16
- export { u as ThemeToggle, V as default };
16
+ export { T as ThemeToggle, D as default };
@@ -443,7 +443,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
443
443
  wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
444
444
  writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
445
445
  zIndex?: csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto")[] | undefined;
446
- zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
446
+ zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
447
447
  all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
448
448
  animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "auto" | "none" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
449
449
  animationRange?: csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | readonly (string | (string & {}))[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.5.70",
3
+ "version": "2.5.72",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",