@flipdish/portal-library 7.3.2 → 7.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("@mui/material/Box"),n=require("@mui/material/Button"),a=require("@mui/material/Divider"),r=require("@mui/material/IconButton"),s=require("@mui/material/styles"),o=require("@mui/material/Typography"),l=require("@mui/material/useMediaQuery"),d=require("../../icons/Add/index.cjs.js"),c=require("../../icons/ArrowLeft02/index.cjs.js"),p=require("../../utilities/renderUtilities.cjs.js"),g=require("../../utilities/validation.cjs.js"),m=require("@mui/material/Grid2"),h=require("../FDErrorBoundary/index.cjs.js"),u=require("../Spacer/index.cjs.js"),x=require("./DocumentTitle.cjs.js"),j=require("./FullWidthContainer.cjs.js");const b=1112,f=s.styled("div")((({theme:e,fluid:t})=>({maxWidth:t?"none":b,[e.breakpoints.down("laptop")]:{maxWidth:"none"},padding:e.spacing(2,4),position:"relative",minHeight:"100vh"}))),y=s.styled(m)((({theme:e})=>({[e.breakpoints.down("laptop")]:{width:"100%",paddingTop:e.spacing(2)}}))),k=s.styled(m)((({theme:e})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:e.spacing(3),paddingBottom:e.spacing(3),[e.breakpoints.down("laptop")]:{paddingTop:e.spacing(2),paddingBottom:e.spacing(3)}}))),v=s.styled(m)((({theme:e})=>({paddingTop:e.spacing(2),[e.breakpoints.up("laptop")]:{width:"100%",alignItems:"center"},[e.breakpoints.only("mobile")]:{marginLeft:e.spacing(-3),marginRight:e.spacing(-3),flexDirection:"column",alignItems:"flex-start"},[e.breakpoints.only("base")]:{marginLeft:e.spacing(-2),marginRight:e.spacing(-2),flexDirection:"column",alignItems:"flex-start"}}))),A=s.styled(m)((()=>({flexGrow:1}))),T=s.styled("div")((({theme:e})=>({maxWidth:b,paddingBottom:e.spacing(3),[e.breakpoints.down("laptop")]:{paddingBottom:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}))),L=s.styled(d)((({theme:e})=>({marginRight:e.spacing(1)}))),B=s.styled(r,{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("tablet")]:{marginLeft:e.spacing(-2)},[e.breakpoints.only("base")]:{marginLeft:e.spacing(-2)}}))),C=s.styled("div")((({theme:e})=>({maxWidth:b,marginLeft:e.spacing(6),marginRight:e.spacing(4),paddingBottom:e.spacing(2),[e.breakpoints.only("tablet")]:{marginLeft:12,marginRight:e.spacing(3)},[e.breakpoints.only("mobile")]:{marginLeft:e.spacing(3),marginRight:e.spacing(3),maxWidth:"none"},[e.breakpoints.only("base")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),maxWidth:"none"}}))),q=s.styled(m)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),w=s.styled(o)((()=>({lineHeight:"26px"}))),W=s.styled(o)((()=>({fontWeight:"bold"}))),I=s.styled(a)((({theme:e})=>({marginBottom:e.spacing(4)}))),S=({title:t})=>e.jsx(W,{component:"h2",variant:"h5",children:t}),_=s.styled("div")((({useAlternateBackground:e,theme:t})=>({backgroundColor:e?t.palette.semantic.background["background-alternate"]:t.palette.semantic.background["background-base"],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:r,caption:o,children:d,contextButtons:b,documentTitle:W,fluid:E=!1,fullWidth:R,header:P,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}=a,ee=s.useTheme(),te=l(ee.breakpoints.down("tablet")),ie=p.getMicroFrontendAttribute("data-portal-base-url")||"/",ne=!!F&&F.startsWith("https://"),ae=ne?F:void 0!==F?g.joinUrlPaths(ie,F):"";return e.jsx(_,{useAlternateBackground:K,children:e.jsxs(f,{fluid:E,children:[W&&e.jsx(x,{children:W}),N||null,e.jsxs(C,{children:[N&&e.jsx(u,{size:16,variant:"vertical"}),!z&&e.jsxs(e.Fragment,{children:[e.jsxs(k,{container:!0,alignItems:"center",direction:"column",children:[e.jsx(m,{container:!0,alignContent:"space-between",direction:"row",children:e.jsx(q,{children:b?.map((i=>e.jsx("div",{children:i},`context-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),e.jsxs(v,{container:!0,children:[(Z||V)&&e.jsx(i,{children:e.jsx(B,{"aria-label":"Back",component:"button","data-testid":"back_button",hasTitleComponent:!!G,onClick:()=>{V?U(-1):Z&&$||Z&&history.length<3?U(Z):U(-1)},children:e.jsx(c,{})})}),e.jsxs(A,{children:[G?e.jsx(G,{}):e.jsxs(i,{alignItems:"center",display:"flex",gap:2,children:[e.jsx(S,{title:D}),X]}),o&&e.jsx(w,{component:"h3",variant:"caption",children:o})]}),M&&e.jsxs(e.Fragment,{children:[te&&e.jsx(u,{size:56,variant:"vertical"}),e.jsx(y,{children:e.jsxs(n,{"data-testid":`Action-button-${r}`,fullWidth:!0,href:H||ne?ae:"",onClick:H||ne?()=>{}:()=>{U(F)},rel:H?"noopener noreferrer":void 0,target:H?"_blank":void 0,variant:"contained",children:[O&&e.jsx(L,{size:"sm"}),r]})})]}),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,{children:i})]},`custom-action-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))]})]}),!Q&&e.jsx(I,{})]}),e.jsxs(j,{fullWidth:R,children:[P?e.jsx(T,{children:P}):null,e.jsx(h,{identifier:W,somethingWentWrongText:Y,children:e.jsx(e.Fragment,{children:d})})]})]})]})})},exports.maxWidth=b;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("@mui/material/Box"),n=require("@mui/material/Button"),a=require("@mui/material/Divider"),r=require("@mui/material/IconButton"),s=require("@mui/material/styles"),o=require("@mui/material/Typography"),l=require("@mui/material/useMediaQuery"),d=require("../../icons/Add/index.cjs.js"),c=require("../../icons/ArrowLeft02/index.cjs.js"),p=require("../../utilities/renderUtilities.cjs.js"),g=require("../../utilities/validation.cjs.js"),m=require("@mui/material/Grid2"),h=require("../FDErrorBoundary/index.cjs.js"),u=require("../Spacer/index.cjs.js"),x=require("./DocumentTitle.cjs.js"),j=require("./FullWidthContainer.cjs.js");const f=1112,b=s.styled("div")((({theme:e,fluid:t})=>({maxWidth:t?"none":f,[e.breakpoints.down("laptop")]:{maxWidth:"none"},padding:e.spacing(2,4),position:"relative",minHeight:"100vh"}))),y=s.styled(m)((({theme:e})=>({[e.breakpoints.down("laptop")]:{width:"100%",paddingTop:e.spacing(2)}}))),k=s.styled(m)((({theme:e})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:e.spacing(3),paddingBottom:e.spacing(3),[e.breakpoints.down("laptop")]:{paddingTop:e.spacing(2),paddingBottom:e.spacing(3)}}))),v=s.styled(m,{shouldForwardProp:e=>"stackAboveTitle"!==e})((({theme:e,stackAboveTitle:t})=>({paddingTop:e.spacing(2),...t?{flexDirection:"column",alignItems:"flex-start"}:{},[e.breakpoints.up("laptop")]:{width:"100%",alignItems:t?"flex-start":"center",...t?{flexDirection:"column"}:{}},[e.breakpoints.only("mobile")]:{marginLeft:e.spacing(-3),marginRight:e.spacing(-3),flexDirection:"column",alignItems:"flex-start"},[e.breakpoints.only("base")]:{marginLeft:e.spacing(-2),marginRight:e.spacing(-2),flexDirection:"column",alignItems:"flex-start"}}))),A=s.styled(m)((()=>({flexGrow:1}))),T=s.styled("div")((({theme:e})=>({maxWidth:f,paddingBottom:e.spacing(3),[e.breakpoints.down("laptop")]:{paddingBottom:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}))),C=s.styled(d)((({theme:e})=>({marginRight:e.spacing(1)}))),L=s.styled(i)((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",marginBottom:e.spacing(1),marginLeft:e.spacing(-2)}))),B=s.styled(r,{shouldForwardProp:e=>"hasTitleComponent"!==e&&"alignWithContent"!==e})((({theme:e,hasTitleComponent:t,alignWithContent:i})=>{const n=t?e.spacing(-.75):e.spacing(-1.5),a=e.spacing(-1.5);return{marginTop:n,marginRight:e.spacing(.5),marginBottom:a,marginLeft:i?0:e.spacing(-1.5),padding:0,[e.breakpoints.only("tablet")]:{marginLeft:i?0:e.spacing(-2)},[e.breakpoints.only("base")]:{marginLeft:i?0:e.spacing(-2)}}})),W=s.styled("div")((({theme:e})=>({maxWidth:f,marginLeft:e.spacing(6),marginRight:e.spacing(4),paddingBottom:e.spacing(2),[e.breakpoints.only("tablet")]:{marginLeft:12,marginRight:e.spacing(3)},[e.breakpoints.only("mobile")]:{marginLeft:e.spacing(3),marginRight:e.spacing(3),maxWidth:"none"},[e.breakpoints.only("base")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),maxWidth:"none"}}))),w=s.styled(m)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),q=s.styled(o)((({theme:e})=>({lineHeight:"26px",color:e.palette.semantic.text["text-weak"]}))),I=s.styled(o)((()=>({fontWeight:"bold"}))),R=s.styled(a)((({theme:e})=>({marginBottom:e.spacing(4)}))),S=({title:t})=>e.jsx(I,{component:"h2",variant:"h5",children:t}),_=s.styled("div")((({useAlternateBackground:e,theme:t})=>({backgroundColor:e?t.palette.semantic.background["background-alternate"]:t.palette.semantic.background["background-base"],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:r,caption:o,children:d,contextButtons:f,documentTitle:I,fluid:E=!1,fullWidth:P,header:F,hideHeader:z,actionButtonLink:D,openLinkInNewTab:H=!1,pageHeader:N,showActionButton:M,showAddIcon:O,title:G,titleComponent:V,toPrevious:Z,toParent:$,toParentCaption:U,strictToParent:Q,navigate:J,hideDivider:K=!1,customActionButtons:X,useAlternateBackground:Y=!1,titleComponentAfter:ee,errorBoundarySomethingWentWrongText:te}=a,ie=s.useTheme(),ne=l(ie.breakpoints.down("tablet")),ae=p.getMicroFrontendAttribute("data-portal-base-url")||"/",re=!!D&&D.startsWith("https://"),se=re?D:void 0!==D?g.joinUrlPaths(ae,D):"";return e.jsx(_,{useAlternateBackground:Y,children:e.jsxs(b,{fluid:E,children:[I&&e.jsx(x,{children:I}),N||null,e.jsxs(W,{children:[N&&e.jsx(u,{size:16,variant:"vertical"}),!z&&e.jsxs(e.Fragment,{children:[e.jsxs(k,{container:!0,alignItems:"center",direction:"column",children:[e.jsx(m,{container:!0,alignContent:"space-between",direction:"row",children:e.jsx(w,{children:f?.map((i=>e.jsx("div",{children:i},`context-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),e.jsxs(v,{container:!0,stackAboveTitle:!!U,children:[($||Z)&&e.jsxs(L,{children:[e.jsx(B,{alignWithContent:!!U,"aria-label":"Back",component:"button","data-testid":"back_button",hasTitleComponent:!!V,onClick:()=>{Z?J(-1):$&&Q||$&&history.length<3?J($):J(-1)},children:e.jsx(c,{})}),U&&e.jsx(q,{component:"h3",variant:"caption",children:U})]}),e.jsxs(A,{children:[V?e.jsx(V,{}):e.jsxs(i,{alignItems:"center",display:"flex",gap:2,children:[e.jsx(S,{title:G}),ee]}),o&&e.jsx(q,{component:"h3",variant:"caption",children:o})]}),M&&e.jsxs(e.Fragment,{children:[ne&&e.jsx(u,{size:56,variant:"vertical"}),e.jsx(y,{children:e.jsxs(n,{"data-testid":`Action-button-${r}`,fullWidth:!0,href:H||re?se:"",onClick:H||re?()=>{}:()=>{J(D)},rel:H?"noopener noreferrer":void 0,target:H?"_blank":void 0,variant:"contained",children:[O&&e.jsx(C,{size:"sm"}),r]})})]}),X?.map((i=>e.jsxs("div",{children:[ne&&e.jsx(u,{size:56,variant:"vertical"}),!ne&&e.jsx(u,{size:16,variant:"vertical"}),e.jsx(y,{children:i})]},`custom-action-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))]})]}),!K&&e.jsx(R,{})]}),e.jsxs(j,{fullWidth:P,children:[F?e.jsx(T,{children:F}):null,e.jsx(h,{identifier:I,somethingWentWrongText:te,children:e.jsx(e.Fragment,{children:d})})]})]})]})})},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 Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Divider from '@mui/material/Divider';\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 Add from '../../icons/Add';\nimport ArrowLeft02 from '../../icons/ArrowLeft02';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Grid from '../atoms/Grid';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Spacer from '../Spacer';\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\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('laptop')]: {\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('laptop')]: {\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('laptop')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n [theme.breakpoints.up('laptop')]: {\n width: '100%',\n alignItems: 'center',\n },\n [theme.breakpoints.only('mobile')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n flexDirection: 'column',\n alignItems: 'flex-start',\n },\n [theme.breakpoints.only('base')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n flexDirection: 'column',\n alignItems: 'flex-start',\n },\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('laptop')]: {\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('tablet')]: {\n marginLeft: theme.spacing(-2),\n },\n\n [theme.breakpoints.only('base')]: {\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('tablet')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('mobile')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('base')]: {\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: ReactNode | string }): JSX.Element => (\n <StyledPageTitle component=\"h2\" variant=\"h5\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(\n ({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground\n ? theme.palette.semantic.background['background-alternate']\n : theme.palette.semantic.background['background-base'],\n width: '100%',\n height: '100%',\n }),\n);\n\nexport interface 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): JSX.Element => {\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\n const isMobile = useMediaQuery(theme.breakpoints.down('tablet'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps: boolean = !!actionButtonLink && actionButtonLink.startsWith('https://');\n const getActionButtonLink = (): string => {\n if (actionButtonWithHttps) {\n return actionButtonLink as string;\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 container alignContent=\"space-between\" direction=\"row\">\n <StyledHeaderContainer>\n {contextButtons?.map((button) => (\n <div\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\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 container>\n {(toParent || toPrevious) && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n component={'button'}\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\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>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box alignItems=\"center\" display=\"flex\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption component=\"h3\" variant=\"caption\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid>\n <Button\n data-testid={`Action-button-${actionBtnTitle}`}\n fullWidth={true}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps\n ? (): void => {\n navigate(actionButtonLink);\n }\n : (): void => {}\n }\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n target={openLinkInNewTab ? '_blank' : undefined}\n variant=\"contained\"\n >\n {showAddIcon && <StyledAdd size=\"sm\" />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\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>{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\n identifier={documentTitle}\n somethingWentWrongText={errorBoundarySomethingWentWrongText}\n >\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\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","up","only","marginLeft","marginRight","flexDirection","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","StyledInnerWrapper","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","component","variant","children","StyledPageContainer","useAlternateBackground","backgroundColor","palette","semantic","background","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","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowLeft02","gap","Button","href","rel","target","FullWidthContainer","FDErrorBoundary","identifier","somethingWentWrongText"],"mappings":"mvBAoBO,MAIMA,EAAW,KAGlBC,EAAgBC,EAAAA,OAAO,MAAPA,EAAkC,EAAGC,QAAOC,YAAO,CACvEJ,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAME,YAAYC,KAAK,WAAY,CAClCN,SAAU,QAEZO,QAASJ,EAAMK,QAAQ,EAAG,GAC1BC,SAAU,WACVC,UAAW,YAGPC,EAAyBT,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAO,CACpD,CAACA,EAAME,YAAYC,KAAK,WAAY,CAClCO,MAAO,OACPC,WAAYX,EAAMK,QAAQ,QAIxBO,EAAeb,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAO,CAC1Ca,SAAU,SACVC,WAAY,aACZH,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,WAAY,CAClCQ,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,QAI3BW,EAAuBjB,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAO,CAClDW,WAAYX,EAAMK,QAAQ,GAC1B,CAACL,EAAME,YAAYe,GAAG,WAAY,CAChCP,MAAO,OACPI,WAAY,UAEd,CAACd,EAAME,YAAYgB,KAAK,WAAY,CAClCC,WAAYnB,EAAMK,YAClBe,YAAapB,EAAMK,YACnBgB,cAAe,SACfP,WAAY,cAEd,CAACd,EAAME,YA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AAS,CAACC,MAAOA,IACjBiC,KAGJnB,GACCb,MAACV,EAAa,CAACW,UAAU,KAAKC,QAAQ,UAASC,SAC5CU,OAKNS,GACCsB,EAAAA,KAAAI,EAAAA,SAAA,CAAA7C,SAAA,CACGgC,IAAYnC,EAAAA,IAAC8C,EAAM,CAACC,KAAM,GAAI7C,QAAQ,aACvCF,EAAAA,IAACzC,EAAsB,CAAA4C,SACrByC,OAACkB,EAAM,CAAA,cACQ,iBAAiBlD,IAC9BI,WAAW,EACX+C,KAAM3C,GAAoBmB,GAAwBE,GAAwB,GAC1EgB,QACGrC,GAAqBmB,GAIlB,OAHA,KACEV,EAASV,IAIjB6C,IAAK5C,EAAmB,2BAAwBsB,EAChDuB,OAAQ7C,EAAmB,cAAWsB,EACtCxC,QAAQ,YAAWC,SAAA,CAElBoB,GAAevB,EAAAA,IAACtB,GAAUqE,KAAK,OAC/BnC,UAKRmB,GAAqBqB,KAAKC,GACzBT,EAAAA,KAAA,MAAA,CAAAzC,SAAA,CAIGgC,IAAYnC,EAAAA,IAAC8C,EAAM,CAACC,KAAM,GAAI7C,QAAQ,cACrCiC,IAAYnC,EAAAA,IAAC8C,EAAM,CAACC,KAAM,GAAI7C,QAAQ,aACxCF,EAAAA,IAACzC,YAAwB8F,MAJpB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO1C,QAAQ,gBAAkB0C,EAAO1C,OAAOR,SAAW,uBAS5H2B,GAAe9B,EAAAA,IAACL,EAAiB,OAGvCiD,EAAAA,KAACsB,GAAmBlD,UAAWA,EAASb,SAAA,CACrCc,EAASjB,EAAAA,IAACzB,EAAgB,CAAA4B,SAAEc,IAA6B,KAC1DjB,EAAAA,IAACmE,EAAe,CACdC,WAAYrD,EACZsD,uBAAwBpC,WAGxBjC,EAAAA,IAAAgD,WAAA,CAAA7C,SAAGA"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode } from 'react';\n\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Divider from '@mui/material/Divider';\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 Add from '../../icons/Add';\nimport ArrowLeft02 from '../../icons/ArrowLeft02';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Grid from '../atoms/Grid';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Spacer from '../Spacer';\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\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('laptop')]: {\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('laptop')]: {\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('laptop')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid, {\n shouldForwardProp: (prop) => prop !== 'stackAboveTitle',\n})<{ stackAboveTitle?: boolean }>(({ theme, stackAboveTitle }) => ({\n paddingTop: theme.spacing(2),\n ...(stackAboveTitle ? { flexDirection: 'column', alignItems: 'flex-start' } : {}),\n [theme.breakpoints.up('laptop')]: {\n width: '100%',\n alignItems: stackAboveTitle ? 'flex-start' : 'center',\n ...(stackAboveTitle ? { flexDirection: 'column' } : {}),\n },\n [theme.breakpoints.only('mobile')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n flexDirection: 'column',\n alignItems: 'flex-start',\n },\n [theme.breakpoints.only('base')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n flexDirection: 'column',\n alignItems: 'flex-start',\n },\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('laptop')]: {\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 StyledBackRow = styled(Box)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n marginBottom: theme.spacing(1),\n marginLeft: theme.spacing(-2),\n}));\n\nconst StyledBackButton = styled(IconButton, {\n shouldForwardProp: (prop) => prop !== 'hasTitleComponent' && prop !== 'alignWithContent',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n})<{ hasTitleComponent: boolean; component: any; alignWithContent?: boolean }>(\n ({ theme, hasTitleComponent, alignWithContent }) => {\n const marginTop = hasTitleComponent ? theme.spacing(-0.75) : theme.spacing(-1.5);\n const marginBottom = theme.spacing(-1.5);\n const marginRight = theme.spacing(0.5);\n const marginLeft = alignWithContent ? 0 : theme.spacing(-1.5);\n\n return {\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n padding: 0,\n\n [theme.breakpoints.only('tablet')]: {\n marginLeft: alignWithContent ? 0 : theme.spacing(-2),\n },\n\n [theme.breakpoints.only('base')]: {\n marginLeft: alignWithContent ? 0 : theme.spacing(-2),\n },\n };\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('tablet')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('mobile')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('base')]: {\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 }>(({ theme }) => ({\n lineHeight: '26px',\n color: theme.palette.semantic.text['text-weak'],\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: ReactNode | string }): JSX.Element => (\n <StyledPageTitle component=\"h2\" variant=\"h5\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(\n ({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground\n ? theme.palette.semantic.background['background-alternate']\n : theme.palette.semantic.background['background-base'],\n width: '100%',\n height: '100%',\n }),\n);\n\nexport interface 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 toParentCaption?: 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): JSX.Element => {\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 toParentCaption,\n strictToParent,\n navigate,\n hideDivider = false,\n customActionButtons,\n useAlternateBackground = false,\n titleComponentAfter,\n errorBoundarySomethingWentWrongText,\n } = props;\n const theme = useTheme();\n\n const isMobile = useMediaQuery(theme.breakpoints.down('tablet'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps: boolean = !!actionButtonLink && actionButtonLink.startsWith('https://');\n const getActionButtonLink = (): string => {\n if (actionButtonWithHttps) {\n return actionButtonLink as string;\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 container alignContent=\"space-between\" direction=\"row\">\n <StyledHeaderContainer>\n {contextButtons?.map((button) => (\n <div\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\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 container stackAboveTitle={!!toParentCaption}>\n {(toParent || toPrevious) && (\n <StyledBackRow>\n <StyledBackButton\n alignWithContent={!!toParentCaption}\n aria-label=\"Back\"\n component={'button'}\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\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 {toParentCaption && (\n <StyledCaption component=\"h3\" variant=\"caption\">\n {toParentCaption}\n </StyledCaption>\n )}\n </StyledBackRow>\n )}\n\n <StyledTitleSection>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box alignItems=\"center\" display=\"flex\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption component=\"h3\" variant=\"caption\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid>\n <Button\n data-testid={`Action-button-${actionBtnTitle}`}\n fullWidth={true}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps\n ? (): void => {\n navigate(actionButtonLink);\n }\n : (): void => {}\n }\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n target={openLinkInNewTab ? '_blank' : undefined}\n variant=\"contained\"\n >\n {showAddIcon && <StyledAdd size=\"sm\" />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\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>{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\n identifier={documentTitle}\n somethingWentWrongText={errorBoundarySomethingWentWrongText}\n >\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\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","shouldForwardProp","prop","stackAboveTitle","flexDirection","up","only","marginLeft","marginRight","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","StyledBackRow","Box","display","justifyContent","marginBottom","StyledBackButton","IconButton","hasTitleComponent","alignWithContent","marginTop","StyledInnerWrapper","StyledHeaderContainer","StyledCaption","Typography","lineHeight","color","palette","semantic","text","StyledPageTitle","fontWeight","StyledPageDivider","Divider","PageTitle","title","_jsx","component","variant","children","StyledPageContainer","useAlternateBackground","backgroundColor","background","height","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","toParentCaption","strictToParent","navigate","hideDivider","customActionButtons","titleComponentAfter","errorBoundarySomethingWentWrongText","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","alignContent","map","button","React","isValidElement","onClick","history","length","ArrowLeft02","gap","Button","href","rel","target","FullWidthContainer","FDErrorBoundary","identifier","somethingWentWrongText"],"mappings":"mvBAoBO,MAIMA,EAAW,KAGlBC,EAAgBC,EAAAA,OAAO,MAAPA,EAAkC,EAAGC,QAAOC,YAAO,CACvEJ,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAME,YAAYC,KAAK,WAAY,CAClCN,SAAU,QAEZO,QAASJ,EAAMK,QAAQ,EAAG,GAC1BC,SAAU,WACVC,UAAW,YAGPC,EAAyBT,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAO,CACpD,CAACA,EAAME,YAAYC,KAAK,WAAY,CAClCO,MAAO,OACPC,WAAYX,EAAMK,QAAQ,QAIxBO,EAAeb,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAO,CAC1Ca,SAAU,SACVC,WAAY,aACZH,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,WAAY,CAClCQ,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,QAI3BW,EAAuBjB,EAAAA,OAAOU,EAAM,CACxCQ,kBAAoBC,GAAkB,oBAATA,GADFnB,EAEK,EAAGC,QAAOmB,sBAAiB,CAC3DR,WAAYX,EAAMK,QAAQ,MACtBc,EAAkB,CAAEC,cAAe,SAAUN,WAAY,cAAiB,GAC9E,CAACd,EAAME,YAAYmB,GAAG,WAAY,CAChCX,MAAO,OACPI,WAAYK,EAAkB,aAAe,YACzCA,EAAkB,CAAEC,cAAe,UAAa,CAAA,GAEtD,CAACpB,EAAME,YAAYoB,KAAK,WAAY,CAClCC,WAAYvB,EAAMK,YAClBmB,YAAaxB,EAAMK,YACnBe,cAAe,SACfN,WAAY,cAEd,CAAC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QAAQ,aACxCF,EAAAA,IAACjD,YAAwBqG,MAJpB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO3C,QAAQ,gBAAkB2C,EAAO3C,OAAON,SAAW,uBAS5H0B,GAAe7B,EAAAA,IAACJ,EAAiB,OAGvC+C,EAAAA,KAACqB,GAAmBlD,UAAWA,EAASX,SAAA,CACrCY,EAASf,EAAAA,IAAC9B,EAAgB,CAAAiC,SAAEY,IAA6B,KAC1Df,EAAAA,IAACiE,EAAe,CACdC,WAAYrD,EACZsD,uBAAwBnC,YAGxBhC,EAAAA,IAAA+C,WAAA,CAAA5C,SAAGA"}
@@ -27,6 +27,7 @@ interface Props {
27
27
  titleComponentAfter?: ReactNode;
28
28
  toPrevious?: boolean;
29
29
  toParent?: string;
30
+ toParentCaption?: string;
30
31
  strictToParent?: boolean;
31
32
  openLinkInNewTab?: boolean;
32
33
  navigate: (to: any) => void;
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import e from"react";import a from"@mui/material/Box";import o from"@mui/material/Button";import r from"@mui/material/Divider";import l from"@mui/material/IconButton";import{styled as d,useTheme as p}from"@mui/material/styles";import c from"@mui/material/Typography";import m from"@mui/material/useMediaQuery";import s from"../../icons/Add/index.js";import g from"../../icons/ArrowLeft02/index.js";import{getMicroFrontendAttribute as h}from"../../utilities/renderUtilities.js";import{joinUrlPaths as u}from"../../utilities/validation.js";import f from"@mui/material/Grid2";import b from"../FDErrorBoundary/index.js";import k from"../Spacer/index.js";import x from"./DocumentTitle.js";import v from"./FullWidthContainer.js";const B="horizontal-content-space",w="left-horizontal-content-space",y="right-horizontal-content-space",W="vertical-content-space",T=1112,L=d("div")((({theme:t,fluid:i})=>({maxWidth:i?"none":T,[t.breakpoints.down("laptop")]:{maxWidth:"none"},padding:t.spacing(2,4),position:"relative",minHeight:"100vh"}))),C=d(f)((({theme:t})=>({[t.breakpoints.down("laptop")]:{width:"100%",paddingTop:t.spacing(2)}}))),j=d(f)((({theme:t})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:t.spacing(3),paddingBottom:t.spacing(3),[t.breakpoints.down("laptop")]:{paddingTop:t.spacing(2),paddingBottom:t.spacing(3)}}))),A=d(f)((({theme:t})=>({paddingTop:t.spacing(2),[t.breakpoints.up("laptop")]:{width:"100%",alignItems:"center"},[t.breakpoints.only("mobile")]:{marginLeft:t.spacing(-3),marginRight:t.spacing(-3),flexDirection:"column",alignItems:"flex-start"},[t.breakpoints.only("base")]:{marginLeft:t.spacing(-2),marginRight:t.spacing(-2),flexDirection:"column",alignItems:"flex-start"}}))),I=d(f)((()=>({flexGrow:1}))),z=d("div")((({theme:t})=>({maxWidth:T,paddingBottom:t.spacing(3),[t.breakpoints.down("laptop")]:{paddingBottom:t.spacing(2),paddingLeft:t.spacing(2),paddingRight:t.spacing(2)}}))),R=d(s)((({theme:t})=>({marginRight:t.spacing(1)}))),D=d(l,{shouldForwardProp:t=>"hasTitleComponent"!==t})((({theme:t,hasTitleComponent:i})=>({margin:i?t.spacing(-.75,2,-1.5,-1.5):t.spacing(-1.5,2,-1.5,-1.5),[t.breakpoints.only("tablet")]:{marginLeft:t.spacing(-2)},[t.breakpoints.only("base")]:{marginLeft:t.spacing(-2)}}))),H=d("div")((({theme:t})=>({maxWidth:T,marginLeft:t.spacing(6),marginRight:t.spacing(4),paddingBottom:t.spacing(2),[t.breakpoints.only("tablet")]:{marginLeft:12,marginRight:t.spacing(3)},[t.breakpoints.only("mobile")]:{marginLeft:t.spacing(3),marginRight:t.spacing(3),maxWidth:"none"},[t.breakpoints.only("base")]:{marginLeft:t.spacing(2),marginRight:t.spacing(2),maxWidth:"none"}}))),P=d(f)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),E=d(c)((()=>({lineHeight:"26px"}))),F=d(c)((()=>({fontWeight:"bold"}))),G=d(r)((({theme:t})=>({marginBottom:t.spacing(4)}))),$=({title:i})=>t(F,{component:"h2",variant:"h5",children:i}),S=d("div")((({useAlternateBackground:t,theme:i})=>({backgroundColor:t?i.palette.semantic.background["background-alternate"]:i.palette.semantic.background["background-base"],width:"100%",height:"100%"}))),V=r=>{const{actionBtnTitle:l,caption:d,children:c,contextButtons:s,documentTitle:B,fluid:w=!1,fullWidth:y,header:W,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:tt,errorBoundarySomethingWentWrongText:it}=r,nt=p(),et=m(nt.breakpoints.down("tablet")),at=h("data-portal-base-url")||"/",ot=!!F&&F.startsWith("https://"),rt=ot?F:void 0!==F?u(at,F):"";return t(S,{useAlternateBackground:Z,children:i(L,{fluid:w,children:[B&&t(x,{children:B}),_||null,i(H,{children:[_&&t(k,{size:16,variant:"vertical"}),!T&&i(n,{children:[i(j,{container:!0,alignItems:"center",direction:"column",children:[t(f,{container:!0,alignContent:"space-between",direction:"row",children:t(P,{children:s?.map((i=>t("div",{children:i},`context-button-${e.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),i(A,{container:!0,children:[(J||q)&&t(a,{children:t(D,{"aria-label":"Back",component:"button","data-testid":"back_button",hasTitleComponent:!!U,onClick:()=>{q?O(-1):J&&K||J&&history.length<3?O(J):O(-1)},children:t(g,{})})}),i(I,{children:[U?t(U,{}):i(a,{alignItems:"center",display:"flex",gap:2,children:[t($,{title:Q}),tt]}),d&&t(E,{component:"h3",variant:"caption",children:d})]}),M&&i(n,{children:[et&&t(k,{size:56,variant:"vertical"}),t(C,{children:i(o,{"data-testid":`Action-button-${l}`,fullWidth:!0,href:V||ot?rt:"",onClick:V||ot?()=>{}:()=>{O(F)},rel:V?"noopener noreferrer":void 0,target:V?"_blank":void 0,variant:"contained",children:[N&&t(R,{size:"sm"}),l]})})]}),Y?.map((n=>i("div",{children:[et&&t(k,{size:56,variant:"vertical"}),!et&&t(k,{size:16,variant:"vertical"}),t(C,{children:n})]},`custom-action-button-${e.isValidElement(n)?n.props?.["data-testid"]||n.props?.children:"fallback"}`)))]})]}),!X&&t(G,{})]}),i(v,{fullWidth:y,children:[W?t(z,{children:W}):null,t(b,{identifier:B,somethingWentWrongText:it,children:t(n,{children:c})})]})]})]})})};export{B as HORIZONTAL_SPACE_CLASSNAME,w as LEFT_HORIZONTAL_SPACE_CLASSNAME,$ as PageTitle,y as RIGHT_HORIZONTAL_SPACE_CLASSNAME,W as VERTICAL_SPACE_CLASSNAME,V as default,T as maxWidth};
1
+ import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import e from"react";import a from"@mui/material/Box";import o from"@mui/material/Button";import r from"@mui/material/Divider";import l from"@mui/material/IconButton";import{styled as c,useTheme as p}from"@mui/material/styles";import s from"@mui/material/Typography";import d from"@mui/material/useMediaQuery";import m from"../../icons/Add/index.js";import g from"../../icons/ArrowLeft02/index.js";import{getMicroFrontendAttribute as h}from"../../utilities/renderUtilities.js";import{joinUrlPaths as u}from"../../utilities/validation.js";import f from"@mui/material/Grid2";import b from"../FDErrorBoundary/index.js";import x from"../Spacer/index.js";import k from"./DocumentTitle.js";import v from"./FullWidthContainer.js";const B="horizontal-content-space",w="left-horizontal-content-space",W="right-horizontal-content-space",y="vertical-content-space",T=1112,C=c("div")((({theme:t,fluid:i})=>({maxWidth:i?"none":T,[t.breakpoints.down("laptop")]:{maxWidth:"none"},padding:t.spacing(2,4),position:"relative",minHeight:"100vh"}))),L=c(f)((({theme:t})=>({[t.breakpoints.down("laptop")]:{width:"100%",paddingTop:t.spacing(2)}}))),A=c(f)((({theme:t})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:t.spacing(3),paddingBottom:t.spacing(3),[t.breakpoints.down("laptop")]:{paddingTop:t.spacing(2),paddingBottom:t.spacing(3)}}))),j=c(f,{shouldForwardProp:t=>"stackAboveTitle"!==t})((({theme:t,stackAboveTitle:i})=>({paddingTop:t.spacing(2),...i?{flexDirection:"column",alignItems:"flex-start"}:{},[t.breakpoints.up("laptop")]:{width:"100%",alignItems:i?"flex-start":"center",...i?{flexDirection:"column"}:{}},[t.breakpoints.only("mobile")]:{marginLeft:t.spacing(-3),marginRight:t.spacing(-3),flexDirection:"column",alignItems:"flex-start"},[t.breakpoints.only("base")]:{marginLeft:t.spacing(-2),marginRight:t.spacing(-2),flexDirection:"column",alignItems:"flex-start"}}))),I=c(f)((()=>({flexGrow:1}))),R=c("div")((({theme:t})=>({maxWidth:T,paddingBottom:t.spacing(3),[t.breakpoints.down("laptop")]:{paddingBottom:t.spacing(2),paddingLeft:t.spacing(2),paddingRight:t.spacing(2)}}))),z=c(m)((({theme:t})=>({marginRight:t.spacing(1)}))),D=c(a)((({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",marginBottom:t.spacing(1),marginLeft:t.spacing(-2)}))),P=c(l,{shouldForwardProp:t=>"hasTitleComponent"!==t&&"alignWithContent"!==t})((({theme:t,hasTitleComponent:i,alignWithContent:n})=>{const e=i?t.spacing(-.75):t.spacing(-1.5),a=t.spacing(-1.5);return{marginTop:e,marginRight:t.spacing(.5),marginBottom:a,marginLeft:n?0:t.spacing(-1.5),padding:0,[t.breakpoints.only("tablet")]:{marginLeft:n?0:t.spacing(-2)},[t.breakpoints.only("base")]:{marginLeft:n?0:t.spacing(-2)}}})),F=c("div")((({theme:t})=>({maxWidth:T,marginLeft:t.spacing(6),marginRight:t.spacing(4),paddingBottom:t.spacing(2),[t.breakpoints.only("tablet")]:{marginLeft:12,marginRight:t.spacing(3)},[t.breakpoints.only("mobile")]:{marginLeft:t.spacing(3),marginRight:t.spacing(3),maxWidth:"none"},[t.breakpoints.only("base")]:{marginLeft:t.spacing(2),marginRight:t.spacing(2),maxWidth:"none"}}))),H=c(f)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),E=c(s)((({theme:t})=>({lineHeight:"26px",color:t.palette.semantic.text["text-weak"]}))),G=c(s)((()=>({fontWeight:"bold"}))),$=c(r)((({theme:t})=>({marginBottom:t.spacing(4)}))),S=({title:i})=>t(G,{component:"h2",variant:"h5",children:i}),V=c("div")((({useAlternateBackground:t,theme:i})=>({backgroundColor:t?i.palette.semantic.background["background-alternate"]:i.palette.semantic.background["background-base"],width:"100%",height:"100%"}))),_=r=>{const{actionBtnTitle:l,caption:c,children:s,contextButtons:m,documentTitle:B,fluid:w=!1,fullWidth:W,header:y,hideHeader:T,actionButtonLink:G,openLinkInNewTab:_=!1,pageHeader:M,showActionButton:N,showAddIcon:Q,title:U,titleComponent:q,toPrevious:J,toParent:K,toParentCaption:O,strictToParent:X,navigate:Y,hideDivider:Z=!1,customActionButtons:tt,useAlternateBackground:it=!1,titleComponentAfter:nt,errorBoundarySomethingWentWrongText:et}=r,at=p(),ot=d(at.breakpoints.down("tablet")),rt=h("data-portal-base-url")||"/",lt=!!G&&G.startsWith("https://"),ct=lt?G:void 0!==G?u(rt,G):"";return t(V,{useAlternateBackground:it,children:i(C,{fluid:w,children:[B&&t(k,{children:B}),M||null,i(F,{children:[M&&t(x,{size:16,variant:"vertical"}),!T&&i(n,{children:[i(A,{container:!0,alignItems:"center",direction:"column",children:[t(f,{container:!0,alignContent:"space-between",direction:"row",children:t(H,{children:m?.map((i=>t("div",{children:i},`context-button-${e.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),i(j,{container:!0,stackAboveTitle:!!O,children:[(K||J)&&i(D,{children:[t(P,{alignWithContent:!!O,"aria-label":"Back",component:"button","data-testid":"back_button",hasTitleComponent:!!q,onClick:()=>{J?Y(-1):K&&X||K&&history.length<3?Y(K):Y(-1)},children:t(g,{})}),O&&t(E,{component:"h3",variant:"caption",children:O})]}),i(I,{children:[q?t(q,{}):i(a,{alignItems:"center",display:"flex",gap:2,children:[t(S,{title:U}),nt]}),c&&t(E,{component:"h3",variant:"caption",children:c})]}),N&&i(n,{children:[ot&&t(x,{size:56,variant:"vertical"}),t(L,{children:i(o,{"data-testid":`Action-button-${l}`,fullWidth:!0,href:_||lt?ct:"",onClick:_||lt?()=>{}:()=>{Y(G)},rel:_?"noopener noreferrer":void 0,target:_?"_blank":void 0,variant:"contained",children:[Q&&t(z,{size:"sm"}),l]})})]}),tt?.map((n=>i("div",{children:[ot&&t(x,{size:56,variant:"vertical"}),!ot&&t(x,{size:16,variant:"vertical"}),t(L,{children:n})]},`custom-action-button-${e.isValidElement(n)?n.props?.["data-testid"]||n.props?.children:"fallback"}`)))]})]}),!Z&&t($,{})]}),i(v,{fullWidth:W,children:[y?t(R,{children:y}):null,t(b,{identifier:B,somethingWentWrongText:et,children:t(n,{children:s})})]})]})]})})};export{B as HORIZONTAL_SPACE_CLASSNAME,w as LEFT_HORIZONTAL_SPACE_CLASSNAME,S as PageTitle,W as RIGHT_HORIZONTAL_SPACE_CLASSNAME,y as VERTICAL_SPACE_CLASSNAME,_ 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 Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Divider from '@mui/material/Divider';\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 Add from '../../icons/Add';\nimport ArrowLeft02 from '../../icons/ArrowLeft02';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Grid from '../atoms/Grid';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Spacer from '../Spacer';\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\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('laptop')]: {\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('laptop')]: {\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('laptop')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n [theme.breakpoints.up('laptop')]: {\n width: '100%',\n alignItems: 'center',\n },\n [theme.breakpoints.only('mobile')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n flexDirection: 'column',\n alignItems: 'flex-start',\n },\n [theme.breakpoints.only('base')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n flexDirection: 'column',\n alignItems: 'flex-start',\n },\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('laptop')]: {\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('tablet')]: {\n marginLeft: theme.spacing(-2),\n },\n\n [theme.breakpoints.only('base')]: {\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('tablet')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('mobile')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('base')]: {\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: ReactNode | string }): JSX.Element => (\n <StyledPageTitle component=\"h2\" variant=\"h5\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(\n ({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground\n ? theme.palette.semantic.background['background-alternate']\n : theme.palette.semantic.background['background-base'],\n width: '100%',\n height: '100%',\n }),\n);\n\nexport interface 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): JSX.Element => {\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\n const isMobile = useMediaQuery(theme.breakpoints.down('tablet'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps: boolean = !!actionButtonLink && actionButtonLink.startsWith('https://');\n const getActionButtonLink = (): string => {\n if (actionButtonWithHttps) {\n return actionButtonLink as string;\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 container alignContent=\"space-between\" direction=\"row\">\n <StyledHeaderContainer>\n {contextButtons?.map((button) => (\n <div\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\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 container>\n {(toParent || toPrevious) && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n component={'button'}\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\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>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box alignItems=\"center\" display=\"flex\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption component=\"h3\" variant=\"caption\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid>\n <Button\n data-testid={`Action-button-${actionBtnTitle}`}\n fullWidth={true}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps\n ? (): void => {\n navigate(actionButtonLink);\n }\n : (): void => {}\n }\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n target={openLinkInNewTab ? '_blank' : undefined}\n variant=\"contained\"\n >\n {showAddIcon && <StyledAdd size=\"sm\" />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\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>{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\n identifier={documentTitle}\n somethingWentWrongText={errorBoundarySomethingWentWrongText}\n >\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\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","up","only","marginLeft","marginRight","flexDirection","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","StyledInnerWrapper","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","component","variant","children","StyledPageContainer","useAlternateBackground","backgroundColor","palette","semantic","background","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","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowLeft02","gap","Button","href","rel","target","FullWidthContainer","FDErrorBoundary","identifier","somethingWentWrongText"],"mappings":"mxBAoBO,MAAMA,EAA6B,2BAC7BC,EAAkC,gCAClCC,EAAmC,iCACnCC,EAA2B,yBAC3BC,EAAW,KAGlBC,EAAgBC,EAAO,MAAPA,EAAkC,EAAGC,QAAOC,YAAO,CACvEJ,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAME,YAAYC,KAAK,WAAY,CAClCN,SAAU,QAEZO,QAASJ,EAAMK,QAAQ,EAAG,GAC1BC,SAAU,WACVC,UAAW,YAGPC,EAAyBT,EAAOU,EAAPV,EAAa,EAAGC,YAAO,CACpD,CAACA,EAAME,YAAYC,KAAK,WAAY,CAClCO,MAAO,OACPC,WAAYX,EAAMK,QAAQ,QAIxBO,EAAeb,EAAOU,EAAPV,EAAa,EAAGC,YAAO,CAC1Ca,SAAU,SACVC,WAAY,aACZH,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,WAAY,CAClCQ,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,QAI3BW,EAAuBjB,EAAOU,EAAPV,EAAa,EAAGC,YAAO,CAClDW,WAAYX,EAAMK,QAAQ,GAC1B,CAACL,EAAME,YAAYe,GAAG,WAAY,CAChCP,MAAO,OACPI,WAAY,UAEd,CAACd,EAAME,YAAYgB,KAAK,WAAY,CAClCC,WAAYnB,EAAMK,YAClBe,YAAapB,EAAMK,YACnBgB,cAAe,SACfP,WAAY,cAEd,CAACd,EAAME,YAAYg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CAAA,cACQ,iBAAiBlD,IAC9BI,WAAW,EACX+C,KAAM3C,GAAoBmB,GAAwBE,GAAwB,GAC1EgB,QACGrC,GAAqBmB,GAIlB,OAHA,KACEV,EAASV,IAIjB6C,IAAK5C,EAAmB,2BAAwBsB,EAChDuB,OAAQ7C,EAAmB,cAAWsB,EACtCzC,QAAQ,YAAWC,SAAA,CAElBqB,GAAexB,EAACtB,GAAUsE,KAAK,OAC/BnC,UAKRmB,GAAqBqB,KAAKC,GACzBT,EAAA,MAAA,CAAA1C,SAAA,CAIGiC,IAAYpC,EAAC+C,EAAM,CAACC,KAAM,GAAI9C,QAAQ,cACrCkC,IAAYpC,EAAC+C,EAAM,CAACC,KAAM,GAAI9C,QAAQ,aACxCF,EAACzC,YAAwB+F,MAJpB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO1C,QAAQ,gBAAkB0C,EAAO1C,OAAOT,SAAW,uBAS5H4B,GAAe/B,EAACL,EAAiB,OAGvCkD,EAACsB,GAAmBlD,UAAWA,EAASd,SAAA,CACrCe,EAASlB,EAACzB,EAAgB,CAAA4B,SAAEe,IAA6B,KAC1DlB,EAACoE,EAAe,CACdC,WAAYrD,EACZsD,uBAAwBpC,YAGxBlC,EAAAiD,EAAA,CAAA9C,SAAGA"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode } from 'react';\n\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Divider from '@mui/material/Divider';\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 Add from '../../icons/Add';\nimport ArrowLeft02 from '../../icons/ArrowLeft02';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Grid from '../atoms/Grid';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Spacer from '../Spacer';\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\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('laptop')]: {\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('laptop')]: {\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('laptop')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid, {\n shouldForwardProp: (prop) => prop !== 'stackAboveTitle',\n})<{ stackAboveTitle?: boolean }>(({ theme, stackAboveTitle }) => ({\n paddingTop: theme.spacing(2),\n ...(stackAboveTitle ? { flexDirection: 'column', alignItems: 'flex-start' } : {}),\n [theme.breakpoints.up('laptop')]: {\n width: '100%',\n alignItems: stackAboveTitle ? 'flex-start' : 'center',\n ...(stackAboveTitle ? { flexDirection: 'column' } : {}),\n },\n [theme.breakpoints.only('mobile')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n flexDirection: 'column',\n alignItems: 'flex-start',\n },\n [theme.breakpoints.only('base')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n flexDirection: 'column',\n alignItems: 'flex-start',\n },\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('laptop')]: {\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 StyledBackRow = styled(Box)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n marginBottom: theme.spacing(1),\n marginLeft: theme.spacing(-2),\n}));\n\nconst StyledBackButton = styled(IconButton, {\n shouldForwardProp: (prop) => prop !== 'hasTitleComponent' && prop !== 'alignWithContent',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n})<{ hasTitleComponent: boolean; component: any; alignWithContent?: boolean }>(\n ({ theme, hasTitleComponent, alignWithContent }) => {\n const marginTop = hasTitleComponent ? theme.spacing(-0.75) : theme.spacing(-1.5);\n const marginBottom = theme.spacing(-1.5);\n const marginRight = theme.spacing(0.5);\n const marginLeft = alignWithContent ? 0 : theme.spacing(-1.5);\n\n return {\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n padding: 0,\n\n [theme.breakpoints.only('tablet')]: {\n marginLeft: alignWithContent ? 0 : theme.spacing(-2),\n },\n\n [theme.breakpoints.only('base')]: {\n marginLeft: alignWithContent ? 0 : theme.spacing(-2),\n },\n };\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('tablet')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('mobile')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('base')]: {\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 }>(({ theme }) => ({\n lineHeight: '26px',\n color: theme.palette.semantic.text['text-weak'],\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: ReactNode | string }): JSX.Element => (\n <StyledPageTitle component=\"h2\" variant=\"h5\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(\n ({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground\n ? theme.palette.semantic.background['background-alternate']\n : theme.palette.semantic.background['background-base'],\n width: '100%',\n height: '100%',\n }),\n);\n\nexport interface 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 toParentCaption?: 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): JSX.Element => {\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 toParentCaption,\n strictToParent,\n navigate,\n hideDivider = false,\n customActionButtons,\n useAlternateBackground = false,\n titleComponentAfter,\n errorBoundarySomethingWentWrongText,\n } = props;\n const theme = useTheme();\n\n const isMobile = useMediaQuery(theme.breakpoints.down('tablet'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps: boolean = !!actionButtonLink && actionButtonLink.startsWith('https://');\n const getActionButtonLink = (): string => {\n if (actionButtonWithHttps) {\n return actionButtonLink as string;\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 container alignContent=\"space-between\" direction=\"row\">\n <StyledHeaderContainer>\n {contextButtons?.map((button) => (\n <div\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\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 container stackAboveTitle={!!toParentCaption}>\n {(toParent || toPrevious) && (\n <StyledBackRow>\n <StyledBackButton\n alignWithContent={!!toParentCaption}\n aria-label=\"Back\"\n component={'button'}\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\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 {toParentCaption && (\n <StyledCaption component=\"h3\" variant=\"caption\">\n {toParentCaption}\n </StyledCaption>\n )}\n </StyledBackRow>\n )}\n\n <StyledTitleSection>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box alignItems=\"center\" display=\"flex\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption component=\"h3\" variant=\"caption\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid>\n <Button\n data-testid={`Action-button-${actionBtnTitle}`}\n fullWidth={true}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps\n ? (): void => {\n navigate(actionButtonLink);\n }\n : (): void => {}\n }\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n target={openLinkInNewTab ? '_blank' : undefined}\n variant=\"contained\"\n >\n {showAddIcon && <StyledAdd size=\"sm\" />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\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>{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\n identifier={documentTitle}\n somethingWentWrongText={errorBoundarySomethingWentWrongText}\n >\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\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","shouldForwardProp","prop","stackAboveTitle","flexDirection","up","only","marginLeft","marginRight","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","StyledBackRow","Box","display","justifyContent","marginBottom","StyledBackButton","IconButton","hasTitleComponent","alignWithContent","marginTop","StyledInnerWrapper","StyledHeaderContainer","StyledCaption","Typography","lineHeight","color","palette","semantic","text","StyledPageTitle","fontWeight","StyledPageDivider","Divider","PageTitle","title","_jsx","component","variant","children","StyledPageContainer","useAlternateBackground","backgroundColor","background","height","PageLayout","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","toParentCaption","strictToParent","navigate","hideDivider","customActionButtons","titleComponentAfter","errorBoundarySomethingWentWrongText","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","alignContent","map","button","React","isValidElement","onClick","history","length","ArrowLeft02","gap","Button","href","rel","target","FullWidthContainer","FDErrorBoundary","identifier","somethingWentWrongText"],"mappings":"mxBAoBO,MAAMA,EAA6B,2B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AOmF,IAAK,EAACzD,SAAA,CAC5CH,EAACF,EAAS,CAACC,MAAOA,IACjBiC,MAGJpB,GACCZ,EAACb,EAAa,CAACc,UAAU,KAAKC,QAAQ,UAASC,SAC5CS,OAKNS,GACCuB,EAAAI,EAAA,CAAA7C,SAAA,CACGgC,IAAYnC,EAAC8C,EAAM,CAACC,KAAM,GAAI7C,QAAQ,aACvCF,EAACjD,EAAsB,CAAAoD,SACrByC,EAACiB,EAAM,CAAA,cACQ,iBAAiBlD,IAC9BI,WAAW,EACX+C,KAAM3C,GAAoBoB,GAAwBE,GAAwB,GAC1Ee,QACGrC,GAAqBoB,GAIlB,OAHA,KACEV,EAASX,IAIjB6C,IAAK5C,EAAmB,2BAAwBuB,EAChDsB,OAAQ7C,EAAmB,cAAWuB,EACtCxC,QAAQ,YAAWC,SAAA,CAElBmB,GAAetB,EAAC3B,GAAU0E,KAAK,OAC/BpC,UAKRoB,IAAqBqB,KAAKC,GACzBT,EAAA,MAAA,CAAAzC,SAAA,CAIGgC,IAAYnC,EAAC8C,EAAM,CAACC,KAAM,GAAI7C,QAAQ,cACrCiC,IAAYnC,EAAC8C,EAAM,CAACC,KAAM,GAAI7C,QAAQ,aACxCF,EAACjD,YAAwBsG,MAJpB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO3C,QAAQ,gBAAkB2C,EAAO3C,OAAOP,SAAW,uBAS5H2B,GAAe9B,EAACJ,EAAiB,OAGvCgD,EAACqB,GAAmBlD,UAAWA,EAASZ,SAAA,CACrCa,EAAShB,EAAC9B,EAAgB,CAAAiC,SAAEa,IAA6B,KAC1DhB,EAACkE,EAAe,CACdC,WAAYrD,EACZsD,uBAAwBnC,YAGxBjC,EAAAgD,EAAA,CAAA7C,SAAGA"}
@@ -1,2 +1,2 @@
1
- "use strict";var r=require("@mui/material/FormControlLabel");module.exports=r;
1
+ "use strict";var e=require("react/jsx-runtime"),a=require("react"),r=require("@mui/material/FormControlLabel");module.exports=({size:l="medium",control:t,label:i,disabled:s,value:o,children:d,className:u,"data-fd-variant":c,...n})=>{const m=a.cloneElement(t,{...t.props,size:l,disabled:s,value:o}),b=`MuiFormControlLabel-size${l.charAt(0).toUpperCase()+l.slice(1)}`,v=u?`${b} ${u}`:b;return e.jsx(r,{className:v,control:m,"data-fd-variant":c,disabled:s,label:i,value:o,...n})};
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/molecules/FormControlLabel/index.tsx"],"sourcesContent":["import { cloneElement, type ReactElement } from 'react';\n\nimport MuiFormControlLabel, { type FormControlLabelProps as MuiFormControlLabelProps } from '@mui/material/FormControlLabel';\n\n/** Props for a form control label */\nexport interface FormControlLabelProps extends Omit<MuiFormControlLabelProps, 'control' | 'label' | 'size'> {\n /** The control of the form control label. */\n control: ReactElement;\n /** The label of the form control label. */\n label: React.ReactNode;\n /** The value of the form control label. */\n value: unknown;\n /** The identifier of the form control label. */\n fdKey?: string;\n /** The size of the form control label. */\n size?: 'medium' | 'small';\n /** The children of the form control label. */\n children?: React.ReactNode;\n /** The class name of the form control label. */\n className?: string;\n /** The data-fd-variant of the form control label. */\n 'data-fd-variant'?: string;\n /** Whether the form control label is disabled. */\n disabled?: boolean;\n}\n\nconst FormControlLabel = ({ size = 'medium', control, label, disabled, value, children, className, 'data-fd-variant': dataFdVariant, ...props }: FormControlLabelProps): ReactElement => {\n // Clone the control element and pass props to it\n const controlWithProps = cloneElement(control, {\n ...(control.props as Record<string, unknown>),\n size,\n disabled,\n value,\n } as Partial<unknown>);\n\n const sizeClassName = `MuiFormControlLabel-size${size.charAt(0).toUpperCase() + size.slice(1)}`;\n const mergedClassName = className ? `${sizeClassName} ${className}` : sizeClassName;\n\n return (\n <MuiFormControlLabel\n className={mergedClassName}\n control={controlWithProps}\n data-fd-variant={dataFdVariant}\n disabled={disabled}\n label={label}\n value={value}\n {...props}\n />\n );\n};\n\n/**\n * FormControlLabel component is a wrapper component for a form control label.\n *\n * @param props - The props of the form control label.\n * @returns The FormControlLabel component.\n */\nexport default FormControlLabel;"],"names":["size","control","label","disabled","value","children","className","dataFdVariant","props","controlWithProps","cloneElement","sizeClassName","charAt","toUpperCase","slice","mergedClassName","_jsx","MuiFormControlLabel"],"mappings":"8HA0ByB,EAAGA,OAAO,SAAUC,UAASC,QAAOC,WAAUC,QAAOC,WAAUC,YAAW,kBAAmBC,KAAkBC,MAEtI,MAAMC,EAAmBC,EAAAA,aAAaT,EAAS,IACzCA,EAAQO,MACZR,OACAG,WACAC,UAGIO,EAAgB,2BAA2BX,EAAKY,OAAO,GAAGC,cAAgBb,EAAKc,MAAM,KACrFC,EAAkBT,EAAY,GAAGK,KAAiBL,IAAcK,EAEtE,OACEK,EAAAA,IAACC,EAAmB,CAClBX,UAAWS,EACXd,QAASQ,EAAgB,kBACRF,EACjBJ,SAAUA,EACVD,MAAOA,EACPE,MAAOA,KACHI"}
@@ -1,2 +1,28 @@
1
- import FormControlLabel from '@mui/material/FormControlLabel';
2
- export { default } from '@mui/material/FormControlLabel';
1
+ import { ReactElement } from 'react';
2
+ import { FormControlLabelProps as FormControlLabelProps$1 } from '@mui/material/FormControlLabel';
3
+
4
+ /** Props for a form control label */
5
+ interface FormControlLabelProps extends Omit<FormControlLabelProps$1, 'control' | 'label' | 'size'> {
6
+ /** The control of the form control label. */
7
+ control: ReactElement;
8
+ /** The label of the form control label. */
9
+ label: React.ReactNode;
10
+ /** The value of the form control label. */
11
+ value: unknown;
12
+ /** The identifier of the form control label. */
13
+ fdKey?: string;
14
+ /** The size of the form control label. */
15
+ size?: 'medium' | 'small';
16
+ /** The children of the form control label. */
17
+ children?: React.ReactNode;
18
+ /** The class name of the form control label. */
19
+ className?: string;
20
+ /** The data-fd-variant of the form control label. */
21
+ 'data-fd-variant'?: string;
22
+ /** Whether the form control label is disabled. */
23
+ disabled?: boolean;
24
+ }
25
+ declare const FormControlLabel: ({ size, control, label, disabled, value, children, className, "data-fd-variant": dataFdVariant, ...props }: FormControlLabelProps) => ReactElement;
26
+
27
+ export { FormControlLabel as default };
28
+ export type { FormControlLabelProps };
@@ -1,2 +1,2 @@
1
- import o from"@mui/material/FormControlLabel";export{default}from"@mui/material/FormControlLabel";
1
+ import{jsx as a}from"react/jsx-runtime";import{cloneElement as e}from"react";import r from"@mui/material/FormControlLabel";const l=({size:l="medium",control:t,label:o,disabled:i,value:s,children:m,className:d,"data-fd-variant":c,...n})=>{const u=e(t,{...t.props,size:l,disabled:i,value:s}),p=`MuiFormControlLabel-size${l.charAt(0).toUpperCase()+l.slice(1)}`;return a(r,{className:d?`${p} ${d}`:p,control:u,"data-fd-variant":c,disabled:i,label:o,value:s,...n})};export{l as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/molecules/FormControlLabel/index.tsx"],"sourcesContent":["import { cloneElement, type ReactElement } from 'react';\n\nimport MuiFormControlLabel, { type FormControlLabelProps as MuiFormControlLabelProps } from '@mui/material/FormControlLabel';\n\n/** Props for a form control label */\nexport interface FormControlLabelProps extends Omit<MuiFormControlLabelProps, 'control' | 'label' | 'size'> {\n /** The control of the form control label. */\n control: ReactElement;\n /** The label of the form control label. */\n label: React.ReactNode;\n /** The value of the form control label. */\n value: unknown;\n /** The identifier of the form control label. */\n fdKey?: string;\n /** The size of the form control label. */\n size?: 'medium' | 'small';\n /** The children of the form control label. */\n children?: React.ReactNode;\n /** The class name of the form control label. */\n className?: string;\n /** The data-fd-variant of the form control label. */\n 'data-fd-variant'?: string;\n /** Whether the form control label is disabled. */\n disabled?: boolean;\n}\n\nconst FormControlLabel = ({ size = 'medium', control, label, disabled, value, children, className, 'data-fd-variant': dataFdVariant, ...props }: FormControlLabelProps): ReactElement => {\n // Clone the control element and pass props to it\n const controlWithProps = cloneElement(control, {\n ...(control.props as Record<string, unknown>),\n size,\n disabled,\n value,\n } as Partial<unknown>);\n\n const sizeClassName = `MuiFormControlLabel-size${size.charAt(0).toUpperCase() + size.slice(1)}`;\n const mergedClassName = className ? `${sizeClassName} ${className}` : sizeClassName;\n\n return (\n <MuiFormControlLabel\n className={mergedClassName}\n control={controlWithProps}\n data-fd-variant={dataFdVariant}\n disabled={disabled}\n label={label}\n value={value}\n {...props}\n />\n );\n};\n\n/**\n * FormControlLabel component is a wrapper component for a form control label.\n *\n * @param props - The props of the form control label.\n * @returns The FormControlLabel component.\n */\nexport default FormControlLabel;"],"names":["FormControlLabel","size","control","label","disabled","value","children","className","dataFdVariant","props","controlWithProps","cloneElement","sizeClassName","charAt","toUpperCase","slice","_jsx","MuiFormControlLabel"],"mappings":"2HA0BA,MAAMA,EAAmB,EAAGC,OAAO,SAAUC,UAASC,QAAOC,WAAUC,QAAOC,WAAUC,YAAW,kBAAmBC,KAAkBC,MAEtI,MAAMC,EAAmBC,EAAaT,EAAS,IACzCA,EAAQO,MACZR,OACAG,WACAC,UAGIO,EAAgB,2BAA2BX,EAAKY,OAAO,GAAGC,cAAgBb,EAAKc,MAAM,KAG3F,OACEC,EAACC,EAAmB,CAClBV,UAJoBA,EAAY,GAAGK,KAAiBL,IAAcK,EAKlEV,QAASQ,EAAgB,kBACRF,EACjBJ,SAAUA,EACVD,MAAOA,EACPE,MAAOA,KACHI"}
@@ -1,2 +1,2 @@
1
- "use strict";require("@mui/material/styles");var t=require("../tokens/typography/font-family.cjs.js"),e=require("../typography.cjs.js");exports.formControlLabelOverrides=o=>({styleOverrides:{root:{"& .MuiTypography-root":{...e.typography.b1Weak,[o.breakpoints.down("tablet")]:{fontFamily:t.fontFamily.mobile.body,...e.getMobileTextStyle("b1")}},"& .MuiFormControlLabel-label":{color:o.palette.semantic.text["text-strong"]},"& .Mui-disabled":{color:`${o.palette.semantic.text["text-disabled"]} !important`}}}});
1
+ "use strict";require("@mui/material/styles");var e=require("../tokens/typography/font-family.cjs.js"),t=require("../typography.cjs.js");exports.formControlLabelOverrides=o=>({styleOverrides:{root:{padding:0,marginLeft:0,"& .MuiTypography-root":{...t.typography.b1Weak,[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.body,...t.getMobileTextStyle("b1")}},"& .MuiFormControlLabel-label":{color:o.palette.semantic.text["text-strong"]},"& .Mui-disabled":{color:`${o.palette.semantic.text["text-disabled"]} !important`},"&.MuiFormControlLabel-sizeSmall":{columnGap:o.spacing(1)},"&.MuiFormControlLabel-sizeMedium":{columnGap:o.spacing(1.5)},'&[data-fd-variant="radio"]':{"&.MuiFormControlLabel-sizeSmall":{"& .MuiFormControlLabel-label":{fontSize:"14px"}}}}}});
2
2
  //# sourceMappingURL=formControlLabelOverrides.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formControlLabelOverrides.cjs.js","sources":["../../../src/themes/overrides/formControlLabelOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const formControlLabelOverrides = (baseTheme: Theme): Components<Theme>['MuiFormControlLabel'] => ({\n styleOverrides: {\n root: {\n '& .MuiTypography-root': {\n ...typography.b1Weak,\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('b1'),\n },\n },\n '& .MuiFormControlLabel-label': {\n color: baseTheme.palette.semantic.text['text-strong'],\n },\n '& .Mui-disabled': {\n color: `${baseTheme.palette.semantic.text['text-disabled']} !important`,\n },\n },\n },\n});"],"names":["baseTheme","styleOverrides","root","typography","b1Weak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","color","palette","semantic","text"],"mappings":"0KAK0CA,IAAgB,CACxDC,eAAgB,CACdC,KAAM,CACJ,wBAAyB,IACpBC,EAAAA,WAAWC,OACd,CAACJ,EAAUK,YAAYC,KAAK,WAAY,CACtCC,WAAYA,EAAAA,WAAWC,OAAOC,QAC3BC,EAAAA,mBAAmB,QAG1B,+BAAgC,CAC9BC,MAAOX,EAAUY,QAAQC,SAASC,KAAK,gBAEzC,kBAAmB,CACjBH,MAAO,GAAGX,EAAUY,QAAQC,SAASC,KAAK"}
1
+ {"version":3,"file":"formControlLabelOverrides.cjs.js","sources":["../../../src/themes/overrides/formControlLabelOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const formControlLabelOverrides = (baseTheme: Theme): Components<Theme>['MuiFormControlLabel'] => ({\n styleOverrides: {\n root: {\n padding: 0,\n marginLeft: 0,\n '& .MuiTypography-root': {\n ...typography.b1Weak,\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('b1'),\n },\n },\n '& .MuiFormControlLabel-label': {\n color: baseTheme.palette.semantic.text['text-strong'],\n },\n '& .Mui-disabled': {\n color: `${baseTheme.palette.semantic.text['text-disabled']} !important`,\n },\n '&.MuiFormControlLabel-sizeSmall': {\n columnGap: baseTheme.spacing(1),\n },\n '&.MuiFormControlLabel-sizeMedium': {\n columnGap: baseTheme.spacing(1.5),\n },\n '&[data-fd-variant=\"radio\"]': {\n '&.MuiFormControlLabel-sizeSmall': {\n '& .MuiFormControlLabel-label': {\n fontSize: '14px',\n },\n },\n },\n },\n },\n});"],"names":["baseTheme","styleOverrides","root","padding","marginLeft","typography","b1Weak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","color","palette","semantic","text","columnGap","spacing","fontSize"],"mappings":"0KAK0CA,IAAgB,CACxDC,eAAgB,CACdC,KAAM,CACJC,QAAS,EACTC,WAAY,EACZ,wBAAyB,IACpBC,EAAAA,WAAWC,OACd,CAACN,EAAUO,YAAYC,KAAK,WAAY,CACtCC,WAAYA,EAAAA,WAAWC,OAAOC,QAC3BC,EAAAA,mBAAmB,QAG1B,+BAAgC,CAC9BC,MAAOb,EAAUc,QAAQC,SAASC,KAAK,gBAEzC,kBAAmB,CACjBH,MAAO,GAAGb,EAAUc,QAAQC,SAASC,KAAK,+BAE5C,kCAAmC,CACjCC,UAAWjB,EAAUkB,QAAQ,IAE/B,mCAAoC,CAClCD,UAAWjB,EAAUkB,QAAQ,MAE/B,6BAA8B,CAC5B,kCAAmC,CACjC,+BAAgC,CAC9BC,SAAU"}
@@ -1,2 +1,2 @@
1
- import"@mui/material/styles";import{fontFamily as t}from"../tokens/typography/font-family.js";import{getMobileTextStyle as o,typography as e}from"../typography.js";const r=r=>({styleOverrides:{root:{"& .MuiTypography-root":{...e.b1Weak,[r.breakpoints.down("tablet")]:{fontFamily:t.mobile.body,...o("b1")}},"& .MuiFormControlLabel-label":{color:r.palette.semantic.text["text-strong"]},"& .Mui-disabled":{color:`${r.palette.semantic.text["text-disabled"]} !important`}}}});export{r as formControlLabelOverrides};
1
+ import"@mui/material/styles";import{fontFamily as o}from"../tokens/typography/font-family.js";import{getMobileTextStyle as t,typography as a}from"../typography.js";const e=e=>({styleOverrides:{root:{padding:0,marginLeft:0,"& .MuiTypography-root":{...a.b1Weak,[e.breakpoints.down("tablet")]:{fontFamily:o.mobile.body,...t("b1")}},"& .MuiFormControlLabel-label":{color:e.palette.semantic.text["text-strong"]},"& .Mui-disabled":{color:`${e.palette.semantic.text["text-disabled"]} !important`},"&.MuiFormControlLabel-sizeSmall":{columnGap:e.spacing(1)},"&.MuiFormControlLabel-sizeMedium":{columnGap:e.spacing(1.5)},'&[data-fd-variant="radio"]':{"&.MuiFormControlLabel-sizeSmall":{"& .MuiFormControlLabel-label":{fontSize:"14px"}}}}}});export{e as formControlLabelOverrides};
2
2
  //# sourceMappingURL=formControlLabelOverrides.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formControlLabelOverrides.js","sources":["../../../src/themes/overrides/formControlLabelOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const formControlLabelOverrides = (baseTheme: Theme): Components<Theme>['MuiFormControlLabel'] => ({\n styleOverrides: {\n root: {\n '& .MuiTypography-root': {\n ...typography.b1Weak,\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('b1'),\n },\n },\n '& .MuiFormControlLabel-label': {\n color: baseTheme.palette.semantic.text['text-strong'],\n },\n '& .Mui-disabled': {\n color: `${baseTheme.palette.semantic.text['text-disabled']} !important`,\n },\n },\n },\n});"],"names":["formControlLabelOverrides","baseTheme","styleOverrides","root","typography","b1Weak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","color","palette","semantic","text"],"mappings":"0KAKaA,EAA6BC,IAAgB,CACxDC,eAAgB,CACdC,KAAM,CACJ,wBAAyB,IACpBC,EAAWC,OACd,CAACJ,EAAUK,YAAYC,KAAK,WAAY,CACtCC,WAAYA,EAAWC,OAAOC,QAC3BC,EAAmB,QAG1B,+BAAgC,CAC9BC,MAAOX,EAAUY,QAAQC,SAASC,KAAK,gBAEzC,kBAAmB,CACjBH,MAAO,GAAGX,EAAUY,QAAQC,SAASC,KAAK"}
1
+ {"version":3,"file":"formControlLabelOverrides.js","sources":["../../../src/themes/overrides/formControlLabelOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const formControlLabelOverrides = (baseTheme: Theme): Components<Theme>['MuiFormControlLabel'] => ({\n styleOverrides: {\n root: {\n padding: 0,\n marginLeft: 0,\n '& .MuiTypography-root': {\n ...typography.b1Weak,\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('b1'),\n },\n },\n '& .MuiFormControlLabel-label': {\n color: baseTheme.palette.semantic.text['text-strong'],\n },\n '& .Mui-disabled': {\n color: `${baseTheme.palette.semantic.text['text-disabled']} !important`,\n },\n '&.MuiFormControlLabel-sizeSmall': {\n columnGap: baseTheme.spacing(1),\n },\n '&.MuiFormControlLabel-sizeMedium': {\n columnGap: baseTheme.spacing(1.5),\n },\n '&[data-fd-variant=\"radio\"]': {\n '&.MuiFormControlLabel-sizeSmall': {\n '& .MuiFormControlLabel-label': {\n fontSize: '14px',\n },\n },\n },\n },\n },\n});"],"names":["formControlLabelOverrides","baseTheme","styleOverrides","root","padding","marginLeft","typography","b1Weak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","color","palette","semantic","text","columnGap","spacing","fontSize"],"mappings":"0KAKaA,EAA6BC,IAAgB,CACxDC,eAAgB,CACdC,KAAM,CACJC,QAAS,EACTC,WAAY,EACZ,wBAAyB,IACpBC,EAAWC,OACd,CAACN,EAAUO,YAAYC,KAAK,WAAY,CACtCC,WAAYA,EAAWC,OAAOC,QAC3BC,EAAmB,QAG1B,+BAAgC,CAC9BC,MAAOb,EAAUc,QAAQC,SAASC,KAAK,gBAEzC,kBAAmB,CACjBH,MAAO,GAAGb,EAAUc,QAAQC,SAASC,KAAK,+BAE5C,kCAAmC,CACjCC,UAAWjB,EAAUkB,QAAQ,IAE/B,mCAAoC,CAClCD,UAAWjB,EAAUkB,QAAQ,MAE/B,6BAA8B,CAC5B,kCAAmC,CACjC,+BAAgC,CAC9BC,SAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "7.3.2",
3
+ "version": "7.3.3",
4
4
  "files": [
5
5
  "dist"
6
6
  ],