@zydon/common 2.4.54 → 2.4.55

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.
@@ -0,0 +1,7 @@
1
+ import p from '@mui/material/Stack';
2
+ import { styled, alpha } from '@mui/material/styles';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ var r=styled(p)(({theme:o})=>({backgroundColor:"#fff",border:`1px solid ${alpha(o.palette.grey[500],.2)}`}));var i=({children:o,...t})=>jsx(r,{borderRadius:1,gap:3,padding:3,...t,children:o}),s=i;
6
+
7
+ export { s as a };
@@ -1,7 +1,7 @@
1
1
  import { a as a$4 } from '../../chunk-H5L4ARDB.js';
2
- import { a } from '../../chunk-AV36ZLPF.js';
3
2
  import { e } from '../../chunk-ANAHA3L6.js';
4
3
  import { a as a$3 } from '../../chunk-IPOTBSM7.js';
4
+ import { a } from '../../chunk-AV36ZLPF.js';
5
5
  import { f } from '../../chunk-IOF7MNRL.js';
6
6
  import { a as a$5 } from '../../chunk-6VHUXLMC.js';
7
7
  import '../../chunk-4WWRGU3D.js';
@@ -3,13 +3,14 @@ import { ReactNode } from 'react';
3
3
  import { SectionProps } from '../../types/sectionProps.js';
4
4
 
5
5
  type FrameSkeletonProps = {
6
- title: string;
6
+ title: ReactNode;
7
+ subtitle?: ReactNode;
7
8
  sections: SectionProps[];
8
9
  headerLeftContent?: ReactNode;
9
10
  headerRightContent?: ReactNode;
10
11
  onClickBack: VoidFunction;
11
12
  };
12
13
 
13
- declare const FrameSkeleton: ({ title, sections, headerLeftContent, headerRightContent, onClickBack, }: FrameSkeletonProps) => react_jsx_runtime.JSX.Element;
14
+ declare const FrameSkeleton: ({ title, subtitle, sections, headerLeftContent, headerRightContent, onClickBack, }: FrameSkeletonProps) => react_jsx_runtime.JSX.Element;
14
15
 
15
16
  export { FrameSkeleton as default };
@@ -1,17 +1,14 @@
1
- import { a as a$3 } from '../../chunk-BYAPKKGB.js';
2
- import { a } from '../../chunk-E5MGOPPQ.js';
3
- import { a as a$2 } from '../../chunk-YZU7RKVH.js';
4
- import { a as a$1 } from '../../chunk-YQ6K2DEP.js';
1
+ import { a } from '../../chunk-CFD2VTQ3.js';
2
+ import { a as a$2 } from '../../chunk-AV36ZLPF.js';
3
+ import { a as a$1 } from '../../chunk-E5MGOPPQ.js';
4
+ import { a as a$3 } from '../../chunk-YQ6K2DEP.js';
5
5
  import '../../chunk-CHLVIVDD.js';
6
- import { b as b$1 } from '../../chunk-ILHUUK4X.js';
7
- import L from '@mui/material/Divider';
8
- import R from '@mui/material/IconButton';
9
6
  import i from '@mui/material/Stack';
10
- import S from '@mui/material/Typography';
11
- import H from '@mui/material/Button';
12
- import { styled } from '@mui/material/styles';
13
- import { jsx, jsxs } from 'react/jsx-runtime';
7
+ import d from '@mui/material/Typography';
8
+ import R from '@mui/material/Button';
9
+ import { styled, alpha } from '@mui/material/styles';
10
+ import { jsxs, jsx } from 'react/jsx-runtime';
14
11
 
