@flipdish/portal-library 4.2.12 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +9 -0
  2. package/dist/components/FlipdishStaffContainer/index.cjs.js +1 -1
  3. package/dist/components/FlipdishStaffContainer/index.cjs.js.map +1 -1
  4. package/dist/components/FlipdishStaffContainer/index.d.ts +2 -2
  5. package/dist/components/FlipdishStaffContainer/index.js +1 -1
  6. package/dist/components/FlipdishStaffContainer/index.js.map +1 -1
  7. package/dist/components/Form/FormItemLayout/index.cjs.js +1 -1
  8. package/dist/components/Form/FormItemLayout/index.cjs.js.map +1 -1
  9. package/dist/components/Form/FormItemLayout/index.js +1 -1
  10. package/dist/components/Form/FormItemLayout/index.js.map +1 -1
  11. package/dist/components/GenericTableTitle/index.cjs.js +1 -1
  12. package/dist/components/GenericTableTitle/index.cjs.js.map +1 -1
  13. package/dist/components/GenericTableTitle/index.d.ts +2 -1
  14. package/dist/components/GenericTableTitle/index.js +1 -1
  15. package/dist/components/GenericTableTitle/index.js.map +1 -1
  16. package/dist/components/PageLayout/index.cjs.js +1 -1
  17. package/dist/components/PageLayout/index.cjs.js.map +1 -1
  18. package/dist/components/PageLayout/index.js +1 -1
  19. package/dist/components/PageLayout/index.js.map +1 -1
  20. package/dist/components/PortalMock/index.cjs.js +4 -15
  21. package/dist/components/PortalMock/index.cjs.js.map +1 -1
  22. package/dist/components/PortalMock/index.js +4 -15
  23. package/dist/components/PortalMock/index.js.map +1 -1
  24. package/dist/components/atoms/Grid/index.cjs.js +1 -1
  25. package/dist/components/atoms/Grid/index.d.ts +2 -2
  26. package/dist/components/atoms/Grid/index.js +1 -1
  27. package/dist/components/atoms/TextField/index.cjs.js.map +1 -1
  28. package/dist/components/atoms/TextField/index.js.map +1 -1
  29. package/dist/components/molecules/StepLabel/index.cjs.js +2 -0
  30. package/dist/components/molecules/StepLabel/index.cjs.js.map +1 -0
  31. package/dist/components/molecules/StepLabel/index.d.ts +2 -0
  32. package/dist/components/molecules/StepLabel/index.js +2 -0
  33. package/dist/components/molecules/StepLabel/index.js.map +1 -0
  34. package/dist/stories/utilities/MockPageContent.cjs.js +1 -1
  35. package/dist/stories/utilities/MockPageContent.cjs.js.map +1 -1
  36. package/dist/stories/utilities/MockPageContent.d.ts +2 -2
  37. package/dist/stories/utilities/MockPageContent.js +1 -1
  38. package/dist/stories/utilities/MockPageContent.js.map +1 -1
  39. package/dist/themes/overrides/selectOverrides.cjs.js +1 -1
  40. package/dist/themes/overrides/selectOverrides.cjs.js.map +1 -1
  41. package/dist/themes/overrides/selectOverrides.js +1 -1
  42. package/dist/themes/overrides/selectOverrides.js.map +1 -1
  43. package/package.json +2 -2
