@flipdish/portal-library 5.4.1 → 5.5.0

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.
@@ -1,12 +1,12 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/AppBar"),r=require("@mui/material/Box"),i=require("@mui/material/CssBaseline"),a=require("@mui/material/Drawer"),l=require("@mui/material/styles"),n=require("@mui/material/Typography");const o=198,s=l.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"65px",color:e.palette.semantic.text["text-weak"],borderBottom:`2px solid ${e.palette.semantic.stroke["stroke-weak"]}`,width:"100%",position:"relative",[e.breakpoints.down("tablet")]:{width:"100%"}}))),d=l.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"100%",color:e.palette.semantic.text["text-weak"]}))),p=l.styled(t)((({theme:e})=>({width:e.breakpoints.up("tablet")?"calc(100% - 198px)":"100%",left:"198px",[e.breakpoints.down("tablet")]:{left:"0",width:"100%"},boxShadow:"none",position:"fixed",top:0,right:0}))),h=l.styled(a)`
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/AppBar"),r=require("@mui/material/Box"),i=require("@mui/material/CssBaseline"),a=require("@mui/material/Drawer"),l=require("@mui/material/styles"),o=require("@mui/material/Typography");const n=198,s=l.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"65px",color:e.palette.semantic.text["text-weak"],borderBottom:`2px solid ${e.palette.semantic.stroke["stroke-weak"]}`,width:"100%",position:"relative",[e.breakpoints.down("tablet")]:{width:"100%"}}))),d=l.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"100%",color:e.palette.semantic.text["text-weak"]}))),p=l.styled(t)((({theme:e})=>({width:e.breakpoints.up("tablet")?"calc(100% - 198px)":"100%",left:"198px",[e.breakpoints.down("tablet")]:{left:"0",width:"100%"},boxShadow:"none",position:"fixed",top:0,right:0}))),h=l.styled(a)`
2
2
  display: ${({theme:e})=>e.breakpoints.up("tablet")?"block":"none"};
3
3
  & .MuiDrawer-paper {
4
4
  box-sizing: border-box;
5
- width: ${o}px;
5
+ width: ${n}px;
6
6
  border-color: ${({theme:e})=>e.palette.semantic.stroke["stroke-weak"]};
7
7
  border-width: 2px;
8
8
  }
9
- `,c=l.styled(r)((({theme:e})=>({width:e.breakpoints.up("tablet")?"198px":"0",flexShrink:e.breakpoints.up("tablet")?"0":"1",[e.breakpoints.up("tablet")]:{display:"block"},[e.breakpoints.down("tablet")]:{display:"none"}}))),x=l.styled(r)((({theme:e})=>({flexGrow:1,width:"calc(100% - 198px)",marginTop:"65px",paddingTop:e.spacing(2),overflow:"auto",height:"calc(100vh - 65px)",[e.breakpoints.down("tablet")]:{width:"100%",marginTop:"65px"}}))),b=l.styled(r)((()=>({display:"flex",height:"100vh",overflow:"hidden"}))),m=l.styled(n)`
9
+ `,c=l.styled(r)((({theme:e})=>({width:e.breakpoints.up("tablet")?"198px":"0",flexShrink:e.breakpoints.up("tablet")?"0":"1",[e.breakpoints.up("tablet")]:{display:"block"},[e.breakpoints.down("tablet")]:{display:"none"}}))),x=l.styled(r)((({theme:e})=>({flexGrow:1,width:"calc(100% - 198px)",marginTop:"65px",overflow:"auto",height:"calc(100vh - 65px)",[e.breakpoints.down("tablet")]:{width:"100%",marginTop:"65px"}}))),b=l.styled(r)((()=>({display:"flex",height:"100vh",overflow:"hidden"}))),m=l.styled(o)`
10
10
  font-weight: bold;