15
- var h=styled(i)(({theme:t})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"calc(100vh - var(--sticky-header-height, 64px))",borderRight:`1px solid ${t.palette.grey[200]}`,[t.breakpoints.down("sm")]:{display:"none"}})),b=styled(i)(({theme:t})=>({backgroundColor:"#fff",position:"sticky",top:"var(--sticky-header-height, 64px)",zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${t.palette.grey[200]}`})),k=styled(i)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),y=styled(i)(({theme:t})=>({height:"100%",width:"50%",flex:1,[t.breakpoints.down(1680)]:{width:"90%"}})),B=styled(S)(({theme:t})=>({color:t.palette.grey[800],fontSize:18,fontWeight:700})),u=styled(S)(({theme:t})=>({color:t.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),w=styled(H)(({theme:t})=>({paddingTop:6,paddingBottom:6,paddingLeft:0,margin:0,marginBottom:4,marginTop:4,width:"100%",display:"block",cursor:"pointer",color:t.palette.grey[600],textAlign:"left",fontWeight:400,fontSize:14,"> span":{color:t.palette.error.main}})),T=styled(a)(()=>({height:1,"& .simplebar-content":{height:1}})),I=styled(i)(()=>({position:"fixed",width:"202px"})),v=styled(i)(({theme:t})=>({position:"fixed",bottom:0,left:0,width:"100%",height:112,padding:"12px 16px",backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.grey[200]}`,boxShadow:"0 0 4px rgba(0, 0, 0, 0.1)",alignItems:"center",zIndex:800,[t.breakpoints.up("sm")]:{display:"none"}}));var z=({title:t,sections:d,headerLeftContent:W,headerRightContent:c,onClickBack:F})=>{let p=b$1("down","md");return jsx(i,{children:jsxs(i,{direction:"row",children:[jsx(h,{id:"frame-skeleton-left-box",children:jsx(T,{children:jsxs(I,{children:[jsx(S,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO R\xC1PIDO"}),d.map((e,l)=>jsxs(i,{children:[jsxs(w,{onClick:()=>{e.ref.current&&e.ref.current.scrollIntoView({block:"center",behavior:"smooth"});},children:[e.title,e.isRequired&&jsx("span",{children:"*"})]}),l<d.length-1&&jsx(L,{sx:{borderColor:"grey.200"}})]},l))]})})}),jsxs(i,{width:"100%",alignItems:"center",mb:8,children:[jsx(b,{children:jsxs(k,{children:[jsx(i,{flexDirection:"row",gap:2,alignItems:"center",children:jsxs(i,{direction:p?"column":"row",spacing:2,children:[jsxs(i,{direction:"row",children:[jsx(R,{color:"primary",onClick:()=>F(),"aria-label":"Voltar para a tela anterior","data-testid":"backToPreviousPage",children:jsx(a$1,{icon:"CHEVRON_LEFT"})}),jsx(S,{variant:"h4",whiteSpace:"nowrap",children:t})]}),jsx(i,{alignItems:p?"flex-start":"center",justifyContent:"center",children:W})]})}),jsxs(i,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[jsx(a$2,{sx:{display:{xs:"none",sm:"flex"}},disabled:!0}),p&&c?jsx(v,{children:c}):c]})]})}),jsx(y,{children:d.map((e,l)=>jsxs(i,{paddingTop:3,paddingBottom:p?10:2,alignItems:"start",width:"100%",id:`section-${l}`,children:[jsx(B,{ref:e.ref,children:e.title}),jsx(u,{children:e.subTitle}),jsx(a$3,{width:"100%",borderRadius:1,gap:1.5,padding:p?2:3,children:e.child})]},e.title))})]})]})})},Q=z;
12
+ var x=styled(i)(({theme:t})=>({backgroundColor:"#fff",minWidth:300,flex:1,borderRight:`1px solid ${t.palette.grey[200]}`,[t.breakpoints.down("md")]:{display:"none"}})),S=styled(i)({position:"sticky",top:"calc(var(--sticky-header-height, 64px))",height:"calc(100vh - var(--sticky-header-height, 64px))"}),b=styled(i)(({theme:t})=>({position:"sticky",top:"var(--sticky-header-height, 64px)",flexDirection:"row",alignItems:"center",backgroundColor:"#fff",zIndex:999,width:"100%",padding:"12px 24px",height:64,gap:12,borderBottom:`1px solid ${t.palette.grey[200]}`,[t.breakpoints.down("md")]:{padding:"14px 16px",gap:6}})),k=styled(R)(({theme:t})=>({height:50,background:"none",fontSize:13,fontWeight:400,justifyContent:"flex-start",padding:"12px 8px",color:t.palette.text.secondary,borderBottom:`1px dashed ${alpha(t.palette.grey[500],.2)}`,borderRadius:0,gap:4,"&:hover":{backgroundColor:"transparent"},"& .required":{color:t.palette.error.main}})),p=styled(i)(({theme:t})=>({flex:1,flexDirection:"row",alignItems:"center",gap:24,"&.header-left-content":{justifyContent:"flex-start",marginLeft:12},[t.breakpoints.down("md")]:{gap:8,flex:"initial","& button":{textIndent:"-9999px",minWidth:36,maxWidth:36,height:36,width:36,"& .MuiButton-icon":{margin:"auto"}},"&.header-left-content":{justifyContent:"flex-end",marginLeft:"auto",marginRight:-6,"& label":{marginRight:0},"& .MuiTypography-root":{display:"none"}}}})),y=styled(i)(({theme:t})=>({flex:1,width:"100%",padding:24,gap:24,alignItems:"center",[t.breakpoints.down("md")]:{padding:"24px 16px"}})),u=styled(i)(({theme:t})=>({alignItems:"start",width:"100%",maxWidth:700,[t.breakpoints.down("md")]:{maxWidth:"100%"}})),C=styled(a)(({theme:t})=>({width:"100%",borderRadius:12,gap:12,[t.breakpoints.down("md")]:{padding:"24px 16px"}})),w=styled(d)(({theme:t})=>({color:t.palette.grey[800],fontSize:18,fontWeight:700})),T=styled(d)(({theme:t})=>({color:t.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24}));var H=({title:t,subtitle:l,sections:c,headerLeftContent:v,headerRightContent:I,onClickBack:W})=>jsxs(i,{direction:"row",flex:1,children:[jsx(x,{id:"frame-skeleton-left-box",children:jsx(S,{children:jsx(a$1,{fillContent:!0,sx:{p:3},children:jsxs(i,{gap:1.5,children:[jsx(d,{variant:"overline",color:"text.disabled",fontWeight:700,pl:1,children:"ACESSO R\xC1PIDO"}),jsx(i,{children:c.map(o=>jsxs(k,{onClick:()=>{o.ref.current&&o.ref.current.scrollIntoView({block:"center",behavior:"smooth"});},children:[o.title,o.isRequired&&jsx("span",{className:"required",children:"*"})]},o.title))})]})})})}),jsxs(i,{width:"100%",alignItems:"center",mb:8,children:[jsxs(b,{children:[jsx(a$2,{color:"inherit",onClick:()=>W(),label:"Voltar","data-testid":"backToPreviousPage",children:jsx(a$3,{icon:"CHEVRON_LEFT"})}),jsxs(i,{overflow:"hidden",children:[jsx(d,{variant:"subtitle1",noWrap:!0,children:t}),l&&jsx(d,{variant:"caption",color:"text.secondary",noWrap:!0,children:l})]}),jsx(p,{className:"header-left-content",children:v}),jsx(p,{justifyContent:"flex-end",color:"text.secondary",children:I})]}),jsx(y,{children:c.map((o,B)=>jsxs(u,{id:`section-${B}`,children:[jsx(w,{ref:o.ref,children:o.title}),jsx(T,{children:o.subTitle}),jsx(C,{children:o.child})]},o.title))})]})]}),A=H;
16
13
 
17
- export { Q as default };
14
+ export { A as default };
@@ -1,7 +1,7 @@
1
1
  import { d } from '../../chunk-WUQSPJPN.js';
2
2
  import { a } from '../../chunk-HOMGLSVS.js';
3
3
  import { a as a$3 } from '../../chunk-UA7OPAW7.js';
4
- import { a as a$2 } from '../../chunk-BYAPKKGB.js';
4
+ import { a as a$2 } from '../../chunk-CFD2VTQ3.js';
5
5
  import '../../chunk-D27ND54J.js';
6
6
  import { a as a$4 } from '../../chunk-YQ6K2DEP.js';
7
7
  import '../../chunk-CHLVIVDD.js';
@@ -1 +1 @@
1
- export { a as default } from '../../chunk-BYAPKKGB.js';
1
+ export { a as default } from '../../chunk-CFD2VTQ3.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.4.54",
3
+ "version": "2.4.55",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,7 +0,0 @@
1
- import p from '@mui/material/Stack';
2
- import { styled } from '@mui/material/styles';
3
- import { jsx } from 'react/jsx-runtime';
4
-
5
- var r=styled(p)(({theme:o})=>({backgroundColor:"#fff",border:`1px solid ${o.palette.grey[300]}`}));var d=({children:o,...t})=>jsx(r,{borderRadius:1,gap:3,padding:3,...t,children:o}),s=d;
6
-
7
- export { s as a };