package/README.md CHANGED
@@ -93,3 +93,12 @@ const IconExample = () => {
93
93
  ```
94
94
 
95
95
  You can find the current list of provided icons at https://flipdishbytes.github.io/flipdish-ui/?path=/docs/ui-icons--docs
96
+
97
+ ## Changelog
98
+
99
+ ## 5.0.0 — 2025-08-19
100
+
101
+ ### Breaking changes
102
+
103
+ Breaking: Required MUI v6 for Grid usage. Apps on MUI v5 should use MUI v5 Grid: https://v5.mui.com/material-ui/react-grid/.
104
+ Breaking: Replaced deprecated LegacyGrid with Grid2. The exported Grid now wraps Grid2; review and adjust any Grid props/usages accordingly.
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime");require("react");var r=require("../../icons/CustomerSupport/index.cjs.js"),i=require("@mui/material/Grid"),t=require("@mui/material/styles"),s=require("@mui/material/Typography"),a=require("@mui/material/Box");const l=t.styled(a)((({theme:e})=>({backgroundColor:e.palette.grey[200],borderRadius:"4px",padding:e.spacing(2)}))),n=t.styled(i)((({theme:e})=>({alignItems:"center",display:"flex",marginBottom:e.spacing(1.5)}))),d=t.styled(s)((({theme:e})=>({fontWeight:500,marginLeft:e.spacing(1)})));module.exports=({title:i,children:t})=>e.jsxs(l,{"data-testid":"flipdish-staff-only-container",children:[e.jsxs(n,{children:[e.jsx(r,{}),e.jsx(d,{children:i})]}),t]});
1
+ "use strict";var e=require("react/jsx-runtime");require("react");var r=require("@mui/material/Box"),i=require("@mui/material/styles"),t=require("@mui/material/Typography"),s=require("../../icons/CustomerSupport/index.cjs.js"),a=require("@mui/material/Grid2");const l=i.styled(r)((({theme:e})=>({backgroundColor:e.palette.grey[200],borderRadius:"4px",padding:e.spacing(2)}))),n=i.styled(a)((({theme:e})=>({alignItems:"center",display:"flex",marginBottom:e.spacing(1.5)}))),d=i.styled(t)((({theme:e})=>({fontWeight:500,marginLeft:e.spacing(1)})));module.exports=({title:r,children:i})=>e.jsxs(l,{"data-testid":"flipdish-staff-only-container",children:[e.jsxs(n,{children:[e.jsx(s,{}),e.jsx(d,{children:r})]}),i]});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/FlipdishStaffContainer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport SupportAgentOutlinedIcon from '../../icons/CustomerSupport';\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ntype Props = {\n title: string;\n children: ReactNode;\n};\n\nconst FlipdishStaffContainer = ({ title, children }: Props) => {\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{title}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","title","children","_jsxs","_jsx","SupportAgentOutlinedIcon"],"mappings":"kQAOA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAPD,EAAY,EAAGE,YAAO,CAC1CC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAAA,OAAOU,EAAPV,EAAa,EAAGE,YAAO,CAC1CS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAAA,OAAOe,EAAPf,EAAmB,EAAGE,YAAO,CACvCc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,sBAQC,EAAGU,QAAOC,cAEjCC,OAACrB,EAAe,CAAA,cAAa,gCAA+BoB,SAAA,CACxDC,OAACX,EAAc,CAAAU,SAAA,CACXE,EAAAA,IAACC,MACDD,MAACP,EAAK,CAAAK,SAAED,OAGXC"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/FlipdishStaffContainer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nimport Box from '@mui/material/Box';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nimport SupportAgentOutlinedIcon from '../../icons/CustomerSupport';\nimport Grid from '../atoms/Grid';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ninterface Props {\n title: string;\n children: ReactNode;\n}\n\nconst FlipdishStaffContainer = ({ title, children }: Props) => {\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{title}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","title","children","_jsxs","_jsx","SupportAgentOutlinedIcon"],"mappings":"mQASA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAPD,EAAY,EAAGE,YAAO,CAC1CC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAAA,OAAOU,EAAPV,EAAa,EAAGE,YAAO,CAC1CS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAAA,OAAOe,EAAPf,EAAmB,EAAGE,YAAO,CACvCc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,sBAQC,EAAGU,QAAOC,cAEjCC,OAACrB,EAAe,CAAA,cAAa,gCAA+BoB,SAAA,CACxDC,OAACX,EAAc,CAAAU,SAAA,CACXE,EAAAA,IAACC,MACDD,MAACP,EAAK,CAAAK,SAAED,OAGXC"}
@@ -1,10 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
3
 
4
- type Props = {
4
+ interface Props {
5
5
  title: string;
6
6
  children: ReactNode;
7
- };
7
+ }
8
8
  declare const FlipdishStaffContainer: ({ title, children }: Props) => react_jsx_runtime.JSX.Element;
9
9
 
10
10
  export { FlipdishStaffContainer as default };
@@ -1,2 +1,2 @@
1
- import{jsxs as t,jsx as i}from"react/jsx-runtime";import"react";import r from"../../icons/CustomerSupport/index.js";import e from"@mui/material/Grid";import{styled as m}from"@mui/material/styles";import o from"@mui/material/Typography";import a from"@mui/material/Box";const n=m(a)((({theme:t})=>({backgroundColor:t.palette.grey[200],borderRadius:"4px",padding:t.spacing(2)}))),p=m(e)((({theme:t})=>({alignItems:"center",display:"flex",marginBottom:t.spacing(1.5)}))),l=m(o)((({theme:t})=>({fontWeight:500,marginLeft:t.spacing(1)}))),s=({title:e,children:m})=>t(n,{"data-testid":"flipdish-staff-only-container",children:[t(p,{children:[i(r,{}),i(l,{children:e})]}),m]});export{s as default};
1
+ import{jsxs as t,jsx as i}from"react/jsx-runtime";import"react";import r from"@mui/material/Box";import{styled as e}from"@mui/material/styles";import m from"@mui/material/Typography";import o from"../../icons/CustomerSupport/index.js";import a from"@mui/material/Grid2";const n=e(r)((({theme:t})=>({backgroundColor:t.palette.grey[200],borderRadius:"4px",padding:t.spacing(2)}))),p=e(a)((({theme:t})=>({alignItems:"center",display:"flex",marginBottom:t.spacing(1.5)}))),l=e(m)((({theme:t})=>({fontWeight:500,marginLeft:t.spacing(1)}))),s=({title:r,children:e})=>t(n,{"data-testid":"flipdish-staff-only-container",children:[t(p,{children:[i(o,{}),i(l,{children:r})]}),e]});export{s as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/FlipdishStaffContainer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport SupportAgentOutlinedIcon from '../../icons/CustomerSupport';\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ntype Props = {\n title: string;\n children: ReactNode;\n};\n\nconst FlipdishStaffContainer = ({ title, children }: Props) => {\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{title}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","FlipdishStaffContainer","title","children","_jsxs","_jsx","SupportAgentOutlinedIcon"],"mappings":"6QAOA,MAAMA,EAAkBC,EAAOC,EAAPD,EAAY,EAAGE,YAAO,CAC1CC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAOU,EAAPV,EAAa,EAAGE,YAAO,CAC1CS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAOe,EAAPf,EAAmB,EAAGE,YAAO,CACvCc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,OAQxBU,EAAyB,EAAGC,QAAOC,cAEjCC,EAACtB,EAAe,CAAA,cAAa,gCAA+BqB,SAAA,CACxDC,EAACZ,EAAc,CAAAW,SAAA,CACXE,EAACC,MACDD,EAACR,EAAK,CAAAM,SAAED,OAGXC"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/FlipdishStaffContainer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nimport Box from '@mui/material/Box';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nimport SupportAgentOutlinedIcon from '../../icons/CustomerSupport';\nimport Grid from '../atoms/Grid';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ninterface Props {\n title: string;\n children: ReactNode;\n}\n\nconst FlipdishStaffContainer = ({ title, children }: Props) => {\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{title}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","FlipdishStaffContainer","title","children","_jsxs","_jsx","SupportAgentOutlinedIcon"],"mappings":"8QASA,MAAMA,EAAkBC,EAAOC,EAAPD,EAAY,EAAGE,YAAO,CAC1CC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAOU,EAAPV,EAAa,EAAGE,YAAO,CAC1CS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAOe,EAAPf,EAAmB,EAAGE,YAAO,CACvCc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,OAQxBU,EAAyB,EAAGC,QAAOC,cAEjCC,EAACtB,EAAe,CAAA,cAAa,gCAA+BqB,SAAA,CACxDC,EAACZ,EAAc,CAAAW,SAAA,CACXE,EAACC,MACDD,EAACR,EAAK,CAAAM,SAAED,OAGXC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime");require("react");var r=require("@mui/material/Grid"),t=require("@mui/material/styles"),i=require("@mui/material/Typography");const a=t.styled(r)((({theme:e})=>({padding:e.spacing(4.75,0,2.5,0),alignItems:"flex-start",flexWrap:"wrap",borderBottom:"1px solid rgba(0,0,0,0.2)"}))),l=t.styled("div")((({theme:e})=>({paddingBottom:e.spacing(2),paddingRight:e.spacing(1.75)})));module.exports=t=>{const{children:n,description:s,descriptionTranslated:o,label:d,labelTranslated:p,mdProportion:c,smProportion:m}=t,[u,x]=c?c.split("x").map((e=>parseInt(e,10))):[4,8],[h,b]=m?m.split("x").map((e=>parseInt(e,10))):[];return e.jsxs(a,{container:!0,children:[e.jsxs(r,{item:!0,base:12,mobile:h,tablet:u,children:[e.jsx(i,{color:"textPrimary",component:"h3",variant:"subtitle1",children:p||d||null}),o||s?e.jsx(l,{children:e.jsx(i,{color:"textSecondary",variant:"caption",children:o||s||null})}):null]}),e.jsx(r,{item:!0,base:12,mobile:b,tablet:x,children:n})]})};
1
+ "use strict";var e=require("react/jsx-runtime");require("react");var r=require("@mui/material/styles"),t=require("@mui/material/Typography"),i=require("@mui/material/Grid2");const a=r.styled(i)((({theme:e})=>({padding:e.spacing(4.75,0,2.5,0),alignItems:"flex-start",flexWrap:"wrap",borderBottom:"1px solid rgba(0,0,0,0.2)"}))),l=r.styled("div")((({theme:e})=>({paddingBottom:e.spacing(2),paddingRight:e.spacing(1.75)})));module.exports=r=>{const{children:s,description:n,descriptionTranslated:o,label:d,labelTranslated:p,mdProportion:c,smProportion:m}=r,[u,x]=c?c.split("x").map((e=>parseInt(e,10))):[4,8],[h,b]=m?m.split("x").map((e=>parseInt(e,10))):[];return e.jsxs(a,{container:!0,children:[e.jsxs(i,{size:{base:12,mobile:h,tablet:u},children:[e.jsx(t,{color:"textPrimary",component:"h3",variant:"subtitle1",children:p||d||null}),o||n?e.jsx(l,{children:e.jsx(t,{color:"textSecondary",variant:"caption",children:o||n||null})}):null]}),e.jsx(i,{size:{base:12,mobile:b,tablet:x},children:s})]})};
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/Form/FormItemLayout/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport Grid, { type GridSize } from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst StyledGrid = styled(Grid)(({ theme }) => ({\n padding: theme.spacing(4.75, 0, 2.5, 0),\n alignItems: 'flex-start',\n flexWrap: 'wrap',\n borderBottom: '1px solid rgba(0,0,0,0.2)',\n}));\n\nconst StyledDescription = styled('div')(({ theme }) => ({\n paddingBottom: theme.spacing(2),\n paddingRight: theme.spacing(1.75),\n}));\n\nexport interface FormItemLayoutProps {\n children: React.ReactNode;\n description?: React.ReactNode;\n descriptionTranslated?: string;\n label?: React.ReactNode;\n labelTranslated?: string;\n mdProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n smProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n}\n\ntype Props = FormItemLayoutProps;\nconst FormItemLayout = (props: Props) => {\n const { children, description, descriptionTranslated, label, labelTranslated, mdProportion, smProportion } =\n props;\n\n const [titleProportion, dataProportion] = mdProportion\n ? mdProportion.split('x').map((m) => parseInt(m, 10))\n : [4, 8];\n const [titleProportionSm, dataProportionSm] = smProportion\n ? smProportion.split('x').map((m) => parseInt(m, 10))\n : [];\n const castToGridSize = (data: unknown) => data as GridSize;\n\n return (\n <StyledGrid container>\n <Grid\n item\n base={12}\n mobile={castToGridSize(titleProportionSm)}\n tablet={castToGridSize(titleProportion)}\n >\n <Typography color=\"textPrimary\" component=\"h3\" variant=\"subtitle1\">\n {labelTranslated || label || null}\n </Typography>\n\n {descriptionTranslated || description ? (\n <StyledDescription>\n <Typography color=\"textSecondary\" variant=\"caption\">\n {descriptionTranslated || description || null}\n </Typography>\n </StyledDescription>\n ) : null}\n </Grid>\n <Grid item base={12} mobile={castToGridSize(dataProportionSm)} tablet={castToGridSize(dataProportion)}>\n {children}\n </Grid>\n </StyledGrid>\n );\n};\n\nexport default FormItemLayout;\n"],"names":["StyledGrid","styled","Grid","theme","padding","spacing","alignItems","flexWrap","borderBottom","StyledDescription","paddingBottom","paddingRight","props","children","description","descriptionTranslated","label","labelTranslated","mdProportion","smProportion","titleProportion","dataProportion","split","map","m","parseInt","titleProportionSm","dataProportionSm","_jsxs","container","item","base","mobile","tablet","_jsx","Typography","color","component","variant"],"mappings":"6KAMA,MAAMA,EAAaC,EAAAA,OAAOC,EAAPD,EAAa,EAAGE,YAAO,CACxCC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGVC,EAAoBR,EAAAA,OAAO,MAAPA,EAAc,EAAGE,YAAO,CAChDO,cAAeP,EAAME,QAAQ,GAC7BM,aAAcR,EAAME,QAAQ,yBAcNO,IACtB,MAAMC,SAAEA,EAAQC,YAAEA,EAAWC,sBAAEA,EAAqBC,MAAEA,EAAKC,gBAAEA,EAAeC,aAAEA,EAAYC,aAAEA,GAC1FP,GAEKQ,EAAiBC,GAAkBH,EACtCA,EAAaI,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAC/C,CAAC,EAAG,IACDE,EAAmBC,GAAoBR,EAC1CA,EAAaG,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAC/C,GAGJ,OACEI,EAAAA,KAAC5B,EAAU,CAAC6B,uBACVD,OAAC1B,EAAI,CACH4B,MAAI,EACJC,KAAM,GACNC,OAAuBN,EACvBO,OAAuBb,EAAgBP,SAAA,CAEvCqB,EAAAA,IAACC,EAAU,CAACC,MAAM,cAAcC,UAAU,KAAKC,QAAQ,YAAWzB,SAC/DI,GAAmBD,GAAS,OAG9BD,GAAyBD,EACxBoB,EAAAA,IAACzB,EAAiB,CAAAI,SAChBqB,EAAAA,IAACC,GAAWC,MAAM,gBAAgBE,QAAQ,UAASzB,SAChDE,GAAyBD,GAAe,SAG3C,QAENoB,EAAAA,IAAChC,EAAI,CAAC4B,MAAI,EAACC,KAAM,GAAIC,OAAuBL,EAAmBM,OAAuBZ,EAAeR,SAClGA"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/Form/FormItemLayout/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nimport Grid, {type GridSize} from '../../atoms/Grid';\n\nconst StyledGrid = styled(Grid)(({ theme }) => ({\n padding: theme.spacing(4.75, 0, 2.5, 0),\n alignItems: 'flex-start',\n flexWrap: 'wrap',\n borderBottom: '1px solid rgba(0,0,0,0.2)',\n}));\n\nconst StyledDescription = styled('div')(({ theme }) => ({\n paddingBottom: theme.spacing(2),\n paddingRight: theme.spacing(1.75),\n}));\n\nexport interface FormItemLayoutProps {\n children: React.ReactNode;\n description?: React.ReactNode;\n descriptionTranslated?: string;\n label?: React.ReactNode;\n labelTranslated?: string;\n mdProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n smProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n}\n\ntype Props = FormItemLayoutProps;\nconst FormItemLayout = (props: Props) => {\n const { children, description, descriptionTranslated, label, labelTranslated, mdProportion, smProportion } =\n props;\n\n const [titleProportion, dataProportion] = mdProportion\n ? mdProportion.split('x').map((m) => parseInt(m, 10))\n : [4, 8];\n const [titleProportionSm, dataProportionSm] = smProportion\n ? smProportion.split('x').map((m) => parseInt(m, 10))\n : [];\n const castToGridSize = (data: unknown) => data as GridSize;\n\n return (\n <StyledGrid container>\n <Grid size={{ base: 12, mobile: castToGridSize(titleProportionSm), tablet: castToGridSize(titleProportion) }}>\n <Typography color=\"textPrimary\" component=\"h3\" variant=\"subtitle1\">\n {labelTranslated || label || null}\n </Typography>\n\n {descriptionTranslated || description ? (\n <StyledDescription>\n <Typography color=\"textSecondary\" variant=\"caption\">\n {descriptionTranslated || description || null}\n </Typography>\n </StyledDescription>\n ) : null}\n </Grid>\n <Grid size={{ base: 12, mobile: castToGridSize(dataProportionSm), tablet: castToGridSize(dataProportion) }}>\n {children}\n </Grid>\n </StyledGrid>\n );\n};\n\nexport default FormItemLayout;\n"],"names":["StyledGrid","styled","Grid","theme","padding","spacing","alignItems","flexWrap","borderBottom","StyledDescription","paddingBottom","paddingRight","props","children","description","descriptionTranslated","label","labelTranslated","mdProportion","smProportion","titleProportion","dataProportion","split","map","m","parseInt","titleProportionSm","dataProportionSm","_jsxs","container","size","base","mobile","tablet","_jsx","Typography","color","component","variant"],"mappings":"8KAOA,MAAMA,EAAaC,EAAAA,OAAOC,EAAPD,EAAa,EAAGE,YAAO,CACxCC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGVC,EAAoBR,EAAAA,OAAO,MAAPA,EAAc,EAAGE,YAAO,CAChDO,cAAeP,EAAME,QAAQ,GAC7BM,aAAcR,EAAME,QAAQ,yBAcNO,IACtB,MAAMC,SAAEA,EAAQC,YAAEA,EAAWC,sBAAEA,EAAqBC,MAAEA,EAAKC,gBAAEA,EAAeC,aAAEA,EAAYC,aAAEA,GAC1FP,GAEKQ,EAAiBC,GAAkBH,EACtCA,EAAaI,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAC/C,CAAC,EAAG,IACDE,EAAmBC,GAAoBR,EAC1CA,EAAaG,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAC/C,GAGJ,OACEI,EAAAA,KAAC5B,EAAU,CAAC6B,WAAS,EAAAhB,SAAA,CACnBe,OAAC1B,EAAI,CAAC4B,KAAM,CAAEC,KAAM,GAAIC,OAAuBN,EAAoBO,OAAuBb,GAAkBP,SAAA,CAC1GqB,EAAAA,IAACC,EAAU,CAACC,MAAM,cAAcC,UAAU,KAAKC,QAAQ,YAAWzB,SAC/DI,GAAmBD,GAAS,OAG9BD,GAAyBD,EACxBoB,EAAAA,IAACzB,EAAiB,CAAAI,SAChBqB,EAAAA,IAACC,EAAU,CAACC,MAAM,gBAAgBE,QAAQ,mBACvCvB,GAAyBD,GAAe,SAG3C,QAENoB,EAAAA,IAAChC,EAAI,CAAC4B,KAAM,CAAEC,KAAM,GAAIC,OAAuBL,EAAmBM,OAAuBZ,GAAiBR,SACvGA"}
@@ -1,2 +1,2 @@
1
- import{jsxs as t,jsx as r}from"react/jsx-runtime";import"react";import i from"@mui/material/Grid";import{styled as e}from"@mui/material/styles";import a from"@mui/material/Typography";const o=e(i)((({theme:t})=>({padding:t.spacing(4.75,0,2.5,0),alignItems:"flex-start",flexWrap:"wrap",borderBottom:"1px solid rgba(0,0,0,0.2)"}))),l=e("div")((({theme:t})=>({paddingBottom:t.spacing(2),paddingRight:t.spacing(1.75)}))),n=e=>{const{children:n,description:m,descriptionTranslated:p,label:d,labelTranslated:s,mdProportion:c,smProportion:h}=e,[b,g]=c?c.split("x").map((t=>parseInt(t,10))):[4,8],[u,x]=h?h.split("x").map((t=>parseInt(t,10))):[];return t(o,{container:!0,children:[t(i,{item:!0,base:12,mobile:u,tablet:b,children:[r(a,{color:"textPrimary",component:"h3",variant:"subtitle1",children:s||d||null}),p||m?r(l,{children:r(a,{color:"textSecondary",variant:"caption",children:p||m||null})}):null]}),r(i,{item:!0,base:12,mobile:x,tablet:g,children:n})]})};export{n as default};
1
+ import{jsxs as t,jsx as r}from"react/jsx-runtime";import"react";import{styled as i}from"@mui/material/styles";import e from"@mui/material/Typography";import a from"@mui/material/Grid2";const o=i(a)((({theme:t})=>({padding:t.spacing(4.75,0,2.5,0),alignItems:"flex-start",flexWrap:"wrap",borderBottom:"1px solid rgba(0,0,0,0.2)"}))),l=i("div")((({theme:t})=>({paddingBottom:t.spacing(2),paddingRight:t.spacing(1.75)}))),n=i=>{const{children:n,description:m,descriptionTranslated:p,label:s,labelTranslated:d,mdProportion:c,smProportion:h}=i,[b,g]=c?c.split("x").map((t=>parseInt(t,10))):[4,8],[u,x]=h?h.split("x").map((t=>parseInt(t,10))):[];return t(o,{container:!0,children:[t(a,{size:{base:12,mobile:u,tablet:b},children:[r(e,{color:"textPrimary",component:"h3",variant:"subtitle1",children:d||s||null}),p||m?r(l,{children:r(e,{color:"textSecondary",variant:"caption",children:p||m||null})}):null]}),r(a,{size:{base:12,mobile:x,tablet:g},children:n})]})};export{n as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Form/FormItemLayout/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport Grid, { type GridSize } from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst StyledGrid = styled(Grid)(({ theme }) => ({\n padding: theme.spacing(4.75, 0, 2.5, 0),\n alignItems: 'flex-start',\n flexWrap: 'wrap',\n borderBottom: '1px solid rgba(0,0,0,0.2)',\n}));\n\nconst StyledDescription = styled('div')(({ theme }) => ({\n paddingBottom: theme.spacing(2),\n paddingRight: theme.spacing(1.75),\n}));\n\nexport interface FormItemLayoutProps {\n children: React.ReactNode;\n description?: React.ReactNode;\n descriptionTranslated?: string;\n label?: React.ReactNode;\n labelTranslated?: string;\n mdProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n smProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n}\n\ntype Props = FormItemLayoutProps;\nconst FormItemLayout = (props: Props) => {\n const { children, description, descriptionTranslated, label, labelTranslated, mdProportion, smProportion } =\n props;\n\n const [titleProportion, dataProportion] = mdProportion\n ? mdProportion.split('x').map((m) => parseInt(m, 10))\n : [4, 8];\n const [titleProportionSm, dataProportionSm] = smProportion\n ? smProportion.split('x').map((m) => parseInt(m, 10))\n : [];\n const castToGridSize = (data: unknown) => data as GridSize;\n\n return (\n <StyledGrid container>\n <Grid\n item\n base={12}\n mobile={castToGridSize(titleProportionSm)}\n tablet={castToGridSize(titleProportion)}\n >\n <Typography color=\"textPrimary\" component=\"h3\" variant=\"subtitle1\">\n {labelTranslated || label || null}\n </Typography>\n\n {descriptionTranslated || description ? (\n <StyledDescription>\n <Typography color=\"textSecondary\" variant=\"caption\">\n {descriptionTranslated || description || null}\n </Typography>\n </StyledDescription>\n ) : null}\n </Grid>\n <Grid item base={12} mobile={castToGridSize(dataProportionSm)} tablet={castToGridSize(dataProportion)}>\n {children}\n </Grid>\n </StyledGrid>\n );\n};\n\nexport default FormItemLayout;\n"],"names":["StyledGrid","styled","Grid","theme","padding","spacing","alignItems","flexWrap","borderBottom","StyledDescription","paddingBottom","paddingRight","FormItemLayout","props","children","description","descriptionTranslated","label","labelTranslated","mdProportion","smProportion","titleProportion","dataProportion","split","map","m","parseInt","titleProportionSm","dataProportionSm","_jsxs","container","item","base","mobile","tablet","_jsx","Typography","color","component","variant"],"mappings":"wLAMA,MAAMA,EAAaC,EAAOC,EAAPD,EAAa,EAAGE,YAAO,CACxCC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGVC,EAAoBR,EAAO,MAAPA,EAAc,EAAGE,YAAO,CAChDO,cAAeP,EAAME,QAAQ,GAC7BM,aAAcR,EAAME,QAAQ,UAcxBO,EAAkBC,IACtB,MAAMC,SAAEA,EAAQC,YAAEA,EAAWC,sBAAEA,EAAqBC,MAAEA,EAAKC,gBAAEA,EAAeC,aAAEA,EAAYC,aAAEA,GAC1FP,GAEKQ,EAAiBC,GAAkBH,EACtCA,EAAaI,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAC/C,CAAC,EAAG,IACDE,EAAmBC,GAAoBR,EAC1CA,EAAaG,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAC/C,GAGJ,OACEI,EAAC7B,EAAU,CAAC8B,uBACVD,EAAC3B,EAAI,CACH6B,MAAI,EACJC,KAAM,GACNC,OAAuBN,EACvBO,OAAuBb,EAAgBP,SAAA,CAEvCqB,EAACC,EAAU,CAACC,MAAM,cAAcC,UAAU,KAAKC,QAAQ,YAAWzB,SAC/DI,GAAmBD,GAAS,OAG9BD,GAAyBD,EACxBoB,EAAC1B,EAAiB,CAAAK,SAChBqB,EAACC,GAAWC,MAAM,gBAAgBE,QAAQ,UAASzB,SAChDE,GAAyBD,GAAe,SAG3C,QAENoB,EAACjC,EAAI,CAAC6B,MAAI,EAACC,KAAM,GAAIC,OAAuBL,EAAmBM,OAAuBZ,EAAeR,SAClGA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Form/FormItemLayout/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nimport Grid, {type GridSize} from '../../atoms/Grid';\n\nconst StyledGrid = styled(Grid)(({ theme }) => ({\n padding: theme.spacing(4.75, 0, 2.5, 0),\n alignItems: 'flex-start',\n flexWrap: 'wrap',\n borderBottom: '1px solid rgba(0,0,0,0.2)',\n}));\n\nconst StyledDescription = styled('div')(({ theme }) => ({\n paddingBottom: theme.spacing(2),\n paddingRight: theme.spacing(1.75),\n}));\n\nexport interface FormItemLayoutProps {\n children: React.ReactNode;\n description?: React.ReactNode;\n descriptionTranslated?: string;\n label?: React.ReactNode;\n labelTranslated?: string;\n mdProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n smProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n}\n\ntype Props = FormItemLayoutProps;\nconst FormItemLayout = (props: Props) => {\n const { children, description, descriptionTranslated, label, labelTranslated, mdProportion, smProportion } =\n props;\n\n const [titleProportion, dataProportion] = mdProportion\n ? mdProportion.split('x').map((m) => parseInt(m, 10))\n : [4, 8];\n const [titleProportionSm, dataProportionSm] = smProportion\n ? smProportion.split('x').map((m) => parseInt(m, 10))\n : [];\n const castToGridSize = (data: unknown) => data as GridSize;\n\n return (\n <StyledGrid container>\n <Grid size={{ base: 12, mobile: castToGridSize(titleProportionSm), tablet: castToGridSize(titleProportion) }}>\n <Typography color=\"textPrimary\" component=\"h3\" variant=\"subtitle1\">\n {labelTranslated || label || null}\n </Typography>\n\n {descriptionTranslated || description ? (\n <StyledDescription>\n <Typography color=\"textSecondary\" variant=\"caption\">\n {descriptionTranslated || description || null}\n </Typography>\n </StyledDescription>\n ) : null}\n </Grid>\n <Grid size={{ base: 12, mobile: castToGridSize(dataProportionSm), tablet: castToGridSize(dataProportion) }}>\n {children}\n </Grid>\n </StyledGrid>\n );\n};\n\nexport default FormItemLayout;\n"],"names":["StyledGrid","styled","Grid","theme","padding","spacing","alignItems","flexWrap","borderBottom","StyledDescription","paddingBottom","paddingRight","FormItemLayout","props","children","description","descriptionTranslated","label","labelTranslated","mdProportion","smProportion","titleProportion","dataProportion","split","map","m","parseInt","titleProportionSm","dataProportionSm","_jsxs","container","size","base","mobile","tablet","_jsx","Typography","color","component","variant"],"mappings":"yLAOA,MAAMA,EAAaC,EAAOC,EAAPD,EAAa,EAAGE,YAAO,CACxCC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGVC,EAAoBR,EAAO,MAAPA,EAAc,EAAGE,YAAO,CAChDO,cAAeP,EAAME,QAAQ,GAC7BM,aAAcR,EAAME,QAAQ,UAcxBO,EAAkBC,IACtB,MAAMC,SAAEA,EAAQC,YAAEA,EAAWC,sBAAEA,EAAqBC,MAAEA,EAAKC,gBAAEA,EAAeC,aAAEA,EAAYC,aAAEA,GAC1FP,GAEKQ,EAAiBC,GAAkBH,EACtCA,EAAaI,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAC/C,CAAC,EAAG,IACDE,EAAmBC,GAAoBR,EAC1CA,EAAaG,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAC/C,GAGJ,OACEI,EAAC7B,EAAU,CAAC8B,WAAS,EAAAhB,SAAA,CACnBe,EAAC3B,EAAI,CAAC6B,KAAM,CAAEC,KAAM,GAAIC,OAAuBN,EAAoBO,OAAuBb,GAAkBP,SAAA,CAC1GqB,EAACC,EAAU,CAACC,MAAM,cAAcC,UAAU,KAAKC,QAAQ,YAAWzB,SAC/DI,GAAmBD,GAAS,OAG9BD,GAAyBD,EACxBoB,EAAC1B,EAAiB,CAAAK,SAChBqB,EAACC,EAAU,CAACC,MAAM,gBAAgBE,QAAQ,mBACvCvB,GAAyBD,GAAe,SAG3C,QAENoB,EAACjC,EAAI,CAAC6B,KAAM,CAAEC,KAAM,GAAIC,OAAuBL,EAAmBM,OAAuBZ,GAAiBR,SACvGA"}
@@ -1,2 +1,2 @@
1
- "use strict";var i=require("react/jsx-runtime");require("react");var e=require("@mui/material/Grid"),t=require("@mui/material/styles"),r=require("@mui/material/Typography");const a=t.styled(e,{shouldForwardProp:i=>"titlePadding"!==i})((({theme:i,titlePadding:e})=>{switch(e){case"small":return{padding:i.spacing(3,0,1.5),[i.breakpoints.down("tablet")]:{padding:i.spacing(3,2,1.5)}};case"medium":return{padding:i.spacing(4,0,2),[i.breakpoints.down("tablet")]:{padding:i.spacing(4,2,2)}};default:return{padding:0}}})),d=t.styled(r)({width:191,height:16,fontSize:12,fontWeight:"normal",lineHeight:1.33,letterSpacing:.4,color:"rgba(0, 0, 0, 0.38)"});module.exports=({maxGridWidth:t=12,subTitle:n,title:l,children:s,titlePadding:c="medium"})=>i.jsxs(a,{container:!0,titlePadding:c,children:[i.jsxs(e,{item:!0,base:t,mobile:t,children:[l&&i.jsx(r,{variant:"h5",children:l}),n&&i.jsx("div",{children:i.jsx(d,{variant:"caption",children:n})})]}),s]});
1
+ "use strict";var i=require("react/jsx-runtime");require("react");var e=require("@mui/material/styles"),t=require("@mui/material/Typography"),r=require("@mui/material/Grid2");const a=e.styled(r,{shouldForwardProp:i=>"titlePadding"!==i})((({theme:i,titlePadding:e})=>{switch(e){case"small":return{padding:i.spacing(3,0,1.5),[i.breakpoints.down("tablet")]:{padding:i.spacing(3,2,1.5)}};case"medium":return{padding:i.spacing(4,0,2),[i.breakpoints.down("tablet")]:{padding:i.spacing(4,2,2)}};default:return{padding:0}}})),d=e.styled(t)({width:191,height:16,fontSize:12,fontWeight:"normal",lineHeight:1.33,letterSpacing:.4,color:"rgba(0, 0, 0, 0.38)"});module.exports=({maxGridWidth:e=12,subTitle:n,title:l,children:s,titlePadding:c="medium"})=>i.jsxs(a,{container:!0,titlePadding:c,children:[i.jsxs(r,{size:{base:e,mobile:e},children:[l&&i.jsx(t,{variant:"h5",children:l}),n&&i.jsx("div",{children:i.jsx(d,{variant:"caption",children:n})})]}),s]});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/GenericTableTitle/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\ninterface OuterProps {\n maxGridWidth?: boolean | 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n subTitle?: string;\n title?: string;\n children?: ReactNode;\n titlePadding?: 'medium' | 'small';\n}\n\nconst HeaderContainer = styled(Grid, {\n shouldForwardProp: (prop) => prop !== 'titlePadding',\n})<{ titlePadding: OuterProps['titlePadding'] }>(({ theme, titlePadding }) => {\n switch (titlePadding) {\n case 'small':\n return {\n padding: theme.spacing(3, 0, 1.5),\n [theme.breakpoints.down('tablet')]: {\n padding: theme.spacing(3, 2, 1.5),\n },\n };\n case 'medium':\n return {\n padding: theme.spacing(4, 0, 2),\n [theme.breakpoints.down('tablet')]: {\n padding: theme.spacing(4, 2, 2),\n },\n };\n default:\n return { padding: 0 };\n }\n});\n\nconst SubTitle = styled(Typography)({\n width: 191,\n height: 16,\n fontSize: 12,\n fontWeight: 'normal',\n lineHeight: 1.33,\n letterSpacing: 0.4,\n color: 'rgba(0, 0, 0, 0.38)',\n});\n\nconst GenericTableTitle = ({\n maxGridWidth = 12,\n subTitle,\n title,\n children,\n titlePadding = 'medium',\n}: OuterProps): JSX.Element => {\n return (\n <HeaderContainer container titlePadding={titlePadding}>\n <Grid item base={maxGridWidth} mobile={maxGridWidth}>\n {title && <Typography variant=\"h5\">{title}</Typography>}\n {subTitle && (\n <div>\n <SubTitle variant=\"caption\">{subTitle}</SubTitle>\n </div>\n )}\n </Grid>\n\n {children}\n </HeaderContainer>\n );\n};\n\nexport default GenericTableTitle;\n"],"names":["HeaderContainer","styled","Grid","shouldForwardProp","prop","theme","titlePadding","padding","spacing","breakpoints","down","SubTitle","Typography","width","height","fontSize","fontWeight","lineHeight","letterSpacing","color","maxGridWidth","subTitle","title","children","_jsxs","container","item","base","mobile","_jsx","variant"],"mappings":"6KAcA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAM,CACnCC,kBAAoBC,GAAkB,iBAATA,GADPH,EAEyB,EAAGI,QAAOC,mBACzD,OAAQA,GACN,IAAK,QACH,MAAO,CACLC,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAC7B,CAACH,EAAMI,YAAYC,KAAK,WAAY,CAClCH,QAASF,EAAMG,QAAQ,EAAG,EAAG,OAGnC,IAAK,SACH,MAAO,CACLD,QAASF,EAAMG,QAAQ,EAAG,EAAG,GAC7B,CAACH,EAAMI,YAAYC,KAAK,WAAY,CAClCH,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAGnC,QACE,MAAO,CAAED,QAAS,OAIlBI,EAAWV,EAAAA,OAAOW,EAAPX,CAAmB,CAClCY,MAAO,IACPC,OAAQ,GACRC,SAAU,GACVC,WAAY,SACZC,WAAY,KACZC,cAAe,GACfC,MAAO,uCAGiB,EACxBC,eAAe,GACfC,WACAC,QACAC,WACAjB,eAAe,YAGbkB,EAAAA,KAACxB,EAAe,CAACyB,aAAUnB,aAAcA,EAAYiB,SAAA,CACnDC,OAACtB,GAAKwB,MAAI,EAACC,KAAMP,EAAcQ,OAAQR,EAAYG,SAAA,CAChDD,GAASO,EAAAA,IAACjB,GAAWkB,QAAQ,KAAIP,SAAED,IACnCD,GACCQ,EAAAA,IAAA,MAAA,CAAAN,SACEM,MAAClB,EAAQ,CAACmB,QAAQ,UAASP,SAAEF,SAKlCE"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/GenericTableTitle/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nimport Grid, {type GridSize} from '../atoms/Grid';\n\ninterface OuterProps {\n maxGridWidth?: GridSize;\n subTitle?: string;\n title?: string;\n children?: ReactNode;\n titlePadding?: 'medium' | 'small';\n}\n\nconst HeaderContainer = styled(Grid, {\n shouldForwardProp: (prop) => prop !== 'titlePadding',\n})<{ titlePadding: OuterProps['titlePadding'] }>(({ theme, titlePadding }) => {\n switch (titlePadding) {\n case 'small':\n return {\n padding: theme.spacing(3, 0, 1.5),\n [theme.breakpoints.down('tablet')]: {\n padding: theme.spacing(3, 2, 1.5),\n },\n };\n case 'medium':\n return {\n padding: theme.spacing(4, 0, 2),\n [theme.breakpoints.down('tablet')]: {\n padding: theme.spacing(4, 2, 2),\n },\n };\n default:\n return { padding: 0 };\n }\n});\n\nconst SubTitle = styled(Typography)({\n width: 191,\n height: 16,\n fontSize: 12,\n fontWeight: 'normal',\n lineHeight: 1.33,\n letterSpacing: 0.4,\n color: 'rgba(0, 0, 0, 0.38)',\n});\n\nconst GenericTableTitle = ({\n maxGridWidth = 12,\n subTitle,\n title,\n children,\n titlePadding = 'medium',\n}: OuterProps): JSX.Element => {\n return (\n <HeaderContainer container titlePadding={titlePadding}>\n <Grid size={{ base: maxGridWidth, mobile: maxGridWidth }}>\n {title && <Typography variant=\"h5\">{title}</Typography>}\n {subTitle && (\n <div>\n <SubTitle variant=\"caption\">{subTitle}</SubTitle>\n </div>\n )}\n </Grid>\n\n {children}\n </HeaderContainer>\n );\n};\n\nexport default GenericTableTitle;\n"],"names":["HeaderContainer","styled","Grid","shouldForwardProp","prop","theme","titlePadding","padding","spacing","breakpoints","down","SubTitle","Typography","width","height","fontSize","fontWeight","lineHeight","letterSpacing","color","maxGridWidth","subTitle","title","children","_jsxs","container","size","base","mobile","_jsx","variant"],"mappings":"8KAeA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAM,CACnCC,kBAAoBC,GAAkB,iBAATA,GADPH,EAEyB,EAAGI,QAAOC,mBACzD,OAAQA,GACN,IAAK,QACH,MAAO,CACLC,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAC7B,CAACH,EAAMI,YAAYC,KAAK,WAAY,CAClCH,QAASF,EAAMG,QAAQ,EAAG,EAAG,OAGnC,IAAK,SACH,MAAO,CACLD,QAASF,EAAMG,QAAQ,EAAG,EAAG,GAC7B,CAACH,EAAMI,YAAYC,KAAK,WAAY,CAClCH,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAGnC,QACE,MAAO,CAAED,QAAS,OAIlBI,EAAWV,EAAAA,OAAOW,EAAPX,CAAmB,CAClCY,MAAO,IACPC,OAAQ,GACRC,SAAU,GACVC,WAAY,SACZC,WAAY,KACZC,cAAe,GACfC,MAAO,uCAGiB,EACxBC,eAAe,GACfC,WACAC,QACAC,WACAjB,eAAe,YAGbkB,EAAAA,KAACxB,EAAe,CAACyB,WAAS,EAACnB,aAAcA,EAAYiB,SAAA,CACnDC,OAACtB,EAAI,CAACwB,KAAM,CAAEC,KAAMP,EAAcQ,OAAQR,GAAcG,SAAA,CACrDD,GAASO,EAAAA,IAACjB,EAAU,CAACkB,QAAQ,KAAIP,SAAED,IACnCD,GACCQ,EAAAA,IAAA,MAAA,CAAAN,SACEM,MAAClB,EAAQ,CAACmB,QAAQ,UAASP,SAAEF,SAKlCE"}
@@ -1,7 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
+ import { GridSize } from '@mui/material/Grid2';
2
3
 
3
4
  interface OuterProps {
4
- maxGridWidth?: boolean | 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
5
+ maxGridWidth?: GridSize;
5
6
  subTitle?: string;
6
7
  title?: string;
7
8
  children?: ReactNode;
@@ -1,2 +1,2 @@
1
- import{jsxs as i,jsx as t}from"react/jsx-runtime";import"react";import e from"@mui/material/Grid";import{styled as a}from"@mui/material/styles";import r from"@mui/material/Typography";const n=a(e,{shouldForwardProp:i=>"titlePadding"!==i})((({theme:i,titlePadding:t})=>{switch(t){case"small":return{padding:i.spacing(3,0,1.5),[i.breakpoints.down("tablet")]:{padding:i.spacing(3,2,1.5)}};case"medium":return{padding:i.spacing(4,0,2),[i.breakpoints.down("tablet")]:{padding:i.spacing(4,2,2)}};default:return{padding:0}}})),d=a(r)({width:191,height:16,fontSize:12,fontWeight:"normal",lineHeight:1.33,letterSpacing:.4,color:"rgba(0, 0, 0, 0.38)"}),l=({maxGridWidth:a=12,subTitle:l,title:o,children:m,titlePadding:p="medium"})=>i(n,{container:!0,titlePadding:p,children:[i(e,{item:!0,base:a,mobile:a,children:[o&&t(r,{variant:"h5",children:o}),l&&t("div",{children:t(d,{variant:"caption",children:l})})]}),m]});export{l as default};
1
+ import{jsxs as i,jsx as t}from"react/jsx-runtime";import"react";import{styled as e}from"@mui/material/styles";import a from"@mui/material/Typography";import r from"@mui/material/Grid2";const n=e(r,{shouldForwardProp:i=>"titlePadding"!==i})((({theme:i,titlePadding:t})=>{switch(t){case"small":return{padding:i.spacing(3,0,1.5),[i.breakpoints.down("tablet")]:{padding:i.spacing(3,2,1.5)}};case"medium":return{padding:i.spacing(4,0,2),[i.breakpoints.down("tablet")]:{padding:i.spacing(4,2,2)}};default:return{padding:0}}})),d=e(a)({width:191,height:16,fontSize:12,fontWeight:"normal",lineHeight:1.33,letterSpacing:.4,color:"rgba(0, 0, 0, 0.38)"}),l=({maxGridWidth:e=12,subTitle:l,title:o,children:m,titlePadding:p="medium"})=>i(n,{container:!0,titlePadding:p,children:[i(r,{size:{base:e,mobile:e},children:[o&&t(a,{variant:"h5",children:o}),l&&t("div",{children:t(d,{variant:"caption",children:l})})]}),m]});export{l as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/GenericTableTitle/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\ninterface OuterProps {\n maxGridWidth?: boolean | 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n subTitle?: string;\n title?: string;\n children?: ReactNode;\n titlePadding?: 'medium' | 'small';\n}\n\nconst HeaderContainer = styled(Grid, {\n shouldForwardProp: (prop) => prop !== 'titlePadding',\n})<{ titlePadding: OuterProps['titlePadding'] }>(({ theme, titlePadding }) => {\n switch (titlePadding) {\n case 'small':\n return {\n padding: theme.spacing(3, 0, 1.5),\n [theme.breakpoints.down('tablet')]: {\n padding: theme.spacing(3, 2, 1.5),\n },\n };\n case 'medium':\n return {\n padding: theme.spacing(4, 0, 2),\n [theme.breakpoints.down('tablet')]: {\n padding: theme.spacing(4, 2, 2),\n },\n };\n default:\n return { padding: 0 };\n }\n});\n\nconst SubTitle = styled(Typography)({\n width: 191,\n height: 16,\n fontSize: 12,\n fontWeight: 'normal',\n lineHeight: 1.33,\n letterSpacing: 0.4,\n color: 'rgba(0, 0, 0, 0.38)',\n});\n\nconst GenericTableTitle = ({\n maxGridWidth = 12,\n subTitle,\n title,\n children,\n titlePadding = 'medium',\n}: OuterProps): JSX.Element => {\n return (\n <HeaderContainer container titlePadding={titlePadding}>\n <Grid item base={maxGridWidth} mobile={maxGridWidth}>\n {title && <Typography variant=\"h5\">{title}</Typography>}\n {subTitle && (\n <div>\n <SubTitle variant=\"caption\">{subTitle}</SubTitle>\n </div>\n )}\n </Grid>\n\n {children}\n </HeaderContainer>\n );\n};\n\nexport default GenericTableTitle;\n"],"names":["HeaderContainer","styled","Grid","shouldForwardProp","prop","theme","titlePadding","padding","spacing","breakpoints","down","SubTitle","Typography","width","height","fontSize","fontWeight","lineHeight","letterSpacing","color","GenericTableTitle","maxGridWidth","subTitle","title","children","_jsxs","container","item","base","mobile","_jsx","variant"],"mappings":"wLAcA,MAAMA,EAAkBC,EAAOC,EAAM,CACnCC,kBAAoBC,GAAkB,iBAATA,GADPH,EAEyB,EAAGI,QAAOC,mBACzD,OAAQA,GACN,IAAK,QACH,MAAO,CACLC,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAC7B,CAACH,EAAMI,YAAYC,KAAK,WAAY,CAClCH,QAASF,EAAMG,QAAQ,EAAG,EAAG,OAGnC,IAAK,SACH,MAAO,CACLD,QAASF,EAAMG,QAAQ,EAAG,EAAG,GAC7B,CAACH,EAAMI,YAAYC,KAAK,WAAY,CAClCH,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAGnC,QACE,MAAO,CAAED,QAAS,OAIlBI,EAAWV,EAAOW,EAAPX,CAAmB,CAClCY,MAAO,IACPC,OAAQ,GACRC,SAAU,GACVC,WAAY,SACZC,WAAY,KACZC,cAAe,GACfC,MAAO,wBAGHC,EAAoB,EACxBC,eAAe,GACfC,WACAC,QACAC,WACAlB,eAAe,YAGbmB,EAACzB,EAAe,CAAC0B,aAAUpB,aAAcA,EAAYkB,SAAA,CACnDC,EAACvB,GAAKyB,MAAI,EAACC,KAAMP,EAAcQ,OAAQR,EAAYG,SAAA,CAChDD,GAASO,EAAClB,GAAWmB,QAAQ,KAAIP,SAAED,IACnCD,GACCQ,EAAA,MAAA,CAAAN,SACEM,EAACnB,EAAQ,CAACoB,QAAQ,UAASP,SAAEF,SAKlCE"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/GenericTableTitle/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nimport Grid, {type GridSize} from '../atoms/Grid';\n\ninterface OuterProps {\n maxGridWidth?: GridSize;\n subTitle?: string;\n title?: string;\n children?: ReactNode;\n titlePadding?: 'medium' | 'small';\n}\n\nconst HeaderContainer = styled(Grid, {\n shouldForwardProp: (prop) => prop !== 'titlePadding',\n})<{ titlePadding: OuterProps['titlePadding'] }>(({ theme, titlePadding }) => {\n switch (titlePadding) {\n case 'small':\n return {\n padding: theme.spacing(3, 0, 1.5),\n [theme.breakpoints.down('tablet')]: {\n padding: theme.spacing(3, 2, 1.5),\n },\n };\n case 'medium':\n return {\n padding: theme.spacing(4, 0, 2),\n [theme.breakpoints.down('tablet')]: {\n padding: theme.spacing(4, 2, 2),\n },\n };\n default:\n return { padding: 0 };\n }\n});\n\nconst SubTitle = styled(Typography)({\n width: 191,\n height: 16,\n fontSize: 12,\n fontWeight: 'normal',\n lineHeight: 1.33,\n letterSpacing: 0.4,\n color: 'rgba(0, 0, 0, 0.38)',\n});\n\nconst GenericTableTitle = ({\n maxGridWidth = 12,\n subTitle,\n title,\n children,\n titlePadding = 'medium',\n}: OuterProps): JSX.Element => {\n return (\n <HeaderContainer container titlePadding={titlePadding}>\n <Grid size={{ base: maxGridWidth, mobile: maxGridWidth }}>\n {title && <Typography variant=\"h5\">{title}</Typography>}\n {subTitle && (\n <div>\n <SubTitle variant=\"caption\">{subTitle}</SubTitle>\n </div>\n )}\n </Grid>\n\n {children}\n </HeaderContainer>\n );\n};\n\nexport default GenericTableTitle;\n"],"names":["HeaderContainer","styled","Grid","shouldForwardProp","prop","theme","titlePadding","padding","spacing","breakpoints","down","SubTitle","Typography","width","height","fontSize","fontWeight","lineHeight","letterSpacing","color","GenericTableTitle","maxGridWidth","subTitle","title","children","_jsxs","container","size","base","mobile","_jsx","variant"],"mappings":"yLAeA,MAAMA,EAAkBC,EAAOC,EAAM,CACnCC,kBAAoBC,GAAkB,iBAATA,GADPH,EAEyB,EAAGI,QAAOC,mBACzD,OAAQA,GACN,IAAK,QACH,MAAO,CACLC,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAC7B,CAACH,EAAMI,YAAYC,KAAK,WAAY,CAClCH,QAASF,EAAMG,QAAQ,EAAG,EAAG,OAGnC,IAAK,SACH,MAAO,CACLD,QAASF,EAAMG,QAAQ,EAAG,EAAG,GAC7B,CAACH,EAAMI,YAAYC,KAAK,WAAY,CAClCH,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAGnC,QACE,MAAO,CAAED,QAAS,OAIlBI,EAAWV,EAAOW,EAAPX,CAAmB,CAClCY,MAAO,IACPC,OAAQ,GACRC,SAAU,GACVC,WAAY,SACZC,WAAY,KACZC,cAAe,GACfC,MAAO,wBAGHC,EAAoB,EACxBC,eAAe,GACfC,WACAC,QACAC,WACAlB,eAAe,YAGbmB,EAACzB,EAAe,CAAC0B,WAAS,EAACpB,aAAcA,EAAYkB,SAAA,CACnDC,EAACvB,EAAI,CAACyB,KAAM,CAAEC,KAAMP,EAAcQ,OAAQR,GAAcG,SAAA,CACrDD,GAASO,EAAClB,EAAU,CAACmB,QAAQ,KAAIP,SAAED,IACnCD,GACCQ,EAAA,MAAA,CAAAN,SACEM,EAACnB,EAAQ,CAACoB,QAAQ,UAASP,SAAEF,SAKlCE"}
@@ -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/Grid"),s=require("@mui/material/IconButton"),o=require("@mui/material/styles"),d=require("@mui/material/Typography"),l=require("@mui/material/useMediaQuery"),c=require("../../icons/Add/index.cjs.js"),p=require("../../icons/ArrowLeft02/index.cjs.js"),m=require("../../utilities/renderUtilities.cjs.js"),h=require("../../utilities/validation.cjs.js"),g=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=o.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"}))),v=o.styled(r)((({theme:e})=>({[e.breakpoints.down("laptop")]:{width:"100%",paddingTop:e.spacing(2)}}))),y=o.styled(r)((({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)}}))),k=o.styled(r)((({theme:e})=>({paddingTop:e.spacing(2)}))),A=o.styled(r)((()=>({flexGrow:1}))),T=o.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)}}))),B=o.styled(c)((({theme:e})=>({marginRight:e.spacing(1)}))),C=o.styled(s,{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)}}))),L=o.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=o.styled(r)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),W=o.styled(d)((()=>({lineHeight:"26px"}))),w=o.styled(d)((()=>({fontWeight:"bold"}))),S=o.styled(a)((({theme:e})=>({marginBottom:e.spacing(4)}))),_=({title:t})=>e.jsx(w,{component:"h2",variant:"h5",children:t}),E=o.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=_,exports.RIGHT_HORIZONTAL_SPACE_CLASSNAME="right-horizontal-content-space",exports.VERTICAL_SPACE_CLASSNAME="vertical-content-space",exports.default=a=>{const{actionBtnTitle:s,caption:d,children:c,contextButtons:b,documentTitle:w,fluid:I=!1,fullWidth:P,header:R,hideHeader:z,actionButtonLink:F,openLinkInNewTab:H=!1,pageHeader:N,showActionButton:M,showAddIcon:O,title:D,titleComponent:G,toPrevious:V,toParent:Z,strictToParent:$,navigate:U,hideDivider:Q=!1,customActionButtons:J,useAlternateBackground:K=!1,titleComponentAfter:X,errorBoundarySomethingWentWrongText:Y}=a,ee=o.useTheme(),te=l(ee.breakpoints.down("tablet")),ie=m.getMicroFrontendAttribute("data-portal-base-url")||"/",ne=F?.startsWith("https://"),ae=ne?F:void 0!==F?h.joinUrlPaths(ie,F):"";return e.jsx(E,{useAlternateBackground:K,children:e.jsxs(f,{fluid:I,children:[w&&e.jsx(x,{children:w}),N||null,e.jsxs(L,{children:[N&&e.jsx(u,{size:16,variant:"vertical"}),!z&&e.jsxs(e.Fragment,{children:[e.jsxs(y,{container:!0,alignItems:"center",direction:"column",children:[e.jsx(r,{container:!0,item:!0,alignContent:"space-between",direction:"row",children:e.jsx(q,{item:!0,children:b?.map((i=>e.jsx("div",{children:i},`context-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),e.jsxs(k,{container:!0,item:!0,children:[(Z||V)&&e.jsx(i,{children:e.jsx(C,{"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(p,{})})}),e.jsxs(A,{item:!0,children:[G?e.jsx(G,{}):e.jsxs(i,{alignItems:"center",display:"flex",gap:2,children:[e.jsx(_,{title:D}),X]}),d&&e.jsx(W,{component:"h3",variant:"caption",children:d})]}),M&&e.jsxs(e.Fragment,{children:[te&&e.jsx(u,{size:56,variant:"vertical"}),e.jsx(v,{item:!0,children:e.jsxs(n,{"data-testid":`Action-button-${s}`,fullWidth:!0,href:H||ne?ae:"",rel:H?"noopener noreferrer":void 0,target:H?"_blank":void 0,variant:"contained",onClick:H||ne?()=>{}:()=>U(F),children:[O&&e.jsx(B,{size:"sm"}),s]})})]}),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(v,{item:!0,children:i})]},`custom-action-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))]})]}),!Q&&e.jsx(S,{})]}),e.jsxs(j,{fullWidth:P,children:[R?e.jsx(T,{children:R}):null,e.jsx(g,{identifier:w,somethingWentWrongText:Y,children:e.jsx(e.Fragment,{children:c})})]})]})]})})},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"),d=require("@mui/material/useMediaQuery"),l=require("../../icons/Add/index.cjs.js"),c=require("../../icons/ArrowLeft02/index.cjs.js"),p=require("../../utilities/renderUtilities.cjs.js"),h=require("../../utilities/validation.cjs.js"),g=require("@mui/material/Grid2"),m=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"}))),v=s.styled(g)((({theme:e})=>({[e.breakpoints.down("laptop")]:{width:"100%",paddingTop:e.spacing(2)}}))),y=s.styled(g)((({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)}}))),k=s.styled(g)((({theme:e})=>({paddingTop:e.spacing(2)}))),A=s.styled(g)((()=>({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)}}))),B=s.styled(l)((({theme:e})=>({marginRight:e.spacing(1)}))),C=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)}}))),L=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(g)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),W=s.styled(o)((()=>({lineHeight:"26px"}))),w=s.styled(o)((()=>({fontWeight:"bold"}))),S=s.styled(a)((({theme:e})=>({marginBottom:e.spacing(4)}))),_=({title:t})=>e.jsx(w,{component:"h2",variant:"h5",children:t}),E=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=_,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:l,contextButtons:b,documentTitle:w,fluid:I=!1,fullWidth:P,header:R,hideHeader:z,actionButtonLink:F,openLinkInNewTab:H=!1,pageHeader:N,showActionButton:M,showAddIcon:O,title:D,titleComponent:G,toPrevious:V,toParent:Z,strictToParent:$,navigate:U,hideDivider:Q=!1,customActionButtons:J,useAlternateBackground:K=!1,titleComponentAfter:X,errorBoundarySomethingWentWrongText:Y}=a,ee=s.useTheme(),te=d(ee.breakpoints.down("tablet")),ie=p.getMicroFrontendAttribute("data-portal-base-url")||"/",ne=F?.startsWith("https://"),ae=ne?F:void 0!==F?h.joinUrlPaths(ie,F):"";return e.jsx(E,{useAlternateBackground:K,children:e.jsxs(f,{fluid:I,children:[w&&e.jsx(x,{children:w}),N||null,e.jsxs(L,{children:[N&&e.jsx(u,{size:16,variant:"vertical"}),!z&&e.jsxs(e.Fragment,{children:[e.jsxs(y,{container:!0,alignItems:"center",direction:"column",children:[e.jsx(g,{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(k,{container:!0,children:[(Z||V)&&e.jsx(i,{children:e.jsx(C,{"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(_,{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(v,{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(B,{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(v,{children:i})]},`custom-action-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))]})]}),!Q&&e.jsx(S,{})]}),e.jsxs(j,{fullWidth:P,children:[R?e.jsx(T,{children:R}):null,e.jsx(m,{identifier:w,somethingWentWrongText:Y,children:e.jsx(e.Fragment,{children:l})})]})]})]})})},exports.maxWidth=b;
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 Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport Add from '../../icons/Add';\nimport ArrowLeft02 from '../../icons/ArrowLeft02';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\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}));\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 }) => (\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 = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid container item alignContent=\"space-between\" direction=\"row\">\n <StyledHeaderContainer item>\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 item>\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 item>\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 item>\n {/* @ts-expect-error - Button props type mismatch with href/target */}\n <Button\n data-testid={`Action-button-${actionBtnTitle}`}\n fullWidth={true}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n target={openLinkInNewTab ? '_blank' : undefined}\n variant=\"contained\"\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps\n ? () => navigate(actionButtonLink)\n : () => {}\n }\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 item>{button}</StyledActionButtonGrid>\n </div>\n ))}\n </StyledTitleContainer>\n </StyledHeader>\n {!hideDivider && <StyledPageDivider />}\n </>\n )}\n <FullWidthContainer fullWidth={fullWidth}>\n {header ? <StyledTopSection>{header}</StyledTopSection> : null}\n <FDErrorBoundary\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","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","marginRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","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","item","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowLeft02","gap","Button","href","rel","target","FullWidthContainer","FDErrorBoundary","identifier","somethingWentWrongText"],"mappings":"kvBAoBO,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,WAAY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,EAAAA,IAAC5B,EAAgB,CAAA+B,SAAEc,IAA6B,KAC1DjB,EAAAA,IAACoE,EAAe,CACdC,WAAYtD,EACZuD,uBAAwBrC,EAAmC9B,SAG3DH,MAAAgD,EAAAA,SAAA,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)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n}));\n\nconst StyledTitleSection = styled(Grid)(() => ({\n flexGrow: 1,\n}));\n\nconst StyledTopSection = styled('div')(({ theme }) => ({\n maxWidth,\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('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 }) => (\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 = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid 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 {/* @ts-expect-error - Button props type mismatch with href/target */}\n <Button\n data-testid={`Action-button-${actionBtnTitle}`}\n fullWidth={true}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps\n ? () => navigate(actionButtonLink)\n : () => {}\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","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","marginRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","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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jsx as t,jsxs as i,Fragment as e}from"react/jsx-runtime";import n from"react";import a from"@mui/material/Box";import o from"@mui/material/Button";import r from"@mui/material/Divider";import d from"@mui/material/Grid";import l from"@mui/material/IconButton";import{styled as m,useTheme as p}from"@mui/material/styles";import c from"@mui/material/Typography";import s from"@mui/material/useMediaQuery";import h from"../../icons/Add/index.js";import g from"../../icons/ArrowLeft02/index.js";import{getMicroFrontendAttribute as u}from"../../utilities/renderUtilities.js";import{joinUrlPaths as f}from"../../utilities/validation.js";import b from"../FDErrorBoundary/index.js";import v from"../Spacer/index.js";import k from"./DocumentTitle.js";import x 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=m("div")((({theme:t,fluid:i})=>({maxWidth:i?"none":T,[t.breakpoints.down("laptop")]:{maxWidth:"none"},padding:t.spacing(2,4),position:"relative",minHeight:"100vh"}))),j=m(d)((({theme:t})=>({[t.breakpoints.down("laptop")]:{width:"100%",paddingTop:t.spacing(2)}}))),A=m(d)((({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)}}))),L=m(d)((({theme:t})=>({paddingTop:t.spacing(2)}))),z=m(d)((()=>({flexGrow:1}))),I=m("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=m(h)((({theme:t})=>({marginRight:t.spacing(1)}))),D=m(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=m("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=m(d)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),E=m(c)((()=>({lineHeight:"26px"}))),F=m(c)((()=>({fontWeight:"bold"}))),G=m(r)((({theme:t})=>({marginBottom:t.spacing(4)}))),$=({title:i})=>t(F,{component:"h2",variant:"h5",children:i}),S=m("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:m,children:c,contextButtons:h,documentTitle:B,fluid:w=!1,fullWidth:W,header:y,hideHeader:T,actionButtonLink:F,openLinkInNewTab:V=!1,pageHeader:_,showActionButton:M,showAddIcon:N,title:Q,titleComponent:U,toPrevious:q,toParent:J,strictToParent:K,navigate:O,hideDivider:X=!1,customActionButtons:Y,useAlternateBackground:Z=!1,titleComponentAfter:tt,errorBoundarySomethingWentWrongText:it}=r,et=p(),nt=s(et.breakpoints.down("tablet")),at=u("data-portal-base-url")||"/",ot=F?.startsWith("https://"),rt=ot?F:void 0!==F?f(at,F):"";return t(S,{useAlternateBackground:Z,children:i(C,{fluid:w,children:[B&&t(k,{children:B}),_||null,i(H,{children:[_&&t(v,{size:16,variant:"vertical"}),!T&&i(e,{children:[i(A,{container:!0,alignItems:"center",direction:"column",children:[t(d,{container:!0,item:!0,alignContent:"space-between",direction:"row",children:t(P,{item:!0,children:h?.map((i=>t("div",{children:i},`context-button-${n.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),i(L,{container:!0,item:!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(z,{item:!0,children:[U?t(U,{}):i(a,{alignItems:"center",display:"flex",gap:2,children:[t($,{title:Q}),tt]}),m&&t(E,{component:"h3",variant:"caption",children:m})]}),M&&i(e,{children:[nt&&t(v,{size:56,variant:"vertical"}),t(j,{item:!0,children:i(o,{"data-testid":`Action-button-${l}`,fullWidth:!0,href:V||ot?rt:"",rel:V?"noopener noreferrer":void 0,target:V?"_blank":void 0,variant:"contained",onClick:V||ot?()=>{}:()=>O(F),children:[N&&t(R,{size:"sm"}),l]})})]}),Y?.map((e=>i("div",{children:[nt&&t(v,{size:56,variant:"vertical"}),!nt&&t(v,{size:16,variant:"vertical"}),t(j,{item:!0,children:e})]},`custom-action-button-${n.isValidElement(e)?e.props?.["data-testid"]||e.props?.children:"fallback"}`)))]})]}),!X&&t(G,{})]}),i(x,{fullWidth:W,children:[y?t(I,{children:y}):null,t(b,{identifier:B,somethingWentWrongText:it,children:t(e,{children:c})})]})]})]})})};export{B as HORIZONTAL_SPACE_CLASSNAME,w as LEFT_HORIZONTAL_SPACE_CLASSNAME,$ as PageTitle,W as RIGHT_HORIZONTAL_SPACE_CLASSNAME,y as VERTICAL_SPACE_CLASSNAME,V as default,T as maxWidth};
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 d from"@mui/material/IconButton";import{styled as l,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 h from"../../icons/ArrowLeft02/index.js";import{getMicroFrontendAttribute as g}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 v from"../Spacer/index.js";import k from"./DocumentTitle.js";import x 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=l("div")((({theme:t,fluid:i})=>({maxWidth:i?"none":T,[t.breakpoints.down("laptop")]:{maxWidth:"none"},padding:t.spacing(2,4),position:"relative",minHeight:"100vh"}))),j=l(f)((({theme:t})=>({[t.breakpoints.down("laptop")]:{width:"100%",paddingTop:t.spacing(2)}}))),A=l(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)}}))),L=l(f)((({theme:t})=>({paddingTop:t.spacing(2)}))),z=l(f)((()=>({flexGrow:1}))),I=l("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=l(s)((({theme:t})=>({marginRight:t.spacing(1)}))),D=l(d,{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=l("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=l(f)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),E=l(c)((()=>({lineHeight:"26px"}))),F=l(c)((()=>({fontWeight:"bold"}))),G=l(r)((({theme:t})=>({marginBottom:t.spacing(4)}))),$=({title:i})=>t(F,{component:"h2",variant:"h5",children:i}),S=l("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:d,caption:l,children:c,contextButtons:s,documentTitle:B,fluid:w=!1,fullWidth:W,header:y,hideHeader:T,actionButtonLink:F,openLinkInNewTab:V=!1,pageHeader:_,showActionButton:M,showAddIcon:N,title:Q,titleComponent:U,toPrevious:q,toParent:J,strictToParent:K,navigate:O,hideDivider:X=!1,customActionButtons:Y,useAlternateBackground:Z=!1,titleComponentAfter:tt,errorBoundarySomethingWentWrongText:it}=r,nt=p(),et=m(nt.breakpoints.down("tablet")),at=g("data-portal-base-url")||"/",ot=F?.startsWith("https://"),rt=ot?F:void 0!==F?u(at,F):"";return t(S,{useAlternateBackground:Z,children:i(C,{fluid:w,children:[B&&t(k,{children:B}),_||null,i(H,{children:[_&&t(v,{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(P,{children:s?.map((i=>t("div",{children:i},`context-button-${e.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),i(L,{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(h,{})})}),i(z,{children:[U?t(U,{}):i(a,{alignItems:"center",display:"flex",gap:2,children:[t($,{title:Q}),tt]}),l&&t(E,{component:"h3",variant:"caption",children:l})]}),M&&i(n,{children:[et&&t(v,{size:56,variant:"vertical"}),t(j,{children:i(o,{"data-testid":`Action-button-${d}`,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"}),d]})})]}),Y?.map((n=>i("div",{children:[et&&t(v,{size:56,variant:"vertical"}),!et&&t(v,{size:16,variant:"vertical"}),t(j,{children:n})]},`custom-action-button-${e.isValidElement(n)?n.props?.["data-testid"]||n.props?.children:"fallback"}`)))]})]}),!X&&t(G,{})]}),i(x,{fullWidth:W,children:[y?t(I,{children:y}):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,W as RIGHT_HORIZONTAL_SPACE_CLASSNAME,y as VERTICAL_SPACE_CLASSNAME,V as default,T as maxWidth};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode } from 'react';\n\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Divider from '@mui/material/Divider';\nimport Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport Add from '../../icons/Add';\nimport ArrowLeft02 from '../../icons/ArrowLeft02';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\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}));\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 }) => (\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 = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid container item alignContent=\"space-between\" direction=\"row\">\n <StyledHeaderContainer item>\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 item>\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 item>\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 item>\n {/* @ts-expect-error - Button props type mismatch with href/target */}\n <Button\n data-testid={`Action-button-${actionBtnTitle}`}\n fullWidth={true}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n target={openLinkInNewTab ? '_blank' : undefined}\n variant=\"contained\"\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps\n ? () => navigate(actionButtonLink)\n : () => {}\n }\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 item>{button}</StyledActionButtonGrid>\n </div>\n ))}\n </StyledTitleContainer>\n </StyledHeader>\n {!hideDivider && <StyledPageDivider />}\n </>\n )}\n <FullWidthContainer fullWidth={fullWidth}>\n {header ? <StyledTopSection>{header}</StyledTopSection> : null}\n <FDErrorBoundary\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","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","marginRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","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","item","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowLeft02","gap","Button","href","rel","target","FullWidthContainer","FDErrorBoundary","identifier","somethingWentWrongText"],"mappings":"kxBAoBO,MAAMA,EAA6B,2BAC7BC,EAAkC,gCAClCC,EAAmC,iCACnCC,EAA2B,yBAC3BC,EAAW,K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,SAAW,uBAS5H4B,GAAe/B,EAACL,EAAiB,CAAA,MAGvCkD,EAACuB,EAAkB,CAACnD,UAAWA,EAASd,SAAA,CACrCe,EAASlB,EAAC5B,EAAgB,CAAA+B,SAAEe,IAA6B,KAC1DlB,EAACqE,EAAe,CACdC,WAAYtD,EACZuD,uBAAwBrC,GAAmC/B,SAG3DH,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)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n}));\n\nconst StyledTitleSection = styled(Grid)(() => ({\n flexGrow: 1,\n}));\n\nconst StyledTopSection = styled('div')(({ theme }) => ({\n maxWidth,\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('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 }) => (\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 = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid 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 {/* @ts-expect-error - Button props type mismatch with href/target */}\n <Button\n data-testid={`Action-button-${actionBtnTitle}`}\n fullWidth={true}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps\n ? () => navigate(actionButtonLink)\n : () => {}\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","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledAdd","Add","marginRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","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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,CAAC1F,WAAW,SAASqB,QAAQ,OAAO0E,IAAK,EAAC3D,SAAA,CAC5CH,EAACF,EAAS,CAACC,MAAOA,IACjBkC,MAGJnB,GACCd,EAACV,EAAa,CAACW,UAAU,KAAKC,QAAQ,UAASC,SAC5CW,OAKNS,GACCsB,EAAAI,EAAA,CAAA9C,SAAA,CACGiC,IAAYpC,EAAC+C,EAAM,CAACC,KAAM,GAAI9C,QAAQ,aACvCF,EAACvC,EAAsB,CAAA0C,SAErB0C,EAACkB,EAAM,CAAA,cACQ,iBAAiBlD,IAC9BI,WAAW,EACX+C,KAAM3C,GAAoBmB,GAAwBE,GAAwB,GAC1EgB,QACGrC,GAAqBmB,GAElB,OADA,IAAMV,EAASV,GAGrB6C,IAAK5C,EAAmB,2BAAwBsB,EAChDuB,OAAQ7C,EAAmB,cAAWsB,EACtCzC,QAAQ,YAAWC,SAAA,CAElBqB,GAAexB,EAACzB,GAAUyE,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,EAACvC,YAAwB6F,MAJpB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO1C,QAAQ,gBAAkB0C,EAAO1C,OAAOT,SAAW,uBAS5H4B,GAAe/B,EAACL,EAAiB,OAGvCkD,EAACsB,GAAmBlD,UAAWA,EAASd,SAAA,CACrCe,EAASlB,EAAC5B,EAAgB,CAAA+B,SAAEe,IAA6B,KAC1DlB,EAACoE,EAAe,CACdC,WAAYrD,EACZsD,uBAAwBpC,YAGxBlC,EAAAiD,EAAA,CAAA9C,SAAGA"}
@@ -1,23 +1,12 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/AppBar"),r=require("@mui/material/Box"),a=require("@mui/material/CssBaseline"),i=require("@mui/material/Drawer"),l=require("@mui/material/styles"),n=require("@mui/material/Typography");const s=198,o=l.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"65px",color:e.palette.semantic.text["text-weak"],borderBottom:`2px solid ${e.palette.semantic.stroke["stroke-weak"]}`}))),d=l.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"100%",color:e.palette.semantic.text["text-weak"]}))),p=l.styled(t)`
2
- width: ${({theme:e})=>e.breakpoints.up("tablet")?"calc(100% - 198px)":"100%"};
3
- margin-left: ${({theme:e})=>e.breakpoints.up("tablet")?"198px":"0"};
4
- box-shadow: none;
5
- `,c=l.styled(i)`
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/AppBar"),r=require("@mui/material/Box"),i=require("@mui/material/CssBaseline"),a=require("@mui/material/Drawer"),l=require("@mui/material/styles"),n=require("@mui/material/Typography");const o=198,s=l.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"65px",color:e.palette.semantic.text["text-weak"],borderBottom:`2px solid ${e.palette.semantic.stroke["stroke-weak"]}`,width:"100%",position:"relative",[e.breakpoints.down("tablet")]:{width:"100%"}}))),d=l.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"100%",color:e.palette.semantic.text["text-weak"]}))),p=l.styled(t)((({theme:e})=>({width:e.breakpoints.up("tablet")?"calc(100% - 198px)":"100%",left:"198px",[e.breakpoints.down("tablet")]:{left:"0",width:"100%"},boxShadow:"none",position:"fixed",top:0,right:0}))),h=l.styled(a)`
6
2
  display: ${({theme:e})=>e.breakpoints.up("tablet")?"block":"none"};
7
3
  & .MuiDrawer-paper {
8
4
  box-sizing: border-box;
9
- width: ${s}px;
5
+ width: ${o}px;
10
6
  border-color: ${({theme:e})=>e.palette.semantic.stroke["stroke-weak"]};
11
7
  border-width: 2px;
12
8
  }
13
- `,m=l.styled(r)`
14
- width: ${({theme:e})=>e.breakpoints.up("tablet")?"198px":"0"};
15
- flex-shrink: ${({theme:e})=>e.breakpoints.up("tablet")?"0":"1"};
16
- `,x=l.styled(r)`
17
- flex-grow: 1;
18
- width: ${({theme:e})=>e.breakpoints.up("tablet")?"calc(100% - 198px)":"100%"};
19
- margin-top: 65px;
20
- `,u=l.styled(n)`
9
+ `,c=l.styled(r)((({theme:e})=>({width:e.breakpoints.up("tablet")?"198px":"0",flexShrink:e.breakpoints.up("tablet")?"0":"1",[e.breakpoints.up("tablet")]:{display:"block"},[e.breakpoints.down("tablet")]:{display:"none"}}))),x=l.styled(r)((({theme:e})=>({flexGrow:1,width:"calc(100% - 198px)",marginTop:"65px",paddingTop:e.spacing(2),overflow:"auto",height:"calc(100vh - 65px)",[e.breakpoints.down("tablet")]:{width:"100%",marginTop:"65px"}}))),b=l.styled(r)((()=>({display:"flex",height:"100vh",overflow:"hidden"}))),m=l.styled(n)`
21
10
  font-weight: bold;
22
- `;module.exports=({children:t,loadedFromPortal:i})=>{if(i)return e.jsx(e.Fragment,{children:t});const l=e.jsx(d,{children:e.jsx(u,{children:"Sidebar"})});return e.jsxs(r,{sx:{display:"flex"},children:[e.jsx(a,{}),e.jsx(p,{position:"fixed",children:e.jsx(o,{children:e.jsx(u,{children:"Header"})})}),e.jsx(m,{"aria-label":"mailbox folders",as:"nav",children:e.jsx(c,{open:!0,variant:"permanent",children:l})}),e.jsx(x,{as:"main",children:t})]})};
11
+ `;module.exports=({children:t,loadedFromPortal:r})=>{if(r)return e.jsx(e.Fragment,{children:t});const a=e.jsx(d,{children:e.jsx(m,{children:"Sidebar"})});return e.jsxs(b,{children:[e.jsx(i,{}),e.jsx(p,{children:e.jsx(s,{id:"header",children:e.jsx(m,{children:"Header"})})}),e.jsx(c,{"aria-label":"mailbox folders",as:"nav",children:e.jsx(h,{open:!0,variant:"permanent",children:a})}),e.jsx(x,{as:"main",children:t})]})};
23
12
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst drawerWidth = 198;\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '65px',\n color: theme.palette.semantic.text['text-weak'],\n borderBottom: `2px solid ${theme.palette.semantic.stroke['stroke-weak']}`,\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '100%',\n color: theme.palette.semantic.text['text-weak'],\n}));\n\nconst StyledAppBar = styled(AppBar)`\n width: ${({ theme }) => (theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%')};\n margin-left: ${({ theme }) => (theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0')};\n box-shadow: none;\n`;\n\nconst StyledDrawer = styled(Drawer)`\n display: ${({ theme }) => (theme.breakpoints.up('tablet') ? 'block' : 'none')};\n & .MuiDrawer-paper {\n box-sizing: border-box;\n width: ${drawerWidth}px;\n border-color: ${({ theme }) => theme.palette.semantic.stroke['stroke-weak']};\n border-width: 2px;\n }\n`;\n\nconst StyledNavBox = styled(Box)`\n width: ${({ theme }) => (theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0')};\n flex-shrink: ${({ theme }) => (theme.breakpoints.up('tablet') ? '0' : '1')};\n`;\n\nconst StyledMainBox = styled(Box)`\n flex-grow: 1;\n width: ${({ theme }) => (theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%')};\n margin-top: 65px;\n`;\n\nconst StyledBoldTypography = styled(Typography)`\n font-weight: bold;\n`;\n\ninterface Props {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n}\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n if (loadedFromPortal) {\n /* eslint-disable-next-line react/jsx-no-useless-fragment */\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <StyledBoldTypography>Sidebar</StyledBoldTypography>\n </StyledSidebar>\n );\n\n return (\n <Box sx={{ display: 'flex' }}>\n <CssBaseline />\n <StyledAppBar position=\"fixed\">\n <StyledHeader>\n <StyledBoldTypography>Header</StyledBoldTypography>\n </StyledHeader>\n </StyledAppBar>\n <StyledNavBox aria-label=\"mailbox folders\" as=\"nav\">\n <StyledDrawer open variant=\"permanent\">\n {drawer}\n </StyledDrawer>\n </StyledNavBox>\n <StyledMainBox as=\"main\">{children}</StyledMainBox>\n </Box>\n );\n};\n\nexport default PortalMock;\n"],"names":["drawerWidth","StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","semantic","background","height","color","text","borderBottom","stroke","StyledSidebar","StyledAppBar","AppBar","breakpoints","up","StyledDrawer","Drawer","StyledNavBox","Box","StyledMainBox","StyledBoldTypography","Typography","children","loadedFromPortal","_jsx","_Fragment","drawer","_jsxs","sx","CssBaseline","position","as","open","variant"],"mappings":"kQAOA,MAAMA,EAAc,IAEdC,EAAeC,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAO,CAC3CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,aACnCC,aAAc,aAAaX,EAAMK,QAAQC,SAASM,OAAO,qBAGrDC,EAAgBd,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAO,CAC5CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC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SACnCI,MAGLF,EAAAA,IAACL,EAAa,CAACY,GAAG,OAAMT,SAAEA"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst drawerWidth = 198;\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '65px',\n color: theme.palette.semantic.text['text-weak'],\n borderBottom: `2px solid ${theme.palette.semantic.stroke['stroke-weak']}`,\n width: '100%',\n position: 'relative',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n },\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '100%',\n color: theme.palette.semantic.text['text-weak'],\n}));\n\nconst StyledAppBar = styled(AppBar)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%',\n left: `${drawerWidth}px`,\n [theme.breakpoints.down('tablet')]: {\n left: '0',\n width: '100%',\n },\n boxShadow: 'none',\n position: 'fixed',\n top: 0,\n right: 0,\n}));\n\nconst StyledDrawer = styled(Drawer)`\n display: ${({ theme }) => (theme.breakpoints.up('tablet') ? 'block' : 'none')};\n & .MuiDrawer-paper {\n box-sizing: border-box;\n width: ${drawerWidth}px;\n border-color: ${({ theme }) => theme.palette.semantic.stroke['stroke-weak']};\n border-width: 2px;\n }\n`;\n\nconst StyledNavBox = styled(Box)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0',\n flexShrink: theme.breakpoints.up('tablet') ? '0' : '1',\n [theme.breakpoints.up('tablet')]: {\n display: 'block',\n },\n [theme.breakpoints.down('tablet')]: {\n display: 'none',\n },\n}));\n\nconst StyledMainBox = styled(Box)(({ theme }) => ({\n flexGrow: 1,\n width: `calc(100% - ${drawerWidth}px)`,\n marginTop: '65px',\n paddingTop: theme.spacing(2),\n overflow: 'auto',\n height: 'calc(100vh - 65px)',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n marginTop: '65px',\n },\n}));\n\nconst StylesBoxContainer = styled(Box)(() => ({\n display: 'flex',\n height: '100vh',\n overflow: 'hidden',\n}));\n\nconst StyledBoldTypography = styled(Typography)`\n font-weight: bold;\n`;\n\ninterface Props {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n}\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n if (loadedFromPortal) {\n /* eslint-disable-next-line react/jsx-no-useless-fragment */\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <StyledBoldTypography>Sidebar</StyledBoldTypography>\n </StyledSidebar>\n );\n\n return (\n <StylesBoxContainer>\n <CssBaseline />\n <StyledAppBar>\n <StyledHeader id=\"header\">\n <StyledBoldTypography>Header</StyledBoldTypography>\n </StyledHeader>\n </StyledAppBar>\n <StyledNavBox aria-label=\"mailbox folders\" as=\"nav\">\n <StyledDrawer open variant=\"permanent\">\n {drawer}\n </StyledDrawer>\n </StyledNavBox>\n <StyledMainBox as=\"main\">{children}</StyledMainBox>\n </StylesBoxContainer>\n );\n};\n\nexport default PortalMock;\n"],"names":["drawerWidth","StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","semantic","background","height","color","text","borderBottom","stroke","width","position","breakpoints","down","StyledSidebar","StyledAppBar","AppBar","up","left","boxShadow","top","right","StyledDrawer","Drawer","StyledNavBox","Box","flexShrink","StyledMainBox","flexGrow","marginTop","paddingTop","spacing","overflow","StylesBoxContainer","StyledBoldTypography","Typography","children","loadedFromPortal","_jsx","_Fragment","drawer","_jsxs","CssBaseline","id","as","open","variant"],"mappings":"kQAOA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AGC,YAAO,CAC1C+B,SAAU,EACVlB,MAAO,qBACPmB,UAAW,OACXC,WAAYjC,EAAMkC,QAAQ,GAC1BC,SAAU,OACV3B,OAAQ,qBACR,CAACR,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,OACPmB,UAAW,YAITI,EAAqBrC,EAAAA,OAAO6B,EAAP7B,EAAY,KAAA,CACrCE,QAAS,OACTO,OAAQ,QACR2B,SAAU,aAGNE,EAAuBtC,EAAAA,OAAOuC,EAAW;;iBAS5B,EAAGC,WAAUC,uBAC9B,GAAIA,EAEF,OAAOC,EAAAA,IAAAC,EAAAA,SAAA,CAAAH,SAAGA,IAGZ,MAAMI,EACJF,EAAAA,IAACxB,EAAa,CAAAsB,SACZE,EAAAA,IAACJ,EAAoB,CAAAE,SAAA,cAIzB,OACEK,OAACR,EAAkB,CAAAG,SAAA,CACjBE,EAAAA,IAACI,EAAW,CAAA,GACZJ,EAAAA,IAACvB,EAAY,CAAAqB,SACXE,EAAAA,IAAC3C,GAAagD,GAAG,SAAQP,SACvBE,EAAAA,IAACJ,EAAoB,CAAAE,SAAA,eAGzBE,EAAAA,IAACd,EAAY,CAAA,aAAY,kBAAkBoB,GAAG,MAAKR,SACjDE,EAAAA,IAAChB,EAAY,CAACuB,MAAI,EAACC,QAAQ,YAAWV,SACnCI,MAGLF,EAAAA,IAACX,EAAa,CAACiB,GAAG,OAAMR,SAAEA"}
@@ -1,23 +1,12 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import a from"@mui/material/AppBar";import i from"@mui/material/Box";import o from"@mui/material/CssBaseline";import n from"@mui/material/Drawer";import{styled as l}from"@mui/material/styles";import m from"@mui/material/Typography";const p=198,s=l("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"65px",color:e.palette.semantic.text["text-weak"],borderBottom:`2px solid ${e.palette.semantic.stroke["stroke-weak"]}`}))),d=l("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"100%",color:e.palette.semantic.text["text-weak"]}))),c=l(a)`
2
- width: ${({theme:e})=>e.breakpoints.up("tablet")?"calc(100% - 198px)":"100%"};
3
- margin-left: ${({theme:e})=>e.breakpoints.up("tablet")?"198px":"0"};
4
- box-shadow: none;
5
- `,h=l(n)`
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import i from"@mui/material/AppBar";import a from"@mui/material/Box";import o from"@mui/material/CssBaseline";import n from"@mui/material/Drawer";import{styled as l}from"@mui/material/styles";import p from"@mui/material/Typography";const d=198,m=l("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"65px",color:e.palette.semantic.text["text-weak"],borderBottom:`2px solid ${e.palette.semantic.stroke["stroke-weak"]}`,width:"100%",position:"relative",[e.breakpoints.down("tablet")]:{width:"100%"}}))),s=l("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.semantic.background["background-sunken"],height:"100%",color:e.palette.semantic.text["text-weak"]}))),h=l(i)((({theme:e})=>({width:e.breakpoints.up("tablet")?"calc(100% - 198px)":"100%",left:"198px",[e.breakpoints.down("tablet")]:{left:"0",width:"100%"},boxShadow:"none",position:"fixed",top:0,right:0}))),c=l(n)`
6
2
  display: ${({theme:e})=>e.breakpoints.up("tablet")?"block":"none"};
7
3
  & .MuiDrawer-paper {
8
4
  box-sizing: border-box;
9
- width: ${p}px;
5
+ width: ${d}px;
10
6
  border-color: ${({theme:e})=>e.palette.semantic.stroke["stroke-weak"]};
11
7
  border-width: 2px;
12
8
  }
13
- `,b=l(i)`
14
- width: ${({theme:e})=>e.breakpoints.up("tablet")?"198px":"0"};
15
- flex-shrink: ${({theme:e})=>e.breakpoints.up("tablet")?"0":"1"};
16
- `,u=l(i)`
17
- flex-grow: 1;
18
- width: ${({theme:e})=>e.breakpoints.up("tablet")?"calc(100% - 198px)":"100%"};
19
- margin-top: 65px;
20
- `,x=l(m)`
9
+ `,b=l(a)((({theme:e})=>({width:e.breakpoints.up("tablet")?"198px":"0",flexShrink:e.breakpoints.up("tablet")?"0":"1",[e.breakpoints.up("tablet")]:{display:"block"},[e.breakpoints.down("tablet")]:{display:"none"}}))),k=l(a)((({theme:e})=>({flexGrow:1,width:"calc(100% - 198px)",marginTop:"65px",paddingTop:e.spacing(2),overflow:"auto",height:"calc(100vh - 65px)",[e.breakpoints.down("tablet")]:{width:"100%",marginTop:"65px"}}))),x=l(a)((()=>({display:"flex",height:"100vh",overflow:"hidden"}))),u=l(p)`
21
10
  font-weight: bold;
22
- `,k=({children:a,loadedFromPortal:n})=>{if(n)return e(t,{children:a});const l=e(d,{children:e(x,{children:"Sidebar"})});return r(i,{sx:{display:"flex"},children:[e(o,{}),e(c,{position:"fixed",children:e(s,{children:e(x,{children:"Header"})})}),e(b,{"aria-label":"mailbox folders",as:"nav",children:e(h,{open:!0,variant:"permanent",children:l})}),e(u,{as:"main",children:a})]})};export{k as default};
11
+ `,w=({children:i,loadedFromPortal:a})=>{if(a)return e(t,{children:i});const n=e(s,{children:e(u,{children:"Sidebar"})});return r(x,{children:[e(o,{}),e(h,{children:e(m,{id:"header",children:e(u,{children:"Header"})})}),e(b,{"aria-label":"mailbox folders",as:"nav",children:e(c,{open:!0,variant:"permanent",children:n})}),e(k,{as:"main",children:i})]})};export{w as default};
23
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst drawerWidth = 198;\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '65px',\n color: theme.palette.semantic.text['text-weak'],\n borderBottom: `2px solid ${theme.palette.semantic.stroke['stroke-weak']}`,\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '100%',\n color: theme.palette.semantic.text['text-weak'],\n}));\n\nconst StyledAppBar = styled(AppBar)`\n width: ${({ theme }) => (theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%')};\n margin-left: ${({ theme }) => (theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0')};\n box-shadow: none;\n`;\n\nconst StyledDrawer = styled(Drawer)`\n display: ${({ theme }) => (theme.breakpoints.up('tablet') ? 'block' : 'none')};\n & .MuiDrawer-paper {\n box-sizing: border-box;\n width: ${drawerWidth}px;\n border-color: ${({ theme }) => theme.palette.semantic.stroke['stroke-weak']};\n border-width: 2px;\n }\n`;\n\nconst StyledNavBox = styled(Box)`\n width: ${({ theme }) => (theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0')};\n flex-shrink: ${({ theme }) => (theme.breakpoints.up('tablet') ? '0' : '1')};\n`;\n\nconst StyledMainBox = styled(Box)`\n flex-grow: 1;\n width: ${({ theme }) => (theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%')};\n margin-top: 65px;\n`;\n\nconst StyledBoldTypography = styled(Typography)`\n font-weight: bold;\n`;\n\ninterface Props {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n}\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n if (loadedFromPortal) {\n /* eslint-disable-next-line react/jsx-no-useless-fragment */\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <StyledBoldTypography>Sidebar</StyledBoldTypography>\n </StyledSidebar>\n );\n\n return (\n <Box sx={{ display: 'flex' }}>\n <CssBaseline />\n <StyledAppBar position=\"fixed\">\n <StyledHeader>\n <StyledBoldTypography>Header</StyledBoldTypography>\n </StyledHeader>\n </StyledAppBar>\n <StyledNavBox aria-label=\"mailbox folders\" as=\"nav\">\n <StyledDrawer open variant=\"permanent\">\n {drawer}\n </StyledDrawer>\n </StyledNavBox>\n <StyledMainBox as=\"main\">{children}</StyledMainBox>\n </Box>\n );\n};\n\nexport default PortalMock;\n"],"names":["drawerWidth","StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","semantic","background","height","color","text","borderBottom","stroke","StyledSidebar","StyledAppBar","AppBar","breakpoints","up","StyledDrawer","Drawer","StyledNavBox","Box","StyledMainBox","StyledBoldTypography","Typography","PortalMock","children","loadedFromPortal","_jsx","_Fragment","drawer","_jsxs","sx","CssBaseline","position","as","open","variant"],"mappings":"wSAOA,MAAMA,EAAc,IAEdC,EAAeC,EAAO,MAAPA,EAAc,EAAGC,YAAO,CAC3CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,aACnCC,aAAc,aAAaX,EAAMK,QAAQC,SAASM,OAAO,qBAGrDC,EAAgBd,EAAO,MAAPA,EAAc,EAAGC,YAAO,CAC5CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,iBAG/BI,EAAef,EAAOgB,EAAO;WACxB,EAAGf,WAAaA,EAAMgB,YAAYC,GAAG,UAAY,qBAAkC;iBAC7E,EAAGjB,WAAaA,EAAMgB,YAAYC,GAAG,UAAY,QAAqB;;EAIjFC,EAAenB,EAAOoB,EAAO;aACtB,EAAGnB,WAAaA,EAAMgB,YAAYC,GAAG,UAAY,QAAU;;;aAG3DpB;oBACO,EAAGG,WAAYA,EAAMK,QAAQC,SAASM,OAAO;;;EAK3DQ,EAAerB,EAAOsB,EAAI;WACrB,EAAGrB,WAAaA,EAAMgB,YAAYC,GAAG,UAAY,QAAqB;iBAChE,EAAGjB,WAAaA,EAAMgB,YAAYC,GAAG,UAAY,IAAM;EAGlEK,EAAgBvB,EAAOsB,EAAI;;WAEtB,EAAGrB,WAAaA,EAAMgB,YAAYC,GAAG,UAAY,qBAAkC;;EAIxFM,EAAuBxB,EAAOyB,EAAW;;EASzCC,EAAa,EAAGC,WAAUC,uBAC9B,GAAIA,EAEF,OAAOC,EAAAC,EAAA,CAAAH,SAAGA,IAGZ,MAAMI,EACJF,EAACf,EAAa,CAAAa,SACZE,EAACL,EAAoB,CAAAG,SAAA,cAIzB,OACEK,EAACV,EAAG,CAACW,GAAI,CAAE/B,QAAS,QAAQyB,SAAA,CAC1BE,EAACK,EAAW,CAAA,GACZL,EAACd,EAAY,CAACoB,SAAS,QAAOR,SAC5BE,EAAC9B,EAAY,CAAA4B,SACXE,EAACL,EAAoB,CAAAG,SAAA,eAGzBE,EAACR,EAAY,CAAA,aAAY,kBAAkBe,GAAG,MAAKT,SACjDE,EAACV,EAAY,CAACkB,MAAI,EAACC,QAAQ,YAAWX,SACnCI,MAGLF,EAACN,EAAa,CAACa,GAAG,OAAMT,SAAEA"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst drawerWidth = 198;\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '65px',\n color: theme.palette.semantic.text['text-weak'],\n borderBottom: `2px solid ${theme.palette.semantic.stroke['stroke-weak']}`,\n width: '100%',\n position: 'relative',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n },\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.semantic.background['background-sunken'],\n height: '100%',\n color: theme.palette.semantic.text['text-weak'],\n}));\n\nconst StyledAppBar = styled(AppBar)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `calc(100% - ${drawerWidth}px)` : '100%',\n left: `${drawerWidth}px`,\n [theme.breakpoints.down('tablet')]: {\n left: '0',\n width: '100%',\n },\n boxShadow: 'none',\n position: 'fixed',\n top: 0,\n right: 0,\n}));\n\nconst StyledDrawer = styled(Drawer)`\n display: ${({ theme }) => (theme.breakpoints.up('tablet') ? 'block' : 'none')};\n & .MuiDrawer-paper {\n box-sizing: border-box;\n width: ${drawerWidth}px;\n border-color: ${({ theme }) => theme.palette.semantic.stroke['stroke-weak']};\n border-width: 2px;\n }\n`;\n\nconst StyledNavBox = styled(Box)(({ theme }) => ({\n width: theme.breakpoints.up('tablet') ? `${drawerWidth}px` : '0',\n flexShrink: theme.breakpoints.up('tablet') ? '0' : '1',\n [theme.breakpoints.up('tablet')]: {\n display: 'block',\n },\n [theme.breakpoints.down('tablet')]: {\n display: 'none',\n },\n}));\n\nconst StyledMainBox = styled(Box)(({ theme }) => ({\n flexGrow: 1,\n width: `calc(100% - ${drawerWidth}px)`,\n marginTop: '65px',\n paddingTop: theme.spacing(2),\n overflow: 'auto',\n height: 'calc(100vh - 65px)',\n [theme.breakpoints.down('tablet')]: {\n width: '100%',\n marginTop: '65px',\n },\n}));\n\nconst StylesBoxContainer = styled(Box)(() => ({\n display: 'flex',\n height: '100vh',\n overflow: 'hidden',\n}));\n\nconst StyledBoldTypography = styled(Typography)`\n font-weight: bold;\n`;\n\ninterface Props {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n}\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n if (loadedFromPortal) {\n /* eslint-disable-next-line react/jsx-no-useless-fragment */\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <StyledBoldTypography>Sidebar</StyledBoldTypography>\n </StyledSidebar>\n );\n\n return (\n <StylesBoxContainer>\n <CssBaseline />\n <StyledAppBar>\n <StyledHeader id=\"header\">\n <StyledBoldTypography>Header</StyledBoldTypography>\n </StyledHeader>\n </StyledAppBar>\n <StyledNavBox aria-label=\"mailbox folders\" as=\"nav\">\n <StyledDrawer open variant=\"permanent\">\n {drawer}\n </StyledDrawer>\n </StyledNavBox>\n <StyledMainBox as=\"main\">{children}</StyledMainBox>\n </StylesBoxContainer>\n );\n};\n\nexport default PortalMock;\n"],"names":["drawerWidth","StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","semantic","background","height","color","text","borderBottom","stroke","width","position","breakpoints","down","StyledSidebar","StyledAppBar","AppBar","up","left","boxShadow","top","right","StyledDrawer","Drawer","StyledNavBox","Box","flexShrink","StyledMainBox","flexGrow","marginTop","paddingTop","spacing","overflow","StylesBoxContainer","StyledBoldTypography","Typography","PortalMock","children","loadedFromPortal","_jsx","_Fragment","drawer","_jsxs","CssBaseline","id","as","open","variant"],"mappings":"wSAOA,MAAMA,EAAc,IAEdC,EAAeC,EAAO,MAAPA,EAAc,EAAGC,YAAO,CAC3CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,KAAK,aACnCC,aAAc,aAAaX,EAAMK,QAAQC,SAASM,OAAO,iBACzDC,MAAO,OACPC,SAAU,WACV,CAACd,EAAMe,YAAYC,KAAK,WAAY,CAClCH,MAAO,YAILI,EAAgBlB,EAAO,MAAPA,EAAc,EAAGC,YAAO,CAC5CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,SAASC,WAAW,qBACnDC,OAAQ,OACRC,MAAOT,EAAMK,QAAQC,SAASI,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XE,EAAC5C,GAAaiD,GAAG,SAAQP,SACvBE,EAACL,EAAoB,CAAAG,SAAA,eAGzBE,EAACf,EAAY,CAAA,aAAY,kBAAkBqB,GAAG,MAAKR,SACjDE,EAACjB,EAAY,CAACwB,MAAI,EAACC,QAAQ,YAAWV,SACnCI,MAGLF,EAACZ,EAAa,CAACkB,GAAG,OAAMR,SAAEA"}
@@ -1,2 +1,2 @@
1
- "use strict";var r=require("@mui/material/Grid");module.exports=r;
1
+ "use strict";var r=require("@mui/material/Grid2");module.exports=r;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1,2 +1,2 @@
1
- import Grid from '@mui/material/Grid';
2
- export { default } from '@mui/material/Grid';
1
+ import Grid from '@mui/material/Grid2';
2
+ export { GridSize, default } from '@mui/material/Grid2';
@@ -1,2 +1,2 @@
1
- import r from"@mui/material/Grid";export{default}from"@mui/material/Grid";
1
+ import r from"@mui/material/Grid2";export{default}from"@mui/material/Grid2";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\n\nimport IconButton from '../IconButton';\n\n// Common props for all TextField variants\ntype BaseTextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'type' | 'variant'> & {\n errorText?: string;\n fdKey: string;\n};\n\n// Password TextField variant - requires aria labels\ntype PasswordTextFieldProps = BaseTextFieldProps & {\n type: 'password';\n showPasswordAriaLabel: string;\n hidePasswordAriaLabel: string;\n};\n\n// Generic TextField variant - for all other input types\ntype GenericTextFieldProps = BaseTextFieldProps & {\n type?: Exclude<MuiTextFieldProps['type'], 'password'>;\n showPasswordAriaLabel?: never;\n hidePasswordAriaLabel?: never;\n};\n\nexport type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain minWidth to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst TextField = ({\n disabled = false,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n hidePasswordAriaLabel,\n label,\n multiline = false,\n required = false,\n showPasswordAriaLabel,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n if (!showPasswordAriaLabel || !hidePasswordAriaLabel) {\n return undefined;\n }\n\n return (\n <MuiInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? hidePasswordAriaLabel : showPasswordAriaLabel}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </MuiInputAdornment>\n );\n }\n\n return undefined;\n };\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n endAdornment: renderEndAdornment(),\n },\n htmlInput: {\n 'aria-describedby': ariaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n {...props}\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","disabled","errorText","fdKey","helperText","hidePasswordAriaLabel","label","multiline","required","showPasswordAriaLabel","type","props","showPassword","setShowPassword","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","isError","isPassword","handleClickShowPassword","show","_jsxs","_jsx","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","children","CancelCircleIcon","slotProps","input","endAdornment","MuiInputAdornment","position","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderEndAdornment","htmlInput"],"mappings":"geAqCA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CAC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EAAwBI,EACnDR,SAAUA,EACVwC,QAASjB,EACTkB,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUX,SAEjBrB,EAAee,EAAAA,IAACkB,EAAW,CAAA,GAAMlB,EAAAA,IAACmB,EAAQ,CAAA,MAInD,GAsCsBC,IAEhBC,UAAW,CACT,mBAAoB9B,IAGxBR,KAvEAa,EACKX,EAAe,OAAS,WAG1BF,EAoEHkC,QAAQ,cACJjC"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\n\nimport IconButton from '../IconButton';\n\n// Common props for all TextField variants\ntype BaseTextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'type' | 'variant'> & {\n errorText?: string;\n fdKey: string;\n};\n\n// Password TextField variant - requires aria labels\ntype PasswordTextFieldProps = BaseTextFieldProps & {\n type: 'password';\n showPasswordAriaLabel: string;\n hidePasswordAriaLabel: string;\n};\n\n// Generic TextField variant - for all other input types\ntype GenericTextFieldProps = BaseTextFieldProps & {\n type?: Exclude<MuiTextFieldProps['type'], 'password'>;\n showPasswordAriaLabel?: never;\n hidePasswordAriaLabel?: never;\n};\n\nexport type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain width to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst TextField = ({\n disabled = false,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n hidePasswordAriaLabel,\n label,\n multiline = false,\n required = false,\n showPasswordAriaLabel,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n if (!showPasswordAriaLabel || !hidePasswordAriaLabel) {\n return undefined;\n }\n\n return (\n <MuiInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? hidePasswordAriaLabel : showPasswordAriaLabel}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </MuiInputAdornment>\n );\n }\n\n return undefined;\n };\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n endAdornment: renderEndAdornment(),\n },\n htmlInput: {\n 'aria-describedby': ariaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n {...props}\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","disabled","errorText","fdKey","helperText","hidePasswordAriaLabel","label","multiline","required","showPasswordAriaLabel","type","props","showPassword","setShowPassword","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","isError","isPassword","handleClickShowPassword","show","_jsxs","_jsx","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","children","CancelCircleIcon","slotProps","input","endAdornment","MuiInputAdornment","position","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderEndAdornment","htmlInput"],"mappings":"geAqCA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAkBX,EAAAA,OAAOY,EAAc,CAC3CV,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGK,aAAY,MAAO,CAChDC,QAAS,OACTI,MAAOL,EAAY,OAAS,0BAGZ,EAChBQ,YAAW,EACXC,YACAC,QACAV,aAAY,EACZW,aACAC,wBACAC,QACAC,aAAY,EACZC,YAAW,EACXC,wBACAC,OAAO,UACJC,MAEH,MAAOC,EAAcC,GAAmBC,EAAAA,UAAkB,GAEpDC,EAAeX,EAAa,GAAGD,qBAAsBa,EACrDC,EAAiBf,EAAY,GAAGC,uBAAwBa,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAE9EM,IAAYpB,IAAcD,EAC1BsB,EAAsB,aAATb,EAEbc,EAA0B,IAAYX,GAAiBY,IAAUA,IAmCvE,OACEC,EAAAA,KAACvC,EAAe,CAACM,UAAWA,YACzBa,GACCqB,EAAAA,IAACC,GAAc3B,SAAUA,EAAU4B,QAAS1B,EAAOK,SAAUA,WAC1DF,IAIJF,GACCuB,EAAAA,IAACG,EAAiB,CAAC7B,SAAUA,EAAU8B,GAAIhB,WACxCX,IAIJkB,GACCI,EAAAA,KAACI,EAAiB,CAACE,SAAMD,GAAId,EAAcgB,SAAA,CACzCN,EAAAA,IAACO,EAAgB,CAAA,GAEhBhC,KAILyB,EAAAA,IAAC5B,aACUI,EACTF,SAAUA,EACV+B,MAAOV,EACP7B,UAAWA,EACXsC,GAAI5B,EACJG,MAAM,GACNC,UAAWA,EACXC,SAAUA,EACV2B,UAAW,CACTC,MAAO,CACLC,aA1DiB,MACzB,GAAId,EAAY,CACd,IAAKd,IAA0BJ,EAC7B,OAGF,OACEsB,EAAAA,IAACW,EAAiB,CAACC,SAAS,MAAKN,SAC/BN,MAACa,EAAAA,WAAU,CAAA,aACG5B,EAAeP,EAAwBI,EACnDR,SAAUA,EACVwC,QAASjB,EACTkB,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUX,SAEjBrB,EAAee,EAAAA,IAACkB,EAAW,CAAA,GAAMlB,EAAAA,IAACmB,EAAQ,CAAA,MAInD,GAsCsBC,IAEhBC,UAAW,CACT,mBAAoB9B,IAGxBR,KAvEAa,EACKX,EAAe,OAAS,WAG1BF,EAoEHkC,QAAQ,cACJjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\n\nimport IconButton from '../IconButton';\n\n// Common props for all TextField variants\ntype BaseTextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'type' | 'variant'> & {\n errorText?: string;\n fdKey: string;\n};\n\n// Password TextField variant - requires aria labels\ntype PasswordTextFieldProps = BaseTextFieldProps & {\n type: 'password';\n showPasswordAriaLabel: string;\n hidePasswordAriaLabel: string;\n};\n\n// Generic TextField variant - for all other input types\ntype GenericTextFieldProps = BaseTextFieldProps & {\n type?: Exclude<MuiTextFieldProps['type'], 'password'>;\n showPasswordAriaLabel?: never;\n hidePasswordAriaLabel?: never;\n};\n\nexport type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain minWidth to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst TextField = ({\n disabled = false,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n hidePasswordAriaLabel,\n label,\n multiline = false,\n required = false,\n showPasswordAriaLabel,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n if (!showPasswordAriaLabel || !hidePasswordAriaLabel) {\n return undefined;\n }\n\n return (\n <MuiInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? hidePasswordAriaLabel : showPasswordAriaLabel}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </MuiInputAdornment>\n );\n }\n\n return undefined;\n };\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n endAdornment: renderEndAdornment(),\n },\n htmlInput: {\n 'aria-describedby': ariaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n {...props}\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","TextField","disabled","errorText","fdKey","helperText","hidePasswordAriaLabel","label","multiline","required","showPasswordAriaLabel","type","props","showPassword","setShowPassword","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","isError","isPassword","handleClickShowPassword","show","_jsxs","_jsx","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","children","CancelCircleIcon","slotProps","input","endAdornment","MuiInputAdornment","position","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderEndAdornment","htmlInput"],"mappings":"4gBAqCA,MAAMA,EAAkBC,EAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAkBX,EAAOY,EAAc,CAC3CV,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGK,aAAY,MAAO,CAChDC,QAAS,OACTI,MAAOL,EAAY,OAAS,WAGxBQ,EAAY,EAChBC,YAAW,EACXC,YACAC,QACAX,aAAY,EACZY,aACAC,wBACAC,QACAC,aAAY,EACZC,YAAW,EACXC,wBACAC,OAAO,UACJC,MAEH,MAAOC,EAAcC,GAAmBC,GAAkB,GAEpDC,EAAeX,EAAa,GAAGD,qBAAsBa,EACrDC,EAAiBf,EAAY,GAAGC,uBAAwBa,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAE9EM,IAAYpB,IAAcD,EAC1BsB,EAAsB,aAATb,EAEbc,EAA0B,IAAYX,GAAiBY,IAAUA,IAmCvE,OACEC,EAACxC,EAAe,CAACM,UAAWA,YACzBc,GACCqB,EAACC,GAAc3B,SAAUA,EAAU4B,QAAS1B,EAAOK,SAAUA,WAC1DF,IAIJF,GACCuB,EAACG,EAAiB,CAAC7B,SAAUA,EAAU8B,GAAIhB,WACxCX,IAIJkB,GACCI,EAACI,EAAiB,CAACE,SAAMD,GAAId,EAAcgB,SAAA,CACzCN,EAACO,EAAgB,CAAA,GAEhBhC,KAILyB,EAAC7B,aACUK,EACTF,SAAUA,EACV+B,MAAOV,EACP9B,UAAWA,EACXuC,GAAI5B,EACJG,MAAM,GACNC,UAAWA,EACXC,SAAUA,EACV2B,UAAW,CACTC,MAAO,CACLC,aA1DiB,MACzB,GAAId,EAAY,CACd,IAAKd,IAA0BJ,EAC7B,OAGF,OACEsB,EAACW,EAAiB,CAACC,SAAS,MAAKN,SAC/BN,EAACa,EAAU,CAAA,aACG5B,EAAeP,EAAwBI,EACnDR,SAAUA,EACVwC,QAASjB,EACTkB,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUX,SAEFN,EAAff,EAAgBiC,EAAkBC,EAAP,CAAA,MAIpC,GAsCsBC,IAEhBC,UAAW,CACT,mBAAoB9B,IAGxBR,KAvEAa,EACKX,EAAe,OAAS,WAG1BF,EAoEHkC,QAAQ,cACJjC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\n\nimport IconButton from '../IconButton';\n\n// Common props for all TextField variants\ntype BaseTextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'type' | 'variant'> & {\n errorText?: string;\n fdKey: string;\n};\n\n// Password TextField variant - requires aria labels\ntype PasswordTextFieldProps = BaseTextFieldProps & {\n type: 'password';\n showPasswordAriaLabel: string;\n hidePasswordAriaLabel: string;\n};\n\n// Generic TextField variant - for all other input types\ntype GenericTextFieldProps = BaseTextFieldProps & {\n type?: Exclude<MuiTextFieldProps['type'], 'password'>;\n showPasswordAriaLabel?: never;\n hidePasswordAriaLabel?: never;\n};\n\nexport type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain width to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst TextField = ({\n disabled = false,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n hidePasswordAriaLabel,\n label,\n multiline = false,\n required = false,\n showPasswordAriaLabel,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n if (!showPasswordAriaLabel || !hidePasswordAriaLabel) {\n return undefined;\n }\n\n return (\n <MuiInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? hidePasswordAriaLabel : showPasswordAriaLabel}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </MuiInputAdornment>\n );\n }\n\n return undefined;\n };\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n endAdornment: renderEndAdornment(),\n },\n htmlInput: {\n 'aria-describedby': ariaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n {...props}\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","TextField","disabled","errorText","fdKey","helperText","hidePasswordAriaLabel","label","multiline","required","showPasswordAriaLabel","type","props","showPassword","setShowPassword","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","isError","isPassword","handleClickShowPassword","show","_jsxs","_jsx","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","children","CancelCircleIcon","slotProps","input","endAdornment","MuiInputAdornment","position","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderEndAdornment","htmlInput"],"mappings":"4gBAqCA,MAAMA,EAAkBC,EAAOC,EAAK,CAClCC,kBAAoB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ACnDR,SAAUA,EACVwC,QAASjB,EACTkB,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUX,SAEFN,EAAff,EAAgBiC,EAAkBC,EAAP,CAAA,MAIpC,GAsCsBC,IAEhBC,UAAW,CACT,mBAAoB9B,IAGxBR,KAvEAa,EACKX,EAAe,OAAS,WAG1BF,EAoEHkC,QAAQ,cACJjC"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("@mui/material/StepLabel");module.exports=e;
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import StepLabel from '@mui/material/StepLabel';
2
+ export { default } from '@mui/material/StepLabel';
@@ -0,0 +1,2 @@
1
+ import e from"@mui/material/StepLabel";export{default}from"@mui/material/StepLabel";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/Button"),i=require("@mui/material/Card"),t=require("@mui/material/CardActions"),a=require("@mui/material/CardContent"),o=require("@mui/material/CardMedia"),s=require("@mui/material/Typography");module.exports=()=>e.jsxs(i,{sx:{maxWidth:345},children:[e.jsx(o,{component:"img",height:"140",image:"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",alt:"green iguana"}),e.jsxs(a,{children:[e.jsx(s,{gutterBottom:!0,variant:"h5",component:"div",children:"Cafe Shirley"}),e.jsx(s,{variant:"body2",sx:{color:"text.secondary"},children:"Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle. With its warm ambiance, aromatic coffee, and delectable pastries, it's the perfect spot to unwind."})]}),e.jsx(t,{children:e.jsx(r,{size:"small",variant:"contained",children:"Learn More"})})]});
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/Button"),t=require("@mui/material/Card"),a=require("@mui/material/CardActions"),i=require("@mui/material/CardContent"),n=require("@mui/material/CardMedia"),s=require("@mui/material/Typography");module.exports=()=>e.jsx(e.Fragment,{children:Array.from({length:10},((o,m)=>e.jsxs(t,{sx:{maxWidth:345,mb:3},children:[e.jsx(n,{alt:"green iguana",component:"img",height:"140",image:"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"}),e.jsxs(i,{children:[e.jsxs(s,{gutterBottom:!0,component:"div",variant:"h5",children:["Cafe Shirley ",m+1]}),e.jsx(s,{sx:{color:"text.secondary"},variant:"body2",children:"Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle. With its warm ambiance, aromatic coffee, and delectable pastries, it's the perfect spot to unwind."})]}),e.jsx(a,{children:e.jsx(r,{size:"small",variant:"contained",children:"Learn More"})})]},m)))});
2
2
  //# sourceMappingURL=MockPageContent.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MockPageContent.cjs.js","sources":["../../../src/stories/utilities/MockPageContent.tsx"],"sourcesContent":["import Button from '@mui/material/Button';\nimport Card from '@mui/material/Card';\nimport CardActions from '@mui/material/CardActions';\nimport CardContent from '@mui/material/CardContent';\nimport CardMedia from '@mui/material/CardMedia';\nimport Typography from '@mui/material/Typography';\n\nconst MockPageContent = () => {\n return (\n <Card sx={{ maxWidth: 345 }}>\n <CardMedia\n component=\"img\"\n height=\"140\"\n image=\"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"green iguana\"\n />\n <CardContent>\n <Typography gutterBottom variant=\"h5\" component=\"div\">\n Cafe Shirley\n </Typography>\n <Typography variant=\"body2\" sx={{ color: 'text.secondary' }}>\n Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle. With its warm ambiance, aromatic\n coffee, and delectable pastries, it's the perfect spot to unwind.\n </Typography>\n </CardContent>\n <CardActions>\n <Button size=\"small\" variant=\"contained\">\n Learn More\n </Button>\n </CardActions>\n </Card>\n );\n};\n\nexport default MockPageContent;\n"],"names":["_jsxs","Card","sx","maxWidth","children","_jsx","CardMedia","component","height","image","alt","CardContent","Typography","gutterBottom","variant","color","CardActions","Button","size"],"mappings":"0RAOwB,IAEhBA,EAAAA,KAACC,EAAI,CAACC,GAAI,CAAEC,SAAU,KAAKC,SAAA,CACvBC,EAAAA,IAACC,EAAS,CACNC,UAAU,MACVC,OAAO,MACPC,MAAM,sKACNC,IAAI,iBAERV,EAAAA,KAACW,EAAW,CAAAP,SAAA,CACRC,EAAAA,IAACO,EAAU,CAACC,cAAY,EAACC,QAAQ,KAAKP,UAAU,MAAKH,SAAA,iBAGrDC,EAAAA,IAACO,EAAU,CAACE,QAAQ,QAAQZ,GAAI,CAAEa,MAAO,kBAAkBX,SAAA,2MAK/DC,EAAAA,IAACW,YACGX,EAAAA,IAACY,GAAOC,KAAK,QAAQJ,QAAQ"}
