@flipdish/portal-library 2.0.7 → 2.0.8

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.
Files changed (36) hide show
  1. package/dist/components/FlipdishStaffContainer/index.cjs.js +1 -1
  2. package/dist/components/FlipdishStaffContainer/index.cjs.js.map +1 -1
  3. package/dist/components/FlipdishStaffContainer/index.js +1 -1
  4. package/dist/components/FlipdishStaffContainer/index.js.map +1 -1
  5. package/dist/components/GenericTable/index.cjs.js +3 -3
  6. package/dist/components/GenericTable/index.cjs.js.map +1 -1
  7. package/dist/components/GenericTable/index.js +3 -3
  8. package/dist/components/GenericTable/index.js.map +1 -1
  9. package/dist/components/ListItemLinkButton/index.cjs.js +1 -1
  10. package/dist/components/ListItemLinkButton/index.cjs.js.map +1 -1
  11. package/dist/components/ListItemLinkButton/index.js +1 -1
  12. package/dist/components/ListItemLinkButton/index.js.map +1 -1
  13. package/dist/components/PageLayout/index.cjs.js +1 -1
  14. package/dist/components/PageLayout/index.cjs.js.map +1 -1
  15. package/dist/components/PageLayout/index.js +1 -1
  16. package/dist/components/PageLayout/index.js.map +1 -1
  17. package/dist/components/Tooltip/index.cjs.js +1 -1
  18. package/dist/components/Tooltip/index.cjs.js.map +1 -1
  19. package/dist/components/Tooltip/index.d.ts +3 -3
  20. package/dist/components/Tooltip/index.js +1 -1
  21. package/dist/components/Tooltip/index.js.map +1 -1
  22. package/dist/icons/InformationCircle/index.cjs.js +2 -0
  23. package/dist/icons/InformationCircle/index.cjs.js.map +1 -0
  24. package/dist/icons/InformationCircle/index.d.ts +6 -0
  25. package/dist/icons/InformationCircle/index.js +2 -0
  26. package/dist/icons/InformationCircle/index.js.map +1 -0
  27. package/dist/icons/InformationCircle/information-circle.svg.cjs.js +2 -0
  28. package/dist/icons/InformationCircle/information-circle.svg.cjs.js.map +1 -0
  29. package/dist/icons/InformationCircle/information-circle.svg.js +2 -0
  30. package/dist/icons/InformationCircle/information-circle.svg.js.map +1 -0
  31. package/dist/icons/helpers/withSvgIcon.cjs.js +1 -1
  32. package/dist/icons/helpers/withSvgIcon.cjs.js.map +1 -1
  33. package/dist/icons/helpers/withSvgIcon.d.ts +3 -3
  34. package/dist/icons/helpers/withSvgIcon.js +1 -1
  35. package/dist/icons/helpers/withSvgIcon.js.map +1 -1
  36. package/package.json +6 -6
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime");require("react");var r=require("@mui/icons-material/SupportAgentOutlined"),i=require("@mui/material/Grid"),t=require("@mui/material/styles"),a=require("@mui/material/Typography"),s=require("@mui/material/Box");const l=t.styled(s)((({theme:e})=>({backgroundColor:e.palette.grey[200],borderRadius:"4px",padding:e.spacing(2)}))),n=t.styled(i)((({theme:e})=>({alignItems:"center",display:"flex",marginBottom:e.spacing(1.5)}))),d=t.styled(a)((({theme:e})=>({fontWeight:500,marginLeft:e.spacing(1)})));module.exports=({title:i,children:t})=>e.jsxs(l,{"data-testid":"flipdish-staff-only-container",children:[e.jsxs(n,{children:[e.jsx(r,{}),e.jsx(d,{children:i})]}),t]});
1
+ "use strict";var e=require("react/jsx-runtime");require("react");var r=require("../../icons/CustomerSupport/index.cjs.js"),i=require("@mui/material/Grid"),t=require("@mui/material/styles"),s=require("@mui/material/Typography"),a=require("@mui/material/Box");const l=t.styled(a)((({theme:e})=>({backgroundColor:e.palette.grey[200],borderRadius:"4px",padding:e.spacing(2)}))),n=t.styled(i)((({theme:e})=>({alignItems:"center",display:"flex",marginBottom:e.spacing(1.5)}))),d=t.styled(s)((({theme:e})=>({fontWeight:500,marginLeft:e.spacing(1)})));module.exports=({title:i,children:t})=>e.jsxs(l,{"data-testid":"flipdish-staff-only-container",children:[e.jsxs(n,{children:[e.jsx(r,{}),e.jsx(d,{children:i})]}),t]});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/FlipdishStaffContainer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport SupportAgentOutlinedIcon from '@mui/icons-material/SupportAgentOutlined';\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ntype Props = {\n title: string;\n children: ReactNode;\n};\n\nconst FlipdishStaffContainer = ({ title, children }: Props) => {\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{title}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","title","children","_jsxs","_jsx","jsx","SupportAgentOutlinedIcon"],"mappings":"kQAOA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAPD,EAAY,EAAGE,YAAa,CAChDC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAAA,OAAOU,EAAPV,EAAa,EAAGE,YAAa,CAChDS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAAA,OAAOe,EAAPf,EAAmB,EAAGE,YAAa,CAC7Cc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,sBAQC,EAAGU,QAAOC,cAEjCC,OAACrB,EAAe,CAAA,cAAa,gCACzBoB,SAAA,CAAAC,OAACX,EAAc,CAAAU,SAAA,CACXE,EAACC,IAAAC,MACDF,EAAAA,IAACP,EAAK,CAAAK,SAAED,OAGXC"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/FlipdishStaffContainer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport SupportAgentOutlinedIcon from '../../icons/CustomerSupport';\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ntype Props = {\n title: string;\n children: ReactNode;\n};\n\nconst FlipdishStaffContainer = ({ title, children }: Props) => {\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{title}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","title","children","_jsxs","_jsx","jsx","SupportAgentOutlinedIcon"],"mappings":"kQAOA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAPD,EAAY,EAAGE,YAAa,CAChDC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAAA,OAAOU,EAAPV,EAAa,EAAGE,YAAa,CAChDS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAAA,OAAOe,EAAPf,EAAmB,EAAGE,YAAa,CAC7Cc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,sBAQC,EAAGU,QAAOC,cAEjCC,OAACrB,EAAe,CAAA,cAAa,gCACzBoB,SAAA,CAAAC,OAACX,EAAc,CAAAU,SAAA,CACXE,EAACC,IAAAC,MACDF,EAAAA,IAACP,EAAK,CAAAK,SAAED,OAGXC"}
@@ -1,2 +1,2 @@
1
- import{jsxs as t,jsx as i}from"react/jsx-runtime";import"react";import r from"@mui/icons-material/SupportAgentOutlined";import e from"@mui/material/Grid";import{styled as m}from"@mui/material/styles";import a from"@mui/material/Typography";import o from"@mui/material/Box";const n=m(o)((({theme:t})=>({backgroundColor:t.palette.grey[200],borderRadius:"4px",padding:t.spacing(2)}))),l=m(e)((({theme:t})=>({alignItems:"center",display:"flex",marginBottom:t.spacing(1.5)}))),p=m(a)((({theme:t})=>({fontWeight:500,marginLeft:t.spacing(1)}))),d=({title:e,children:m})=>t(n,{"data-testid":"flipdish-staff-only-container",children:[t(l,{children:[i(r,{}),i(p,{children:e})]}),m]});export{d as default};
1
+ import{jsxs as t,jsx as i}from"react/jsx-runtime";import"react";import r from"../../icons/CustomerSupport/index.js";import e from"@mui/material/Grid";import{styled as m}from"@mui/material/styles";import o from"@mui/material/Typography";import a from"@mui/material/Box";const n=m(a)((({theme:t})=>({backgroundColor:t.palette.grey[200],borderRadius:"4px",padding:t.spacing(2)}))),p=m(e)((({theme:t})=>({alignItems:"center",display:"flex",marginBottom:t.spacing(1.5)}))),l=m(o)((({theme:t})=>({fontWeight:500,marginLeft:t.spacing(1)}))),s=({title:e,children:m})=>t(n,{"data-testid":"flipdish-staff-only-container",children:[t(p,{children:[i(r,{}),i(l,{children:e})]}),m]});export{s as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/FlipdishStaffContainer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport SupportAgentOutlinedIcon from '@mui/icons-material/SupportAgentOutlined';\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ntype Props = {\n title: string;\n children: ReactNode;\n};\n\nconst FlipdishStaffContainer = ({ title, children }: Props) => {\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{title}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","FlipdishStaffContainer","title","children","_jsxs","_jsx","SupportAgentOutlinedIcon"],"mappings":"iRAOA,MAAMA,EAAkBC,EAAOC,EAAPD,EAAY,EAAGE,YAAa,CAChDC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAOU,EAAPV,EAAa,EAAGE,YAAa,CAChDS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAOe,EAAPf,EAAmB,EAAGE,YAAa,CAC7Cc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,OAQxBU,EAAyB,EAAGC,QAAOC,cAEjCC,EAACtB,EAAe,CAAA,cAAa,gCACzBqB,SAAA,CAAAC,EAACZ,EAAc,CAAAW,SAAA,CACXE,EAACC,MACDD,EAACR,EAAK,CAAAM,SAAED,OAGXC"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/FlipdishStaffContainer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport SupportAgentOutlinedIcon from '../../icons/CustomerSupport';\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ntype Props = {\n title: string;\n children: ReactNode;\n};\n\nconst FlipdishStaffContainer = ({ title, children }: Props) => {\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{title}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","FlipdishStaffContainer","title","children","_jsxs","_jsx","SupportAgentOutlinedIcon"],"mappings":"6QAOA,MAAMA,EAAkBC,EAAOC,EAAPD,EAAY,EAAGE,YAAa,CAChDC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAOU,EAAPV,EAAa,EAAGE,YAAa,CAChDS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAOe,EAAPf,EAAmB,EAAGE,YAAa,CAC7Cc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,OAQxBU,EAAyB,EAAGC,QAAOC,cAEjCC,EAACtB,EAAe,CAAA,cAAa,gCACzBqB,SAAA,CAAAC,EAACZ,EAAc,CAAAW,SAAA,CACXE,EAACC,MACDD,EAACR,EAAK,CAAAM,SAAED,OAGXC"}
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/styles"),r=require("@mui/material/Table"),t=require("@mui/material/TableCell"),a=require("@mui/material/TableHead"),l=require("@mui/material/TableRow"),s=require("@mui/material/useMediaQuery"),o=require("../GenericTableTitle/index.cjs.js"),n=require("./HighlightScrollbar.cjs.js"),d=require("../GenericTableBody/index.cjs.js"),u=require("@mui/material/Card"),c=require("@mui/icons-material/InfoOutlined"),m=require("@mui/material/Tooltip"),h=require("@mui/material/IconButton");const p=i.styled("div")`
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/styles"),r=require("@mui/material/Table"),t=require("@mui/material/TableCell"),a=require("@mui/material/TableHead"),l=require("@mui/material/TableRow"),s=require("@mui/material/useMediaQuery"),n=require("../GenericTableTitle/index.cjs.js"),o=require("./HighlightScrollbar.cjs.js"),d=require("../GenericTableBody/index.cjs.js"),c=require("@mui/material/Card"),u=require("../../icons/InformationCircle/index.cjs.js"),m=require("@mui/material/Tooltip"),h=require("@mui/material/IconButton");const p=i.styled("div")`
2
2
  overflow-x: auto;
3
3
  &::-webkit-scrollbar {
4
4
  padding: 2px 0;
@@ -12,7 +12,7 @@
12
12
  background: #f5f5f5;
13
13
  border-radius: 3px;
14
14
  }
15
- `,b=i.styled(t,{shouldForwardProp:e=>"isSticky"!==e&&"titleVariant"!==e})((({theme:e,isSticky:i,titleVariant:r})=>({fontSize:13,fontWeight:"light"===r?400:e.typography.fontWeightMedium,color:"light"===r?"rgba(0, 0, 0, 0.54)":e.palette.text.primary,padding:e.spacing(1.25,2),whiteSpace:"nowrap",position:i?"sticky":"relative",zIndex:i?1:"auto"}))),x=i.styled(u)`
15
+ `,b=i.styled(t,{shouldForwardProp:e=>"isSticky"!==e&&"titleVariant"!==e})((({theme:e,isSticky:i,titleVariant:r})=>({fontSize:13,fontWeight:"light"===r?400:e.typography.fontWeightMedium,color:"light"===r?"rgba(0, 0, 0, 0.54)":e.palette.text.primary,padding:e.spacing(1.25,2),whiteSpace:"nowrap",position:i?"sticky":"relative",zIndex:i?1:"auto"}))),x=i.styled(c)`
16
16
  overflow: hidden;