11
11
  `;module.exports=({children:t,loadedFromPortal:r})=>{if(r)return e.jsx(e.Fragment,{children:t});const a=e.jsx(d,{children:e.jsx(m,{children:"Sidebar"})});return e.jsxs(b,{children:[e.jsx(i,{}),e.jsx(p,{children:e.jsx(s,{id:"header",children:e.jsx(m,{children:"Header"})})}),e.jsx(c,{"aria-label":"mailbox folders",as:"nav",children:e.jsx(h,{open:!0,variant:"permanent",children:a})}),e.jsx(x,{as:"main",children:t})]})};
12
12
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst drawerWidth = 198;\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '65px',\n color: theme.palette.semantic.text['text-weak'],\n borderBottom: `2px solid ${theme.palette.semantic.stroke['stroke-weak']}`,\n width: '100%',\n position: 'relative',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n },\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '100%',\n color: theme.palette.semantic.text['text-weak'],\n}));\n\nconst StyledAppBar = styled(AppBar)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%',\n left: `${drawerWidth}px`,\n [theme.breakpoints.down('tablet')]: {\n left: '0',\n width: '100%',\n },\n boxShadow: 'none',\n position: 'fixed',\n top: 0,\n right: 0,\n}));\n\nconst StyledDrawer = styled(Drawer)`\n display: ${({ theme }) => (theme.breakpoints.up('tablet') ? 'block' : 'none')};\n & .MuiDrawer-paper {\n box-sizing: border-box;\n width: ${drawerWidth}px;\n border-color: ${({ theme }) => theme.palette.semantic.stroke['stroke-weak']};\n border-width: 2px;\n }\n`;\n\nconst StyledNavBox = styled(Box)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0',\n flexShrink: theme.breakpoints.up('tablet') ? '0' : '1',\n [theme.breakpoints.up('tablet')]: {\n display: 'block',\n },\n [theme.breakpoints.down('tablet')]: {\n display: 'none',\n },\n}));\n\nconst StyledMainBox = styled(Box)(({ theme }) => ({\n flexGrow: 1,\n width: `calc(100% - ${drawerWidth}px)`,\n marginTop: '65px',\n paddingTop: theme.spacing(2),\n overflow: 'auto',\n height: 'calc(100vh - 65px)',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n marginTop: '65px',\n },\n}));\n\nconst StylesBoxContainer = styled(Box)(() => ({\n display: 'flex',\n height: '100vh',\n overflow: 'hidden',\n}));\n\nconst StyledBoldTypography = styled(Typography)`\n font-weight: bold;\n`;\n\ninterface Props {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n}\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n if (loadedFromPortal) {\n /* eslint-disable-next-line react/jsx-no-useless-fragment */\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <StyledBoldTypography>Sidebar</StyledBoldTypography>\n </StyledSidebar>\n );\n\n return (\n <StylesBoxContainer>\n <CssBaseline />\n <StyledAppBar>\n <StyledHeader id=\"header\">\n <StyledBoldTypography>Header</StyledBoldTypography>\n </StyledHeader>\n </StyledAppBar>\n <StyledNavBox aria-label=\"mailbox folders\" as=\"nav\">\n <StyledDrawer open variant=\"permanent\">\n {drawer}\n </StyledDrawer>\n </StyledNavBox>\n <StyledMainBox as=\"main\">{children}</StyledMainBox>\n </StylesBoxContainer>\n );\n};\n\nexport default PortalMock;\n"],"names":["drawerWidth","StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","semantic","background","height","color","text","borderBottom","stroke","width","position","breakpoints","down","StyledSidebar","StyledAppBar","AppBar","up","left","boxShadow","top","right","StyledDrawer","Drawer","StyledNavBox","Box","flexShrink","StyledMainBox","flexGrow","marginTop","paddingTop","spacing","overflow","StylesBoxContainer","StyledBoldTypography","Typography","children","loadedFromPortal","_jsx","_Fragment","drawer","_jsxs","CssBaseline","id","as","open","variant"],"mappings":"kQAOA,MAAMA,EAAc,IAEdC,EAAeC,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAO,CAC3CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,aACnCC,aAAc,aAAaX,EAAMK,QAAQC,SAASM,OAAO,iBACzDC,MAAO,OACPC,SAAU,WACV,CAACd,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,YAILI,EAAgBlB,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAO,CAC5CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,iBAG/BQ,EAAenB,EAAAA,OAAOoB,EAAPpB,EAAe,EAAGC,YAAO,CAC5Ca,MAAOb,EAAMe,YAAYK,GAAG,UAAY,qBAAkC,OAC1EC,KAAM,QACN,CAACrB,EAAMe,YAAYC,KAAK,WAAY,CAClCK,KAAM,IACNR,MAAO,QAETS,UAAW,OACXR,SAAU,QACVS,IAAK,EACLC,MAAO,MAGHC,EAAe1B,EAAAA,OAAO2B,EAAO;aACtB,EAAG1B,WAAaA,EAAMe,YAAYK,GAAG,UAAY,QAAU;;;aAG3DvB;oBACO,EAAGG,WAAYA,EAAMK,QAAQC,SAASM,OAAO;;;EAK3De,EAAe5B,EAAAA,OAAO6B,EAAP7B,EAAY,EAAGC,YAAO,CACzCa,MAAOb,EAAMe,YAAYK,GAAG,UAAY,QAAqB,IAC7DS,WAAY7B,EAAMe,YAAYK,GAAG,UAAY,IAAM,IACnD,CAACpB,EAAMe,YAAYK,GAAG,WAAY,CAChCnB,QAAS,SAEX,CAACD,EAAMe,YAAYC,KAAK,WAAY,CAClCf,QAAS,YAIP6B,EAAgB/B,EAAAA,OAAO6B,EAAP7B,EAAY,EAAGC,YAAO,CAC1C+B,SAAU,EACVlB,MAAO,qBACPmB,UAAW,OACXC,WAAYjC,EAAMkC,QAAQ,GAC1BC,SAAU,OACV3B,OAAQ,qBACR,CAACR,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,OACPmB,UAAW,YAITI,EAAqBrC,EAAAA,OAAO6B,EAAP7B,EAAY,KAAA,CACrCE,QAAS,OACTO,OAAQ,QACR2B,SAAU,aAGNE,EAAuBtC,EAAAA,OAAOuC,EAAW;;iBAS5B,EAAGC,WAAUC,uBAC9B,GAAIA,EAEF,OAAOC,EAAAA,IAAAC,EAAAA,SAAA,CAAAH,SAAGA,IAGZ,MAAMI,EACJF,EAAAA,IAACxB,EAAa,CAAAsB,SACZE,EAAAA,IAACJ,EAAoB,CAAAE,SAAA,cAIzB,OACEK,OAACR,EAAkB,CAAAG,SAAA,CACjBE,EAAAA,IAACI,EAAW,CAAA,GACZJ,EAAAA,IAACvB,EAAY,CAAAqB,SACXE,EAAAA,IAAC3C,GAAagD,GAAG,SAAQP,SACvBE,EAAAA,IAACJ,EAAoB,CAAAE,SAAA,eAGzBE,EAAAA,IAACd,EAAY,CAAA,aAAY,kBAAkBoB,GAAG,MAAKR,SACjDE,EAAAA,IAAChB,EAAY,CAACuB,MAAI,EAACC,QAAQ,YAAWV,SACnCI,MAGLF,EAAAA,IAACX,EAAa,CAACiB,GAAG,OAAMR,SAAEA"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst drawerWidth = 198;\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '65px',\n color: theme.palette.semantic.text['text-weak'],\n borderBottom: `2px solid ${theme.palette.semantic.stroke['stroke-weak']}`,\n width: '100%',\n position: 'relative',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n },\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '100%',\n color: theme.palette.semantic.text['text-weak'],\n}));\n\nconst StyledAppBar = styled(AppBar)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%',\n left: `${drawerWidth}px`,\n [theme.breakpoints.down('tablet')]: {\n left: '0',\n width: '100%',\n },\n boxShadow: 'none',\n position: 'fixed',\n top: 0,\n right: 0,\n}));\n\nconst StyledDrawer = styled(Drawer)`\n display: ${({ theme }) => (theme.breakpoints.up('tablet') ? 'block' : 'none')};\n & .MuiDrawer-paper {\n box-sizing: border-box;\n width: ${drawerWidth}px;\n border-color: ${({ theme }) => theme.palette.semantic.stroke['stroke-weak']};\n border-width: 2px;\n }\n`;\n\nconst StyledNavBox = styled(Box)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0',\n flexShrink: theme.breakpoints.up('tablet') ? '0' : '1',\n [theme.breakpoints.up('tablet')]: {\n display: 'block',\n },\n [theme.breakpoints.down('tablet')]: {\n display: 'none',\n },\n}));\n\nconst StyledMainBox = styled(Box)(({ theme }) => ({\n flexGrow: 1,\n width: `calc(100% - ${drawerWidth}px)`,\n marginTop: '65px',\n overflow: 'auto',\n height: 'calc(100vh - 65px)',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n marginTop: '65px',\n },\n}));\n\nconst StylesBoxContainer = styled(Box)(() => ({\n display: 'flex',\n height: '100vh',\n overflow: 'hidden',\n}));\n\nconst StyledBoldTypography = styled(Typography)`\n font-weight: bold;\n`;\n\ninterface Props {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n}\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n if (loadedFromPortal) {\n /* eslint-disable-next-line react/jsx-no-useless-fragment */\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <StyledBoldTypography>Sidebar</StyledBoldTypography>\n </StyledSidebar>\n );\n\n return (\n <StylesBoxContainer>\n <CssBaseline />\n <StyledAppBar>\n <StyledHeader id=\"header\">\n <StyledBoldTypography>Header</StyledBoldTypography>\n </StyledHeader>\n </StyledAppBar>\n <StyledNavBox aria-label=\"mailbox folders\" as=\"nav\">\n <StyledDrawer open variant=\"permanent\">\n {drawer}\n </StyledDrawer>\n </StyledNavBox>\n <StyledMainBox as=\"main\">{children}</StyledMainBox>\n </StylesBoxContainer>\n );\n};\n\nexport default PortalMock;\n"],"names":["drawerWidth","StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","semantic","background","height","color","text","borderBottom","stroke","width","position","breakpoints","down","StyledSidebar","StyledAppBar","AppBar","up","left","boxShadow","top","right","StyledDrawer","Drawer","StyledNavBox","Box","flexShrink","StyledMainBox","flexGrow","marginTop","overflow","StylesBoxContainer","StyledBoldTypography","Typography","children","loadedFromPortal","_jsx","_Fragment","drawer","_jsxs","CssBaseline","id","as","open","variant"],"mappings":"kQAOA,MAAMA,EAAc,IAEdC,EAAeC,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAO,CAC3CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,aACnCC,aAAc,aAAaX,EAAMK,QAAQC,SAASM,OAAO,iBACzDC,MAAO,OACPC,SAAU,WACV,CAACd,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,YAILI,EAAgBlB,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAO,CAC5CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,iBAG/BQ,EAAenB,EAAAA,OAAOoB,EAAPpB,EAAe,EAAGC,YAAO,CAC5Ca,MAAOb,EAAMe,YAAYK,GAAG,UAAY,qBAAkC,OAC1EC,KAAM,QACN,CAACrB,EAAMe,YAAYC,KAAK,WAAY,CAClCK,KAAM,IACNR,MAAO,QAETS,UAAW,OACXR,SAAU,QACVS,IAAK,EACLC,MAAO,MAGHC,EAAe1B,EAAAA,OAAO2B,EAAO;aACtB,EAAG1B,WAAaA,EAAMe,YAAYK,GAAG,UAAY,QAAU;;;aAG3DvB;oBACO,EAAGG,WAAYA,EAAMK,QAAQC,SAASM,OAAO;;;EAK3De,EAAe5B,EAAAA,OAAO6B,EAAP7B,EAAY,EAAGC,YAAO,CACzCa,MAAOb,EAAMe,YAAYK,GAAG,UAAY,QAAqB,IAC7DS,WAAY7B,EAAMe,YAAYK,GAAG,UAAY,IAAM,IACnD,CAACpB,EAAMe,YAAYK,GAAG,WAAY,CAChCnB,QAAS,SAEX,CAACD,EAAMe,YAAYC,KAAK,WAAY,CAClCf,QAAS,YAIP6B,EAAgB/B,EAAAA,OAAO6B,EAAP7B,EAAY,EAAGC,YAAO,CAC1C+B,SAAU,EACVlB,MAAO,qBACPmB,UAAW,OACXC,SAAU,OACVzB,OAAQ,qBACR,CAACR,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,OACPmB,UAAW,YAITE,EAAqBnC,EAAAA,OAAO6B,EAAP7B,EAAY,KAAA,CACrCE,QAAS,OACTO,OAAQ,QACRyB,SAAU,aAGNE,EAAuBpC,EAAAA,OAAOqC,EAAW;;iBAS5B,EAAGC,WAAUC,uBAC9B,GAAIA,EAEF,OAAOC,EAAAA,IAAAC,EAAAA,SAAA,CAAAH,SAAGA,IAGZ,MAAMI,EACJF,EAAAA,IAACtB,EAAa,CAAAoB,SACZE,EAAAA,IAACJ,EAAoB,CAAAE,SAAA,cAIzB,OACEK,OAACR,EAAkB,CAAAG,SAAA,CACjBE,EAAAA,IAACI,EAAW,CAAA,GACZJ,EAAAA,IAACrB,EAAY,CAAAmB,SACXE,EAAAA,IAACzC,GAAa8C,GAAG,SAAQP,SACvBE,EAAAA,IAACJ,EAAoB,CAAAE,SAAA,eAGzBE,EAAAA,IAACZ,EAAY,CAAA,aAAY,kBAAkBkB,GAAG,MAAKR,SACjDE,EAAAA,IAACd,EAAY,CAACqB,MAAI,EAACC,QAAQ,YAAWV,SACnCI,MAGLF,EAAAA,IAACT,EAAa,CAACe,GAAG,OAAMR,SAAEA"}
@@ -6,7 +6,7 @@ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import i from"@m
6
6
  border-color: ${({theme:e})=>e.palette.semantic.stroke["stroke-weak"]};
7
7
  border-width: 2px;
8
8
  }
9
- `,b=l(a)((({theme:e})=>({width:e.breakpoints.up("tablet")?"198px":"0",flexShrink:e.breakpoints.up("tablet")?"0":"1",[e.breakpoints.up("tablet")]:{display:"block"},[e.breakpoints.down("tablet")]:{display:"none"}}))),k=l(a)((({theme:e})=>({flexGrow:1,width:"calc(100% - 198px)",marginTop:"65px",paddingTop:e.spacing(2),overflow:"auto",height:"calc(100vh - 65px)",[e.breakpoints.down("tablet")]:{width:"100%",marginTop:"65px"}}))),x=l(a)((()=>({display:"flex",height:"100vh",overflow:"hidden"}))),u=l(p)`
9
+ `,b=l(a)((({theme:e})=>({width:e.breakpoints.up("tablet")?"198px":"0",flexShrink:e.breakpoints.up("tablet")?"0":"1",[e.breakpoints.up("tablet")]:{display:"block"},[e.breakpoints.down("tablet")]:{display:"none"}}))),k=l(a)((({theme:e})=>({flexGrow:1,width:"calc(100% - 198px)",marginTop:"65px",overflow:"auto",height:"calc(100vh - 65px)",[e.breakpoints.down("tablet")]:{width:"100%",marginTop:"65px"}}))),x=l(a)((()=>({display:"flex",height:"100vh",overflow:"hidden"}))),u=l(p)`
10
10
  font-weight: bold;
11
11
  `,w=({children:i,loadedFromPortal:a})=>{if(a)return e(t,{children:i});const n=e(s,{children:e(u,{children:"Sidebar"})});return r(x,{children:[e(o,{}),e(h,{children:e(m,{id:"header",children:e(u,{children:"Header"})})}),e(b,{"aria-label":"mailbox folders",as:"nav",children:e(c,{open:!0,variant:"permanent",children:n})}),e(k,{as:"main",children:i})]})};export{w as default};