1
+ {"version":3,"file":"MockPageContent.cjs.js","sources":["../../../src/stories/utilities/MockPageContent.tsx"],"sourcesContent":["import Button from '@mui/material/Button';\nimport Card from '@mui/material/Card';\nimport CardActions from '@mui/material/CardActions';\nimport CardContent from '@mui/material/CardContent';\nimport CardMedia from '@mui/material/CardMedia';\nimport Typography from '@mui/material/Typography';\n\nimport type { FC } from 'react';\n\nconst MockPageContent: FC = () => {\n return (\n <>\n {Array.from({ length: 10 }, (_, index) => (\n <Card key={index} sx={{ maxWidth: 345, mb: 3 }}>\n <CardMedia\n alt=\"green iguana\"\n component=\"img\"\n height=\"140\"\n image=\"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n />\n <CardContent>\n <Typography gutterBottom component=\"div\" variant=\"h5\">\n Cafe Shirley {index + 1}\n </Typography>\n <Typography sx={{ color: 'text.secondary' }} variant=\"body2\">\n Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle.\n With its warm ambiance, aromatic coffee, and delectable pastries, it&apos;s the perfect spot to\n unwind.\n </Typography>\n </CardContent>\n <CardActions>\n <Button size=\"small\" variant=\"contained\">\n Learn More\n </Button>\n </CardActions>\n </Card>\n ))}\n </>\n );\n};\n\nexport default MockPageContent;\n"],"names":["_jsx","_Fragment","children","Array","from","length","_","index","_jsxs","Card","sx","maxWidth","mb","CardMedia","alt","component","height","image","CardContent","Typography","gutterBottom","variant","color","CardActions","Button","size"],"mappings":"0RAS4B,IAExBA,EAAAA,IAAAC,EAAAA,SAAA,CAAAC,SACGC,MAAMC,KAAK,CAAEC,OAAQ,KAAM,CAACC,EAAGC,IAC9BC,EAAAA,KAACC,EAAI,CAAaC,GAAI,CAAEC,SAAU,IAAKC,GAAI,GAAGV,SAAA,CAC5CF,EAAAA,IAACa,EAAS,CACRC,IAAI,eACJC,UAAU,MACVC,OAAO,MACPC,MAAM,wKAERT,EAAAA,KAACU,aACCV,EAAAA,KAACW,EAAU,CAACC,cAAY,EAACL,UAAU,MAAMM,QAAQ,KAAInB,SAAA,CAAA,gBACrCK,EAAQ,KAExBP,EAAAA,IAACmB,EAAU,CAACT,GAAI,CAAEY,MAAO,kBAAoBD,QAAQ,QAAOnB,SAAA,2MAM9DF,EAAAA,IAACuB,EAAW,CAAArB,SACVF,MAACwB,EAAM,CAACC,KAAK,QAAQJ,QAAQ,YAAWnB,SAAA,mBAlBjCK"}
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import { FC } from 'react';
2
2
 