17
- `,g=i.styled(m)((({theme:e})=>({marginLeft:e.spacing(.5),svg:{fontSize:e.typography.body1.fontSize}})));module.exports=({data:t,title:u,subTitle:m,showTitle:j=!0,onRowClick:f,loading:y,metadata:k,titleVariant:q="default"})=>{const w=new Set(k.filter((e=>e.isVisible)).sort(((e,i)=>e.ordinal-i.ordinal)).map((e=>e.columnName))),T=k.reduce(((e,i)=>(e[i.columnName]=i,e)),{}),S=i.useTheme(),v=!s(S.breakpoints.up("sm")),z=v?"normal":"sticky";return e.jsxs(p,{children:[j&&e.jsx(o,{title:u,subTitle:m}),e.jsx(x,{children:e.jsx(n,{children:e.jsxs(r,{"aria-label":u,"data-testid":"generic-table"+(j?`-${u.replace(" ","-").toLowerCase()}`:""),children:[e.jsx(a,{children:e.jsx(l,{children:Array.from(w).map(((i,r)=>{const{columnName:t,columnTitle:a,align:l="left",tooltip:s}=T[i];return e.jsx(b,{align:l,isSticky:0===r&&!v,titleVariant:q,children:e.jsxs("div",{children:[e.jsx("span",{children:a}),s&&e.jsx(g,{title:s,placement:"right-start",children:e.jsx(h,{size:"small",children:e.jsx(c,{fontSize:"small"})})})]})},t)}))})}),e.jsx(d,{type:z,data:t,columns:w,onRowClick:f,loading:y,meta:T})]})})})]})};
17
+ `,g=i.styled(m)((({theme:e})=>({marginLeft:e.spacing(.5),svg:{fontSize:e.typography.body1.fontSize}})));module.exports=({data:t,title:c,subTitle:m,showTitle:j=!0,onRowClick:f,loading:y,metadata:k,titleVariant:q="default"})=>{const w=new Set(k.filter((e=>e.isVisible)).sort(((e,i)=>e.ordinal-i.ordinal)).map((e=>e.columnName))),T=k.reduce(((e,i)=>(e[i.columnName]=i,e)),{}),S=i.useTheme(),v=!s(S.breakpoints.up("sm")),z=v?"normal":"sticky";return e.jsxs(p,{children:[j&&e.jsx(n,{title:c,subTitle:m}),e.jsx(x,{children:e.jsx(o,{children:e.jsxs(r,{"aria-label":c,"data-testid":"generic-table"+(j?`-${c.replace(" ","-").toLowerCase()}`:""),children:[e.jsx(a,{children:e.jsx(l,{children:Array.from(w).map(((i,r)=>{const{columnName:t,columnTitle:a,align:l="left",tooltip:s}=T[i];return e.jsx(b,{align:l,isSticky:0===r&&!v,titleVariant:q,children:e.jsxs("div",{children:[e.jsx("span",{children:a}),s&&e.jsx(g,{title:s,placement:"right-start",children:e.jsx(h,{size:"small",children:e.jsx(u,{"data-testid":"InfoOutlinedIcon",size:"sm"})})})]})},t)}))})}),e.jsx(d,{type:z,data:t,columns:w,onRowClick:f,loading:y,meta:T})]})})})]})};
18
18
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/GenericTable/index.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport GenericTableTitle from '../GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport GenericTableBody, { type GenericTableColumns } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';\nimport Tooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n titleVariant?: 'default' | 'light';\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell, {\n shouldForwardProp: (prop) => prop !== 'isSticky' && prop !== 'titleVariant',\n})<{ isSticky: boolean; titleVariant: 'default' | 'light' }>(({ theme, isSticky, titleVariant }) => ({\n fontSize: 13,\n fontWeight: titleVariant === 'light' ? 400 : theme.typography.fontWeightMedium,\n color: titleVariant === 'light' ? 'rgba(0, 0, 0, 0.54)' : theme.palette.text.primary,\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst StyledTooltip = styled(Tooltip)(({ theme }) => ({\n marginLeft: theme.spacing(0.5),\n svg: {\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata, titleVariant = 'default' }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left', tooltip } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile} titleVariant={titleVariant}>\n <div>\n <span>{columnTitle}</span>\n {tooltip && (\n <StyledTooltip title={tooltip} placement=\"right-start\">\n <IconButton size=\"small\">\n <InfoOutlinedIcon fontSize=\"small\" />\n </IconButton>\n </StyledTooltip>\n )}\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title} data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","shouldForwardProp","prop","theme","isSticky","titleVariant","fontSize","fontWeight","typography","fontWeightMedium","color","palette","text","primary","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","StyledTooltip","Tooltip","marginLeft","svg","body1","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","jsx","TableHead","TableRow","Array","from","idx","columnTitle","align","tooltip","placement","IconButton","size","InfoOutlinedIcon","GenericTableBody","type","meta"],"mappings":"uiBA4BA,MAAMA,EAAkBC,EAAAA,OAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAMA,OAACE,EAAW,CACtCC,kBAAoBC,GAAkB,aAATA,GAAgC,iBAATA,GADhCJ,EAEqC,EAAGK,QAAOC,WAAUC,mBAAoB,CACjGC,SAAU,GACVC,WAA6B,UAAjBF,EAA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EA,EAAWC,MAAEA,EAAQ,OAAMC,QAAEA,GAAY3B,EAAU1C,GACvE,OACIsD,MAACzD,EAAe,CAAkBuE,MAAOA,EAAOlE,SAAkB,IAARgE,IAAcnB,EAAU5C,aAAcA,EAC5FqD,SAAAJ,OAAA,MAAA,CAAAI,SAAA,CACIF,EAAAA,IAAO,OAAA,CAAAE,SAAAW,IACNE,GACGf,EAAAA,IAACnC,EAAc,CAAAM,MAAO4C,EAASC,UAAU,cACrCd,SAAAF,EAAAA,IAACiB,EAAU,CAACC,KAAK,QAAOhB,SACpBF,EAACO,IAAAY,EAAiB,CAAArE,SAAS,kBANzBqC,EAYxB,QAaEa,EAAAO,IAACa,EACG,CAAAC,KAAMxB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACT+C,KAAMlC,aAM5B"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/GenericTable/index.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport GenericTableTitle from '../GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport GenericTableBody, { type GenericTableColumns } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\nimport InfoOutlinedIcon from '../../icons/InformationCircle';\nimport Tooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n titleVariant?: 'default' | 'light';\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell, {\n shouldForwardProp: (prop) => prop !== 'isSticky' && prop !== 'titleVariant',\n})<{ isSticky: boolean; titleVariant: 'default' | 'light' }>(({ theme, isSticky, titleVariant }) => ({\n fontSize: 13,\n fontWeight: titleVariant === 'light' ? 400 : theme.typography.fontWeightMedium,\n color: titleVariant === 'light' ? 'rgba(0, 0, 0, 0.54)' : theme.palette.text.primary,\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst StyledTooltip = styled(Tooltip)(({ theme }) => ({\n marginLeft: theme.spacing(0.5),\n svg: {\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata, titleVariant = 'default' }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left', tooltip } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile} titleVariant={titleVariant}>\n <div>\n <span>{columnTitle}</span>\n {tooltip && (\n <StyledTooltip title={tooltip} placement=\"right-start\">\n <IconButton size=\"small\">\n <InfoOutlinedIcon data-testid=\"InfoOutlinedIcon\" size=\"sm\" />\n </IconButton>\n </StyledTooltip>\n )}\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title} data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","shouldForwardProp","prop","theme","isSticky","titleVariant","fontSize","fontWeight","typography","fontWeightMedium","color","palette","text","primary","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","StyledTooltip","Tooltip","marginLeft","svg","body1","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","jsx","TableHead","TableRow","Array","from","idx","columnTitle","align","tooltip","placement","IconButton","size","InfoOutlinedIcon","GenericTableBody","type","meta"],"mappings":"ijBA4BA,MAAMA,EAAkBC,EAAAA,OAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAMA,OAACE,EAAW,CACtCC,kBAAoBC,GAAkB,aAATA,GAAgC,iBAATA,GADhCJ,EAEqC,EAAGK,QAAOC,WAAUC,mBAAoB,CACjGC,SAAU,GACVC,WAA6B,UAAjBF,EAA2B,IAAMF,EAAMK,WAAWC,iBAC9DC,MAAwB,UAAjBL,E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U1C,GACvE,OACIsD,MAACzD,EAAe,CAAkBuE,MAAOA,EAAOlE,SAAkB,IAARgE,IAAcnB,EAAU5C,aAAcA,EAAYqD,SACxGJ,EAAAA,KACI,MAAA,CAAAI,SAAA,CAAAF,EAAAA,IAAA,OAAA,CAAAE,SAAOW,IACNE,GACGf,EAAAA,IAACnC,EAAa,CAACM,MAAO4C,EAASC,UAAU,cAAad,SAClDF,MAACiB,EAAW,CAAAC,KAAK,iBACblB,EAACO,IAAAY,EAA6B,CAAA,cAAA,mBAAmBD,KAAK,eANpD/B,EAYxB,QAaEa,EAAAO,IAACa,EACG,CAAAC,KAAMxB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACT+C,KAAMlC,aAM5B"}
@@ -1,4 +1,4 @@
1
- import{jsxs as i,jsx as t}from"react/jsx-runtime";import{styled as e,useTheme as r}from"@mui/material/styles";import a from"@mui/material/Table";import o from"@mui/material/TableCell";import l from"@mui/material/TableHead";import m from"@mui/material/TableRow";import n from"@mui/material/useMediaQuery";import d from"../GenericTableTitle/index.js";import c from"./HighlightScrollbar.js";import p from"../GenericTableBody/index.js";import s from"@mui/material/Card";import u from"@mui/icons-material/InfoOutlined";import f from"@mui/material/Tooltip";import h from"@mui/material/IconButton";const b=e("div")`
1
+ import{jsxs as i,jsx as t}from"react/jsx-runtime";import{styled as e,useTheme as r}from"@mui/material/styles";import a from"@mui/material/Table";import o from"@mui/material/TableCell";import l from"@mui/material/TableHead";import m from"@mui/material/TableRow";import n from"@mui/material/useMediaQuery";import d from"../GenericTableTitle/index.js";import c from"./HighlightScrollbar.js";import s from"../GenericTableBody/index.js";import p from"@mui/material/Card";import f from"../../icons/InformationCircle/index.js";import u from"@mui/material/Tooltip";import h from"@mui/material/IconButton";const b=e("div")`
2
2
  overflow-x: auto;
3
3
  &::-webkit-scrollbar {
4
4
  padding: 2px 0;
@@ -12,7 +12,7 @@ import{jsxs as i,jsx as t}from"react/jsx-runtime";import{styled as e,useTheme as
12
12
  background: #f5f5f5;
13
13
  border-radius: 3px;
14
14
  }
15
- `,g=e(o,{shouldForwardProp:i=>"isSticky"!==i&&"titleVariant"!==i})((({theme:i,isSticky:t,titleVariant:e})=>({fontSize:13,fontWeight:"light"===e?400:i.typography.fontWeightMedium,color:"light"===e?"rgba(0, 0, 0, 0.54)":i.palette.text.primary,padding:i.spacing(1.25,2),whiteSpace:"nowrap",position:t?"sticky":"relative",zIndex:t?1:"auto"}))),y=e(s)`
15
+ `,g=e(o,{shouldForwardProp:i=>"isSticky"!==i&&"titleVariant"!==i})((({theme:i,isSticky:t,titleVariant:e})=>({fontSize:13,fontWeight:"light"===e?400:i.typography.fontWeightMedium,color:"light"===e?"rgba(0, 0, 0, 0.54)":i.palette.text.primary,padding:i.spacing(1.25,2),whiteSpace:"nowrap",position:t?"sticky":"relative",zIndex:t?1:"auto"}))),y=e(p)`
16
16
  overflow: hidden;
17
- `,k=e(f)((({theme:i})=>({marginLeft:i.spacing(.5),svg:{fontSize:i.typography.body1.fontSize}}))),w=({data:e,title:o,subTitle:s,showTitle:f=!0,onRowClick:w,loading:T,metadata:x,titleVariant:S="default"})=>{const v=new Set(x.filter((i=>i.isVisible)).sort(((i,t)=>i.ordinal-t.ordinal)).map((i=>i.columnName))),z=x.reduce(((i,t)=>(i[t.columnName]=t,i)),{}),C=r(),V=!n(C.breakpoints.up("sm")),j=V?"normal":"sticky";return i(b,{children:[f&&t(d,{title:o,subTitle:s}),t(y,{children:t(c,{children:i(a,{"aria-label":o,"data-testid":"generic-table"+(f?`-${o.replace(" ","-").toLowerCase()}`:""),children:[t(l,{children:t(m,{children:Array.from(v).map(((e,r)=>{const{columnName:a,columnTitle:o,align:l="left",tooltip:m}=z[e];return t(g,{align:l,isSticky:0===r&&!V,titleVariant:S,children:i("div",{children:[t("span",{children:o}),m&&t(k,{title:m,placement:"right-start",children:t(h,{size:"small",children:t(u,{fontSize:"small"})})})]})},a)}))})}),t(p,{type:j,data:e,columns:v,onRowClick:w,loading:T,meta:z})]})})})]})};export{w as default};
17
+ `,k=e(u)((({theme:i})=>({marginLeft:i.spacing(.5),svg:{fontSize:i.typography.body1.fontSize}}))),w=({data:e,title:o,subTitle:p,showTitle:u=!0,onRowClick:w,loading:x,metadata:T,titleVariant:S="default"})=>{const v=new Set(T.filter((i=>i.isVisible)).sort(((i,t)=>i.ordinal-t.ordinal)).map((i=>i.columnName))),z=T.reduce(((i,t)=>(i[t.columnName]=t,i)),{}),C=r(),j=!n(C.breakpoints.up("sm")),I=j?"normal":"sticky";return i(b,{children:[u&&t(d,{title:o,subTitle:p}),t(y,{children:t(c,{children:i(a,{"aria-label":o,"data-testid":"generic-table"+(u?`-${o.replace(" ","-").toLowerCase()}`:""),children:[t(l,{children:t(m,{children:Array.from(v).map(((e,r)=>{const{columnName:a,columnTitle:o,align:l="left",tooltip:m}=z[e];return t(g,{align:l,isSticky:0===r&&!j,titleVariant:S,children:i("div",{children:[t("span",{children:o}),m&&t(k,{title:m,placement:"right-start",children:t(h,{size:"small",children:t(f,{"data-testid":"InfoOutlinedIcon",size:"sm"})})})]})},a)}))})}),t(s,{type:I,data:e,columns:v,onRowClick:w,loading:x,meta:z})]})})})]})};export{w as default};
18
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/GenericTable/index.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport GenericTableTitle from '../GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport GenericTableBody, { type GenericTableColumns } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';\nimport Tooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n titleVariant?: 'default' | 'light';\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell, {\n shouldForwardProp: (prop) => prop !== 'isSticky' && prop !== 'titleVariant',\n})<{ isSticky: boolean; titleVariant: 'default' | 'light' }>(({ theme, isSticky, titleVariant }) => ({\n fontSize: 13,\n fontWeight: titleVariant === 'light' ? 400 : theme.typography.fontWeightMedium,\n color: titleVariant === 'light' ? 'rgba(0, 0, 0, 0.54)' : theme.palette.text.primary,\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst StyledTooltip = styled(Tooltip)(({ theme }) => ({\n marginLeft: theme.spacing(0.5),\n svg: {\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata, titleVariant = 'default' }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left', tooltip } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile} titleVariant={titleVariant}>\n <div>\n <span>{columnTitle}</span>\n {tooltip && (\n <StyledTooltip title={tooltip} placement=\"right-start\">\n <IconButton size=\"small\">\n <InfoOutlinedIcon fontSize=\"small\" />\n </IconButton>\n </StyledTooltip>\n )}\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title} data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","shouldForwardProp","prop","theme","isSticky","titleVariant","fontSize","fontWeight","typography","fontWeightMedium","color","palette","text","primary","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","StyledTooltip","Tooltip","marginLeft","svg","body1","GenericTable","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","TableHead","TableRow","Array","from","idx","columnTitle","align","tooltip","placement","IconButton","size","InfoOutlinedIcon","GenericTableBody","type","meta"],"mappings":"+kBA4BA,MAAMA,EAAkBC,EAAO,MAA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EAAS,CAAAL,SACNF,EAACQ,EACI,CAAAN,SAAAO,MAAMC,KAAKhC,GAASS,KAAI,CAACzC,EAAMiE,KAC5B,MAAMvB,WAAEA,EAAUwB,YAAEA,EAAWC,MAAEA,EAAQ,OAAMC,QAAEA,GAAYzB,EAAU3C,GACvE,OACIsD,EAACzD,EAAe,CAAkBsE,MAAOA,EAAOjE,SAAkB,IAAR+D,IAAcjB,EAAU7C,aAAcA,EAC5FqD,SAAAH,EAAA,MAAA,CAAAG,SAAA,CACIF,EAAO,OAAA,CAAAE,SAAAU,IACNE,GACGd,EAACnC,EAAc,CAAAO,MAAO0C,EAASC,UAAU,cACrCb,SAAAF,EAACgB,EAAU,CAACC,KAAK,QAAOf,SACpBF,EAACkB,EAAiB,CAAApE,SAAS,kBANzBsC,EAYxB,QAaEY,EAACmB,EACG,CAAAC,KAAMtB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACT6C,KAAMhC,aAM5B"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/GenericTable/index.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport GenericTableTitle from '../GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport GenericTableBody, { type GenericTableColumns } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\nimport InfoOutlinedIcon from '../../icons/InformationCircle';\nimport Tooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n titleVariant?: 'default' | 'light';\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell, {\n shouldForwardProp: (prop) => prop !== 'isSticky' && prop !== 'titleVariant',\n})<{ isSticky: boolean; titleVariant: 'default' | 'light' }>(({ theme, isSticky, titleVariant }) => ({\n fontSize: 13,\n fontWeight: titleVariant === 'light' ? 400 : theme.typography.fontWeightMedium,\n color: titleVariant === 'light' ? 'rgba(0, 0, 0, 0.54)' : theme.palette.text.primary,\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst StyledTooltip = styled(Tooltip)(({ theme }) => ({\n marginLeft: theme.spacing(0.5),\n svg: {\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata, titleVariant = 'default' }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left', tooltip } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile} titleVariant={titleVariant}>\n <div>\n <span>{columnTitle}</span>\n {tooltip && (\n <StyledTooltip title={tooltip} placement=\"right-start\">\n <IconButton size=\"small\">\n <InfoOutlinedIcon data-testid=\"InfoOutlinedIcon\" size=\"sm\" />\n </IconButton>\n </StyledTooltip>\n )}\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title} data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","shouldForwardProp","prop","theme","isSticky","titleVariant","fontSize","fontWeight","typography","fontWeightMedium","color","palette","text","primary","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","StyledTooltip","Tooltip","marginLeft","svg","body1","GenericTable","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","TableHead","TableRow","Array","from","idx","columnTitle","align","tooltip","placement","IconButton","size","InfoOutlinedIcon","GenericTableBody","type","meta"],"mappings":"qlBA4BA,MAAMA,EAAkBC,EAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAOE,EAAW,CACtCC,kBAAoBC,GAAkB,aAATA,GAAgC,iBAATA,GADhCJ,EAEqC,EAAGK,QAAOC,WAAUC,mBAAoB,CACjGC,SAAU,GACVC,WAA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,GAAYzB,EAAU3C,GACvE,OACIsD,EAACzD,EAAe,CAAkBsE,MAAOA,EAAOjE,SAAkB,IAAR+D,IAAcjB,EAAU7C,aAAcA,EAAYqD,SACxGH,EACI,MAAA,CAAAG,SAAA,CAAAF,EAAA,OAAA,CAAAE,SAAOU,IACNE,GACGd,EAACnC,EAAa,CAACO,MAAO0C,EAASC,UAAU,cAAab,SAClDF,EAACgB,EAAW,CAAAC,KAAK,iBACbjB,EAACkB,EAA6B,CAAA,cAAA,mBAAmBD,KAAK,eANpD7B,EAYxB,QAaEY,EAACmB,EACG,CAAAC,KAAMtB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACT6C,KAAMhC,aAM5B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/icons-material"),i=require("@mui/material/IconButton"),r=require("@mui/material/ListItemIcon"),o=require("@mui/material/ListItemText"),n=require("@mui/material/styles/useTheme"),a=require("@mui/material/useMediaQuery"),s=require("@mui/material/styles/styled");const d=s(require("../ListItemLink/index.cjs.js"),{shouldForwardProp:e=>!["borderBottom"].includes(e)&&!["disabled"].includes(e)&&!["selected"].includes(e)})((({theme:e,borderBottom:t,selected:i})=>({borderBottom:t??"1px solid #cecece",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:e.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),c=s(r,{shouldForwardProp:e=>!["iconMargin"].includes(e)})((({iconMargin:e})=>({margin:e||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),l=s(o)((({theme:e})=>({"& .MuiListItemText-primary":{color:e.palette.text.primary},"& .MuiListItemText-secondary":{color:e.palette.text.secondary}}))),u=({borderBottom:r,customTitle:o,customSubtitle:s,disabled:u=!1,onClick:m,title:p,subtitle:x,icon:b,iconMargin:g,hideIcon:f=!1,link:h,isLast:y,customButton:j,iconComponent:k,dataFd:L="",isSelected:q=!1})=>{const I=n(),M=a(I.breakpoints.down("md")),B=!y||M,C=o||p,v=s||x;return e.jsxs(d,{borderBottom:B?r:"none",divider:B,button:!0,fdKey:L||`link-button-${p}`,to:h,onClick:m,disabled:u,selected:q,children:[b&&e.jsx(c,{iconMargin:g,children:e.jsx("img",{src:b,alt:""})}),k&&e.jsx(c,{iconMargin:g,children:k}),e.jsx(l,{primary:C,secondary:v,sx:{pr:"60px"}}),!f&&(j||e.jsx(i,{"aria-label":`link-button-${p}`,children:e.jsx(t.KeyboardArrowRight,{})}))]})};exports.ListItemLinkButton=u,exports.default=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("../../icons/ArrowRight01/index.cjs.js"),i=require("@mui/material/IconButton"),r=require("@mui/material/ListItemIcon"),o=require("@mui/material/ListItemText"),n=require("@mui/material/styles/useTheme"),s=require("@mui/material/useMediaQuery"),a=require("@mui/material/styles/styled");const d=a(require("../ListItemLink/index.cjs.js"),{shouldForwardProp:e=>!["borderBottom"].includes(e)&&!["disabled"].includes(e)&&!["selected"].includes(e)})((({theme:e,borderBottom:t,selected:i})=>({borderBottom:t??"1px solid #cecece",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:e.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),c=a(r,{shouldForwardProp:e=>!["iconMargin"].includes(e)})((({iconMargin:e})=>({margin:e||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),l=a(o)((({theme:e})=>({"& .MuiListItemText-primary":{color:e.palette.text.primary},"& .MuiListItemText-secondary":{color:e.palette.text.secondary}}))),u=({borderBottom:r,customTitle:o,customSubtitle:a,disabled:u=!1,onClick:m,title:p,subtitle:x,icon:b,iconMargin:g,hideIcon:f=!1,link:h,isLast:j,customButton:y,iconComponent:k,dataFd:L="",isSelected:q=!1})=>{const I=n(),M=s(I.breakpoints.down("md")),B=!j||M,C=o||p,v=a||x;return e.jsxs(d,{borderBottom:B?r:"none",divider:B,button:!0,fdKey:L||`link-button-${p}`,to:h,onClick:m,disabled:u,selected:q,children:[b&&e.jsx(c,{iconMargin:g,children:e.jsx("img",{src:b,alt:""})}),k&&e.jsx(c,{iconMargin:g,children:k}),e.jsx(l,{primary:C,secondary:v,sx:{pr:"60px"}}),!f&&(y||e.jsx(i,{"aria-label":`link-button-${p}`,children:e.jsx(t,{})}))]})};exports.ListItemLinkButton=u,exports.default=u;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/ListItemLinkButton/index.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport ListItemLink from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"gZAaA,MAAMA,EAAqBC,0CAAqB,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FF,EAG0C,EAAGI,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBhB,EAAOiB,EAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BF,EAEK,EAAGkB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBvB,EAAOwB,EAAPxB,EAAqB,EAAGI,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAAAA,KAAClD,EAAkB,CACfM,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAAAC,IAACxC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,EAAAA,WAAKE,IAAKxB,EAAMyB,IAAI,OAI3BpB,GAAiBiB,EAAAA,IAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAACC,IAAAjC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcW,GAAI,CAAEC,GAAI,WAEzE1B,IACGG,GACGkB,MAACM,EAAU,CAAA,aAAa,eAAe9B,IACnCuB,SAAAC,EAAAA,IAACO,EAAAA,mBAAqB,CAAA,QAIxC"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/ListItemLinkButton/index.tsx"],"sourcesContent":["import React from 'react';\nimport KeyboardArrowRight from '../../icons/ArrowRight01';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport ListItemLink from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"kaAaA,MAAMA,EAAqBC,0CAAqB,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FF,EAG0C,EAAGI,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBhB,EAAOiB,EAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BF,EAEK,EAAGkB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBvB,EAAOwB,EAAPxB,EAAqB,EAAGI,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAAAA,KAAClD,EAAkB,CACfM,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAAAC,IAACxC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,EAAAA,WAAKE,IAAKxB,EAAMyB,IAAI,OAI3BpB,GAAiBiB,EAAAA,IAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAACC,IAAAjC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcW,GAAI,CAAEC,GAAI,WAEzE1B,IACGG,GACGkB,MAACM,EAAU,CAAA,aAAa,eAAe9B,IACnCuB,SAAAC,EAAAA,IAACO,EAAqB,CAAA,QAIxC"}
@@ -1,2 +1,2 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react";import{KeyboardArrowRight as i}from"@mui/icons-material";import o from"@mui/material/IconButton";import r from"@mui/material/ListItemIcon";import n from"@mui/material/ListItemText";import a from"@mui/material/styles/useTheme";import m from"@mui/material/useMediaQuery";import d from"@mui/material/styles/styled";import l from"../ListItemLink/index.js";const c=d(l,{shouldForwardProp:t=>!["borderBottom"].includes(t)&&!["disabled"].includes(t)&&!["selected"].includes(t)})((({theme:t,borderBottom:e,selected:i})=>({borderBottom:e??"1px solid #cecece",paddingLeft:t.spacing(4),paddingRight:t.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:t.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),s=d(r,{shouldForwardProp:t=>!["iconMargin"].includes(t)})((({iconMargin:t})=>({margin:t||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),u=d(n)((({theme:t})=>({"& .MuiListItemText-primary":{color:t.palette.text.primary},"& .MuiListItemText-secondary":{color:t.palette.text.secondary}}))),p=({borderBottom:r,customTitle:n,customSubtitle:d,disabled:l=!1,onClick:p,title:f,subtitle:b,icon:g,iconMargin:x,hideIcon:h=!1,link:y,isLast:k,customButton:L,iconComponent:I,dataFd:M="",isSelected:B=!1})=>{const C=a(),T=m(C.breakpoints.down("md")),w=!k||T,F=n||f,j=d||b;return t(c,{borderBottom:w?r:"none",divider:w,button:!0,fdKey:M||`link-button-${f}`,to:y,onClick:p,disabled:l,selected:B,children:[g&&e(s,{iconMargin:x,children:e("img",{src:g,alt:""})}),I&&e(s,{iconMargin:x,children:I}),e(u,{primary:F,secondary:j,sx:{pr:"60px"}}),!h&&(L||e(o,{"aria-label":`link-button-${f}`,children:e(i,{})}))]})};export{p as ListItemLinkButton,p as default};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react";import o from"../../icons/ArrowRight01/index.js";import i from"@mui/material/IconButton";import r from"@mui/material/ListItemIcon";import n from"@mui/material/ListItemText";import a from"@mui/material/styles/useTheme";import m from"@mui/material/useMediaQuery";import d from"@mui/material/styles/styled";import c from"../ListItemLink/index.js";const l=d(c,{shouldForwardProp:t=>!["borderBottom"].includes(t)&&!["disabled"].includes(t)&&!["selected"].includes(t)})((({theme:t,borderBottom:e,selected:o})=>({borderBottom:e??"1px solid #cecece",paddingLeft:t.spacing(4),paddingRight:t.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:t.palette.text.primary,textDecoration:"none",backgroundColor:o?"#eaf2ff":"inherit"}))),s=d(r,{shouldForwardProp:t=>!["iconMargin"].includes(t)})((({iconMargin:t})=>({margin:t||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),u=d(n)((({theme:t})=>({"& .MuiListItemText-primary":{color:t.palette.text.primary},"& .MuiListItemText-secondary":{color:t.palette.text.secondary}}))),p=({borderBottom:r,customTitle:n,customSubtitle:d,disabled:c=!1,onClick:p,title:f,subtitle:b,icon:g,iconMargin:x,hideIcon:h=!1,link:y,isLast:k,customButton:L,iconComponent:I,dataFd:M="",isSelected:B=!1})=>{const C=a(),T=m(C.breakpoints.down("md")),w=!k||T,j=n||f,F=d||b;return t(l,{borderBottom:w?r:"none",divider:w,button:!0,fdKey:M||`link-button-${f}`,to:y,onClick:p,disabled:c,selected:B,children:[g&&e(s,{iconMargin:x,children:e("img",{src:g,alt:""})}),I&&e(s,{iconMargin:x,children:I}),e(u,{primary:j,secondary:F,sx:{pr:"60px"}}),!h&&(L||e(i,{"aria-label":`link-button-${f}`,children:e(o,{})}))]})};export{p as ListItemLinkButton,p as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/ListItemLinkButton/index.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport ListItemLink from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"gaAaA,MAAMA,EAAqBC,EAAOC,EAAc,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FH,EAG0C,EAAGK,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ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],"sourcesContent":["import React from 'react';\nimport KeyboardArrowRight from '../../icons/ArrowRight01';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport ListItemLink from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"wZAaA,MAAMA,EAAqBC,EAAOC,EAAc,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,S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C,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAAChC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcU,GAAI,CAAEC,GAAI,WAEzEzB,IACGG,GACGkB,EAACK,EAAU,CAAA,aAAa,eAAe7B,IACnCuB,SAAAC,EAACM,EAAqB,CAAA,QAIxC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("@mui/icons-material/Add"),n=require("@mui/icons-material/ArrowBack"),r=require("@mui/material/Grid"),a=require("@mui/material/IconButton"),s=require("@mui/material/styles"),o=require("@mui/material/Typography"),d=require("@mui/material/useMediaQuery"),l=require("./DocumentTitle.cjs.js"),c=require("./FullWidthContainer.cjs.js"),p=require("../FDErrorBoundary/index.cjs.js"),m=require("@mui/material/Button"),h=require("../../utilities/renderUtilities.cjs.js"),g=require("../../utilities/validation.cjs.js"),u=require("../Spacer/index.cjs.js"),x=require("@mui/material/Box"),j=require("@mui/material/Divider");const f=1112,v=s.styled("div")((({theme:e,fluid:t})=>({maxWidth:t?"none":f,[e.breakpoints.down("md")]:{maxWidth:"none"},padding:e.spacing(2,4),position:"relative",minHeight:"100vh"}))),y=s.styled(r)((({theme:e})=>({[e.breakpoints.down("sm")]:{width:"100%",paddingTop:e.spacing(2)}}))),b=s.styled(r)((({theme:e})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:e.spacing(3),paddingBottom:e.spacing(3),[e.breakpoints.down("md")]:{paddingTop:e.spacing(2),paddingBottom:e.spacing(3)}}))),A=s.styled(r)((({theme:e})=>({paddingTop:e.spacing(2)}))),k=s.styled(r)((()=>({flexGrow:1}))),T=s.styled("div")((({theme:e})=>({maxWidth:f,paddingBottom:e.spacing(3),[e.breakpoints.down("md")]:{paddingBottom:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}))),B=s.styled(a,{shouldForwardProp:e=>"hasTitleComponent"!==e})((({theme:e,hasTitleComponent:t})=>({margin:t?e.spacing(-.75,2,-1.5,-1.5):e.spacing(-1.5,2,-1.5,-1.5),[e.breakpoints.only("sm")]:{marginLeft:e.spacing(-2)},[e.breakpoints.only("xs")]:{marginLeft:e.spacing(-2)}}))),C=s.styled("div")((({theme:e})=>({maxWidth:f,marginLeft:e.spacing(6),marginRight:e.spacing(4),paddingBottom:e.spacing(2),[e.breakpoints.only("md")]:{marginLeft:12,marginRight:e.spacing(3)},[e.breakpoints.only("sm")]:{marginLeft:e.spacing(3),marginRight:e.spacing(3),maxWidth:"none"},[e.breakpoints.only("xs")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),maxWidth:"none"}}))),q=s.styled(r)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),w=s.styled(o)((()=>({lineHeight:"26px"}))),L=s.styled(o)((()=>({fontWeight:"bold"}))),W=s.styled(j)((({theme:e})=>({marginBottom:e.spacing(4)}))),S=({title:t})=>e.jsx(L,{variant:"h5",component:"h2",children:t}),_=s.styled("div")((({useAlternateBackground:e,theme:t})=>({backgroundColor:e?t.palette.alternateBackground.main:t.palette.white.main,width:"100%",height:"100%"})));exports.HORIZONTAL_SPACE_CLASSNAME="horizontal-content-space",exports.LEFT_HORIZONTAL_SPACE_CLASSNAME="left-horizontal-content-space",exports.PageTitle=S,exports.RIGHT_HORIZONTAL_SPACE_CLASSNAME="right-horizontal-content-space",exports.VERTICAL_SPACE_CLASSNAME="vertical-content-space",exports.default=a=>{const{actionBtnTitle:o,caption:j,children:f,contextButtons:L,documentTitle:E,fluid:I=!1,fullWidth:P,header:R,hideHeader:F,actionButtonLink:H,openLinkInNewTab:N=!1,pageHeader:z,showActionButton:M,showAddIcon:O,title:D,titleComponent:G,toPrevious:V,toParent:Z,strictToParent:$,navigate:U,hideDivider:Q=!1,customActionButtons:J,useAlternateBackground:K=!1,titleComponentAfter:X,errorBoundarySomethingWentWrongText:Y}=a,ee=s.useTheme(),te=d(ee.breakpoints.down("md")),ie=h.getMicroFrontendAttribute("data-portal-base-url")||"/",ne=H?.startsWith("https://"),re=ne?H:void 0!==H?g.joinUrlPaths(ie,H):"";return e.jsx(_,{useAlternateBackground:K,children:e.jsxs(v,{fluid:I,children:[E&&e.jsx(l,{children:E}),z||null,e.jsxs(C,{children:[z&&e.jsx(u,{size:16,variant:"vertical"}),!F&&e.jsxs(e.Fragment,{children:[e.jsxs(b,{container:!0,alignItems:"center",direction:"column",children:[e.jsx(r,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:e.jsx(q,{item:!0,children:L?.map((i=>e.jsx("div",{children:i},`context-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),e.jsxs(A,{item:!0,container:!0,children:[(Z||V)&&e.jsx(x,{children:e.jsx(B,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!G,component:"button",onClick:()=>{V?U(-1):Z&&$||Z&&history.length<3?U(Z):U(-1)},children:e.jsx(n,{})})}),e.jsxs(k,{item:!0,children:[G?e.jsx(G,{}):e.jsxs(x,{display:"flex",alignItems:"center",gap:2,children:[e.jsx(S,{title:D}),X]}),j&&e.jsx(w,{variant:"caption",component:"h3",children:j})]}),M&&e.jsxs(e.Fragment,{children:[te&&e.jsx(u,{size:56,variant:"vertical"}),e.jsx(y,{item:!0,children:e.jsxs(m,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${o}`,href:N||ne?re:"",target:N?"_blank":void 0,rel:N?"noopener noreferrer":void 0,onClick:N||ne?()=>{}:()=>U(H),children:[O&&e.jsx(i,{}),o]})})]}),J?.map((i=>e.jsxs("div",{children:[te&&e.jsx(u,{size:56,variant:"vertical"}),!te&&e.jsx(u,{size:16,variant:"vertical"}),e.jsx(y,{item:!0,children:i})]},`custom-action-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))]})]}),!Q&&e.jsx(W,{})]}),e.jsxs(c,{fullWidth:P,children:[R?e.jsx(T,{children:R}):null,e.jsx(p,{identifier:E,somethingWentWrongText:Y,children:e.jsx(e.Fragment,{children:f})})]})]})]})})},exports.maxWidth=f;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("../../icons/Add/index.cjs.js"),n=require("../../icons/ArrowLeft02/index.cjs.js"),r=require("@mui/material/Grid"),a=require("@mui/material/IconButton"),s=require("@mui/material/styles"),o=require("@mui/material/Typography"),d=require("@mui/material/useMediaQuery"),l=require("./DocumentTitle.cjs.js"),c=require("./FullWidthContainer.cjs.js"),p=require("../FDErrorBoundary/index.cjs.js"),m=require("@mui/material/Button"),h=require("../../utilities/renderUtilities.cjs.js"),g=require("../../utilities/validation.cjs.js"),u=require("../Spacer/index.cjs.js"),x=require("@mui/material/Box"),j=require("@mui/material/Divider");const f=1112,v=s.styled("div")((({theme:e,fluid:t})=>({maxWidth:t?"none":f,[e.breakpoints.down("md")]:{maxWidth:"none"},padding:e.spacing(2,4),position:"relative",minHeight:"100vh"}))),y=s.styled(r)((({theme:e})=>({[e.breakpoints.down("sm")]:{width:"100%",paddingTop:e.spacing(2)}}))),b=s.styled(r)((({theme:e})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:e.spacing(3),paddingBottom:e.spacing(3),[e.breakpoints.down("md")]:{paddingTop:e.spacing(2),paddingBottom:e.spacing(3)}}))),A=s.styled(r)((({theme:e})=>({paddingTop:e.spacing(2)}))),k=s.styled(r)((()=>({flexGrow:1}))),T=s.styled("div")((({theme:e})=>({maxWidth:f,paddingBottom:e.spacing(3),[e.breakpoints.down("md")]:{paddingBottom:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}))),B=s.styled(i)((({theme:e})=>({marginRight:e.spacing(1)}))),C=s.styled(a,{shouldForwardProp:e=>"hasTitleComponent"!==e})((({theme:e,hasTitleComponent:t})=>({margin:t?e.spacing(-.75,2,-1.5,-1.5):e.spacing(-1.5,2,-1.5,-1.5),[e.breakpoints.only("sm")]:{marginLeft:e.spacing(-2)},[e.breakpoints.only("xs")]:{marginLeft:e.spacing(-2)}}))),L=s.styled("div")((({theme:e})=>({maxWidth:f,marginLeft:e.spacing(6),marginRight:e.spacing(4),paddingBottom:e.spacing(2),[e.breakpoints.only("md")]:{marginLeft:12,marginRight:e.spacing(3)},[e.breakpoints.only("sm")]:{marginLeft:e.spacing(3),marginRight:e.spacing(3),maxWidth:"none"},[e.breakpoints.only("xs")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),maxWidth:"none"}}))),q=s.styled(r)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),w=s.styled(o)((()=>({lineHeight:"26px"}))),W=s.styled(o)((()=>({fontWeight:"bold"}))),S=s.styled(j)((({theme:e})=>({marginBottom:e.spacing(4)}))),_=({title:t})=>e.jsx(W,{variant:"h5",component:"h2",children:t}),E=s.styled("div")((({useAlternateBackground:e,theme:t})=>({backgroundColor:e?t.palette.alternateBackground.main:t.palette.white.main,width:"100%",height:"100%"})));exports.HORIZONTAL_SPACE_CLASSNAME="horizontal-content-space",exports.LEFT_HORIZONTAL_SPACE_CLASSNAME="left-horizontal-content-space",exports.PageTitle=_,exports.RIGHT_HORIZONTAL_SPACE_CLASSNAME="right-horizontal-content-space",exports.VERTICAL_SPACE_CLASSNAME="vertical-content-space",exports.default=i=>{const{actionBtnTitle:a,caption:o,children:j,contextButtons:f,documentTitle:W,fluid:I=!1,fullWidth:P,header:R,hideHeader:z,actionButtonLink:F,openLinkInNewTab:H=!1,pageHeader:N,showActionButton:M,showAddIcon:O,title:D,titleComponent:G,toPrevious:V,toParent:Z,strictToParent:$,navigate:U,hideDivider:Q=!1,customActionButtons:J,useAlternateBackground:K=!1,titleComponentAfter:X,errorBoundarySomethingWentWrongText:Y}=i,ee=s.useTheme(),te=d(ee.breakpoints.down("md")),ie=h.getMicroFrontendAttribute("data-portal-base-url")||"/",ne=F?.startsWith("https://"),re=ne?F:void 0!==F?g.joinUrlPaths(ie,F):"";return e.jsx(E,{useAlternateBackground:K,children:e.jsxs(v,{fluid:I,children:[W&&e.jsx(l,{children:W}),N||null,e.jsxs(L,{children:[N&&e.jsx(u,{size:16,variant:"vertical"}),!z&&e.jsxs(e.Fragment,{children:[e.jsxs(b,{container:!0,alignItems:"center",direction:"column",children:[e.jsx(r,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:e.jsx(q,{item:!0,children:f?.map((i=>e.jsx("div",{children:i},`context-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),e.jsxs(A,{item:!0,container:!0,children:[(Z||V)&&e.jsx(x,{children:e.jsx(C,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!G,component:"button",onClick:()=>{V?U(-1):Z&&$||Z&&history.length<3?U(Z):U(-1)},children:e.jsx(n,{})})}),e.jsxs(k,{item:!0,children:[G?e.jsx(G,{}):e.jsxs(x,{display:"flex",alignItems:"center",gap:2,children:[e.jsx(_,{title:D}),X]}),o&&e.jsx(w,{variant:"caption",component:"h3",children:o})]}),M&&e.jsxs(e.Fragment,{children:[te&&e.jsx(u,{size:56,variant:"vertical"}),e.jsx(y,{item:!0,children:e.jsxs(m,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${a}`,href:H||ne?re:"",target:H?"_blank":void 0,rel:H?"noopener noreferrer":void 0,onClick:H||ne?()=>{}:()=>U(F),children:[O&&e.jsx(B,{size:"sm"}),a]})})]}),J?.map((i=>e.jsxs("div",{children:[te&&e.jsx(u,{size:56,variant:"vertical"}),!te&&e.jsx(u,{size:16,variant:"vertical"}),e.jsx(y,{item:!0,children:i})]},`custom-action-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))]})]}),!Q&&e.jsx(S,{})]}),e.jsxs(c,{fullWidth:P,children:[R?e.jsx(T,{children:R}):null,e.jsx(p,{identifier:W,somethingWentWrongText:Y,children:e.jsx(e.Fragment,{children:j})})]})]})]})})},exports.maxWidth=f;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode } from 'react';\n\nimport Add from '@mui/icons-material/Add';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Spacer from '../Spacer';\nimport Box from '@mui/material/Box';\nimport Divider from '@mui/material/Divider';\n\nexport const HORIZONTAL_SPACE_CLASSNAME = 'horizontal-content-space';\nexport const LEFT_HORIZONTAL_SPACE_CLASSNAME = 'left-horizontal-content-space';\nexport const RIGHT_HORIZONTAL_SPACE_CLASSNAME = 'right-horizontal-content-space';\nexport const VERTICAL_SPACE_CLASSNAME = 'vertical-content-space';\nexport const maxWidth = 1112;\nconst historyMinLength = 3;\n\nconst StyledWrapper = styled('div')<{ fluid: boolean }>(({ theme, fluid }) => ({\n maxWidth: fluid ? 'none' : maxWidth,\n [theme.breakpoints.down('md')]: {\n maxWidth: 'none',\n },\n padding: theme.spacing(2, 4),\n position: 'relative',\n minHeight: '100vh',\n}));\n\nconst StyledActionButtonGrid = styled(Grid)(({ theme }) => ({\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n paddingTop: theme.spacing(2),\n },\n}));\n\nconst StyledHeader = styled(Grid)(({ theme }) => ({\n flexWrap: 'nowrap',\n alignItems: 'flex-start',\n paddingTop: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n}));\n\nconst StyledTitleSection = styled(Grid)(() => ({\n flexGrow: 1,\n}));\n\nconst StyledTopSection = styled('div')(({ theme }) => ({\n maxWidth,\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n}));\n\nconst StyledBackButton = styled(IconButton, {\n shouldForwardProp: (prop) => prop !== 'hasTitleComponent',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n})<{ hasTitleComponent: boolean; component: any }>(({ theme, hasTitleComponent }) => ({\n margin: hasTitleComponent ? theme.spacing(-0.75, 2, -1.5, -1.5) : theme.spacing(-1.5, 2, -1.5, -1.5),\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-2),\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n },\n}));\n\nconst StyledInnerWrapper = styled('div')(({ theme }) => ({\n maxWidth,\n marginLeft: theme.spacing(6),\n marginRight: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('md')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n maxWidth: 'none',\n },\n}));\n\nconst StyledHeaderContainer = styled(Grid)(() => ({\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'flex-end',\n}));\nconst StyledCaption = styled(Typography)<{ component: string }>(() => ({\n lineHeight: '26px',\n}));\n\nconst StyledPageTitle = styled(Typography)<{ component: string }>(() => ({\n fontWeight: 'bold',\n}));\n\nconst StyledPageDivider = styled(Divider)(({ theme }) => ({\n marginBottom: theme.spacing(4),\n}));\n\nexport const PageTitle = ({ title }: { title: string | ReactNode }) => (\n <StyledPageTitle variant=\"h5\" component=\"h2\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground ? theme.palette.alternateBackground.main : theme.palette.white.main,\n width: '100%',\n height: '100%',\n}));\n\nexport type Props = {\n actionBtnTitle?: string;\n caption?: ReactNode;\n children: ReactNode;\n contextButtons?: ReactNode[];\n documentTitle: string;\n fluid?: boolean;\n fullWidth?: boolean;\n header?: ReactNode;\n hideHeader?: boolean;\n actionButtonLink?: string;\n pageHeader?: ReactNode;\n showActionButton?: boolean;\n showAddIcon?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n titleComponentAfter?: ReactNode;\n toPrevious?: boolean;\n toParent?: string;\n strictToParent?: boolean;\n openLinkInNewTab?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigate: (to: any) => void;\n hideDivider?: boolean;\n customActionButtons?: ReactNode[];\n useAlternateBackground?: boolean;\n errorBoundarySomethingWentWrongText: string;\n};\n\nconst PageLayout = (props: Props) => {\n const {\n actionBtnTitle,\n caption,\n children,\n contextButtons,\n documentTitle,\n fluid = false,\n fullWidth,\n header,\n hideHeader,\n actionButtonLink,\n openLinkInNewTab = false,\n pageHeader,\n showActionButton,\n showAddIcon,\n title,\n titleComponent: TitleComponent,\n toPrevious,\n toParent,\n strictToParent,\n navigate,\n hideDivider = false,\n customActionButtons,\n useAlternateBackground = false,\n titleComponentAfter,\n errorBoundarySomethingWentWrongText,\n } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid item container direction=\"row\" alignContent=\"space-between\">\n <StyledHeaderContainer item>\n {contextButtons?.map((button) => (\n <div\n key={`context-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {button}\n </div>\n ))}\n </StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\n {(toParent || toPrevious) && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n if (toPrevious) {\n navigate(-1);\n } else if (toParent && strictToParent) {\n navigate(toParent);\n } else if (toParent && history.length < historyMinLength) {\n navigate(toParent);\n } else {\n navigate(-1);\n }\n }}\n >\n <ArrowBackIcon />\n </StyledBackButton>\n </Box>\n )}\n\n <StyledTitleSection item>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box display=\"flex\" alignItems=\"center\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption variant=\"caption\" component=\"h3\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid item>\n <Button\n variant=\"contained\"\n fullWidth={true}\n data-testid={`Action-button-${actionBtnTitle}`}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n target={openLinkInNewTab ? '_blank' : undefined}\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}\n }\n >\n {showAddIcon && <Add />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n key={`custom-action-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n {!isMobile && <Spacer size={16} variant=\"vertical\" />}\n <StyledActionButtonGrid item>{button}</StyledActionButtonGrid>\n </div>\n ))}\n </StyledTitleContainer>\n </StyledHeader>\n {!hideDivider && <StyledPageDivider />}\n </>\n )}\n <FullWidthContainer fullWidth={fullWidth}>\n {header ? <StyledTopSection>{header}</StyledTopSection> : null}\n <FDErrorBoundary identifier={documentTitle} somethingWentWrongText={errorBoundarySomethingWentWrongText}>\n <>{children}</>\n </FDErrorBoundary>\n </FullWidthContainer>\n </StyledInnerWrapper>\n </StyledWrapper>\n </StyledPageContainer>\n );\n};\n\nexport default PageLayout;\n"],"names":["maxWidth","StyledWrapper","styled","theme","fluid","breakpoints","down","padding","spacing","position","minHeight","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","StyledPageContainer","useAlternateBackground","backgroundColor","palette","alternateBackground","main","white","height","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","titleComponentAfter","errorBoundarySomethingWentWrongText","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","jsx","_jsxs","DocumentTitle","Spacer","size","_Fragment","jsxs","container","direction","item","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowBackIcon","gap","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier","somethingWentWrongText"],"mappings":"suBAoBO,MAIMA,EAAW,KAGlBC,EAAgBC,EAAMA,OAAC,MAAPA,EAAkC,EAAGC,QAAOC,YAAa,CAC3EJ,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAME,YAAYC,KAAK,OAAQ,CAC5BN,SAAU,QAEdO,QAASJ,EAAMK,QAAQ,EAAG,GAC1BC,SAAU,WACVC,UAAW,YAGTC,EAAyBT,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAa,CACxD,CAACA,EAAME,YAAYC,KAAK,OAAQ,CAC5BO,MAAO,OACPC,WAAYX,EAAMK,QAAQ,QAI5BO,EAAeb,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAa,CAC9Ca,SAAU,SACVC,WAAY,aACZH,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,OAAQ,CAC5BQ,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,QAI/BW,EAAuBjB,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAa,CACtDW,WAAYX,EAAMK,QAAQ,OAGxBY,EAAqBlB,EAAAA,OAAOU,EAAPV,EAAa,KAAO,CAC3CmB,SAAU,MAGRC,EAAmBpB,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAa,CACnDH,WACAkB,cAAef,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,OAAQ,CAC5BY,cAAef,EAAMK,QAAQ,GAC7Be,YAAapB,EAAM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AKhD,EAAmB,2BAAwBsB,EAChDkB,QACKxC,GAAqBmB,GAA2D,OAAnC,IAAMV,EAASV,GAA4BjB,SAAA,CAG5FqB,GAAexB,MAACsE,EAAG,CAAA,GACnBzD,UAKhBmB,GAAqBwB,KAAKC,GACvBX,wBAGKV,IAAYpC,MAACgD,GAAOC,KAAM,GAAIhD,QAAQ,cACrCmC,IAAYpC,EAAAA,IAACgD,GAAOC,KAAM,GAAIhD,QAAQ,aACxCD,EAAAA,IAACrC,EAAsB,CAAC2F,MAAI,EAAAnD,SAAEsD,MAJzB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO7C,QAAQ,gBAAkB6C,EAAO7C,OAAOT,SAAW,uBASpI4B,GAAe/B,MAACL,EAAiB,CAAA,MAG3CmD,EAACK,KAAAoB,EAAmB,CAAAtD,UAAWA,EAASd,SAAA,CACnCe,EAASlB,EAAAA,IAAC1B,EAAgB,CAAA6B,SAAEe,IAA6B,KAC1DlB,EAAAA,IAACwE,EAAe,CAACC,WAAYzD,EAAe0D,uBAAwBxC,EAAmC/B,SACnGH,EAAG6C,IAAAK,WAAA,CAAA/C,SAAAA,gBAMzB"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode } from 'react';\n\nimport Add from '../../icons/Add';\nimport ArrowLeft02 from '../../icons/ArrowLeft02';\nimport Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Spacer from '../Spacer';\nimport Box from '@mui/material/Box';\nimport Divider from '@mui/material/Divider';\n\nexport const HORIZONTAL_SPACE_CLASSNAME = 'horizontal-content-space';\nexport const LEFT_HORIZONTAL_SPACE_CLASSNAME = 'left-horizontal-content-space';\nexport const RIGHT_HORIZONTAL_SPACE_CLASSNAME = 'right-horizontal-content-space';\nexport const VERTICAL_SPACE_CLASSNAME = 'vertical-content-space';\nexport const maxWidth = 1112;\nconst historyMinLength = 3;\n\nconst StyledWrapper = styled('div')<{ fluid: boolean }>(({ theme, fluid }) => ({\n maxWidth: fluid ? 'none' : maxWidth,\n [theme.breakpoints.down('md')]: {\n maxWidth: 'none',\n },\n padding: theme.spacing(2, 4),\n position: 'relative',\n minHeight: '100vh',\n}));\n\nconst StyledActionButtonGrid = styled(Grid)(({ theme }) => ({\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n paddingTop: theme.spacing(2),\n },\n}));\n\nconst StyledHeader = styled(Grid)(({ theme }) => ({\n flexWrap: 'nowrap',\n alignItems: 'flex-start',\n paddingTop: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n}));\n\nconst StyledTitleSection = styled(Grid)(() => ({\n flexGrow: 1,\n}));\n\nconst StyledTopSection = styled('div')(({ theme }) => ({\n maxWidth,\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n}));\n\nconst StyledAdd = styled(Add)(({ theme }) => ({\n marginRight: theme.spacing(1),\n}));\n\nconst StyledBackButton = styled(IconButton, {\n shouldForwardProp: (prop) => prop !== 'hasTitleComponent',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n})<{ hasTitleComponent: boolean; component: any }>(({ theme, hasTitleComponent }) => ({\n margin: hasTitleComponent ? theme.spacing(-0.75, 2, -1.5, -1.5) : theme.spacing(-1.5, 2, -1.5, -1.5),\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-2),\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n },\n}));\n\nconst StyledInnerWrapper = styled('div')(({ theme }) => ({\n maxWidth,\n marginLeft: theme.spacing(6),\n marginRight: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('md')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n maxWidth: 'none',\n },\n}));\n\nconst StyledHeaderContainer = styled(Grid)(() => ({\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'flex-end',\n}));\nconst StyledCaption = styled(Typography)<{ component: string }>(() => ({\n lineHeight: '26px',\n}));\n\nconst StyledPageTitle = styled(Typography)<{ component: string }>(() => ({\n fontWeight: 'bold',\n}));\n\nconst StyledPageDivider = styled(Divider)(({ theme }) => ({\n marginBottom: theme.spacing(4),\n}));\n\nexport const PageTitle = ({ title }: { title: string | ReactNode }) => (\n <StyledPageTitle variant=\"h5\" component=\"h2\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground ? theme.palette.alternateBackground.main : theme.palette.white.main,\n width: '100%',\n height: '100%',\n}));\n\nexport type Props = {\n actionBtnTitle?: string;\n caption?: ReactNode;\n children: ReactNode;\n contextButtons?: ReactNode[];\n documentTitle: string;\n fluid?: boolean;\n fullWidth?: boolean;\n header?: ReactNode;\n hideHeader?: boolean;\n actionButtonLink?: string;\n pageHeader?: ReactNode;\n showActionButton?: boolean;\n showAddIcon?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n titleComponentAfter?: ReactNode;\n toPrevious?: boolean;\n toParent?: string;\n strictToParent?: boolean;\n openLinkInNewTab?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigate: (to: any) => void;\n hideDivider?: boolean;\n customActionButtons?: ReactNode[];\n useAlternateBackground?: boolean;\n errorBoundarySomethingWentWrongText: string;\n};\n\nconst PageLayout = (props: Props) => {\n const {\n actionBtnTitle,\n caption,\n children,\n contextButtons,\n documentTitle,\n fluid = false,\n fullWidth,\n header,\n hideHeader,\n actionButtonLink,\n openLinkInNewTab = false,\n pageHeader,\n showActionButton,\n showAddIcon,\n title,\n titleComponent: TitleComponent,\n toPrevious,\n toParent,\n strictToParent,\n navigate,\n hideDivider = false,\n customActionButtons,\n useAlternateBackground = false,\n titleComponentAfter,\n errorBoundarySomethingWentWrongText,\n } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid item container direction=\"row\" alignContent=\"space-between\">\n <StyledHeaderContainer item>\n {contextButtons?.map((button) => (\n <div\n key={`context-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {button}\n </div>\n ))}\n </StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\n {(toParent || toPrevious) && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n if (toPrevious) {\n navigate(-1);\n } else if (toParent && strictToParent) {\n navigate(toParent);\n } else if (toParent && history.length < historyMinLength) {\n navigate(toParent);\n } else {\n navigate(-1);\n }\n }}\n >\n <ArrowLeft02 />\n </StyledBackButton>\n </Box>\n )}\n\n <StyledTitleSection item>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box display=\"flex\" alignItems=\"center\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption variant=\"caption\" component=\"h3\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid item>\n <Button\n variant=\"contained\"\n fullWidth={true}\n data-testid={`Action-button-${actionBtnTitle}`}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n target={openLinkInNewTab ? '_blank' : undefined}\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}\n }\n >\n {showAddIcon && <StyledAdd size=\"sm\" />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n key={`custom-action-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n {!isMobile && <Spacer size={16} variant=\"vertical\" />}\n <StyledActionButtonGrid item>{button}</StyledActionButtonGrid>\n </div>\n ))}\n </StyledTitleContainer>\n </StyledHeader>\n {!hideDivider && <StyledPageDivider />}\n </>\n )}\n <FullWidthContainer fullWidth={fullWidth}>\n {header ? <StyledTopSection>{header}</StyledTopSection> : null}\n <FDErrorBoundary identifier={documentTitle} somethingWentWrongText={errorBoundarySomethingWentWrongText}>\n <>{children}</>\n </FDErrorBoundary>\n </FullWidthContainer>\n </StyledInnerWrapper>\n </StyledWrapper>\n </StyledPageContainer>\n );\n};\n\nexport default PageLayout;\n"],"names":["maxWidth","StyledWrapper","styled","theme","fluid","breakpoints","down","padding","spacing","position","minHeight","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","marginRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","StyledPageContainer","useAlternateBackground","backgroundColor","palette","alternateBackground","main","white","height","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","titleComponentAfter","errorBoundarySomethingWentWrongText","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","jsx","_jsxs","DocumentTitle","Spacer","size","_Fragment","jsxs","container","direction","item","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowLeft02","gap","Fragment","Button","href","target","rel","FullWidthContainer","FDErrorBoundary","identifier","somethingWentWrongText"],"mappings":"kvBAoBO,MAIMA,EAAW,KAGlBC,EAAgBC,EAAMA,OAAC,MAAPA,EAAkC,EAAGC,QAAOC,YAAa,CAC3EJ,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAME,YAAYC,KAAK,OAAQ,CAC5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CAACC,KAAM,GAAIhD,QAAQ,aACxCD,EAAA6C,IAACpF,EAAsB,CAAC6F,MAAM,EAAAnD,SAAAsD,MAJzB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO7C,QAAQ,gBAAkB6C,EAAO7C,OAAOT,SAAW,uBASpI4B,GAAe/B,MAACL,SAG1BmD,EAACK,KAAAoB,EAAmB,CAAAtD,UAAWA,EAASd,SAAA,CACnCe,EAASlB,EAAAA,IAAC5B,EAAgB,CAAA+B,SAAEe,IAA6B,KAC1DlB,EAAAA,IAACwE,EAAe,CAACC,WAAYzD,EAAe0D,uBAAwBxC,EAAmC/B,SACnGH,EAAG6C,IAAAK,WAAA,CAAA/C,SAAAA,gBAMzB"}
@@ -1,2 +1,2 @@
1
- import{jsx as i,jsxs as t,Fragment as n}from"react/jsx-runtime";import e from"react";import a from"@mui/icons-material/Add";import o from"@mui/icons-material/ArrowBack";import r from"@mui/material/Grid";import d from"@mui/material/IconButton";import{styled as m,useTheme as l}from"@mui/material/styles";import c from"@mui/material/Typography";import p from"@mui/material/useMediaQuery";import s from"./DocumentTitle.js";import h from"./FullWidthContainer.js";import g from"../FDErrorBoundary/index.js";import u from"@mui/material/Button";import{getMicroFrontendAttribute as f}from"../../utilities/renderUtilities.js";import{joinUrlPaths as v}from"../../utilities/validation.js";import b from"../Spacer/index.js";import k from"@mui/material/Box";import x from"@mui/material/Divider";const B="horizontal-content-space",w="left-horizontal-content-space",W="right-horizontal-content-space",y="vertical-content-space",T=1112,C=m("div")((({theme:i,fluid:t})=>({maxWidth:t?"none":T,[i.breakpoints.down("md")]:{maxWidth:"none"},padding:i.spacing(2,4),position:"relative",minHeight:"100vh"}))),A=m(r)((({theme:i})=>({[i.breakpoints.down("sm")]:{width:"100%",paddingTop:i.spacing(2)}}))),L=m(r)((({theme:i})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:i.spacing(3),paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingTop:i.spacing(2),paddingBottom:i.spacing(3)}}))),j=m(r)((({theme:i})=>({paddingTop:i.spacing(2)}))),z=m(r)((()=>({flexGrow:1}))),I=m("div")((({theme:i})=>({maxWidth:T,paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingBottom:i.spacing(2),paddingLeft:i.spacing(2),paddingRight:i.spacing(2)}}))),R=m(d,{shouldForwardProp:i=>"hasTitleComponent"!==i})((({theme:i,hasTitleComponent:t})=>({margin:t?i.spacing(-.75,2,-1.5,-1.5):i.spacing(-1.5,2,-1.5,-1.5),[i.breakpoints.only("sm")]:{marginLeft:i.spacing(-2)},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(-2)}}))),D=m("div")((({theme:i})=>({maxWidth:T,marginLeft:i.spacing(6),marginRight:i.spacing(4),paddingBottom:i.spacing(2),[i.breakpoints.only("md")]:{marginLeft:12,marginRight:i.spacing(3)},[i.breakpoints.only("sm")]:{marginLeft:i.spacing(3),marginRight:i.spacing(3),maxWidth:"none"},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(2),marginRight:i.spacing(2),maxWidth:"none"}}))),H=m(r)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),P=m(c)((()=>({lineHeight:"26px"}))),E=m(c)((()=>({fontWeight:"bold"}))),F=m(x)((({theme:i})=>({marginBottom:i.spacing(4)}))),G=({title:t})=>i(E,{variant:"h5",component:"h2",children:t}),$=m("div")((({useAlternateBackground:i,theme:t})=>({backgroundColor:i?t.palette.alternateBackground.main:t.palette.white.main,width:"100%",height:"100%"}))),S=d=>{const{actionBtnTitle:m,caption:c,children:x,contextButtons:B,documentTitle:w,fluid:W=!1,fullWidth:y,header:T,hideHeader:E,actionButtonLink:S,openLinkInNewTab:V=!1,pageHeader:_,showActionButton:M,showAddIcon:N,title:Q,titleComponent:U,toPrevious:q,toParent:J,strictToParent:K,navigate:O,hideDivider:X=!1,customActionButtons:Y,useAlternateBackground:Z=!1,titleComponentAfter:ii,errorBoundarySomethingWentWrongText:ti}=d,ni=l(),ei=p(ni.breakpoints.down("md")),ai=f("data-portal-base-url")||"/",oi=S?.startsWith("https://"),ri=oi?S:void 0!==S?v(ai,S):"";return i($,{useAlternateBackground:Z,children:t(C,{fluid:W,children:[w&&i(s,{children:w}),_||null,t(D,{children:[_&&i(b,{size:16,variant:"vertical"}),!E&&t(n,{children:[t(L,{container:!0,alignItems:"center",direction:"column",children:[i(r,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:i(H,{item:!0,children:B?.map((t=>i("div",{children:t},`context-button-${e.isValidElement(t)?t.props?.["data-testid"]||t.props?.children:"fallback"}`)))})}),t(j,{item:!0,container:!0,children:[(J||q)&&i(k,{children:i(R,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!U,component:"button",onClick:()=>{q?O(-1):J&&K||J&&history.length<3?O(J):O(-1)},children:i(o,{})})}),t(z,{item:!0,children:[U?i(U,{}):t(k,{display:"flex",alignItems:"center",gap:2,children:[i(G,{title:Q}),ii]}),c&&i(P,{variant:"caption",component:"h3",children:c})]}),M&&t(n,{children:[ei&&i(b,{size:56,variant:"vertical"}),i(A,{item:!0,children:t(u,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${m}`,href:V||oi?ri:"",target:V?"_blank":void 0,rel:V?"noopener noreferrer":void 0,onClick:V||oi?()=>{}:()=>O(S),children:[N&&i(a,{}),m]})})]}),Y?.map((n=>t("div",{children:[ei&&i(b,{size:56,variant:"vertical"}),!ei&&i(b,{size:16,variant:"vertical"}),i(A,{item:!0,children:n})]},`custom-action-button-${e.isValidElement(n)?n.props?.["data-testid"]||n.props?.children:"fallback"}`)))]})]}),!X&&i(F,{})]}),t(h,{fullWidth:y,children:[T?i(I,{children:T}):null,i(g,{identifier:w,somethingWentWrongText:ti,children:i(n,{children:x})})]})]})]})})};export{B as HORIZONTAL_SPACE_CLASSNAME,w as LEFT_HORIZONTAL_SPACE_CLASSNAME,G as PageTitle,W as RIGHT_HORIZONTAL_SPACE_CLASSNAME,y as VERTICAL_SPACE_CLASSNAME,S as default,T as maxWidth};
1
+ import{jsx as i,jsxs as t,Fragment as n}from"react/jsx-runtime";import e from"react";import a from"../../icons/Add/index.js";import o from"../../icons/ArrowLeft02/index.js";import r from"@mui/material/Grid";import d from"@mui/material/IconButton";import{styled as m,useTheme as l}from"@mui/material/styles";import c from"@mui/material/Typography";import p from"@mui/material/useMediaQuery";import s from"./DocumentTitle.js";import h from"./FullWidthContainer.js";import g from"../FDErrorBoundary/index.js";import u from"@mui/material/Button";import{getMicroFrontendAttribute as f}from"../../utilities/renderUtilities.js";import{joinUrlPaths as v}from"../../utilities/validation.js";import x from"../Spacer/index.js";import b from"@mui/material/Box";import k from"@mui/material/Divider";const B="horizontal-content-space",w="left-horizontal-content-space",W="right-horizontal-content-space",y="vertical-content-space",T=1112,C=m("div")((({theme:i,fluid:t})=>({maxWidth:t?"none":T,[i.breakpoints.down("md")]:{maxWidth:"none"},padding:i.spacing(2,4),position:"relative",minHeight:"100vh"}))),j=m(r)((({theme:i})=>({[i.breakpoints.down("sm")]:{width:"100%",paddingTop:i.spacing(2)}}))),A=m(r)((({theme:i})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:i.spacing(3),paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingTop:i.spacing(2),paddingBottom:i.spacing(3)}}))),L=m(r)((({theme:i})=>({paddingTop:i.spacing(2)}))),z=m(r)((()=>({flexGrow:1}))),I=m("div")((({theme:i})=>({maxWidth:T,paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingBottom:i.spacing(2),paddingLeft:i.spacing(2),paddingRight:i.spacing(2)}}))),R=m(a)((({theme:i})=>({marginRight:i.spacing(1)}))),D=m(d,{shouldForwardProp:i=>"hasTitleComponent"!==i})((({theme:i,hasTitleComponent:t})=>({margin:t?i.spacing(-.75,2,-1.5,-1.5):i.spacing(-1.5,2,-1.5,-1.5),[i.breakpoints.only("sm")]:{marginLeft:i.spacing(-2)},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(-2)}}))),H=m("div")((({theme:i})=>({maxWidth:T,marginLeft:i.spacing(6),marginRight:i.spacing(4),paddingBottom:i.spacing(2),[i.breakpoints.only("md")]:{marginLeft:12,marginRight:i.spacing(3)},[i.breakpoints.only("sm")]:{marginLeft:i.spacing(3),marginRight:i.spacing(3),maxWidth:"none"},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(2),marginRight:i.spacing(2),maxWidth:"none"}}))),P=m(r)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),E=m(c)((()=>({lineHeight:"26px"}))),F=m(c)((()=>({fontWeight:"bold"}))),G=m(k)((({theme:i})=>({marginBottom:i.spacing(4)}))),$=({title:t})=>i(F,{variant:"h5",component:"h2",children:t}),S=m("div")((({useAlternateBackground:i,theme:t})=>({backgroundColor:i?t.palette.alternateBackground.main:t.palette.white.main,width:"100%",height:"100%"}))),V=a=>{const{actionBtnTitle:d,caption:m,children:c,contextButtons:k,documentTitle:B,fluid:w=!1,fullWidth:W,header:y,hideHeader:T,actionButtonLink:F,openLinkInNewTab:V=!1,pageHeader:_,showActionButton:M,showAddIcon:N,title:Q,titleComponent:U,toPrevious:q,toParent:J,strictToParent:K,navigate:O,hideDivider:X=!1,customActionButtons:Y,useAlternateBackground:Z=!1,titleComponentAfter:ii,errorBoundarySomethingWentWrongText:ti}=a,ni=l(),ei=p(ni.breakpoints.down("md")),ai=f("data-portal-base-url")||"/",oi=F?.startsWith("https://"),ri=oi?F:void 0!==F?v(ai,F):"";return i(S,{useAlternateBackground:Z,children:t(C,{fluid:w,children:[B&&i(s,{children:B}),_||null,t(H,{children:[_&&i(x,{size:16,variant:"vertical"}),!T&&t(n,{children:[t(A,{container:!0,alignItems:"center",direction:"column",children:[i(r,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:i(P,{item:!0,children:k?.map((t=>i("div",{children:t},`context-button-${e.isValidElement(t)?t.props?.["data-testid"]||t.props?.children:"fallback"}`)))})}),t(L,{item:!0,container:!0,children:[(J||q)&&i(b,{children:i(D,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!U,component:"button",onClick:()=>{q?O(-1):J&&K||J&&history.length<3?O(J):O(-1)},children:i(o,{})})}),t(z,{item:!0,children:[U?i(U,{}):t(b,{display:"flex",alignItems:"center",gap:2,children:[i($,{title:Q}),ii]}),m&&i(E,{variant:"caption",component:"h3",children:m})]}),M&&t(n,{children:[ei&&i(x,{size:56,variant:"vertical"}),i(j,{item:!0,children:t(u,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${d}`,href:V||oi?ri:"",target:V?"_blank":void 0,rel:V?"noopener noreferrer":void 0,onClick:V||oi?()=>{}:()=>O(F),children:[N&&i(R,{size:"sm"}),d]})})]}),Y?.map((n=>t("div",{children:[ei&&i(x,{size:56,variant:"vertical"}),!ei&&i(x,{size:16,variant:"vertical"}),i(j,{item:!0,children:n})]},`custom-action-button-${e.isValidElement(n)?n.props?.["data-testid"]||n.props?.children:"fallback"}`)))]})]}),!X&&i(G,{})]}),t(h,{fullWidth:W,children:[y?i(I,{children:y}):null,i(g,{identifier:B,somethingWentWrongText:ti,children:i(n,{children:c})})]})]})]})})};export{B as HORIZONTAL_SPACE_CLASSNAME,w as LEFT_HORIZONTAL_SPACE_CLASSNAME,$ as PageTitle,W as RIGHT_HORIZONTAL_SPACE_CLASSNAME,y as VERTICAL_SPACE_CLASSNAME,V as default,T as maxWidth};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode } from 'react';\n\nimport Add from '@mui/icons-material/Add';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Spacer from '../Spacer';\nimport Box from '@mui/material/Box';\nimport Divider from '@mui/material/Divider';\n\nexport const HORIZONTAL_SPACE_CLASSNAME = 'horizontal-content-space';\nexport const LEFT_HORIZONTAL_SPACE_CLASSNAME = 'left-horizontal-content-space';\nexport const RIGHT_HORIZONTAL_SPACE_CLASSNAME = 'right-horizontal-content-space';\nexport const VERTICAL_SPACE_CLASSNAME = 'vertical-content-space';\nexport const maxWidth = 1112;\nconst historyMinLength = 3;\n\nconst StyledWrapper = styled('div')<{ fluid: boolean }>(({ theme, fluid }) => ({\n maxWidth: fluid ? 'none' : maxWidth,\n [theme.breakpoints.down('md')]: {\n maxWidth: 'none',\n },\n padding: theme.spacing(2, 4),\n position: 'relative',\n minHeight: '100vh',\n}));\n\nconst StyledActionButtonGrid = styled(Grid)(({ theme }) => ({\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n paddingTop: theme.spacing(2),\n },\n}));\n\nconst StyledHeader = styled(Grid)(({ theme }) => ({\n flexWrap: 'nowrap',\n alignItems: 'flex-start',\n paddingTop: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n}));\n\nconst StyledTitleSection = styled(Grid)(() => ({\n flexGrow: 1,\n}));\n\nconst StyledTopSection = styled('div')(({ theme }) => ({\n maxWidth,\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n}));\n\nconst StyledBackButton = styled(IconButton, {\n shouldForwardProp: (prop) => prop !== 'hasTitleComponent',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n})<{ hasTitleComponent: boolean; component: any }>(({ theme, hasTitleComponent }) => ({\n margin: hasTitleComponent ? theme.spacing(-0.75, 2, -1.5, -1.5) : theme.spacing(-1.5, 2, -1.5, -1.5),\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-2),\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n },\n}));\n\nconst StyledInnerWrapper = styled('div')(({ theme }) => ({\n maxWidth,\n marginLeft: theme.spacing(6),\n marginRight: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('md')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n maxWidth: 'none',\n },\n}));\n\nconst StyledHeaderContainer = styled(Grid)(() => ({\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'flex-end',\n}));\nconst StyledCaption = styled(Typography)<{ component: string }>(() => ({\n lineHeight: '26px',\n}));\n\nconst StyledPageTitle = styled(Typography)<{ component: string }>(() => ({\n fontWeight: 'bold',\n}));\n\nconst StyledPageDivider = styled(Divider)(({ theme }) => ({\n marginBottom: theme.spacing(4),\n}));\n\nexport const PageTitle = ({ title }: { title: string | ReactNode }) => (\n <StyledPageTitle variant=\"h5\" component=\"h2\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground ? theme.palette.alternateBackground.main : theme.palette.white.main,\n width: '100%',\n height: '100%',\n}));\n\nexport type Props = {\n actionBtnTitle?: string;\n caption?: ReactNode;\n children: ReactNode;\n contextButtons?: ReactNode[];\n documentTitle: string;\n fluid?: boolean;\n fullWidth?: boolean;\n header?: ReactNode;\n hideHeader?: boolean;\n actionButtonLink?: string;\n pageHeader?: ReactNode;\n showActionButton?: boolean;\n showAddIcon?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n titleComponentAfter?: ReactNode;\n toPrevious?: boolean;\n toParent?: string;\n strictToParent?: boolean;\n openLinkInNewTab?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigate: (to: any) => void;\n hideDivider?: boolean;\n customActionButtons?: ReactNode[];\n useAlternateBackground?: boolean;\n errorBoundarySomethingWentWrongText: string;\n};\n\nconst PageLayout = (props: Props) => {\n const {\n actionBtnTitle,\n caption,\n children,\n contextButtons,\n documentTitle,\n fluid = false,\n fullWidth,\n header,\n hideHeader,\n actionButtonLink,\n openLinkInNewTab = false,\n pageHeader,\n showActionButton,\n showAddIcon,\n title,\n titleComponent: TitleComponent,\n toPrevious,\n toParent,\n strictToParent,\n navigate,\n hideDivider = false,\n customActionButtons,\n useAlternateBackground = false,\n titleComponentAfter,\n errorBoundarySomethingWentWrongText,\n } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid item container direction=\"row\" alignContent=\"space-between\">\n <StyledHeaderContainer item>\n {contextButtons?.map((button) => (\n <div\n key={`context-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {button}\n </div>\n ))}\n </StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\n {(toParent || toPrevious) && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n if (toPrevious) {\n navigate(-1);\n } else if (toParent && strictToParent) {\n navigate(toParent);\n } else if (toParent && history.length < historyMinLength) {\n navigate(toParent);\n } else {\n navigate(-1);\n }\n }}\n >\n <ArrowBackIcon />\n </StyledBackButton>\n </Box>\n )}\n\n <StyledTitleSection item>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box display=\"flex\" alignItems=\"center\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption variant=\"caption\" component=\"h3\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid item>\n <Button\n variant=\"contained\"\n fullWidth={true}\n data-testid={`Action-button-${actionBtnTitle}`}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n target={openLinkInNewTab ? '_blank' : undefined}\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}\n }\n >\n {showAddIcon && <Add />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n key={`custom-action-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n {!isMobile && <Spacer size={16} variant=\"vertical\" />}\n <StyledActionButtonGrid item>{button}</StyledActionButtonGrid>\n </div>\n ))}\n </StyledTitleContainer>\n </StyledHeader>\n {!hideDivider && <StyledPageDivider />}\n </>\n )}\n <FullWidthContainer fullWidth={fullWidth}>\n {header ? <StyledTopSection>{header}</StyledTopSection> : null}\n <FDErrorBoundary identifier={documentTitle} somethingWentWrongText={errorBoundarySomethingWentWrongText}>\n <>{children}</>\n </FDErrorBoundary>\n </FullWidthContainer>\n </StyledInnerWrapper>\n </StyledWrapper>\n </StyledPageContainer>\n );\n};\n\nexport default PageLayout;\n"],"names":["HORIZONTAL_SPACE_CLASSNAME","LEFT_HORIZONTAL_SPACE_CLASSNAME","RIGHT_HORIZONTAL_SPACE_CLASSNAME","VERTICAL_SPACE_CLASSNAME","maxWidth","StyledWrapper","styled","theme","fluid","breakpoints","down","padding","spacing","position","minHeight","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","StyledPageContainer","useAlternateBackground","backgroundColor","palette","alternateBackground","main","white","height","PageLayout","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","titleComponentAfter","errorBoundarySomethingWentWrongText","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","item","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowBackIcon","gap","Button","href","target","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AehC,EAACL,EAAiB,CAAA,MAG3CmD,EAACwB,EAAmB,CAAApD,UAAWA,EAASf,SAAA,CACnCgB,EAASnB,EAAC1B,EAAgB,CAAA6B,SAAEgB,IAA6B,KAC1DnB,EAACuE,EAAe,CAACC,WAAYvD,EAAewD,uBAAwBtC,GAAmChC,SACnGH,EAAGkD,EAAA,CAAA/C,SAAAA,gBAMzB"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode } from 'react';\n\nimport Add from '../../icons/Add';\nimport ArrowLeft02 from '../../icons/ArrowLeft02';\nimport Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Spacer from '../Spacer';\nimport Box from '@mui/material/Box';\nimport Divider from '@mui/material/Divider';\n\nexport const HORIZONTAL_SPACE_CLASSNAME = 'horizontal-content-space';\nexport const LEFT_HORIZONTAL_SPACE_CLASSNAME = 'left-horizontal-content-space';\nexport const RIGHT_HORIZONTAL_SPACE_CLASSNAME = 'right-horizontal-content-space';\nexport const VERTICAL_SPACE_CLASSNAME = 'vertical-content-space';\nexport const maxWidth = 1112;\nconst historyMinLength = 3;\n\nconst StyledWrapper = styled('div')<{ fluid: boolean }>(({ theme, fluid }) => ({\n maxWidth: fluid ? 'none' : maxWidth,\n [theme.breakpoints.down('md')]: {\n maxWidth: 'none',\n },\n padding: theme.spacing(2, 4),\n position: 'relative',\n minHeight: '100vh',\n}));\n\nconst StyledActionButtonGrid = styled(Grid)(({ theme }) => ({\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n paddingTop: theme.spacing(2),\n },\n}));\n\nconst StyledHeader = styled(Grid)(({ theme }) => ({\n flexWrap: 'nowrap',\n alignItems: 'flex-start',\n paddingTop: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n}));\n\nconst StyledTitleSection = styled(Grid)(() => ({\n flexGrow: 1,\n}));\n\nconst StyledTopSection = styled('div')(({ theme }) => ({\n maxWidth,\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n}));\n\nconst StyledAdd = styled(Add)(({ theme }) => ({\n marginRight: theme.spacing(1),\n}));\n\nconst StyledBackButton = styled(IconButton, {\n shouldForwardProp: (prop) => prop !== 'hasTitleComponent',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n})<{ hasTitleComponent: boolean; component: any }>(({ theme, hasTitleComponent }) => ({\n margin: hasTitleComponent ? theme.spacing(-0.75, 2, -1.5, -1.5) : theme.spacing(-1.5, 2, -1.5, -1.5),\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-2),\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n },\n}));\n\nconst StyledInnerWrapper = styled('div')(({ theme }) => ({\n maxWidth,\n marginLeft: theme.spacing(6),\n marginRight: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('md')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n maxWidth: 'none',\n },\n}));\n\nconst StyledHeaderContainer = styled(Grid)(() => ({\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'flex-end',\n}));\nconst StyledCaption = styled(Typography)<{ component: string }>(() => ({\n lineHeight: '26px',\n}));\n\nconst StyledPageTitle = styled(Typography)<{ component: string }>(() => ({\n fontWeight: 'bold',\n}));\n\nconst StyledPageDivider = styled(Divider)(({ theme }) => ({\n marginBottom: theme.spacing(4),\n}));\n\nexport const PageTitle = ({ title }: { title: string | ReactNode }) => (\n <StyledPageTitle variant=\"h5\" component=\"h2\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground ? theme.palette.alternateBackground.main : theme.palette.white.main,\n width: '100%',\n height: '100%',\n}));\n\nexport type Props = {\n actionBtnTitle?: string;\n caption?: ReactNode;\n children: ReactNode;\n contextButtons?: ReactNode[];\n documentTitle: string;\n fluid?: boolean;\n fullWidth?: boolean;\n header?: ReactNode;\n hideHeader?: boolean;\n actionButtonLink?: string;\n pageHeader?: ReactNode;\n showActionButton?: boolean;\n showAddIcon?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n titleComponentAfter?: ReactNode;\n toPrevious?: boolean;\n toParent?: string;\n strictToParent?: boolean;\n openLinkInNewTab?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigate: (to: any) => void;\n hideDivider?: boolean;\n customActionButtons?: ReactNode[];\n useAlternateBackground?: boolean;\n errorBoundarySomethingWentWrongText: string;\n};\n\nconst PageLayout = (props: Props) => {\n const {\n actionBtnTitle,\n caption,\n children,\n contextButtons,\n documentTitle,\n fluid = false,\n fullWidth,\n header,\n hideHeader,\n actionButtonLink,\n openLinkInNewTab = false,\n pageHeader,\n showActionButton,\n showAddIcon,\n title,\n titleComponent: TitleComponent,\n toPrevious,\n toParent,\n strictToParent,\n navigate,\n hideDivider = false,\n customActionButtons,\n useAlternateBackground = false,\n titleComponentAfter,\n errorBoundarySomethingWentWrongText,\n } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid item container direction=\"row\" alignContent=\"space-between\">\n <StyledHeaderContainer item>\n {contextButtons?.map((button) => (\n <div\n key={`context-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {button}\n </div>\n ))}\n </StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\n {(toParent || toPrevious) && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n if (toPrevious) {\n navigate(-1);\n } else if (toParent && strictToParent) {\n navigate(toParent);\n } else if (toParent && history.length < historyMinLength) {\n navigate(toParent);\n } else {\n navigate(-1);\n }\n }}\n >\n <ArrowLeft02 />\n </StyledBackButton>\n </Box>\n )}\n\n <StyledTitleSection item>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box display=\"flex\" alignItems=\"center\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption variant=\"caption\" component=\"h3\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid item>\n <Button\n variant=\"contained\"\n fullWidth={true}\n data-testid={`Action-button-${actionBtnTitle}`}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n target={openLinkInNewTab ? '_blank' : undefined}\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}\n }\n >\n {showAddIcon && <StyledAdd size=\"sm\" />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n key={`custom-action-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n {!isMobile && <Spacer size={16} variant=\"vertical\" />}\n <StyledActionButtonGrid item>{button}</StyledActionButtonGrid>\n </div>\n ))}\n </StyledTitleContainer>\n </StyledHeader>\n {!hideDivider && <StyledPageDivider />}\n </>\n )}\n <FullWidthContainer fullWidth={fullWidth}>\n {header ? <StyledTopSection>{header}</StyledTopSection> : null}\n <FDErrorBoundary identifier={documentTitle} somethingWentWrongText={errorBoundarySomethingWentWrongText}>\n <>{children}</>\n </FDErrorBoundary>\n </FullWidthContainer>\n </StyledInnerWrapper>\n </StyledWrapper>\n </StyledPageContainer>\n );\n};\n\nexport default PageLayout;\n"],"names":["HORIZONTAL_SPACE_CLASSNAME","LEFT_HORIZONTAL_SPACE_CLASSNAME","RIGHT_HORIZONTAL_SPACE_CLASSNAME","VERTICAL_SPACE_CLASSNAME","maxWidth","StyledWrapper","styled","theme","fluid","breakpoints","down","padding","spacing","position","minHeight","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","marginRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","StyledPageContainer","useAlternateBackground","backgroundColor","palette","alternateBackground","main","white","height","PageLayout","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","titleComponentAfter","errorBoundarySomethingWentWrongText","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","item","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowLeft02","gap","Button","href","target","rel","FullWidthContainer","FDErrorBoundary","identifier","somethingWentWrongText"],"mappings":"kxBAoBO,MAAMA,EAA6B,2BAC7BC,EAAkC,gCAClCC,EAAmC,iCACnCC,EAA2B,yBAC3BC,EAAW,KAGlBC,EAAgBC,EAAO,MAAPA,EAAkC,EAAGC,QAAOC,YAAa,CAC3EJ,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAME,YAAYC,KAAK,OAAQ,CAC5BN,SAAU,QAEdO,QAASJ,EAAMK,QAAQ,EAAG,GAC1BC,SAAU,WACVC,UAAW,YAGTC,EAAyBT,EAAOU,EAAPV,EAAa,EAAGC,YAAa,CACxD,CAACA,EAAME,YAAYC,KAAK,OAAQ,CAC5BO,MAAO,OACPC,WAAYX,EAAMK,QAAQ,QAI5BO,EAAeb,EAAOU,EAAPV,EAAa,EAAGC,YAAa,CAC9Ca,SAAU,SACVC,WAAY,aACZH,WAAYX,EAAMK,QAAQ,GAC1BU,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Q,UAAUC,UAAU,KACtCC,SAAAY,OAKZS,GACGsB,EAAAI,EAAA,CAAA/C,SAAA,CACKkC,IAAYrC,EAACgD,EAAM,CAACC,KAAM,GAAIhD,QAAQ,aACvCD,EAACvC,EAAuB,CAAA4F,MACpB,EAAAlD,SAAA2C,EAACmB,EACG,CAAAhE,QAAQ,YACRiB,WAAW,EAAI,cACF,iBAAiBJ,IAC9BoD,KAAM5C,GAAoBmB,GAAwBE,GAAwB,GAC1EwB,OAAQ7C,EAAmB,cAAWsB,EACtCwB,IAAK9C,EAAmB,2BAAwBsB,EAChDgB,QACKtC,GAAqBmB,GAA2D,OAAnC,IAAMV,EAASV,aAGhEI,GAAezB,EAACzB,GAAU0E,KAAK,OAC/BnC,UAKhBmB,GAAqBsB,KAAKC,GACvBV,EAAA,MAAA,CAAA3C,SAAA,CAGKkC,IAAYrC,EAACgD,EAAM,CAACC,KAAM,GAAIhD,QAAQ,cACrCoC,IAAYrC,EAACgD,EAAM,CAACC,KAAM,GAAIhD,QAAQ,aACxCD,EAACvC,EAAsB,CAAC4F,MAAM,EAAAlD,SAAAqD,MAJzB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO3C,QAAQ,gBAAkB2C,EAAO3C,OAAOV,SAAW,uBASpI6B,GAAehC,EAACL,SAG1BmD,EAACuB,EAAmB,CAAAnD,UAAWA,EAASf,SAAA,CACnCgB,EAASnB,EAAC5B,EAAgB,CAAA+B,SAAEgB,IAA6B,KAC1DnB,EAACsE,EAAe,CAACC,WAAYtD,EAAeuD,uBAAwBrC,GAAmChC,SACnGH,EAAGkD,EAAA,CAAA/C,SAAAA,gBAMzB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("@mui/material/Tooltip"),r=require("@mui/material/IconButton"),t=require("@mui/icons-material/InfoOutlined");exports.ICON_SIZES=["small","medium","large"],exports.default=({text:l,iconSize:u="small"})=>e.jsx(i,{title:l,children:e.jsx(r,{children:e.jsx(t,{fontSize:u})})});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@mui/material/Tooltip"),i=require("@mui/material/IconButton"),t=require("../../icons/InformationCircle/index.cjs.js");const l={small:"sm",medium:"md",large:"lg"};exports.ICON_SIZES=["small","medium","large"],exports.default=({text:s,iconSize:m="small"})=>e.jsx(r,{title:s,children:e.jsx(i,{children:e.jsx(t,{size:l[m]})})});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/Tooltip/index.tsx"],"sourcesContent":["import MuiTooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';\n\nexport const ICON_SIZES = ['small', 'medium', 'large'] as const;\nexport type IconSize = (typeof ICON_SIZES)[number];\n\nexport type TooltipProps = {\n text: string;\n iconSize?: IconSize;\n};\n\nconst Tooltip = ({ text, iconSize = 'small' }: TooltipProps) => (\n <MuiTooltip title={text}>\n <IconButton>\n <InfoOutlinedIcon fontSize={iconSize} />\n </IconButton>\n </MuiTooltip>\n);\n\nexport default Tooltip;\n"],"names":["text","iconSize","_jsx","MuiTooltip","title","children","IconButton","InfoOutlinedIcon","fontSize"],"mappings":"iPAI0B,CAAC,QAAS,SAAU,yBAQ9B,EAAGA,OAAMC,WAAW,WAChCC,EAAAA,IAACC,EAAU,CAACC,MAAOJ,EAAIK,SACnBH,EAAAA,IAACI,YACGJ,MAACK,EAAiB,CAAAC,SAAUP"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/Tooltip/index.tsx"],"sourcesContent":["import MuiTooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\nimport InfoOutlinedIcon from '../../icons/InformationCircle';\nimport type { IconSize } from '../../icons/helpers/withSvgIcon';\n\nexport const ICON_SIZES = ['small', 'medium', 'large'] as const;\nexport type TooltopIconSize = (typeof ICON_SIZES)[number];\n\nexport type TooltipProps = {\n text: string;\n iconSize?: TooltopIconSize;\n};\n\nconst sizeMapping: Record<TooltopIconSize, IconSize> = {\n small: 'sm',\n medium: 'md',\n large: 'lg',\n};\n\nconst Tooltip = ({ text, iconSize = 'small' }: TooltipProps) => (\n <MuiTooltip title={text}>\n <IconButton>\n <InfoOutlinedIcon size={sizeMapping[iconSize]} />\n </IconButton>\n </MuiTooltip>\n);\n\nexport default Tooltip;\n"],"names":["sizeMapping","small","medium","large","text","iconSize","_jsx","jsx","MuiTooltip","title","IconButton","children","InfoOutlinedIcon","size"],"mappings":"wOAKa,MAQPA,EAAiD,CACnDC,MAAO,KACPC,OAAQ,KACRC,MAAO,yBAXe,CAAC,QAAS,SAAU,yBAc9B,EAAGC,OAAMC,WAAW,WAChCC,EAAAC,IAACC,EAAW,CAAAC,MAAOL,WACfE,MAACI,EACG,CAAAC,SAAAL,EAAAC,IAACK,EAAiB,CAAAC,KAAMb,EAAYK"}
@@ -1,11 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
3
  declare const ICON_SIZES: readonly ["small", "medium", "large"];
4
- type IconSize = (typeof ICON_SIZES)[number];
4
+ type TooltopIconSize = (typeof ICON_SIZES)[number];
5
5
  type TooltipProps = {
6
6
  text: string;
7
- iconSize?: IconSize;
7
+ iconSize?: TooltopIconSize;
8
8
  };
9
9
  declare const Tooltip: ({ text, iconSize }: TooltipProps) => react_jsx_runtime.JSX.Element;
10
10
 
11
- export { ICON_SIZES, type IconSize, type TooltipProps, Tooltip as default };
11
+ export { ICON_SIZES, type TooltipProps, type TooltopIconSize, Tooltip as default };
@@ -1,2 +1,2 @@
1
- import{jsx as i}from"react/jsx-runtime";import t from"@mui/material/Tooltip";import m from"@mui/material/IconButton";import o from"@mui/icons-material/InfoOutlined";const r=["small","medium","large"],e=({text:r,iconSize:e="small"})=>i(t,{title:r,children:i(m,{children:i(o,{fontSize:e})})});export{r as ICON_SIZES,e as default};
1
+ import{jsx as m}from"react/jsx-runtime";import i from"@mui/material/Tooltip";import r from"@mui/material/IconButton";import t from"../../icons/InformationCircle/index.js";const e=["small","medium","large"],o={small:"sm",medium:"md",large:"lg"},l=({text:e,iconSize:l="small"})=>m(i,{title:e,children:m(r,{children:m(t,{size:o[l]})})});export{e as ICON_SIZES,l as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Tooltip/index.tsx"],"sourcesContent":["import MuiTooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';\n\nexport const ICON_SIZES = ['small', 'medium', 'large'] as const;\nexport type IconSize = (typeof ICON_SIZES)[number];\n\nexport type TooltipProps = {\n text: string;\n iconSize?: IconSize;\n};\n\nconst Tooltip = ({ text, iconSize = 'small' }: TooltipProps) => (\n <MuiTooltip title={text}>\n <IconButton>\n <InfoOutlinedIcon fontSize={iconSize} />\n </IconButton>\n </MuiTooltip>\n);\n\nexport default Tooltip;\n"],"names":["ICON_SIZES","Tooltip","text","iconSize","_jsx","MuiTooltip","title","children","IconButton","InfoOutlinedIcon","fontSize"],"mappings":"qKAIa,MAAAA,EAAa,CAAC,QAAS,SAAU,SAQxCC,EAAU,EAAGC,OAAMC,WAAW,WAChCC,EAACC,EAAU,CAACC,MAAOJ,EAAIK,SACnBH,EAACI,YACGJ,EAACK,EAAiB,CAAAC,SAAUP"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Tooltip/index.tsx"],"sourcesContent":["import MuiTooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\nimport InfoOutlinedIcon from '../../icons/InformationCircle';\nimport type { IconSize } from '../../icons/helpers/withSvgIcon';\n\nexport const ICON_SIZES = ['small', 'medium', 'large'] as const;\nexport type TooltopIconSize = (typeof ICON_SIZES)[number];\n\nexport type TooltipProps = {\n text: string;\n iconSize?: TooltopIconSize;\n};\n\nconst sizeMapping: Record<TooltopIconSize, IconSize> = {\n small: 'sm',\n medium: 'md',\n large: 'lg',\n};\n\nconst Tooltip = ({ text, iconSize = 'small' }: TooltipProps) => (\n <MuiTooltip title={text}>\n <IconButton>\n <InfoOutlinedIcon size={sizeMapping[iconSize]} />\n </IconButton>\n </MuiTooltip>\n);\n\nexport default Tooltip;\n"],"names":["ICON_SIZES","sizeMapping","small","medium","large","Tooltip","text","iconSize","_jsx","MuiTooltip","title","IconButton","children","InfoOutlinedIcon","size"],"mappings":"2KAKa,MAAAA,EAAa,CAAC,QAAS,SAAU,SAQxCC,EAAiD,CACnDC,MAAO,KACPC,OAAQ,KACRC,MAAO,MAGLC,EAAU,EAAGC,OAAMC,WAAW,WAChCC,EAACC,EAAW,CAAAC,MAAOJ,WACfE,EAACG,EACG,CAAAC,SAAAJ,EAACK,EAAiB,CAAAC,KAAMb,EAAYM"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./information-circle.svg.cjs.js");const r=require("../helpers/withSvgIcon.cjs.js")(e.ReactComponent);module.exports=r;
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/icons/InformationCircle/index.tsx"],"sourcesContent":["import { ReactComponent as InformationCircle } from './information-circle.svg';\nimport withSvgIcon from '../helpers/withSvgIcon';\n\nconst InformationCircleIcon = withSvgIcon(InformationCircle);\nexport default InformationCircleIcon;\n"],"names":["InformationCircleIcon","withSvgIcon","InformationCircle","ReactComponent"],"mappings":"8DAGA,MAAMA,0CAAwBC,CAAYC,EAAiBC"}
@@ -0,0 +1,6 @@
1
+ import * as react from 'react';
2
+ import { WithSvgIconProps } from '../helpers/withSvgIcon.js';
3
+
4
+ declare const InformationCircleIcon: react.FC<WithSvgIconProps>;
5
+
6
+ export { InformationCircleIcon as default };
@@ -0,0 +1,2 @@
1
+ import{ReactComponent as o}from"./information-circle.svg.js";import t from"../helpers/withSvgIcon.js";const r=t(o);export{r as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/icons/InformationCircle/index.tsx"],"sourcesContent":["import { ReactComponent as InformationCircle } from './information-circle.svg';\nimport withSvgIcon from '../helpers/withSvgIcon';\n\nconst InformationCircleIcon = withSvgIcon(InformationCircle);\nexport default InformationCircleIcon;\n"],"names":["InformationCircleIcon","withSvgIcon","InformationCircle"],"mappings":"sGAGA,MAAMA,EAAwBC,EAAYC"}
@@ -0,0 +1,2 @@
1
+ "use strict";function e(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var t,r=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(null,arguments)}exports.ReactComponent=function(e){return r.createElement("svg",n({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),t||(t=r.createElement("g",{id:"information-circle"},r.createElement("path",{id:"Icon",d:"M11.2422 17C11.2422 17.5523 11.6899 18 12.2422 18C12.7945 18 13.2422 17.5523 13.2422 17H11.2422ZM11.2422 10C10.6899 10 10.2422 10.4477 10.2422 11C10.2422 11.5523 10.6899 12 11.2422 12V10ZM11.992 7C11.4397 7 10.992 7.44772 10.992 8C10.992 8.55228 11.4397 9 11.992 9V7ZM12.001 9C12.5533 9 13.001 8.55228 13.001 8C13.001 7.44772 12.5533 7 12.001 7V9ZM23 12C23 5.92486 18.0751 1 12 1V3C16.9705 3 21 7.02944 21 12H23ZM12 1C5.92487 1 1 5.92487 1 12H3C3 7.02943 7.02943 3 12 3V1ZM1 12C1 18.0751 5.92486 23 12 23V21C7.02944 21 3 16.9705 3 12H1ZM12 23C18.0751 23 23 18.0751 23 12H21C21 16.9705 16.9705 21 12 21V23ZM13.2422 17V12H11.2422V17H13.2422ZM13.2422 12C13.2422 11.7926 13.2443 11.5364 13.215 11.3181C13.1817 11.0709 13.0928 10.7293 12.8028 10.4393L11.3886 11.8535C11.3246 11.7896 11.2813 11.7182 11.2556 11.6558C11.2333 11.6014 11.2308 11.5694 11.2328 11.5847C11.235 11.6006 11.2383 11.6376 11.2402 11.7136C11.2421 11.7891 11.2422 11.8784 11.2422 12H13.2422ZM12.8028 10.4393C12.5128 10.1493 12.171 10.0604 11.924 10.0272C11.7058 9.99788 11.4496 10 11.2422 10V12C11.3638 12 11.4532 12.0001 11.5286 12.002C11.6046 12.0039 11.6417 12.0072 11.6576 12.0094C11.6729 12.0114 11.6408 12.009 11.5865 11.9866C11.5241 11.9609 11.4526 11.9176 11.3886 11.8535L12.8028 10.4393ZM11.992 9H12.001V7H11.992V9Z",fill:"currentColor",fillOpacity:1}))))};
2
+ //# sourceMappingURL=information-circle.svg.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"information-circle.svg.cjs.js","sources":["../../../src/icons/InformationCircle/information-circle.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%20%20%20%3Cg%20id%3D%22information-circle%22%3E%20%20%20%20%20%20%20%20%3Cpath%20id%3D%22Icon%22%20d%3D%22M11.2422%2017C11.2422%2017.5523%2011.6899%2018%2012.2422%2018C12.7945%2018%2013.2422%2017.5523%2013.2422%2017H11.2422ZM11.2422%2010C10.6899%2010%2010.2422%2010.4477%2010.2422%2011C10.2422%2011.5523%2010.6899%2012%2011.2422%2012V10ZM11.992%207C11.4397%207%2010.992%207.44772%2010.992%208C10.992%208.55228%2011.4397%209%2011.992%209V7ZM12.001%209C12.5533%209%2013.001%208.55228%2013.001%208C13.001%207.44772%2012.5533%207%2012.001%207V9ZM23%2012C23%205.92486%2018.0751%201%2012%201V3C16.9705%203%2021%207.02944%2021%2012H23ZM12%201C5.92487%201%201%205.92487%201%2012H3C3%207.02943%207.02943%203%2012%203V1ZM1%2012C1%2018.0751%205.92486%2023%2012%2023V21C7.02944%2021%203%2016.9705%203%2012H1ZM12%2023C18.0751%2023%2023%2018.0751%2023%2012H21C21%2016.9705%2016.9705%2021%2012%2021V23ZM13.2422%2017V12H11.2422V17H13.2422ZM13.2422%2012C13.2422%2011.7926%2013.2443%2011.5364%2013.215%2011.3181C13.1817%2011.0709%2013.0928%2010.7293%2012.8028%2010.4393L11.3886%2011.8535C11.3246%2011.7896%2011.2813%2011.7182%2011.2556%2011.6558C11.2333%2011.6014%2011.2308%2011.5694%2011.2328%2011.5847C11.235%2011.6006%2011.2383%2011.6376%2011.2402%2011.7136C11.2421%2011.7891%2011.2422%2011.8784%2011.2422%2012H13.2422ZM12.8028%2010.4393C12.5128%2010.1493%2012.171%2010.0604%2011.924%2010.0272C11.7058%209.99788%2011.4496%2010%2011.2422%2010V12C11.3638%2012%2011.4532%2012.0001%2011.5286%2012.002C11.6046%2012.0039%2011.6417%2012.0072%2011.6576%2012.0094C11.6729%2012.0114%2011.6408%2012.009%2011.5865%2011.9866C11.5241%2011.9609%2011.4526%2011.9176%2011.3886%2011.8535L12.8028%2010.4393ZM11.992%209H12.001V7H11.992V9Z%22%20fill%3D%22currentColor%22%20fill-opacity%3D%221%22%2F%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\""],"names":["_g","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","props","React","createElement","fill","xmlns","viewBox","id","d","fillOpacity"],"mappings":"oRAAIA,wBACJ,SAASC,IAAa,OAAOA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAAK,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAAIF,UAAUD,GAAI,IAAK,IAAII,KAAKD,GAAG,CAAG,GAAEE,eAAeC,KAAKH,EAAGC,KAAOL,EAAEK,GAAKD,EAAEC,IAAO,OAAOL,CAAE,EAAIJ,EAASY,MAAM,KAAMN,UAAa,wBAEzP,SAA8BO,GACvD,OAAoBC,EAAMC,cAAc,MAAOf,EAAS,CACtDgB,KAAM,OACNC,MAAO,6BACPC,QAAS,aACRL,GAAQd,IAAOA,EAAkBe,EAAMC,cAAc,IAAK,CAC3DI,GAAI,sBACUL,EAAMC,cAAc,OAAQ,CAC1CI,GAAI,OACJC,EAAG,4wCACHJ,KAAM,eACNK,YAAa,MAEjB"}
@@ -0,0 +1,2 @@
1
+ import*as C from"react";var n;function r(){return r=Object.assign?Object.assign.bind():function(C){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)({}).hasOwnProperty.call(r,e)&&(C[e]=r[e])}return C},r.apply(null,arguments)}var e=function(e){return C.createElement("svg",r({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),n||(n=C.createElement("g",{id:"information-circle"},C.createElement("path",{id:"Icon",d:"M11.2422 17C11.2422 17.5523 11.6899 18 12.2422 18C12.7945 18 13.2422 17.5523 13.2422 17H11.2422ZM11.2422 10C10.6899 10 10.2422 10.4477 10.2422 11C10.2422 11.5523 10.6899 12 11.2422 12V10ZM11.992 7C11.4397 7 10.992 7.44772 10.992 8C10.992 8.55228 11.4397 9 11.992 9V7ZM12.001 9C12.5533 9 13.001 8.55228 13.001 8C13.001 7.44772 12.5533 7 12.001 7V9ZM23 12C23 5.92486 18.0751 1 12 1V3C16.9705 3 21 7.02944 21 12H23ZM12 1C5.92487 1 1 5.92487 1 12H3C3 7.02943 7.02943 3 12 3V1ZM1 12C1 18.0751 5.92486 23 12 23V21C7.02944 21 3 16.9705 3 12H1ZM12 23C18.0751 23 23 18.0751 23 12H21C21 16.9705 16.9705 21 12 21V23ZM13.2422 17V12H11.2422V17H13.2422ZM13.2422 12C13.2422 11.7926 13.2443 11.5364 13.215 11.3181C13.1817 11.0709 13.0928 10.7293 12.8028 10.4393L11.3886 11.8535C11.3246 11.7896 11.2813 11.7182 11.2556 11.6558C11.2333 11.6014 11.2308 11.5694 11.2328 11.5847C11.235 11.6006 11.2383 11.6376 11.2402 11.7136C11.2421 11.7891 11.2422 11.8784 11.2422 12H13.2422ZM12.8028 10.4393C12.5128 10.1493 12.171 10.0604 11.924 10.0272C11.7058 9.99788 11.4496 10 11.2422 10V12C11.3638 12 11.4532 12.0001 11.5286 12.002C11.6046 12.0039 11.6417 12.0072 11.6576 12.0094C11.6729 12.0114 11.6408 12.009 11.5865 11.9866C11.5241 11.9609 11.4526 11.9176 11.3886 11.8535L12.8028 10.4393ZM11.992 9H12.001V7H11.992V9Z",fill:"currentColor",fillOpacity:1}))))};export{e as ReactComponent};
2
+ //# sourceMappingURL=information-circle.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"information-circle.svg.js","sources":["../../../src/icons/InformationCircle/information-circle.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%20%20%20%3Cg%20id%3D%22information-circle%22%3E%20%20%20%20%20%20%20%20%3Cpath%20id%3D%22Icon%22%20d%3D%22M11.2422%2017C11.2422%2017.5523%2011.6899%2018%2012.2422%2018C12.7945%2018%2013.2422%2017.5523%2013.2422%2017H11.2422ZM11.2422%2010C10.6899%2010%2010.2422%2010.4477%2010.2422%2011C10.2422%2011.5523%2010.6899%2012%2011.2422%2012V10ZM11.992%207C11.4397%207%2010.992%207.44772%2010.992%208C10.992%208.55228%2011.4397%209%2011.992%209V7ZM12.001%209C12.5533%209%2013.001%208.55228%2013.001%208C13.001%207.44772%2012.5533%207%2012.001%207V9ZM23%2012C23%205.92486%2018.0751%201%2012%201V3C16.9705%203%2021%207.02944%2021%2012H23ZM12%201C5.92487%201%201%205.92487%201%2012H3C3%207.02943%207.02943%203%2012%203V1ZM1%2012C1%2018.0751%205.92486%2023%2012%2023V21C7.02944%2021%203%2016.9705%203%2012H1ZM12%2023C18.0751%2023%2023%2018.0751%2023%2012H21C21%2016.9705%2016.9705%2021%2012%2021V23ZM13.2422%2017V12H11.2422V17H13.2422ZM13.2422%2012C13.2422%2011.7926%2013.2443%2011.5364%2013.215%2011.3181C13.1817%2011.0709%2013.0928%2010.7293%2012.8028%2010.4393L11.3886%2011.8535C11.3246%2011.7896%2011.2813%2011.7182%2011.2556%2011.6558C11.2333%2011.6014%2011.2308%2011.5694%2011.2328%2011.5847C11.235%2011.6006%2011.2383%2011.6376%2011.2402%2011.7136C11.2421%2011.7891%2011.2422%2011.8784%2011.2422%2012H13.2422ZM12.8028%2010.4393C12.5128%2010.1493%2012.171%2010.0604%2011.924%2010.0272C11.7058%209.99788%2011.4496%2010%2011.2422%2010V12C11.3638%2012%2011.4532%2012.0001%2011.5286%2012.002C11.6046%2012.0039%2011.6417%2012.0072%2011.6576%2012.0094C11.6729%2012.0114%2011.6408%2012.009%2011.5865%2011.9866C11.5241%2011.9609%2011.4526%2011.9176%2011.3886%2011.8535L12.8028%2010.4393ZM11.992%209H12.001V7H11.992V9Z%22%20fill%3D%22currentColor%22%20fill-opacity%3D%221%22%2F%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\""],"names":["_g","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","SvgInformationCircle","props","React","createElement","fill","xmlns","viewBox","id","d","fillOpacity"],"mappings":"wBAAA,IAAIA,EACJ,SAASC,IAAa,OAAOA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAAK,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAAIF,UAAUD,GAAI,IAAK,IAAII,KAAKD,GAAG,CAAG,GAAEE,eAAeC,KAAKH,EAAGC,KAAOL,EAAEK,GAAKD,EAAEC,IAAO,OAAOL,CAAE,EAAIJ,EAASY,MAAM,KAAMN,UAAa,CAEjR,IAACO,EAAuB,SAA8BC,GACvD,OAAoBC,EAAMC,cAAc,MAAOhB,EAAS,CACtDiB,KAAM,OACNC,MAAO,6BACPC,QAAS,aACRL,GAAQf,IAAOA,EAAkBgB,EAAMC,cAAc,IAAK,CAC3DI,GAAI,sBACUL,EAAMC,cAAc,OAAQ,CAC1CI,GAAI,OACJC,EAAG,4wCACHJ,KAAM,eACNK,YAAa,MAEjB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/styles");module.exports=i=>{const s=t.styled(i)((({size:e="md"})=>({..."sm"===e&&{width:"16px",height:"16px"},..."md"===e&&{width:"24px",height:"24px"},..."lg"===e&&{width:"32px",height:"32px"}})));return({size:t,...i})=>e.jsx(s,{size:t,...i})};
1
+ "use strict";var e=require("react/jsx-runtime");const t={sm:"16px",md:"24px",lg:"32px"};module.exports=r=>({size:s="md",...i})=>{const x=t[s];return e.jsx(r,{height:x,width:x,...i})};
2
2
  //# sourceMappingURL=withSvgIcon.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withSvgIcon.cjs.js","sources":["../../../src/icons/helpers/withSvgIcon.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\n\ntype Size = 'sm' | 'md' | 'lg';\n\nexport interface WithSvgIconProps {\n size: Size;\n color?: string;\n}\n\nconst withSvgIcon = (WrappedComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>) => {\n const StyledSvg = styled(WrappedComponent)<WithSvgIconProps>(({ size = 'md' }) => ({\n ...(size === 'sm' && {\n width: '16px',\n height: '16px',\n }),\n ...(size === 'md' && {\n width: '24px',\n height: '24px',\n }),\n ...(size === 'lg' && {\n width: '32px',\n height: '32px',\n }),\n }));\n\n const ComponentWithSvgIcon: React.FC<WithSvgIconProps> = ({ size, ...props }) => {\n return <StyledSvg size={size} {...props} />;\n };\n\n return ComponentWithSvgIcon;\n};\n\nexport default withSvgIcon;\n"],"names":["WrappedComponent","StyledSvg","styled","size","width","height","props","_jsx"],"mappings":"iGASqBA,IACjB,MAAMC,EAAYC,EAAAA,OAAOF,EAAPE,EAA2C,EAAGC,OAAO,SAAY,IAClE,OAATA,GAAiB,CACjBC,MAAO,OACPC,OAAQ,WAEC,OAATF,GAAiB,CACjBC,MAAO,OACPC,OAAQ,WAEC,OAATF,GAAiB,CACjBC,MAAO,OACPC,OAAQ,YAQhB,MAJyD,EAAGF,UAASG,KAC1DC,EAAAA,IAACN,EAAU,CAAAE,KAAMA,KAAUG,GAGX"}
1
+ {"version":3,"file":"withSvgIcon.cjs.js","sources":["../../../src/icons/helpers/withSvgIcon.tsx"],"sourcesContent":["export type IconSize = 'sm' | 'md' | 'lg';\n\nexport interface WithSvgIconProps {\n size?: IconSize;\n color?: string;\n}\n\nconst sizeMapping: Record<string, string> = {\n sm: '16px',\n md: '24px',\n lg: '32px',\n};\n\nconst withSvgIcon = (WrappedComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>) => {\n const ComponentWithSvgIcon: React.FC<WithSvgIconProps> = ({ size = 'md', ...props }) => {\n const hwSize = sizeMapping[size];\n return <WrappedComponent height={hwSize} width={hwSize} {...props} />;\n };\n\n return ComponentWithSvgIcon;\n};\n\nexport default withSvgIcon;\n"],"names":["sizeMapping","sm","md","lg","WrappedComponent","size","props","hwSize","_jsx","jsx","height","width"],"mappings":"gDAOA,MAAMA,EAAsC,CACxCC,GAAI,OACJC,GAAI,OACJC,GAAI,uBAGaC,GACwC,EAAGC,OAAO,QAASC,MACxE,MAAMC,EAASP,EAAYK,GAC3B,OAAOG,EAACC,IAAAL,EAAiB,CAAAM,OAAQH,EAAQI,MAAOJ,KAAYD,GAAS"}
@@ -1,10 +1,10 @@
1
1
  import * as react from 'react';
2
2
 
3
- type Size = 'sm' | 'md' | 'lg';
3
+ type IconSize = 'sm' | 'md' | 'lg';
4
4
  interface WithSvgIconProps {
5
- size: Size;
5
+ size?: IconSize;
6
6
  color?: string;
7
7
  }
8
8
  declare const withSvgIcon: (WrappedComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>) => react.FC<WithSvgIconProps>;
9
9
 
10
- export { type WithSvgIconProps, withSvgIcon as default };
10
+ export { type IconSize, type WithSvgIconProps, withSvgIcon as default };
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import{styled as i}from"@mui/material/styles";const e=e=>{const m=i(e)((({size:t="md"})=>({..."sm"===t&&{width:"16px",height:"16px"},..."md"===t&&{width:"24px",height:"24px"},..."lg"===t&&{width:"32px",height:"32px"}})));return({size:i,...e})=>t(m,{size:i,...e})};export{e as default};
1
+ import{jsx as t}from"react/jsx-runtime";const e={sm:"16px",md:"24px",lg:"32px"},r=r=>({size:m="md",...s})=>{const i=e[m];return t(r,{height:i,width:i,...s})};export{r as default};
2
2
  //# sourceMappingURL=withSvgIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withSvgIcon.js","sources":["../../../src/icons/helpers/withSvgIcon.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\n\ntype Size = 'sm' | 'md' | 'lg';\n\nexport interface WithSvgIconProps {\n size: Size;\n color?: string;\n}\n\nconst withSvgIcon = (WrappedComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>) => {\n const StyledSvg = styled(WrappedComponent)<WithSvgIconProps>(({ size = 'md' }) => ({\n ...(size === 'sm' && {\n width: '16px',\n height: '16px',\n }),\n ...(size === 'md' && {\n width: '24px',\n height: '24px',\n }),\n ...(size === 'lg' && {\n width: '32px',\n height: '32px',\n }),\n }));\n\n const ComponentWithSvgIcon: React.FC<WithSvgIconProps> = ({ size, ...props }) => {\n return <StyledSvg size={size} {...props} />;\n };\n\n return ComponentWithSvgIcon;\n};\n\nexport default withSvgIcon;\n"],"names":["withSvgIcon","WrappedComponent","StyledSvg","styled","size","width","height","props","_jsx"],"mappings":"sFASA,MAAMA,EAAeC,IACjB,MAAMC,EAAYC,EAAOF,EAAPE,EAA2C,EAAGC,OAAO,SAAY,IAClE,OAATA,GAAiB,CACjBC,MAAO,OACPC,OAAQ,WAEC,OAATF,GAAiB,CACjBC,MAAO,OACPC,OAAQ,WAEC,OAATF,GAAiB,CACjBC,MAAO,OACPC,OAAQ,YAQhB,MAJyD,EAAGF,UAASG,KAC1DC,EAACN,EAAU,CAAAE,KAAMA,KAAUG,GAGX"}
1
+ {"version":3,"file":"withSvgIcon.js","sources":["../../../src/icons/helpers/withSvgIcon.tsx"],"sourcesContent":["export type IconSize = 'sm' | 'md' | 'lg';\n\nexport interface WithSvgIconProps {\n size?: IconSize;\n color?: string;\n}\n\nconst sizeMapping: Record<string, string> = {\n sm: '16px',\n md: '24px',\n lg: '32px',\n};\n\nconst withSvgIcon = (WrappedComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>) => {\n const ComponentWithSvgIcon: React.FC<WithSvgIconProps> = ({ size = 'md', ...props }) => {\n const hwSize = sizeMapping[size];\n return <WrappedComponent height={hwSize} width={hwSize} {...props} />;\n };\n\n return ComponentWithSvgIcon;\n};\n\nexport default withSvgIcon;\n"],"names":["sizeMapping","sm","md","lg","withSvgIcon","WrappedComponent","size","props","hwSize","_jsx","height","width"],"mappings":"wCAOA,MAAMA,EAAsC,CACxCC,GAAI,OACJC,GAAI,OACJC,GAAI,QAGFC,EAAeC,GACwC,EAAGC,OAAO,QAASC,MACxE,MAAMC,EAASR,EAAYM,GAC3B,OAAOG,EAACJ,EAAiB,CAAAK,OAAQF,EAAQG,MAAOH,KAAYD,GAAS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -78,11 +78,11 @@
78
78
  "@tanstack/react-query": "^5.62.0",
79
79
  "@testing-library/jest-dom": "6.6.3",
80
80
  "@testing-library/react": "15.0.7",
81
- "@types/react": "18.3.11",
82
- "@types/react-dom": "18.3.1",
81
+ "@types/react": "18.3.20",
82
+ "@types/react-dom": "18.3.5",
83
83
  "@typescript-eslint/eslint-plugin": "7.18.0",
84
84
  "@typescript-eslint/parser": "7.18.0",
85
- "@vitejs/plugin-react-swc": "3.7.1",
85
+ "@vitejs/plugin-react-swc": "3.8.1",
86
86
  "chromatic": "^11.25.2",
87
87
  "dotenv": "^16.4.5",
88
88
  "eslint": "9.12.0",
@@ -100,9 +100,9 @@
100
100
  "storybook": "^8.6.7",
101
101
  "tslib": "^2.8.0",
102
102
  "typescript": "5.4.5",
103
- "vite": "5.4.9",
103
+ "vite": "5.4.15",
104
104
  "vite-plugin-svgr": "^3.2.0",
105
- "vitest": "1.6.0"
105
+ "vitest": "1.6.1"
106
106
  },
107
107
  "scripts": {
108
108
  "dev": "vite",