12
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst drawerWidth = 198;\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '65px',\n color: theme.palette.semantic.text['text-weak'],\n borderBottom: `2px solid ${theme.palette.semantic.stroke['stroke-weak']}`,\n width: '100%',\n position: 'relative',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n },\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '100%',\n color: theme.palette.semantic.text['text-weak'],\n}));\n\nconst StyledAppBar = styled(AppBar)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%',\n left: `${drawerWidth}px`,\n [theme.breakpoints.down('tablet')]: {\n left: '0',\n width: '100%',\n },\n boxShadow: 'none',\n position: 'fixed',\n top: 0,\n right: 0,\n}));\n\nconst StyledDrawer = styled(Drawer)`\n display: ${({ theme }) => (theme.breakpoints.up('tablet') ? 'block' : 'none')};\n & .MuiDrawer-paper {\n box-sizing: border-box;\n width: ${drawerWidth}px;\n border-color: ${({ theme }) => theme.palette.semantic.stroke['stroke-weak']};\n border-width: 2px;\n }\n`;\n\nconst StyledNavBox = styled(Box)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0',\n flexShrink: theme.breakpoints.up('tablet') ? '0' : '1',\n [theme.breakpoints.up('tablet')]: {\n display: 'block',\n },\n [theme.breakpoints.down('tablet')]: {\n display: 'none',\n },\n}));\n\nconst StyledMainBox = styled(Box)(({ theme }) => ({\n flexGrow: 1,\n width: `calc(100% - ${drawerWidth}px)`,\n marginTop: '65px',\n paddingTop: theme.spacing(2),\n overflow: 'auto',\n height: 'calc(100vh - 65px)',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n marginTop: '65px',\n },\n}));\n\nconst StylesBoxContainer = styled(Box)(() => ({\n display: 'flex',\n height: '100vh',\n overflow: 'hidden',\n}));\n\nconst StyledBoldTypography = styled(Typography)`\n font-weight: bold;\n`;\n\ninterface Props {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n}\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n if (loadedFromPortal) {\n /* eslint-disable-next-line react/jsx-no-useless-fragment */\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <StyledBoldTypography>Sidebar</StyledBoldTypography>\n </StyledSidebar>\n );\n\n return (\n <StylesBoxContainer>\n <CssBaseline />\n <StyledAppBar>\n <StyledHeader id=\"header\">\n <StyledBoldTypography>Header</StyledBoldTypography>\n </StyledHeader>\n </StyledAppBar>\n <StyledNavBox aria-label=\"mailbox folders\" as=\"nav\">\n <StyledDrawer open variant=\"permanent\">\n {drawer}\n </StyledDrawer>\n </StyledNavBox>\n <StyledMainBox as=\"main\">{children}</StyledMainBox>\n </StylesBoxContainer>\n );\n};\n\nexport default PortalMock;\n"],"names":["drawerWidth","StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","semantic","background","height","color","text","borderBottom","stroke","width","position","breakpoints","down","StyledSidebar","StyledAppBar","AppBar","up","left","boxShadow","top","right","StyledDrawer","Drawer","StyledNavBox","Box","flexShrink","StyledMainBox","flexGrow","marginTop","paddingTop","spacing","overflow","StylesBoxContainer","StyledBoldTypography","Typography","PortalMock","children","loadedFromPortal","_jsx","_Fragment","drawer","_jsxs","CssBaseline","id","as","open","variant"],"mappings":"wSAOA,MAAMA,EAAc,IAEdC,EAAeC,EAAO,MAAPA,EAAc,EAAGC,YAAO,CAC3CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,aACnCC,aAAc,aAAaX,EAAMK,QAAQC,SAASM,OAAO,iBACzDC,MAAO,OACPC,SAAU,WACV,CAACd,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,YAILI,EAAgBlB,EAAO,MAAPA,EAAc,EAAGC,YAAO,CAC5CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,iBAG/BQ,EAAenB,EAAOoB,EAAPpB,EAAe,EAAGC,YAAO,CAC5Ca,MAAOb,EAAMe,YAAYK,GAAG,UAAY,qBAAkC,OAC1EC,KAAM,QACN,CAACrB,EAAMe,YAAYC,KAAK,WAAY,CAClCK,KAAM,IACNR,MAAO,QAETS,UAAW,OACXR,SAAU,QACVS,IAAK,EACLC,MAAO,MAGHC,EAAe1B,EAAO2B,EAAO;aACtB,EAAG1B,WAAaA,EAAMe,YAAYK,GAAG,UAAY,QAAU;;;aAG3DvB;oBACO,EAAGG,WAAYA,EAAMK,QAAQC,SAASM,OAAO;;;EAK3De,EAAe5B,EAAO6B,EAAP7B,EAAY,EAAGC,YAAO,CACzCa,MAAOb,EAAMe,YAAYK,GAAG,UAAY,QAAqB,IAC7DS,WAAY7B,EAAMe,YAAYK,GAAG,UAAY,IAAM,IACnD,CAACpB,EAAMe,YAAYK,GAAG,WAAY,CAChCnB,QAAS,SAEX,CAACD,EAAMe,YAAYC,KAAK,WAAY,CAClCf,QAAS,YAIP6B,EAAgB/B,EAAO6B,EAAP7B,EAAY,EAAGC,YAAO,CAC1C+B,SAAU,EACVlB,MAAO,qBACPmB,UAAW,OACXC,WAAYjC,EAAMkC,QAAQ,GAC1BC,SAAU,OACV3B,OAAQ,qBACR,CAACR,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,OACPmB,UAAW,YAITI,EAAqBrC,EAAO6B,EAAP7B,EAAY,KAAA,CACrCE,QAAS,OACTO,OAAQ,QACR2B,SAAU,aAGNE,EAAuBtC,EAAOuC,EAAW;;EASzCC,EAAa,EAAGC,WAAUC,uBAC9B,GAAIA,EAEF,OAAOC,EAAAC,EAAA,CAAAH,SAAGA,IAGZ,MAAMI,EACJF,EAACzB,EAAa,CAAAuB,SACZE,EAACL,EAAoB,CAAAG,SAAA,cAIzB,OACEK,EAACT,EAAkB,CAAAI,SAAA,CACjBE,EAACI,EAAW,CAAA,GACZJ,EAACxB,EAAY,CAAAsB,SACXE,EAAC5C,GAAaiD,GAAG,SAAQP,SACvBE,EAACL,EAAoB,CAAAG,SAAA,eAGzBE,EAACf,EAAY,CAAA,aAAY,kBAAkBqB,GAAG,MAAKR,SACjDE,EAACjB,EAAY,CAACwB,MAAI,EAACC,QAAQ,YAAWV,SACnCI,MAGLF,EAACZ,EAAa,CAACkB,GAAG,OAAMR,SAAEA"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst drawerWidth = 198;\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '65px',\n color: theme.palette.semantic.text['text-weak'],\n borderBottom: `2px solid ${theme.palette.semantic.stroke['stroke-weak']}`,\n width: '100%',\n position: 'relative',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n },\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '100%',\n color: theme.palette.semantic.text['text-weak'],\n}));\n\nconst StyledAppBar = styled(AppBar)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%',\n left: `${drawerWidth}px`,\n [theme.breakpoints.down('tablet')]: {\n left: '0',\n width: '100%',\n },\n boxShadow: 'none',\n position: 'fixed',\n top: 0,\n right: 0,\n}));\n\nconst StyledDrawer = styled(Drawer)`\n display: ${({ theme }) => (theme.breakpoints.up('tablet') ? 'block' : 'none')};\n & .MuiDrawer-paper {\n box-sizing: border-box;\n width: ${drawerWidth}px;\n border-color: ${({ theme }) => theme.palette.semantic.stroke['stroke-weak']};\n border-width: 2px;\n }\n`;\n\nconst StyledNavBox = styled(Box)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0',\n flexShrink: theme.breakpoints.up('tablet') ? '0' : '1',\n [theme.breakpoints.up('tablet')]: {\n display: 'block',\n },\n [theme.breakpoints.down('tablet')]: {\n display: 'none',\n },\n}));\n\nconst StyledMainBox = styled(Box)(({ theme }) => ({\n flexGrow: 1,\n width: `calc(100% - ${drawerWidth}px)`,\n marginTop: '65px',\n overflow: 'auto',\n height: 'calc(100vh - 65px)',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n marginTop: '65px',\n },\n}));\n\nconst StylesBoxContainer = styled(Box)(() => ({\n display: 'flex',\n height: '100vh',\n overflow: 'hidden',\n}));\n\nconst StyledBoldTypography = styled(Typography)`\n font-weight: bold;\n`;\n\ninterface Props {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n}\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n if (loadedFromPortal) {\n /* eslint-disable-next-line react/jsx-no-useless-fragment */\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <StyledBoldTypography>Sidebar</StyledBoldTypography>\n </StyledSidebar>\n );\n\n return (\n <StylesBoxContainer>\n <CssBaseline />\n <StyledAppBar>\n <StyledHeader id=\"header\">\n <StyledBoldTypography>Header</StyledBoldTypography>\n </StyledHeader>\n </StyledAppBar>\n <StyledNavBox aria-label=\"mailbox folders\" as=\"nav\">\n <StyledDrawer open variant=\"permanent\">\n {drawer}\n </StyledDrawer>\n </StyledNavBox>\n <StyledMainBox as=\"main\">{children}</StyledMainBox>\n </StylesBoxContainer>\n );\n};\n\nexport default PortalMock;\n"],"names":["drawerWidth","StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","semantic","background","height","color","text","borderBottom","stroke","width","position","breakpoints","down","StyledSidebar","StyledAppBar","AppBar","up","left","boxShadow","top","right","StyledDrawer","Drawer","StyledNavBox","Box","flexShrink","StyledMainBox","flexGrow","marginTop","overflow","StylesBoxContainer","StyledBoldTypography","Typography","PortalMock","children","loadedFromPortal","_jsx","_Fragment","drawer","_jsxs","CssBaseline","id","as","open","variant"],"mappings":"wSAOA,MAAMA,EAAc,IAEdC,EAAeC,EAAO,MAAPA,EAAc,EAAGC,YAAO,CAC3CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,aACnCC,aAAc,aAAaX,EAAMK,QAAQC,SAASM,OAAO,iBACzDC,MAAO,OACPC,SAAU,WACV,CAACd,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,YAILI,EAAgBlB,EAAO,MAAPA,EAAc,EAAGC,YAAO,CAC5CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,iBAG/BQ,EAAenB,EAAOoB,EAAPpB,EAAe,EAAGC,YAAO,CAC5Ca,MAAOb,EAAMe,YAAYK,GAAG,UAAY,qBAAkC,OAC1EC,KAAM,QACN,CAACrB,EAAMe,YAAYC,KAAK,WAAY,CAClCK,KAAM,IACNR,MAAO,QAETS,UAAW,OACXR,SAAU,QACVS,IAAK,EACLC,MAAO,MAGHC,EAAe1B,EAAO2B,EAAO;aACtB,EAAG1B,WAAaA,EAAMe,YAAYK,GAAG,UAAY,QAAU;;;aAG3DvB;oBACO,EAAGG,WAAYA,EAAMK,QAAQC,SAASM,OAAO;;;EAK3De,EAAe5B,EAAO6B,EAAP7B,EAAY,EAAGC,YAAO,CACzCa,MAAOb,EAAMe,YAAYK,GAAG,UAAY,QAAqB,IAC7DS,WAAY7B,EAAMe,YAAYK,GAAG,UAAY,IAAM,IACnD,CAACpB,EAAMe,YAAYK,GAAG,WAAY,CAChCnB,QAAS,SAEX,CAACD,EAAMe,YAAYC,KAAK,WAAY,CAClCf,QAAS,YAIP6B,EAAgB/B,EAAO6B,EAAP7B,EAAY,EAAGC,YAAO,CAC1C+B,SAAU,EACVlB,MAAO,qBACPmB,UAAW,OACXC,SAAU,OACVzB,OAAQ,qBACR,CAACR,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,OACPmB,UAAW,YAITE,EAAqBnC,EAAO6B,EAAP7B,EAAY,KAAA,CACrCE,QAAS,OACTO,OAAQ,QACRyB,SAAU,aAGNE,EAAuBpC,EAAOqC,EAAW;;EASzCC,EAAa,EAAGC,WAAUC,uBAC9B,GAAIA,EAEF,OAAOC,EAAAC,EAAA,CAAAH,SAAGA,IAGZ,MAAMI,EACJF,EAACvB,EAAa,CAAAqB,SACZE,EAACL,EAAoB,CAAAG,SAAA,cAIzB,OACEK,EAACT,EAAkB,CAAAI,SAAA,CACjBE,EAACI,EAAW,CAAA,GACZJ,EAACtB,EAAY,CAAAoB,SACXE,EAAC1C,GAAa+C,GAAG,SAAQP,SACvBE,EAACL,EAAoB,CAAAG,SAAA,eAGzBE,EAACb,EAAY,CAAA,aAAY,kBAAkBmB,GAAG,MAAKR,SACjDE,EAACf,EAAY,CAACsB,MAAI,EAACC,QAAQ,YAAWV,SACnCI,MAGLF,EAACV,EAAa,CAACgB,GAAG,OAAMR,SAAEA"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),s=require("@mui/material/LinearProgress"),a=require("@mui/material/Box"),l=require("@mui/material/Typography");const o=require("@mui/material/styles").styled(s)((({theme:e})=>({height:8,[`&.${s.linearProgressClasses.root}`]:{borderRadius:5,backgroundColor:e.palette.grey[200],...e.applyStyles("dark",{backgroundColor:e.palette.grey[800]}),boxShadow:e.customShadows?.sunken},[`&.${s.linearProgressClasses.colorPrimary} .${s.linearProgressClasses.bar}`]:{backgroundColor:e.palette.semantic.fill["fill-selected"],...e.applyStyles("dark",{backgroundColor:e.palette.semantic.fill["fill-selected"]})},[`& .${s.linearProgressClasses.bar1}`]:{borderRadius:5,boxShadow:e.customShadows?.sunken},[`& .${s.linearProgressClasses.bar2}`]:{borderRadius:5,boxShadow:e.customShadows?.sunken},[`& .${s.linearProgressClasses.dashed}`]:{marginTop:2}}))),i=({value:s,label:i,showLabel:t,...n})=>{const d=r.useId(),u=r.useMemo((()=>i||(void 0!==s?`${s}%`:void 0)),[i,s]);return e.jsxs(a,{alignItems:"center",display:"flex",gap:1,children:[e.jsx(a,{flex:1,children:e.jsx(o,{"aria-label":!t&&u?u:void 0,"aria-labelledby":t&&u?d:void 0,...n,value:s})}),t&&e.jsx(a,{alignItems:"center",display:"flex",height:20,justifyContent:"flex-end",width:40,children:e.jsx(l,{color:"textSecondary",id:d,variant:"captionWeak",children:u})})]})};Object.defineProperty(exports,"linearProgressClasses",{enumerable:!0,get:function(){return s.linearProgressClasses}}),exports.LinearProgress=i,exports.default=i;
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/LinearProgress/index.tsx"],"sourcesContent":["import { useId, useMemo } from 'react';\n\nimport MuiLinearProgress, {\n linearProgressClasses,\n type LinearProgressProps as MuiLinearProgressProps,\n} from '@mui/material/LinearProgress';\n\nimport Box from '@fd/components/atoms/Box';\nimport Typography from '@fd/components/atoms/Typography';\nimport styled from '@fd/utilities/styledUtilities';\n\nconst StyledLinearProgress = styled(MuiLinearProgress)(({ theme }) => {\n return {\n height: 8,\n [`&.${linearProgressClasses.root}`]: {\n borderRadius: 5,\n backgroundColor: theme.palette.grey[200],\n ...theme.applyStyles('dark', {\n backgroundColor: theme.palette.grey[800],\n }),\n boxShadow: theme.customShadows?.sunken,\n },\n [`&.${linearProgressClasses.colorPrimary} .${linearProgressClasses.bar}`]: {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n ...theme.applyStyles('dark', {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n }),\n },\n [`& .${linearProgressClasses.bar1}`]: {\n borderRadius: 5,\n boxShadow: theme.customShadows?.sunken,\n },\n [`& .${linearProgressClasses.bar2}`]: {\n borderRadius: 5,\n boxShadow: theme.customShadows?.sunken,\n },\n [`& .${linearProgressClasses.dashed}`]: {\n marginTop: 2,\n },\n };\n});\n\ninterface LinearProgressProps extends MuiLinearProgressProps {\n label?: string;\n showLabel?: boolean;\n}\n\n/**\n * Props for the themed LinearProgress component.\n * Extends MUI's LinearProgressProps.\n * - label: Optional label text (falls back to percentage when `value` is provided).\n * - showLabel: When true, renders the label to the right of the bar.\n */\nexport const LinearProgress: React.FC<LinearProgressProps> = ({ value, label, showLabel, ...rest }) => {\n const labelId = useId();\n const parsedLabel = useMemo(() => label || (value !== undefined ? `${value}%` : undefined), [label, value]);\n return (\n <Box alignItems=\"center\" display=\"flex\" gap={1}>\n <Box flex={1}>\n <StyledLinearProgress\n aria-label={!showLabel && parsedLabel ? parsedLabel : undefined}\n aria-labelledby={showLabel && parsedLabel ? labelId : undefined}\n {...rest}\n value={value}\n />\n </Box>\n {showLabel && (\n <Box alignItems=\"center\" display=\"flex\" height={20} justifyContent=\"flex-end\" width={40}>\n <Typography color=\"textSecondary\" id={labelId} variant=\"captionWeak\">\n {parsedLabel}\n </Typography>\n </Box>\n )}\n </Box>\n );\n};\n\nexport default LinearProgress;\n\nexport { linearProgressClasses };\n"],"names":["StyledLinearProgress","styled","MuiLinearProgress","theme","height","linearProgressClasses","root","borderRadius","backgroundColor","palette","grey","applyStyles","boxShadow","customShadows","sunken","colorPrimary","bar","semantic","fill","bar1","bar2","dashed","marginTop","LinearProgress","value","label","showLabel","rest","labelId","useId","parsedLabel","useMemo","undefined","_jsxs","Box","alignItems","display","gap","children","_jsx","flex","justifyContent","width","Typography","color","id","variant"],"mappings":"yOAWA,MAAMA,kCAAuBC,OAAOC,EAAPD,EAA0B,EAAGE,YACjD,CACLC,OAAQ,EACR,CAAC,KAAKC,wBAAsBC,QAAS,CACnCC,aAAc,EACdC,gBAAiBL,EAAMM,QAAQC,KAAK,QACjCP,EAAMQ,YAAY,OAAQ,CAC3BH,gBAAiBL,EAAMM,QAAQC,KAAK,OAEtCE,UAAWT,EAAMU,eAAeC,QAElC,CAAC,KAAKT,wBAAsBU,iBAAiBV,EAAAA,sBAAsBW,OAAQ,CACzER,gBAAiBL,EAAMM,QAAQQ,SAASC,KAAK,oBAC1Cf,EAAMQ,YAAY,OAAQ,CAC3BH,gBAAiBL,EAAMM,QAAQQ,SAASC,KAAK,oBAGjD,CAAC,MAAMb,wBAAsBc,QAAS,CACpCZ,aAAc,EACdK,UAAWT,EAAMU,eAAeC,QAElC,CAAC,MAAMT,wBAAsBe,QAAS,CACpCb,aAAc,EACdK,UAAWT,EAAMU,eAAeC,QAElC,CAAC,MAAMT,wBAAsBgB,UAAW,CACtCC,UAAW,OAgBJC,EAAgD,EAAGC,QAAOC,QAAOC,eAAcC,MAC1F,MAAMC,EAAUC,EAAAA,QACVC,EAAcC,EAAAA,SAAQ,IAAMN,SAAoBO,IAAVR,EAAsB,GAAGA,UAAWQ,IAAY,CAACP,EAAOD,IACpG,OACES,EAAAA,KAACC,EAAG,CAACC,WAAW,SAASC,QAAQ,OAAOC,IAAK,EAACC,SAAA,CAC5CC,EAAAA,IAACL,GAAIM,KAAM,EAACF,SACVC,EAAAA,IAACvC,iBACc0B,GAAaI,EAAcA,OAAcE,EAAS,kBAC9CN,GAAaI,EAAcF,OAAUI,KAClDL,EACJH,MAAOA,MAGVE,GACCa,EAAAA,IAACL,EAAG,CAACC,WAAW,SAASC,QAAQ,OAAOhC,OAAQ,GAAIqC,eAAe,WAAWC,MAAO,GAAEJ,SACrFC,EAAAA,IAACI,GAAWC,MAAM,gBAAgBC,GAAIjB,EAASkB,QAAQ,cAAaR,SACjER"}
@@ -0,0 +1,16 @@
1
+ import { LinearProgressProps as LinearProgressProps$1 } from '@mui/material/LinearProgress';
2
+ export { linearProgressClasses } from '@mui/material/LinearProgress';
3
+
4
+ interface LinearProgressProps extends LinearProgressProps$1 {
5
+ label?: string;
6
+ showLabel?: boolean;
7
+ }
8
+ /**
9
+ * Props for the themed LinearProgress component.
10
+ * Extends MUI's LinearProgressProps.
11
+ * - label: Optional label text (falls back to percentage when `value` is provided).
12
+ * - showLabel: When true, renders the label to the right of the bar.
13
+ */
14
+ declare const LinearProgress: React.FC<LinearProgressProps>;
15
+
16
+ export { LinearProgress, LinearProgress as default };
@@ -0,0 +1,2 @@
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useId as a,useMemo as o}from"react";import l,{linearProgressClasses as t}from"@mui/material/LinearProgress";export{linearProgressClasses}from"@mui/material/LinearProgress";import i from"@mui/material/Box";import s from"@mui/material/Typography";import{styled as d}from"@mui/material/styles";const m=d(l)((({theme:e})=>({height:8,[`&.${t.root}`]:{borderRadius:5,backgroundColor:e.palette.grey[200],...e.applyStyles("dark",{backgroundColor:e.palette.grey[800]}),boxShadow:e.customShadows?.sunken},[`&.${t.colorPrimary} .${t.bar}`]:{backgroundColor:e.palette.semantic.fill["fill-selected"],...e.applyStyles("dark",{backgroundColor:e.palette.semantic.fill["fill-selected"]})},[`& .${t.bar1}`]:{borderRadius:5,boxShadow:e.customShadows?.sunken},[`& .${t.bar2}`]:{borderRadius:5,boxShadow:e.customShadows?.sunken},[`& .${t.dashed}`]:{marginTop:2}}))),n=({value:l,label:t,showLabel:d,...n})=>{const c=a(),u=o((()=>t||(void 0!==l?`${l}%`:void 0)),[t,l]);return e(i,{alignItems:"center",display:"flex",gap:1,children:[r(i,{flex:1,children:r(m,{"aria-label":!d&&u?u:void 0,"aria-labelledby":d&&u?c:void 0,...n,value:l})}),d&&r(i,{alignItems:"center",display:"flex",height:20,justifyContent:"flex-end",width:40,children:r(s,{color:"textSecondary",id:c,variant:"captionWeak",children:u})})]})};export{n as LinearProgress,n as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/LinearProgress/index.tsx"],"sourcesContent":["import { useId, useMemo } from 'react';\n\nimport MuiLinearProgress, {\n linearProgressClasses,\n type LinearProgressProps as MuiLinearProgressProps,\n} from '@mui/material/LinearProgress';\n\nimport Box from '@fd/components/atoms/Box';\nimport Typography from '@fd/components/atoms/Typography';\nimport styled from '@fd/utilities/styledUtilities';\n\nconst StyledLinearProgress = styled(MuiLinearProgress)(({ theme }) => {\n return {\n height: 8,\n [`&.${linearProgressClasses.root}`]: {\n borderRadius: 5,\n backgroundColor: theme.palette.grey[200],\n ...theme.applyStyles('dark', {\n backgroundColor: theme.palette.grey[800],\n }),\n boxShadow: theme.customShadows?.sunken,\n },\n [`&.${linearProgressClasses.colorPrimary} .${linearProgressClasses.bar}`]: {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n ...theme.applyStyles('dark', {\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n }),\n },\n [`& .${linearProgressClasses.bar1}`]: {\n borderRadius: 5,\n boxShadow: theme.customShadows?.sunken,\n },\n [`& .${linearProgressClasses.bar2}`]: {\n borderRadius: 5,\n boxShadow: theme.customShadows?.sunken,\n },\n [`& .${linearProgressClasses.dashed}`]: {\n marginTop: 2,\n },\n };\n});\n\ninterface LinearProgressProps extends MuiLinearProgressProps {\n label?: string;\n showLabel?: boolean;\n}\n\n/**\n * Props for the themed LinearProgress component.\n * Extends MUI's LinearProgressProps.\n * - label: Optional label text (falls back to percentage when `value` is provided).\n * - showLabel: When true, renders the label to the right of the bar.\n */\nexport const LinearProgress: React.FC<LinearProgressProps> = ({ value, label, showLabel, ...rest }) => {\n const labelId = useId();\n const parsedLabel = useMemo(() => label || (value !== undefined ? `${value}%` : undefined), [label, value]);\n return (\n <Box alignItems=\"center\" display=\"flex\" gap={1}>\n <Box flex={1}>\n <StyledLinearProgress\n aria-label={!showLabel && parsedLabel ? parsedLabel : undefined}\n aria-labelledby={showLabel && parsedLabel ? labelId : undefined}\n {...rest}\n value={value}\n />\n </Box>\n {showLabel && (\n <Box alignItems=\"center\" display=\"flex\" height={20} justifyContent=\"flex-end\" width={40}>\n <Typography color=\"textSecondary\" id={labelId} variant=\"captionWeak\">\n {parsedLabel}\n </Typography>\n </Box>\n )}\n </Box>\n );\n};\n\nexport default LinearProgress;\n\nexport { linearProgressClasses };\n"],"names":["StyledLinearProgress","styled","MuiLinearProgress","theme","height","linearProgressClasses","root","borderRadius","backgroundColor","palette","grey","applyStyles","boxShadow","customShadows","sunken","colorPrimary","bar","semantic","fill","bar1","bar2","dashed","marginTop","LinearProgress","value","label","showLabel","rest","labelId","useId","parsedLabel","useMemo","undefined","_jsxs","Box","alignItems","display","gap","children","_jsx","flex","justifyContent","width","Typography","color","id","variant"],"mappings":"4VAWA,MAAMA,EAAuBC,EAAOC,EAAPD,EAA0B,EAAGE,YACjD,CACLC,OAAQ,EACR,CAAC,KAAKC,EAAsBC,QAAS,CACnCC,aAAc,EACdC,gBAAiBL,EAAMM,QAAQC,KAAK,QACjCP,EAAMQ,YAAY,OAAQ,CAC3BH,gBAAiBL,EAAMM,QAAQC,KAAK,OAEtCE,UAAWT,EAAMU,eAAeC,QAElC,CAAC,KAAKT,EAAsBU,iBAAiBV,EAAsBW,OAAQ,CACzER,gBAAiBL,EAAMM,QAAQQ,SAASC,KAAK,oBAC1Cf,EAAMQ,YAAY,OAAQ,CAC3BH,gBAAiBL,EAAMM,QAAQQ,SAASC,KAAK,oBAGjD,CAAC,MAAMb,EAAsBc,QAAS,CACpCZ,aAAc,EACdK,UAAWT,EAAMU,eAAeC,QAElC,CAAC,MAAMT,EAAsBe,QAAS,CACpCb,aAAc,EACdK,UAAWT,EAAMU,eAAeC,QAElC,CAAC,MAAMT,EAAsBgB,UAAW,CACtCC,UAAW,OAgBJC,EAAgD,EAAGC,QAAOC,QAAOC,eAAcC,MAC1F,MAAMC,EAAUC,IACVC,EAAcC,GAAQ,IAAMN,SAAoBO,IAAVR,EAAsB,GAAGA,UAAWQ,IAAY,CAACP,EAAOD,IACpG,OACES,EAACC,EAAG,CAACC,WAAW,SAASC,QAAQ,OAAOC,IAAK,EAACC,SAAA,CAC5CC,EAACL,GAAIM,KAAM,EAACF,SACVC,EAACvC,iBACc0B,GAAaI,EAAcA,OAAcE,EAAS,kBAC9CN,GAAaI,EAAcF,OAAUI,KAClDL,EACJH,MAAOA,MAGVE,GACCa,EAACL,EAAG,CAACC,WAAW,SAASC,QAAQ,OAAOhC,OAAQ,GAAIqC,eAAe,WAAWC,MAAO,GAAEJ,SACrFC,EAACI,GAAWC,MAAM,gBAAgBC,GAAIjB,EAASkB,QAAQ,cAAaR,SACjER"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "5.4.1",
3
+ "version": "5.5.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -101,7 +101,7 @@
101
101
  "eslint-plugin-prettier": "^5.1.3",
102
102
  "eslint-plugin-react": "^7.37.4",
103
103
  "eslint-plugin-react-hooks": "4.6.2",
104
- "eslint-plugin-react-refresh": "0.4.20",
104
+ "eslint-plugin-react-refresh": "0.4.21",
105
105
  "eslint-plugin-simple-import-sort": "^12.0.0",
106
106
  "eslint-plugin-storybook": "^0.12.0",
107
107
  "eslint-plugin-testing-library": "^7.1.1",