3
- declare const MockPageContent: () => react_jsx_runtime.JSX.Element;
3
+ declare const MockPageContent: FC;
4
4
 
5
5
  export { MockPageContent as default };
@@ -1,2 +1,2 @@
1
- import{jsxs as t,jsx as a}from"react/jsx-runtime";import e from"@mui/material/Button";import r from"@mui/material/Card";import i from"@mui/material/CardActions";import o from"@mui/material/CardContent";import m from"@mui/material/CardMedia";import n from"@mui/material/Typography";const d=()=>t(r,{sx:{maxWidth:345},children:[a(m,{component:"img",height:"140",image:"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",alt:"green iguana"}),t(o,{children:[a(n,{gutterBottom:!0,variant:"h5",component:"div",children:"Cafe Shirley"}),a(n,{variant:"body2",sx:{color:"text.secondary"},children:"Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle. With its warm ambiance, aromatic coffee, and delectable pastries, it's the perfect spot to unwind."})]}),a(i,{children:a(e,{size:"small",variant:"contained",children:"Learn More"})})]});export{d as default};
1
+ import{jsx as t,Fragment as r,jsxs as e}from"react/jsx-runtime";import a from"@mui/material/Button";import i from"@mui/material/Card";import o from"@mui/material/CardActions";import m from"@mui/material/CardContent";import n from"@mui/material/CardMedia";import l from"@mui/material/Typography";const d=()=>t(r,{children:Array.from({length:10},((r,d)=>e(i,{sx:{maxWidth:345,mb:3},children:[t(n,{alt:"green iguana",component:"img",height:"140",image:"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"}),e(m,{children:[e(l,{gutterBottom:!0,component:"div",variant:"h5",children:["Cafe Shirley ",d+1]}),t(l,{sx:{color:"text.secondary"},variant:"body2",children:"Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle. With its warm ambiance, aromatic coffee, and delectable pastries, it's the perfect spot to unwind."})]}),t(o,{children:t(a,{size:"small",variant:"contained",children:"Learn More"})})]},d)))});export{d as default};
2
2
  //# sourceMappingURL=MockPageContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MockPageContent.js","sources":["../../../src/stories/utilities/MockPageContent.tsx"],"sourcesContent":["import Button from '@mui/material/Button';\nimport Card from '@mui/material/Card';\nimport CardActions from '@mui/material/CardActions';\nimport CardContent from '@mui/material/CardContent';\nimport CardMedia from '@mui/material/CardMedia';\nimport Typography from '@mui/material/Typography';\n\nconst MockPageContent = () => {\n return (\n <Card sx={{ maxWidth: 345 }}>\n <CardMedia\n component=\"img\"\n height=\"140\"\n image=\"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"green iguana\"\n />\n <CardContent>\n <Typography gutterBottom variant=\"h5\" component=\"div\">\n Cafe Shirley\n </Typography>\n <Typography variant=\"body2\" sx={{ color: 'text.secondary' }}>\n Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle. With its warm ambiance, aromatic\n coffee, and delectable pastries, it's the perfect spot to unwind.\n </Typography>\n </CardContent>\n <CardActions>\n <Button size=\"small\" variant=\"contained\">\n Learn More\n </Button>\n </CardActions>\n </Card>\n );\n};\n\nexport default MockPageContent;\n"],"names":["MockPageContent","_jsxs","Card","sx","maxWidth","children","_jsx","CardMedia","component","height","image","alt","CardContent","Typography","gutterBottom","variant","color","CardActions","Button","size"],"mappings":"yRAOA,MAAMA,EAAkB,IAEhBC,EAACC,EAAI,CAACC,GAAI,CAAEC,SAAU,KAAKC,SAAA,CACvBC,EAACC,EAAS,CACNC,UAAU,MACVC,OAAO,MACPC,MAAM,sKACNC,IAAI,iBAERV,EAACW,EAAW,CAAAP,SAAA,CACRC,EAACO,EAAU,CAACC,cAAY,EAACC,QAAQ,KAAKP,UAAU,MAAKH,SAAA,iBAGrDC,EAACO,EAAU,CAACE,QAAQ,QAAQZ,GAAI,CAAEa,MAAO,kBAAkBX,SAAA,2MAK/DC,EAACW,YACGX,EAACY,GAAOC,KAAK,QAAQJ,QAAQ"}
1
+ {"version":3,"file":"MockPageContent.js","sources":["../../../src/stories/utilities/MockPageContent.tsx"],"sourcesContent":["import Button from '@mui/material/Button';\nimport Card from '@mui/material/Card';\nimport CardActions from '@mui/material/CardActions';\nimport CardContent from '@mui/material/CardContent';\nimport CardMedia from '@mui/material/CardMedia';\nimport Typography from '@mui/material/Typography';\n\nimport type { FC } from 'react';\n\nconst MockPageContent: FC = () => {\n return (\n <>\n {Array.from({ length: 10 }, (_, index) => (\n <Card key={index} sx={{ maxWidth: 345, mb: 3 }}>\n <CardMedia\n alt=\"green iguana\"\n component=\"img\"\n height=\"140\"\n image=\"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n />\n <CardContent>\n <Typography gutterBottom component=\"div\" variant=\"h5\">\n Cafe Shirley {index + 1}\n </Typography>\n <Typography sx={{ color: 'text.secondary' }} variant=\"body2\">\n Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle.\n With its warm ambiance, aromatic coffee, and delectable pastries, it&apos;s the perfect spot to\n unwind.\n </Typography>\n </CardContent>\n <CardActions>\n <Button size=\"small\" variant=\"contained\">\n Learn More\n </Button>\n </CardActions>\n </Card>\n ))}\n </>\n );\n};\n\nexport default MockPageContent;\n"],"names":["MockPageContent","_jsx","_Fragment","children","Array","from","length","_","index","_jsxs","Card","sx","maxWidth","mb","CardMedia","alt","component","height","image","CardContent","Typography","gutterBottom","variant","color","CardActions","Button","size"],"mappings":"uSASA,MAAMA,EAAsB,IAExBC,EAAAC,EAAA,CAAAC,SACGC,MAAMC,KAAK,CAAEC,OAAQ,KAAM,CAACC,EAAGC,IAC9BC,EAACC,EAAI,CAAaC,GAAI,CAAEC,SAAU,IAAKC,GAAI,GAAGV,SAAA,CAC5CF,EAACa,EAAS,CACRC,IAAI,eACJC,UAAU,MACVC,OAAO,MACPC,MAAM,wKAERT,EAACU,aACCV,EAACW,EAAU,CAACC,cAAY,EAACL,UAAU,MAAMM,QAAQ,KAAInB,SAAA,CAAA,gBACrCK,EAAQ,KAExBP,EAACmB,EAAU,CAACT,GAAI,CAAEY,MAAO,kBAAoBD,QAAQ,QAAOnB,SAAA,2MAM9DF,EAACuB,EAAW,CAAArB,SACVF,EAACwB,EAAM,CAACC,KAAK,QAAQJ,QAAQ,YAAWnB,SAAA,mBAlBjCK"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");const e=e=>({defaultProps:{MenuProps:{PaperProps:{style:{boxShadow:e.customShadows?.overlay,marginBottom:e.spacing(.5),marginTop:e.spacing(.5)}}}},styleOverrides:{root:{"& .MuiSelect-select":{paddingRight:`${e.spacing(1)} !important`},"&.MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&.Mui-disabled fieldset":{border:"none"},"&.Mui-focused fieldset":{border:"none"},"&:hover fieldset":{border:"none"}}}}});exports.default=e,exports.selectOverrides=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");const e=e=>({defaultProps:{MenuProps:{PaperProps:{style:{boxShadow:e.customShadows?.overlay,marginBottom:e.spacing(.5),marginTop:e.spacing(.5)}}}},styleOverrides:{root:{"& .MuiSelect-select":{"&.MuiInputBase-input":{paddingRight:e.spacing(1)}},"&.MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&.Mui-disabled fieldset":{border:"none"},"&.Mui-focused fieldset":{border:"none"},"&:hover fieldset":{border:"none"}}}}});exports.default=e,exports.selectOverrides=e;
2
2
  //# sourceMappingURL=selectOverrides.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectOverrides.cjs.js","sources":["../../../src/themes/overrides/selectOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nexport const selectOverrides = (theme: Theme): Components<Theme>['MuiSelect'] => ({\n defaultProps: {\n MenuProps: {\n PaperProps: {\n style: {\n boxShadow: theme.customShadows?.overlay,\n marginBottom: theme.spacing(0.5),\n marginTop: theme.spacing(0.5),\n },\n },\n },\n },\n styleOverrides: {\n root: {\n '& .MuiSelect-select': {\n paddingRight: `${theme.spacing(1)} !important`, // Override the default 32px padding-right\n },\n '&.MuiOutlinedInput-root': {\n '& fieldset': {\n border: 'none',\n },\n '&.Mui-disabled fieldset': {\n border: 'none',\n },\n '&.Mui-focused fieldset': {\n border: 'none',\n },\n '&:hover fieldset': {\n border: 'none',\n },\n },\n },\n },\n});\n\nexport default selectOverrides;\n"],"names":["selectOverrides","theme","defaultProps","MenuProps","PaperProps","style","boxShadow","customShadows","overlay","marginBottom","spacing","marginTop","styleOverrides","root","paddingRight","border"],"mappings":"0GAEaA,EAAmBC,IAAY,CAC1CC,aAAc,CACZC,UAAW,CACTC,WAAY,CACVC,MAAO,CACLC,UAAWL,EAAMM,eAAeC,QAChCC,aAAcR,EAAMS,QAAQ,IAC5BC,UAAWV,EAAMS,QAAQ,QAKjCE,eAAgB,CACdC,KAAM,CACJ,sBAAuB,CACrBC,aAAc,GAAGb,EAAMS,QAAQ,iBAEjC,0BAA2B,CACzB,aAAc,CACZK,OAAQ,QAEV,0BAA2B,CACzBA,OAAQ,QAEV,yBAA0B,CACxBA,OAAQ,QAEV,mBAAoB,CAClBA,OAAQ"}
1
+ {"version":3,"file":"selectOverrides.cjs.js","sources":["../../../src/themes/overrides/selectOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nexport const selectOverrides = (theme: Theme): Components<Theme>['MuiSelect'] => ({\n defaultProps: {\n MenuProps: {\n PaperProps: {\n style: {\n boxShadow: theme.customShadows?.overlay,\n marginBottom: theme.spacing(0.5),\n marginTop: theme.spacing(0.5),\n },\n },\n },\n },\n styleOverrides: {\n root: {\n '& .MuiSelect-select': {\n '&.MuiInputBase-input': {\n paddingRight: theme.spacing(1),\n },\n },\n '&.MuiOutlinedInput-root': {\n '& fieldset': {\n border: 'none',\n },\n '&.Mui-disabled fieldset': {\n border: 'none',\n },\n '&.Mui-focused fieldset': {\n border: 'none',\n },\n '&:hover fieldset': {\n border: 'none',\n },\n },\n },\n },\n});\n\nexport default selectOverrides;\n"],"names":["selectOverrides","theme","defaultProps","MenuProps","PaperProps","style","boxShadow","customShadows","overlay","marginBottom","spacing","marginTop","styleOverrides","root","paddingRight","border"],"mappings":"0GAEaA,EAAmBC,IAAY,CAC1CC,aAAc,CACZC,UAAW,CACTC,WAAY,CACVC,MAAO,CACLC,UAAWL,EAAMM,eAAeC,QAChCC,aAAcR,EAAMS,QAAQ,IAC5BC,UAAWV,EAAMS,QAAQ,QAKjCE,eAAgB,CACdC,KAAM,CACJ,sBAAuB,CACrB,uBAAwB,CACtBC,aAAcb,EAAMS,QAAQ,KAGhC,0BAA2B,CACzB,aAAc,CACZK,OAAQ,QAEV,0BAA2B,CACzBA,OAAQ,QAEV,yBAA0B,CACxBA,OAAQ,QAEV,mBAAoB,CAClBA,OAAQ"}
@@ -1,2 +1,2 @@
1
- import"@mui/material/styles";const e=e=>({defaultProps:{MenuProps:{PaperProps:{style:{boxShadow:e.customShadows?.overlay,marginBottom:e.spacing(.5),marginTop:e.spacing(.5)}}}},styleOverrides:{root:{"& .MuiSelect-select":{paddingRight:`${e.spacing(1)} !important`},"&.MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&.Mui-disabled fieldset":{border:"none"},"&.Mui-focused fieldset":{border:"none"},"&:hover fieldset":{border:"none"}}}}});export{e as default,e as selectOverrides};
1
+ import"@mui/material/styles";const e=e=>({defaultProps:{MenuProps:{PaperProps:{style:{boxShadow:e.customShadows?.overlay,marginBottom:e.spacing(.5),marginTop:e.spacing(.5)}}}},styleOverrides:{root:{"& .MuiSelect-select":{"&.MuiInputBase-input":{paddingRight:e.spacing(1)}},"&.MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&.Mui-disabled fieldset":{border:"none"},"&.Mui-focused fieldset":{border:"none"},"&:hover fieldset":{border:"none"}}}}});export{e as default,e as selectOverrides};
2
2
  //# sourceMappingURL=selectOverrides.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectOverrides.js","sources":["../../../src/themes/overrides/selectOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nexport const selectOverrides = (theme: Theme): Components<Theme>['MuiSelect'] => ({\n defaultProps: {\n MenuProps: {\n PaperProps: {\n style: {\n boxShadow: theme.customShadows?.overlay,\n marginBottom: theme.spacing(0.5),\n marginTop: theme.spacing(0.5),\n },\n },\n },\n },\n styleOverrides: {\n root: {\n '& .MuiSelect-select': {\n paddingRight: `${theme.spacing(1)} !important`, // Override the default 32px padding-right\n },\n '&.MuiOutlinedInput-root': {\n '& fieldset': {\n border: 'none',\n },\n '&.Mui-disabled fieldset': {\n border: 'none',\n },\n '&.Mui-focused fieldset': {\n border: 'none',\n },\n '&:hover fieldset': {\n border: 'none',\n },\n },\n },\n },\n});\n\nexport default selectOverrides;\n"],"names":["selectOverrides","theme","defaultProps","MenuProps","PaperProps","style","boxShadow","customShadows","overlay","marginBottom","spacing","marginTop","styleOverrides","root","paddingRight","border"],"mappings":"mCAEaA,EAAmBC,IAAY,CAC1CC,aAAc,CACZC,UAAW,CACTC,WAAY,CACVC,MAAO,CACLC,UAAWL,EAAMM,eAAeC,QAChCC,aAAcR,EAAMS,QAAQ,IAC5BC,UAAWV,EAAMS,QAAQ,QAKjCE,eAAgB,CACdC,KAAM,CACJ,sBAAuB,CACrBC,aAAc,GAAGb,EAAMS,QAAQ,iBAEjC,0BAA2B,CACzB,aAAc,CACZK,OAAQ,QAEV,0BAA2B,CACzBA,OAAQ,QAEV,yBAA0B,CACxBA,OAAQ,QAEV,mBAAoB,CAClBA,OAAQ"}
1
+ {"version":3,"file":"selectOverrides.js","sources":["../../../src/themes/overrides/selectOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nexport const selectOverrides = (theme: Theme): Components<Theme>['MuiSelect'] => ({\n defaultProps: {\n MenuProps: {\n PaperProps: {\n style: {\n boxShadow: theme.customShadows?.overlay,\n marginBottom: theme.spacing(0.5),\n marginTop: theme.spacing(0.5),\n },\n },\n },\n },\n styleOverrides: {\n root: {\n '& .MuiSelect-select': {\n '&.MuiInputBase-input': {\n paddingRight: theme.spacing(1),\n },\n },\n '&.MuiOutlinedInput-root': {\n '& fieldset': {\n border: 'none',\n },\n '&.Mui-disabled fieldset': {\n border: 'none',\n },\n '&.Mui-focused fieldset': {\n border: 'none',\n },\n '&:hover fieldset': {\n border: 'none',\n },\n },\n },\n },\n});\n\nexport default selectOverrides;\n"],"names":["selectOverrides","theme","defaultProps","MenuProps","PaperProps","style","boxShadow","customShadows","overlay","marginBottom","spacing","marginTop","styleOverrides","root","paddingRight","border"],"mappings":"mCAEaA,EAAmBC,IAAY,CAC1CC,aAAc,CACZC,UAAW,CACTC,WAAY,CACVC,MAAO,CACLC,UAAWL,EAAMM,eAAeC,QAChCC,aAAcR,EAAMS,QAAQ,IAC5BC,UAAWV,EAAMS,QAAQ,QAKjCE,eAAgB,CACdC,KAAM,CACJ,sBAAuB,CACrB,uBAAwB,CACtBC,aAAcb,EAAMS,QAAQ,KAGhC,0BAA2B,CACzB,aAAc,CACZK,OAAQ,QAEV,0BAA2B,CACzBA,OAAQ,QAEV,yBAA0B,CACxBA,OAAQ,QAEV,mBAAoB,CAClBA,OAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "4.2.12",
3
+ "version": "5.0.1",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -80,7 +80,7 @@
80
80
  "@storybook/test": "^8.6.7",
81
81
  "@svgr/rollup": "^8.1.0",
82
82
  "@tanstack/react-query": "^5.62.0",
83
- "@testing-library/jest-dom": "6.6.4",
83
+ "@testing-library/jest-dom": "6.7.0",
84
84
  "@testing-library/react": "15.0.7",
85
85
  "@types/lodash.debounce": "^4.0.9",
86
86
  "@types/react": "18.3.23",