@flipdish/portal-library 2.1.5 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/components/Form/FormItemLayout/index.cjs.js +1 -1
  2. package/dist/components/Form/FormItemLayout/index.cjs.js.map +1 -1
  3. package/dist/components/Form/FormItemLayout/index.js +1 -1
  4. package/dist/components/Form/FormItemLayout/index.js.map +1 -1
  5. package/dist/components/GenericTable/index.cjs.js +17 -17
  6. package/dist/components/GenericTable/index.cjs.js.map +1 -1
  7. package/dist/components/GenericTable/index.d.ts +3 -3
  8. package/dist/components/GenericTable/index.js +17 -17
  9. package/dist/components/GenericTable/index.js.map +1 -1
  10. package/dist/components/GenericTableTitle/index.cjs.js +1 -1
  11. package/dist/components/GenericTableTitle/index.cjs.js.map +1 -1
  12. package/dist/components/GenericTableTitle/index.d.ts +4 -5
  13. package/dist/components/GenericTableTitle/index.js +1 -1
  14. package/dist/components/GenericTableTitle/index.js.map +1 -1
  15. package/dist/components/ListItemLinkButton/index.cjs.js +1 -1
  16. package/dist/components/ListItemLinkButton/index.cjs.js.map +1 -1
  17. package/dist/components/ListItemLinkButton/index.d.ts +1 -1
  18. package/dist/components/ListItemLinkButton/index.js +1 -1
  19. package/dist/components/ListItemLinkButton/index.js.map +1 -1
  20. package/dist/components/PageLayout/FullWidthContainer.cjs.js +1 -1
  21. package/dist/components/PageLayout/FullWidthContainer.cjs.js.map +1 -1
  22. package/dist/components/PageLayout/FullWidthContainer.d.ts +2 -2
  23. package/dist/components/PageLayout/FullWidthContainer.js +1 -1
  24. package/dist/components/PageLayout/FullWidthContainer.js.map +1 -1
  25. package/dist/components/PageLayout/GlobalSpacingStyles.cjs.js +1 -1
  26. package/dist/components/PageLayout/GlobalSpacingStyles.cjs.js.map +1 -1
  27. package/dist/components/PageLayout/GlobalSpacingStyles.js +1 -1
  28. package/dist/components/PageLayout/GlobalSpacingStyles.js.map +1 -1
  29. package/dist/components/PageLayout/index.cjs.js +1 -1
  30. package/dist/components/PageLayout/index.cjs.js.map +1 -1
  31. package/dist/components/PageLayout/index.d.ts +4 -4
  32. package/dist/components/PageLayout/index.js +1 -1
  33. package/dist/components/PageLayout/index.js.map +1 -1
  34. package/dist/components/PortalMock/index.cjs.js +22 -22
  35. package/dist/components/PortalMock/index.cjs.js.map +1 -1
  36. package/dist/components/PortalMock/index.d.ts +2 -2
  37. package/dist/components/PortalMock/index.js +22 -22
  38. package/dist/components/PortalMock/index.js.map +1 -1
  39. package/dist/components/molecules/Modal/index.cjs.js +2 -0
  40. package/dist/components/molecules/Modal/index.cjs.js.map +1 -0
  41. package/dist/components/molecules/Modal/index.d.ts +49 -0
  42. package/dist/components/molecules/Modal/index.js +2 -0
  43. package/dist/components/molecules/Modal/index.js.map +1 -0
  44. package/dist/themes/flipdishPublicTheme.cjs.js +1 -1
  45. package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -1
  46. package/dist/themes/flipdishPublicTheme.js +1 -1
  47. package/dist/themes/flipdishPublicTheme.js.map +1 -1
  48. package/dist/themes/tokens/breakpoints/breakpoints.cjs.js +2 -0
  49. package/dist/themes/tokens/breakpoints/breakpoints.cjs.js.map +1 -0
  50. package/dist/themes/tokens/breakpoints/breakpoints.d.ts +20 -0
  51. package/dist/themes/tokens/breakpoints/breakpoints.js +2 -0
  52. package/dist/themes/tokens/breakpoints/breakpoints.js.map +1 -0
  53. package/dist/themes/tokens/spacing/spacing.cjs.js +1 -1
  54. package/dist/themes/tokens/spacing/spacing.cjs.js.map +1 -1
  55. package/dist/themes/tokens/spacing/spacing.d.ts +1 -0
  56. package/dist/themes/tokens/spacing/spacing.js +1 -1
  57. package/dist/themes/tokens/spacing/spacing.js.map +1 -1
  58. package/package.json +8 -8
@@ -1,2 +1,2 @@
1
- "use strict";var r=require("react/jsx-runtime");require("react");var e=require("@mui/material/Grid"),t=require("@mui/material/styles"),i=require("@mui/material/Typography");const a=t.styled(e)((({theme:r})=>({padding:r.spacing(4.75,0,2.5,0),alignItems:"flex-start",flexWrap:"wrap",borderBottom:"1px solid rgba(0,0,0,0.2)"}))),s=t.styled("div")((({theme:r})=>({paddingBottom:r.spacing(2),paddingRight:r.spacing(1.75)})));module.exports=t=>{const{children:n,description:l,descriptionTranslated:d,label:o,labelTranslated:m,mdProportion:p,smProportion:c}=t,[x,u]=p?p.split("x").map((r=>parseInt(r,10))):[4,8],[h,g]=c?c.split("x").map((r=>parseInt(r,10))):[];return r.jsxs(a,{container:!0,children:[r.jsxs(e,{item:!0,xs:12,sm:h,md:x,children:[r.jsx(i,{variant:"subtitle1",component:"h3",color:"textPrimary",children:m||o||null}),d||l?r.jsx(s,{children:r.jsx(i,{variant:"caption",color:"textSecondary",children:d||l||null})}):null]}),r.jsx(e,{item:!0,xs:12,sm:g,md:u,children:n})]})};
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})]})};
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 } = props;\n\n const [titleProportion, dataProportion] = mdProportion ? mdProportion.split('x').map((m) => parseInt(m, 10)) : [4, 8];\n const [titleProportionSm, dataProportionSm] = smProportion ? smProportion.split('x').map((m) => parseInt(m, 10)) : [];\n const castToGridSize = (data: unknown) => data as GridSize;\n\n return (\n <StyledGrid container>\n <Grid item xs={12} sm={castToGridSize(titleProportionSm)} md={castToGridSize(titleProportion)}>\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {labelTranslated || label || null}\n </Typography>\n\n {descriptionTranslated || description ? (\n <StyledDescription>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {descriptionTranslated || description || null}\n </Typography>\n </StyledDescription>\n ) : null}\n </Grid>\n <Grid item xs={12} sm={castToGridSize(dataProportionSm)} md={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","xs","sm","md","_jsx","Typography","variant","component","color","jsx"],"mappings":"6KAMA,MAAMA,EAAaC,EAAAA,OAAOC,EAAPD,EAAa,EAAGE,YAAa,CAC5CC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGZC,EAAoBR,EAAAA,OAAO,MAAPA,EAAc,EAAGE,YAAa,CACpDO,cAAeP,EAAME,QAAQ,GAC7BM,aAAcR,EAAME,QAAQ,yBAcRO,IACpB,MAAMC,SAAEA,EAAQC,YAAEA,EAAWC,sBAAEA,EAAqBC,MAAEA,EAAKC,gBAAEA,EAAeC,aAAEA,EAAYC,aAAEA,GAAiBP,GAEtGQ,EAAiBC,GAAkBH,EAAeA,EAAaI,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAAO,CAAC,EAAG,IAC5GE,EAAmBC,GAAoBR,EAAeA,EAAaG,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAAO,GAGnH,OACII,EAAAA,KAAC5B,EAAW,CAAA6B,uBACRD,OAAC1B,EAAK,CAAA4B,MAAK,EAAAC,GAAI,GAAIC,GAAmBN,EAAoBO,GAAmBb,EACzEP,SAAA,CAAAqB,EAAAA,IAACC,EAAU,CAACC,QAAQ,YAAYC,UAAU,KAAKC,MAAM,cAAazB,SAC7DI,GAAmBD,GAAS,OAGhCD,GAAyBD,EACtBoB,EAAAK,IAAC9B,EAAiB,CAAAI,SACdqB,EAACK,IAAAJ,GAAWC,QAAQ,UAAUE,MAAM,gBAC/BzB,SAAAE,GAAyBD,GAAe,SAGjD,QAERoB,EAACK,IAAArC,EAAK,CAAA4B,MAAK,EAAAC,GAAI,GAAIC,GAAmBL,EAAmBM,GAAmBZ,EAAeR,SACtFA,MAEI"}
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","jsx"],"mappings":"6KAMA,MAAMA,EAAaC,EAAAA,OAAOC,EAAPD,EAAa,EAAGE,YAAa,CAC9CC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGVC,EAAoBR,EAAAA,OAAO,MAAPA,EAAc,EAAGE,YAAa,CACtDO,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,EAAW,CAAA6B,uBACVD,OAAC1B,EACC,CAAA4B,MACA,EAAAC,KAAM,GACNC,OAAuBN,EACvBO,OAAuBb,EAEvBP,SAAA,CAAAqB,EAAAA,IAACC,EAAU,CAACC,MAAM,cAAcC,UAAU,KAAKC,QAAQ,YAAWzB,SAC/DI,GAAmBD,GAAS,OAG9BD,GAAyBD,EACxBoB,EAAAK,IAAC9B,EAAiB,CAAAI,SAChBqB,EAACK,IAAAJ,GAAWC,MAAM,gBAAgBE,QAAQ,UACvCzB,SAAAE,GAAyBD,GAAe,SAG3C,QAENoB,EAACK,IAAArC,EAAK,CAAA4B,MAAK,EAAAC,KAAM,GAAIC,OAAuBL,EAAmBM,OAAuBZ,EAAeR,SAClGA,MAEQ"}
@@ -1,2 +1,2 @@
1
- import{jsxs as r,jsx as t}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 n=e(i)((({theme:r})=>({padding:r.spacing(4.75,0,2.5,0),alignItems:"flex-start",flexWrap:"wrap",borderBottom:"1px solid rgba(0,0,0,0.2)"}))),o=e("div")((({theme:r})=>({paddingBottom:r.spacing(2),paddingRight:r.spacing(1.75)}))),l=e=>{const{children:l,description:m,descriptionTranslated:p,label:d,labelTranslated:s,mdProportion:c,smProportion:h}=e,[x,g]=c?c.split("x").map((r=>parseInt(r,10))):[4,8],[u,f]=h?h.split("x").map((r=>parseInt(r,10))):[];return r(n,{container:!0,children:[r(i,{item:!0,xs:12,sm:u,md:x,children:[t(a,{variant:"subtitle1",component:"h3",color:"textPrimary",children:s||d||null}),p||m?t(o,{children:t(a,{variant:"caption",color:"textSecondary",children:p||m||null})}):null]}),t(i,{item:!0,xs:12,sm:f,md:g,children:l})]})};export{l as default};
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};
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 } = props;\n\n const [titleProportion, dataProportion] = mdProportion ? mdProportion.split('x').map((m) => parseInt(m, 10)) : [4, 8];\n const [titleProportionSm, dataProportionSm] = smProportion ? smProportion.split('x').map((m) => parseInt(m, 10)) : [];\n const castToGridSize = (data: unknown) => data as GridSize;\n\n return (\n <StyledGrid container>\n <Grid item xs={12} sm={castToGridSize(titleProportionSm)} md={castToGridSize(titleProportion)}>\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {labelTranslated || label || null}\n </Typography>\n\n {descriptionTranslated || description ? (\n <StyledDescription>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {descriptionTranslated || description || null}\n </Typography>\n </StyledDescription>\n ) : null}\n </Grid>\n <Grid item xs={12} sm={castToGridSize(dataProportionSm)} md={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","xs","sm","md","_jsx","Typography","variant","component","color"],"mappings":"wLAMA,MAAMA,EAAaC,EAAOC,EAAPD,EAAa,EAAGE,YAAa,CAC5CC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGZC,EAAoBR,EAAO,MAAPA,EAAc,EAAGE,YAAa,CACpDO,cAAeP,EAAME,QAAQ,GAC7BM,aAAcR,EAAME,QAAQ,UAc1BO,EAAkBC,IACpB,MAAMC,SAAEA,EAAQC,YAAEA,EAAWC,sBAAEA,EAAqBC,MAAEA,EAAKC,gBAAEA,EAAeC,aAAEA,EAAYC,aAAEA,GAAiBP,GAEtGQ,EAAiBC,GAAkBH,EAAeA,EAAaI,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAAO,CAAC,EAAG,IAC5GE,EAAmBC,GAAoBR,EAAeA,EAAaG,MAAM,KAAKC,KAAKC,GAAMC,SAASD,EAAG,MAAO,GAGnH,OACII,EAAC7B,EAAW,CAAA8B,uBACRD,EAAC3B,EAAK,CAAA6B,MAAK,EAAAC,GAAI,GAAIC,GAAmBN,EAAoBO,GAAmBb,EACzEP,SAAA,CAAAqB,EAACC,EAAU,CAACC,QAAQ,YAAYC,UAAU,KAAKC,MAAM,cAAazB,SAC7DI,GAAmBD,GAAS,OAGhCD,GAAyBD,EACtBoB,EAAC1B,EAAiB,CAAAK,SACdqB,EAACC,GAAWC,QAAQ,UAAUE,MAAM,gBAC/BzB,SAAAE,GAAyBD,GAAe,SAGjD,QAERoB,EAACjC,EAAK,CAAA6B,MAAK,EAAAC,GAAI,GAAIC,GAAmBL,EAAmBM,GAAmBZ,EAAeR,SACtFA,MAEI"}
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,YAAa,CAC9CC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGVC,EAAoBR,EAAO,MAAPA,EAAc,EAAGE,YAAa,CACtDO,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,EAAW,CAAA8B,uBACVD,EAAC3B,EACC,CAAA6B,MACA,EAAAC,KAAM,GACNC,OAAuBN,EACvBO,OAAuBb,EAEvBP,SAAA,CAAAqB,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,UACvCzB,SAAAE,GAAyBD,GAAe,SAG3C,QAENoB,EAACjC,EAAK,CAAA6B,MAAK,EAAAC,KAAM,GAAIC,OAAuBL,EAAmBM,OAAuBZ,EAAeR,SAClGA,MAEQ"}
@@ -1,18 +1,18 @@
1
- "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/styles"),t=require("@mui/material/Table"),r=require("@mui/material/TableCell"),a=require("@mui/material/TableHead"),l=require("@mui/material/TableRow"),s=require("@mui/material/useMediaQuery"),n=require("../GenericTableTitle/index.cjs.js"),o=require("./HighlightScrollbar.cjs.js"),d=require("../GenericTableBody/index.cjs.js"),c=require("@mui/material/Card"),u=require("../../icons/InformationCircle/index.cjs.js"),m=require("@mui/material/Tooltip"),h=require("@mui/material/IconButton");const p=i.styled("div")`
2
- overflow-x: auto;
3
- &::-webkit-scrollbar {
4
- padding: 2px 0;
5
- height: 6px;
6
- border: 1px solid #d5d5d5;
7
- }
8
- &::-webkit-scrollbar-track {
9
- background: #f1f1f1;
10
- }
11
- &::-webkit-scrollbar-thumb {
12
- background: #f5f5f5;
13
- border-radius: 3px;
14
- }
15
- `,x=i.styled(r,{shouldForwardProp:e=>"isSticky"!==e&&"titleVariant"!==e})((({theme:e,isSticky:i,titleVariant:t})=>({fontSize:13,fontWeight:"light"===t?400:e.typography.fontWeightMedium,color:"light"===t?e.palette.semantic.text["text-weak"]:e.palette.semantic.text["text-strong"],padding:e.spacing(1.25,2),whiteSpace:"nowrap",position:i?"sticky":"relative",zIndex:i?1:"auto"}))),b=i.styled(c)`
16
- overflow: hidden;
17
- `,g=i.styled(m)((({theme:e})=>({marginLeft:e.spacing(.5),svg:{fontSize:e.typography.body1.fontSize}})));module.exports=({data:r,title:c,subTitle:m,showTitle:j=!0,onRowClick:f,loading:y,metadata:k,titleVariant:w="default"})=>{const q=new Set(k.filter((e=>e.isVisible)).sort(((e,i)=>e.ordinal-i.ordinal)).map((e=>e.columnName))),T=k.reduce(((e,i)=>(e[i.columnName]=i,e)),{}),S=i.useTheme(),v=!s(S.breakpoints.up("sm")),z=v?"normal":"sticky";return e.jsxs(p,{children:[j&&e.jsx(n,{title:c,subTitle:m}),e.jsx(b,{children:e.jsx(o,{children:e.jsxs(t,{"aria-label":c,"data-testid":"generic-table"+(j?`-${c.replace(" ","-").toLowerCase()}`:""),children:[e.jsx(a,{children:e.jsx(l,{children:Array.from(q).map(((i,t)=>{const{columnName:r,columnTitle:a,align:l="left",tooltip:s}=T[i];return e.jsx(x,{align:l,isSticky:0===t&&!v,titleVariant:w,children:e.jsxs("div",{children:[e.jsx("span",{children:a}),s&&e.jsx(g,{title:s,placement:"right-start",children:e.jsx(h,{size:"small",children:e.jsx(u,{"data-testid":"InfoOutlinedIcon",size:"sm"})})})]})},r)}))})}),e.jsx(d,{type:z,data:r,columns:q,onRowClick:f,loading:y,meta:T})]})})})]})};
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/Card"),t=require("@mui/material/IconButton"),r=require("@mui/material/styles"),a=require("@mui/material/Table"),l=require("@mui/material/TableCell"),s=require("@mui/material/TableHead"),n=require("@mui/material/TableRow"),o=require("@mui/material/Tooltip"),d=require("@mui/material/useMediaQuery"),c=require("../../icons/InformationCircle/index.cjs.js"),u=require("../GenericTableBody/index.cjs.js"),m=require("../GenericTableTitle/index.cjs.js"),h=require("./HighlightScrollbar.cjs.js");const p=r.styled("div")`
2
+ overflow-x: auto;
3
+ &::-webkit-scrollbar {
4
+ padding: 2px 0;
5
+ height: 6px;
6
+ border: 1px solid #d5d5d5;
7
+ }
8
+ &::-webkit-scrollbar-track {
9
+ background: #f1f1f1;
10
+ }
11
+ &::-webkit-scrollbar-thumb {
12
+ background: #f5f5f5;
13
+ border-radius: 3px;
14
+ }
15
+ `,x=r.styled(l,{shouldForwardProp:e=>"isSticky"!==e&&"titleVariant"!==e})((({theme:e,isSticky:i,titleVariant:t})=>({fontSize:13,fontWeight:"light"===t?400:e.typography.fontWeightMedium,color:"light"===t?e.palette.semantic.text["text-weak"]:e.palette.semantic.text["text-strong"],padding:e.spacing(1.25,2),whiteSpace:"nowrap",position:i?"sticky":"relative",zIndex:i?1:"auto"}))),b=r.styled(i)`
16
+ overflow: hidden;
17
+ `,g=r.styled(o)((({theme:e})=>({marginLeft:e.spacing(.5),svg:{fontSize:e.typography.body1.fontSize}})));module.exports=({data:i,title:l,subTitle:o,showTitle:j=!0,onRowClick:f,loading:y,metadata:k,titleVariant:w="default"})=>{const q=new Set(k.filter((e=>e.isVisible)).sort(((e,i)=>e.ordinal-i.ordinal)).map((e=>e.columnName))),T=k.reduce(((e,i)=>(e[i.columnName]=i,e)),{}),S=r.useTheme(),v=!d(S.breakpoints.up("tablet")),z=v?"normal":"sticky";return e.jsxs(p,{children:[j&&e.jsx(m,{subTitle:o,title:l}),e.jsx(b,{children:e.jsx(h,{children:e.jsxs(a,{"aria-label":l,"data-testid":"generic-table"+(j?`-${l.replace(" ","-").toLowerCase()}`:""),children:[e.jsx(s,{children:e.jsx(n,{children:Array.from(q).map(((i,r)=>{const{columnName:a,columnTitle:l,align:s="left",tooltip:n}=T[i];return e.jsx(x,{align:s,isSticky:0===r&&!v,titleVariant:w,children:e.jsxs("div",{children:[e.jsx("span",{children:l}),n&&e.jsx(g,{placement:"right-start",title:n,children:e.jsx(t,{size:"small",children:e.jsx(c,{"data-testid":"InfoOutlinedIcon",size:"sm"})})})]})},a)}))})}),e.jsx(u,{columns:q,data:i,loading:y,meta:T,type:z,onRowClick:f})]})})})]})};
18
18
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/GenericTable/index.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport GenericTableTitle from '../GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport GenericTableBody, { type GenericTableColumns } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\nimport InfoOutlinedIcon from '../../icons/InformationCircle';\nimport Tooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n titleVariant?: 'default' | 'light';\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell, {\n shouldForwardProp: (prop) => prop !== 'isSticky' && prop !== 'titleVariant',\n})<{ isSticky: boolean; titleVariant: 'default' | 'light' }>(({ theme, isSticky, titleVariant }) => ({\n fontSize: 13,\n fontWeight: titleVariant === 'light' ? 400 : theme.typography.fontWeightMedium,\n color: titleVariant === 'light' ? theme.palette.semantic.text['text-weak'] : theme.palette.semantic.text['text-strong'],\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst StyledTooltip = styled(Tooltip)(({ theme }) => ({\n marginLeft: theme.spacing(0.5),\n svg: {\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata, titleVariant = 'default' }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left', tooltip } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile} titleVariant={titleVariant}>\n <div>\n <span>{columnTitle}</span>\n {tooltip && (\n <StyledTooltip title={tooltip} placement=\"right-start\">\n <IconButton size=\"small\">\n <InfoOutlinedIcon data-testid=\"InfoOutlinedIcon\" size=\"sm\" />\n </IconButton>\n </StyledTooltip>\n )}\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title} data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","shouldForwardProp","prop","theme","isSticky","titleVariant","fontSize","fontWeight","typography","fontWeightMedium","color","palette","semantic","text","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","StyledTooltip","Tooltip","marginLeft","svg","body1","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","jsx","TableHead","TableRow","Array","from","idx","columnTitle","align","tooltip","placement","IconButton","size","InfoOutlinedIcon","GenericTableBody","type","meta"],"mappings":"ijBA4BA,MAAMA,EAAkBC,EAAAA,OAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAMA,OAACE,EAAW,CACtCC,kBAAoBC,GAAkB,aAATA,GAAgC,iBAATA,GADhCJ,EAEqC,EAAGK,QAAOC,WAAUC,mBAAoB,CACjGC,SAAU,GACVC,WAA6B,UAAjBF,EAA2B,IAAMF,EAAMK,WAAWC,iBAC9DC,MAAwB,UAAjBL,EAA2BF,EAAMQ,QAAQC,SAASC,KAAK,aAAeV,EAAMQ,QAAQC,SAASC,KAAK,eACzGC,QAASX,EAAMY,QAAQ,KAAM,GAC7BC,WAAY,SACZC,SAAUb,EAAW,SAAW,WAChCc,OAAQd,EAAW,EAAI,WAGrBe,EAAcrB,EAAAA,OAAOsB,EAAK;;EAI1BC,EAAgBvB,EAAAA,OAAOwB,EAAPxB,EAAgB,EAAGK,YAAa,CAClDoB,WAAYpB,EAAMY,QAAQ,IAC1BS,IAAK,CACDlB,SAAUH,EAAMK,WAAWiB,MAAMnB,6BAIpB,EAAGoB,OAAMC,QAAOC,WAAUC,aAAY,EAAMC,aAAYC,UAASC,WAAU3B,eAAe,cAC3G,MAAM4B,EAAU,IAAIC,IAChBF,EACKG,QAAQC,GAAMA,EAAEC,YAChBC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,QAAUD,EAAEC,UAC7BC,KAAKN,GAAMA,EAAEO,cAEhBC,EAAYZ,EAASa,QAA+C,CAACC,EAAKC,KAC5ED,EAAIC,EAAMJ,YAAcI,EACjBD,IACR,IAEG3C,EAAQ6C,EAAAA,WACRC,GAAYC,EAAc/C,EAAMgD,YAAYC,GAAG,OAG/CC,EAA2BJ,EAAW,SAAW,SA0BvD,OACIK,EAACC,KAAA1D,aACIgC,GAAa2B,MAACC,EAAiB,CAAC9B,MAAOA,EAAOC,SAAUA,IACzD4B,EAAAA,IAACrC,EAAW,CAAAuC,SACRF,MAACG,EAAkB,CAAAD,SACfJ,EAAAA,KAACM,EAAK,CAAA,aAAajC,EAAoB,cAAA,iBAAmBE,EAAY,IAAIF,EAAMkC,QAAQ,IAAK,KAAKC,gBAAkB,IAC/GJ,SAAA,CA7BjBF,EAAAO,IAACC,EAAS,CAAAN,SACNF,EAAAA,IAACS,EACI,CAAAP,SAAAQ,MAAMC,KAAKlC,GAASS,KAAI,CAACxC,EAAMkE,KAC5B,MAAMzB,WAAEA,EAAU0B,YAAEA,EAAWC,MAAEA,EAAQ,OAAMC,QAAEA,GAAY3B,EAAU1C,GACvE,OACIsD,MAACzD,EAAe,CAAkBuE,MAAOA,EAAOlE,SAAkB,IAARgE,IAAcnB,EAAU5C,aAAcA,EAAYqD,SACxGJ,EAAAA,KACI,MAAA,CAAAI,SAAA,CAAAF,EAAAO,IAAA,OAAA,CAAAL,SAAOW,IACNE,GACGf,MAACnC,EAAa,CAACM,MAAO4C,EAASC,UAAU,cAAad,SAClDF,EAACO,IAAAU,EAAW,CAAAC,KAAK,iBACblB,EAAAA,IAACmB,EAA6B,CAAA,cAAA,mBAAmBD,KAAK,eANpD/B,EAWJ,QAclBa,EAAAA,IAACoB,EACG,CAAAC,KAAMxB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACT+C,KAAMlC,aAKR"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/GenericTable/index.tsx"],"sourcesContent":["import Card from '@mui/material/Card';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport Tooltip from '@mui/material/Tooltip';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport InfoOutlinedIcon from '../../icons/InformationCircle';\nimport GenericTableBody, { type GenericTableColumns } from '../GenericTableBody';\nimport GenericTableTitle from '../GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\n\ninterface GenericTableProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n titleVariant?: 'default' | 'light';\n}\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell, {\n shouldForwardProp: (prop) => prop !== 'isSticky' && prop !== 'titleVariant',\n})<{ isSticky: boolean; titleVariant: 'default' | 'light' }>(({ theme, isSticky, titleVariant }) => ({\n fontSize: 13,\n fontWeight: titleVariant === 'light' ? 400 : theme.typography.fontWeightMedium,\n color:\n titleVariant === 'light'\n ? theme.palette.semantic.text['text-weak']\n : theme.palette.semantic.text['text-strong'],\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst StyledTooltip = styled(Tooltip)(({ theme }) => ({\n marginLeft: theme.spacing(0.5),\n svg: {\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nconst GenericTable = ({\n data,\n title,\n subTitle,\n showTitle = true,\n onRowClick,\n loading,\n metadata,\n titleVariant = 'default',\n}: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('tablet'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left', tooltip } = tableMeta[prop];\n return (\n <StyledTableCell\n key={columnName}\n align={align}\n isSticky={idx === 0 && !isMobile}\n titleVariant={titleVariant}\n >\n <div>\n <span>{columnTitle}</span>\n {tooltip && (\n <StyledTooltip placement=\"right-start\" title={tooltip}>\n <IconButton size=\"small\">\n <InfoOutlinedIcon data-testid=\"InfoOutlinedIcon\" size=\"sm\" />\n </IconButton>\n </StyledTooltip>\n )}\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle subTitle={subTitle} title={title}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table\n aria-label={title}\n data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}\n >\n {renderTableHeader()}\n <GenericTableBody\n columns={columns}\n data={data}\n loading={loading}\n meta={tableMeta}\n type={firstColumnStylePosition}\n onRowClick={onRowClick}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","shouldForwardProp","prop","theme","isSticky","titleVariant","fontSize","fontWeight","typography","fontWeightMedium","color","palette","semantic","text","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","StyledTooltip","Tooltip","marginLeft","svg","body1","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","jsx","TableHead","TableRow","Array","from","idx","columnTitle","align","tooltip","placement","IconButton","size","InfoOutlinedIcon","GenericTableBody","meta","type"],"mappings":"ijBA4BA,MAAMA,EAAkBC,EAAAA,OAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAMA,OAACE,EAAW,CACxCC,kBAAoBC,GAAkB,aAATA,GAAgC,iBAATA,GAD9BJ,EAEqC,EAAGK,QAAOC,WAAUC,mBAAoB,CACnGC,SAAU,GACVC,WAA6B,UAAjBF,EAA2B,IAAMF,EAAMK,WAAWC,iBAC9DC,MACmB,UAAjBL,EACIF,EAAMQ,QAAQC,SAASC,KAAK,aAC5BV,EAAMQ,QAAQC,SAASC,KAAK,eAClCC,QAASX,EAAMY,QAAQ,KAAM,GAC7BC,WAAY,SACZC,SAAUb,EAAW,SAAW,WAChCc,OAAQd,EAAW,EAAI,WAGnBe,EAAcrB,EAAAA,OAAOsB,EAAK;;EAI1BC,EAAgBvB,EAAAA,OAAOwB,EAAPxB,EAAgB,EAAGK,YAAa,CACpDoB,WAAYpB,EAAMY,QAAQ,IAC1BS,IAAK,CACHlB,SAAUH,EAAMK,WAAWiB,MAAMnB,6BAIhB,EACnBoB,OACAC,QACAC,WACAC,aAAY,EACZC,aACAC,UACAC,WACA3B,eAAe,cAEf,MAAM4B,EAAU,IAAIC,IAClBF,EACGG,QAAQC,GAAMA,EAAEC,YAChBC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,QAAUD,EAAEC,UAC7BC,KAAKN,GAAMA,EAAEO,cAEZC,EAAYZ,EAASa,QAA+C,CAACC,EAAKC,KAC9ED,EAAIC,EAAMJ,YAAcI,EACjBD,IACN,IAEG3C,EAAQ6C,EAAAA,WACRC,GAAYC,EAAc/C,EAAMgD,YAAYC,GAAG,WAG/CC,EAA2BJ,EAAW,SAAW,SA+BvD,OACEK,EAACC,KAAA1D,aACEgC,GAAa2B,MAACC,EAAiB,CAAC7B,SAAUA,EAAUD,MAAOA,IAC5D6B,EAAAA,IAACrC,EAAW,CAAAuC,SACVF,MAACG,EAAkB,CAAAD,SACjBJ,EAAAA,KAACM,EAAK,CAAA,aACQjC,EACC,cAAA,iBAAmBE,EAAY,IAAIF,EAAMkC,QAAQ,IAAK,KAAKC,gBAAkB,IAEzFJ,SAAA,CArCTF,EAAAO,IAACC,EAAS,CAAAN,SACRF,EAAAA,IAACS,EACE,CAAAP,SAAAQ,MAAMC,KAAKlC,GAASS,KAAI,CAACxC,EAAMkE,KAC9B,MAAMzB,WAAEA,EAAU0B,YAAEA,EAAWC,MAAEA,EAAQ,OAAMC,QAAEA,GAAY3B,EAAU1C,GACvE,OACEsD,MAACzD,EAAe,CAEduE,MAAOA,EACPlE,SAAkB,IAARgE,IAAcnB,EACxB5C,aAAcA,EAAYqD,SAE1BJ,EAAAA,KACE,MAAA,CAAAI,SAAA,CAAAF,EAAAO,IAAA,OAAA,CAAAL,SAAOW,IACNE,GACCf,MAACnC,EAAa,CAACmD,UAAU,cAAc7C,MAAO4C,EAAOb,SACnDF,EAACO,IAAAU,EAAW,CAAAC,KAAK,iBACflB,EAAAA,IAACmB,EAA6B,CAAA,cAAA,mBAAmBD,KAAK,eAVzD/B,EAeW,QAiBlBa,EAAAA,IAACoB,EACC,CAAA3C,QAASA,EACTP,KAAMA,EACNK,QAASA,EACT8C,KAAMjC,EACNkC,KAAMzB,EACNvB,WAAYA,aAKJ"}
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { GenericTableColumns } from '../GenericTableBody/index.js';
3
3
 
4
- type GenericTableProps = {
4
+ interface GenericTableProps {
5
5
  data?: any[];
6
6
  loading?: boolean;
7
7
  metadata: GenericTableColumns[];
@@ -10,7 +10,7 @@ type GenericTableProps = {
10
10
  subTitle?: string;
11
11
  title?: string;
12
12
  titleVariant?: 'default' | 'light';
13
- };
14
- declare const GenericTable: ({ data, title, subTitle, showTitle, onRowClick, loading, metadata, titleVariant }: GenericTableProps) => react_jsx_runtime.JSX.Element;
13
+ }
14
+ declare const GenericTable: ({ data, title, subTitle, showTitle, onRowClick, loading, metadata, titleVariant, }: GenericTableProps) => react_jsx_runtime.JSX.Element;
15
15
 
16
16
  export { GenericTable as default };
@@ -1,18 +1,18 @@
1
- import{jsxs as t,jsx as i}from"react/jsx-runtime";import{styled as e,useTheme as r}from"@mui/material/styles";import a from"@mui/material/Table";import o from"@mui/material/TableCell";import l from"@mui/material/TableHead";import m from"@mui/material/TableRow";import n from"@mui/material/useMediaQuery";import d from"../GenericTableTitle/index.js";import c from"./HighlightScrollbar.js";import s from"../GenericTableBody/index.js";import p from"@mui/material/Card";import f from"../../icons/InformationCircle/index.js";import u from"@mui/material/Tooltip";import h from"@mui/material/IconButton";const b=e("div")`
2
- overflow-x: auto;
3
- &::-webkit-scrollbar {
4
- padding: 2px 0;
5
- height: 6px;
6
- border: 1px solid #d5d5d5;
7
- }
8
- &::-webkit-scrollbar-track {
9
- background: #f1f1f1;
10
- }
11
- &::-webkit-scrollbar-thumb {
12
- background: #f5f5f5;
13
- border-radius: 3px;
14
- }
15
- `,g=e(o,{shouldForwardProp:t=>"isSticky"!==t&&"titleVariant"!==t})((({theme:t,isSticky:i,titleVariant:e})=>({fontSize:13,fontWeight:"light"===e?400:t.typography.fontWeightMedium,color:"light"===e?t.palette.semantic.text["text-weak"]:t.palette.semantic.text["text-strong"],padding:t.spacing(1.25,2),whiteSpace:"nowrap",position:i?"sticky":"relative",zIndex:i?1:"auto"}))),k=e(p)`
16
- overflow: hidden;
17
- `,w=e(u)((({theme:t})=>({marginLeft:t.spacing(.5),svg:{fontSize:t.typography.body1.fontSize}}))),x=({data:e,title:o,subTitle:p,showTitle:u=!0,onRowClick:x,loading:y,metadata:T,titleVariant:S="default"})=>{const v=new Set(T.filter((t=>t.isVisible)).sort(((t,i)=>t.ordinal-i.ordinal)).map((t=>t.columnName))),z=T.reduce(((t,i)=>(t[i.columnName]=i,t)),{}),C=r(),j=!n(C.breakpoints.up("sm")),I=j?"normal":"sticky";return t(b,{children:[u&&i(d,{title:o,subTitle:p}),i(k,{children:i(c,{children:t(a,{"aria-label":o,"data-testid":"generic-table"+(u?`-${o.replace(" ","-").toLowerCase()}`:""),children:[i(l,{children:i(m,{children:Array.from(v).map(((e,r)=>{const{columnName:a,columnTitle:o,align:l="left",tooltip:m}=z[e];return i(g,{align:l,isSticky:0===r&&!j,titleVariant:S,children:t("div",{children:[i("span",{children:o}),m&&i(w,{title:m,placement:"right-start",children:i(h,{size:"small",children:i(f,{"data-testid":"InfoOutlinedIcon",size:"sm"})})})]})},a)}))})}),i(s,{type:I,data:e,columns:v,onRowClick:x,loading:y,meta:z})]})})})]})};export{x as default};
1
+ import{jsxs as t,jsx as i}from"react/jsx-runtime";import e from"@mui/material/Card";import r from"@mui/material/IconButton";import{styled as a,useTheme as o}from"@mui/material/styles";import l from"@mui/material/Table";import m from"@mui/material/TableCell";import n from"@mui/material/TableHead";import d from"@mui/material/TableRow";import c from"@mui/material/Tooltip";import s from"@mui/material/useMediaQuery";import p from"../../icons/InformationCircle/index.js";import f from"../GenericTableBody/index.js";import u from"../GenericTableTitle/index.js";import h from"./HighlightScrollbar.js";const b=a("div")`
2
+ overflow-x: auto;
3
+ &::-webkit-scrollbar {
4
+ padding: 2px 0;
5
+ height: 6px;
6
+ border: 1px solid #d5d5d5;
7
+ }
8
+ &::-webkit-scrollbar-track {
9
+ background: #f1f1f1;
10
+ }
11
+ &::-webkit-scrollbar-thumb {
12
+ background: #f5f5f5;
13
+ border-radius: 3px;
14
+ }
15
+ `,g=a(m,{shouldForwardProp:t=>"isSticky"!==t&&"titleVariant"!==t})((({theme:t,isSticky:i,titleVariant:e})=>({fontSize:13,fontWeight:"light"===e?400:t.typography.fontWeightMedium,color:"light"===e?t.palette.semantic.text["text-weak"]:t.palette.semantic.text["text-strong"],padding:t.spacing(1.25,2),whiteSpace:"nowrap",position:i?"sticky":"relative",zIndex:i?1:"auto"}))),k=a(e)`
16
+ overflow: hidden;
17
+ `,w=a(c)((({theme:t})=>({marginLeft:t.spacing(.5),svg:{fontSize:t.typography.body1.fontSize}}))),x=({data:e,title:a,subTitle:m,showTitle:c=!0,onRowClick:x,loading:y,metadata:T,titleVariant:S="default"})=>{const v=new Set(T.filter((t=>t.isVisible)).sort(((t,i)=>t.ordinal-i.ordinal)).map((t=>t.columnName))),z=T.reduce(((t,i)=>(t[i.columnName]=i,t)),{}),C=o(),j=!s(C.breakpoints.up("tablet")),I=j?"normal":"sticky";return t(b,{children:[c&&i(u,{subTitle:m,title:a}),i(k,{children:i(h,{children:t(l,{"aria-label":a,"data-testid":"generic-table"+(c?`-${a.replace(" ","-").toLowerCase()}`:""),children:[i(n,{children:i(d,{children:Array.from(v).map(((e,a)=>{const{columnName:o,columnTitle:l,align:m="left",tooltip:n}=z[e];return i(g,{align:m,isSticky:0===a&&!j,titleVariant:S,children:t("div",{children:[i("span",{children:l}),n&&i(w,{placement:"right-start",title:n,children:i(r,{size:"small",children:i(p,{"data-testid":"InfoOutlinedIcon",size:"sm"})})})]})},o)}))})}),i(f,{columns:v,data:e,loading:y,meta:z,type:I,onRowClick:x})]})})})]})};export{x as default};
18
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/GenericTable/index.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport GenericTableTitle from '../GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport GenericTableBody, { type GenericTableColumns } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\nimport InfoOutlinedIcon from '../../icons/InformationCircle';\nimport Tooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n titleVariant?: 'default' | 'light';\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell, {\n shouldForwardProp: (prop) => prop !== 'isSticky' && prop !== 'titleVariant',\n})<{ isSticky: boolean; titleVariant: 'default' | 'light' }>(({ theme, isSticky, titleVariant }) => ({\n fontSize: 13,\n fontWeight: titleVariant === 'light' ? 400 : theme.typography.fontWeightMedium,\n color: titleVariant === 'light' ? theme.palette.semantic.text['text-weak'] : theme.palette.semantic.text['text-strong'],\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst StyledTooltip = styled(Tooltip)(({ theme }) => ({\n marginLeft: theme.spacing(0.5),\n svg: {\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata, titleVariant = 'default' }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left', tooltip } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile} titleVariant={titleVariant}>\n <div>\n <span>{columnTitle}</span>\n {tooltip && (\n <StyledTooltip title={tooltip} placement=\"right-start\">\n <IconButton size=\"small\">\n <InfoOutlinedIcon data-testid=\"InfoOutlinedIcon\" size=\"sm\" />\n </IconButton>\n </StyledTooltip>\n )}\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title} data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","shouldForwardProp","prop","theme","isSticky","titleVariant","fontSize","fontWeight","typography","fontWeightMedium","color","palette","semantic","text","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","StyledTooltip","Tooltip","marginLeft","svg","body1","GenericTable","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","TableHead","TableRow","Array","from","idx","columnTitle","align","tooltip","placement","IconButton","size","InfoOutlinedIcon","GenericTableBody","type","meta"],"mappings":"qlBA4BA,MAAMA,EAAkBC,EAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAOE,EAAW,CACtCC,kBAAoBC,GAAkB,aAATA,GAAgC,iBAATA,GADhCJ,EAEqC,EAAGK,QAAOC,WAAUC,mBAAoB,CACjGC,SAAU,GACVC,WAA6B,UAAjBF,EAA2B,IAAMF,EAAMK,WAAWC,iBAC9DC,MAAwB,UAAjBL,EAA2BF,EAAMQ,QAAQC,SAASC,KAAK,aAAeV,EAAMQ,QAAQC,SAASC,KAAK,eACzGC,QAASX,EAAMY,QAAQ,KAAM,GAC7BC,WAAY,SACZC,SAAUb,EAAW,SAAW,WAChCc,OAAQd,EAAW,EAAI,WAGrBe,EAAcrB,EAAOsB,EAAK;;EAI1BC,EAAgBvB,EAAOwB,EAAPxB,EAAgB,EAAGK,YAAa,CAClDoB,WAAYpB,EAAMY,QAAQ,IAC1BS,IAAK,CACDlB,SAAUH,EAAMK,WAAWiB,MAAMnB,cAInCoB,EAAe,EAAGC,OAAMC,QAAOC,WAAUC,aAAY,EAAMC,aAAYC,UAASC,WAAU5B,eAAe,cAC3G,MAAM6B,EAAU,IAAIC,IAChBF,EACKG,QAAQC,GAAMA,EAAEC,YAChBC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,QAAUD,EAAEC,UAC7BC,KAAKN,GAAMA,EAAEO,cAEhBC,EAAYZ,EAASa,QAA+C,CAACC,EAAKC,KAC5ED,EAAIC,EAAMJ,YAAcI,EACjBD,IACR,IAEG5C,EAAQ8C,IACRC,GAAYC,EAAchD,EAAMiD,YAAYC,GAAG,OAG/CC,EAA2BJ,EAAW,SAAW,SA0BvD,OACIK,EAAC1D,aACIiC,GAAa0B,EAACC,EAAiB,CAAC7B,MAAOA,EAAOC,SAAUA,IACzD2B,EAACrC,EAAW,CAAAuC,SACRF,EAACG,EAAkB,CAAAD,SACfH,EAACK,EAAK,CAAA,aAAahC,EAAoB,cAAA,iBAAmBE,EAAY,IAAIF,EAAMiC,QAAQ,IAAK,KAAKC,gBAAkB,IAC/GJ,SAAA,CA7BjBF,EAACO,EAAS,CAAAL,SACNF,EAACQ,EACI,CAAAN,SAAAO,MAAMC,KAAKhC,GAASS,KAAI,CAACzC,EAAMiE,KAC5B,MAAMvB,WAAEA,EAAUwB,YAAEA,EAAWC,MAAEA,EAAQ,OAAMC,QAAEA,GAAYzB,EAAU3C,GACvE,OACIsD,EAACzD,EAAe,CAAkBsE,MAAOA,EAAOjE,SAAkB,IAAR+D,IAAcjB,EAAU7C,aAAcA,EAAYqD,SACxGH,EACI,MAAA,CAAAG,SAAA,CAAAF,EAAA,OAAA,CAAAE,SAAOU,IACNE,GACGd,EAACnC,EAAa,CAACO,MAAO0C,EAASC,UAAU,cAAab,SAClDF,EAACgB,EAAW,CAAAC,KAAK,iBACbjB,EAACkB,EAA6B,CAAA,cAAA,mBAAmBD,KAAK,eANpD7B,EAWJ,QAclBY,EAACmB,EACG,CAAAC,KAAMtB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACT6C,KAAMhC,aAKR"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/GenericTable/index.tsx"],"sourcesContent":["import Card from '@mui/material/Card';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport Tooltip from '@mui/material/Tooltip';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport InfoOutlinedIcon from '../../icons/InformationCircle';\nimport GenericTableBody, { type GenericTableColumns } from '../GenericTableBody';\nimport GenericTableTitle from '../GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\n\ninterface GenericTableProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n titleVariant?: 'default' | 'light';\n}\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell, {\n shouldForwardProp: (prop) => prop !== 'isSticky' && prop !== 'titleVariant',\n})<{ isSticky: boolean; titleVariant: 'default' | 'light' }>(({ theme, isSticky, titleVariant }) => ({\n fontSize: 13,\n fontWeight: titleVariant === 'light' ? 400 : theme.typography.fontWeightMedium,\n color:\n titleVariant === 'light'\n ? theme.palette.semantic.text['text-weak']\n : theme.palette.semantic.text['text-strong'],\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst StyledTooltip = styled(Tooltip)(({ theme }) => ({\n marginLeft: theme.spacing(0.5),\n svg: {\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nconst GenericTable = ({\n data,\n title,\n subTitle,\n showTitle = true,\n onRowClick,\n loading,\n metadata,\n titleVariant = 'default',\n}: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('tablet'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left', tooltip } = tableMeta[prop];\n return (\n <StyledTableCell\n key={columnName}\n align={align}\n isSticky={idx === 0 && !isMobile}\n titleVariant={titleVariant}\n >\n <div>\n <span>{columnTitle}</span>\n {tooltip && (\n <StyledTooltip placement=\"right-start\" title={tooltip}>\n <IconButton size=\"small\">\n <InfoOutlinedIcon data-testid=\"InfoOutlinedIcon\" size=\"sm\" />\n </IconButton>\n </StyledTooltip>\n )}\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle subTitle={subTitle} title={title}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table\n aria-label={title}\n data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}\n >\n {renderTableHeader()}\n <GenericTableBody\n columns={columns}\n data={data}\n loading={loading}\n meta={tableMeta}\n type={firstColumnStylePosition}\n onRowClick={onRowClick}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","shouldForwardProp","prop","theme","isSticky","titleVariant","fontSize","fontWeight","typography","fontWeightMedium","color","palette","semantic","text","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","StyledTooltip","Tooltip","marginLeft","svg","body1","GenericTable","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","TableHead","TableRow","Array","from","idx","columnTitle","align","tooltip","placement","IconButton","size","InfoOutlinedIcon","GenericTableBody","meta","type"],"mappings":"qlBA4BA,MAAMA,EAAkBC,EAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAOE,EAAW,CACxCC,kBAAoBC,GAAkB,aAATA,GAAgC,iBAATA,GAD9BJ,EAEqC,EAAGK,QAAOC,WAAUC,mBAAoB,CACnGC,SAAU,GACVC,WAA6B,UAAjBF,EAA2B,IAAMF,EAAMK,WAAWC,iBAC9DC,MACmB,UAAjBL,EACIF,EAAMQ,QAAQC,SAASC,KAAK,aAC5BV,EAAMQ,QAAQC,SAASC,KAAK,eAClCC,QAASX,EAAMY,QAAQ,KAAM,GAC7BC,WAAY,SACZC,SAAUb,EAAW,SAAW,WAChCc,OAAQd,EAAW,EAAI,WAGnBe,EAAcrB,EAAOsB,EAAK;;EAI1BC,EAAgBvB,EAAOwB,EAAPxB,EAAgB,EAAGK,YAAa,CACpDoB,WAAYpB,EAAMY,QAAQ,IAC1BS,IAAK,CACHlB,SAAUH,EAAMK,WAAWiB,MAAMnB,cAI/BoB,EAAe,EACnBC,OACAC,QACAC,WACAC,aAAY,EACZC,aACAC,UACAC,WACA5B,eAAe,cAEf,MAAM6B,EAAU,IAAIC,IAClBF,EACGG,QAAQC,GAAMA,EAAEC,YAChBC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,QAAUD,EAAEC,UAC7BC,KAAKN,GAAMA,EAAEO,cAEZC,EAAYZ,EAASa,QAA+C,CAACC,EAAKC,KAC9ED,EAAIC,EAAMJ,YAAcI,EACjBD,IACN,IAEG5C,EAAQ8C,IACRC,GAAYC,EAAchD,EAAMiD,YAAYC,GAAG,WAG/CC,EAA2BJ,EAAW,SAAW,SA+BvD,OACEK,EAAC1D,aACEiC,GAAa0B,EAACC,EAAiB,CAAC5B,SAAUA,EAAUD,MAAOA,IAC5D4B,EAACrC,EAAW,CAAAuC,SACVF,EAACG,EAAkB,CAAAD,SACjBH,EAACK,EAAK,CAAA,aACQhC,EACC,cAAA,iBAAmBE,EAAY,IAAIF,EAAMiC,QAAQ,IAAK,KAAKC,gBAAkB,IAEzFJ,SAAA,CArCTF,EAACO,EAAS,CAAAL,SACRF,EAACQ,EACE,CAAAN,SAAAO,MAAMC,KAAKhC,GAASS,KAAI,CAACzC,EAAMiE,KAC9B,MAAMvB,WAAEA,EAAUwB,YAAEA,EAAWC,MAAEA,EAAQ,OAAMC,QAAEA,GAAYzB,EAAU3C,GACvE,OACEsD,EAACzD,EAAe,CAEdsE,MAAOA,EACPjE,SAAkB,IAAR+D,IAAcjB,EACxB7C,aAAcA,EAAYqD,SAE1BH,EACE,MAAA,CAAAG,SAAA,CAAAF,EAAA,OAAA,CAAAE,SAAOU,IACNE,GACCd,EAACnC,EAAa,CAACkD,UAAU,cAAc3C,MAAO0C,EAAOZ,SACnDF,EAACgB,EAAW,CAAAC,KAAK,iBACfjB,EAACkB,EAA6B,CAAA,cAAA,mBAAmBD,KAAK,eAVzD7B,EAeW,QAiBlBY,EAACmB,EACC,CAAAzC,QAASA,EACTP,KAAMA,EACNK,QAASA,EACT4C,KAAM/B,EACNgC,KAAMvB,EACNvB,WAAYA,aAKJ"}
@@ -1,2 +1,2 @@
1
- "use strict";var i=require("react/jsx-runtime");require("react");var e=require("@mui/material/Grid"),r=require("@mui/material/Typography"),t=require("@mui/material/styles");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("md")]:{padding:i.spacing(3,2,1.5)}};case"medium":return{padding:i.spacing(4,0,2),[i.breakpoints.down("md")]:{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:s,children:l,titlePadding:c="medium"})=>i.jsxs(a,{container:!0,titlePadding:c,children:[i.jsxs(e,{item:!0,xs:t,sm:t,children:[s&&i.jsx(r,{variant:"h5",children:s}),n&&i.jsx("div",{children:i.jsx(d,{variant:"caption",children:n})})]}),l]});
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]});
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';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\n\ntype 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?: 'small' | 'medium';\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('md')]: {\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('md')]: {\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 = ({ maxGridWidth = 12, subTitle, title, children, titlePadding = 'medium' }: OuterProps) => {\n return (\n <HeaderContainer container titlePadding={titlePadding}>\n <Grid item xs={maxGridWidth} sm={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","jsxs","container","item","xs","sm","_jsx","variant"],"mappings":"6KAaA,MAAMA,EAAkBC,EAAMA,OAACC,EAAM,CACjCC,kBAAoBC,GAAkB,iBAATA,GADTH,EAEyB,EAAGI,QAAOC,mBACvD,OAAQA,GACJ,IAAK,QACD,MAAO,CACHC,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAC7B,CAACH,EAAMI,YAAYC,KAAK,OAAQ,CAC5BH,QAASF,EAAMG,QAAQ,EAAG,EAAG,OAGzC,IAAK,SACD,MAAO,CACHD,QAASF,EAAMG,QAAQ,EAAG,EAAG,GAC7B,CAACH,EAAMI,YAAYC,KAAK,OAAQ,CAC5BH,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAGzC,QACI,MAAO,CAAED,QAAS,OAIxBI,EAAWV,EAAAA,OAAOW,EAAPX,CAAmB,CAChCY,MAAO,IACPC,OAAQ,GACRC,SAAU,GACVC,WAAY,SACZC,WAAY,KACZC,cAAe,GACfC,MAAO,uCAGe,EAAGC,eAAe,GAAIC,WAAUC,QAAOC,WAAUjB,eAAe,YAElFkB,EAACC,KAAAzB,EAAgB,CAAA0B,aAAUpB,aAAcA,EAAYiB,SAAA,CACjDC,OAACtB,GAAKyB,MAAI,EAACC,GAAIR,EAAcS,GAAIT,EAAYG,SAAA,CACxCD,GAASQ,EAAAA,IAAClB,GAAWmB,QAAQ,KAAIR,SAAED,IACnCD,GACGS,EAAAA,IACI,MAAA,CAAAP,SAAAO,MAACnB,EAAQ,CAACoB,QAAQ,UAAWR,SAAAF,SAKxCE"}
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","jsxs","container","item","base","mobile","_jsx","variant"],"mappings":"6KAcA,MAAMA,EAAkBC,EAAMA,OAACC,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,EAACC,KAAAzB,EAAgB,CAAA0B,aAAUpB,aAAcA,EAAYiB,SAAA,CACnDC,OAACtB,GAAKyB,MAAI,EAACC,KAAMR,EAAcS,OAAQT,EAAYG,SAAA,CAChDD,GAASQ,EAAAA,IAAClB,GAAWmB,QAAQ,KAAIR,SAAED,IACnCD,GACCS,EAAAA,IACE,MAAA,CAAAP,SAAAO,MAACnB,EAAQ,CAACoB,QAAQ,UAAWR,SAAAF,SAKlCE"}
@@ -1,13 +1,12 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { ReactNode } from 'react';
3
2
 
4
- type OuterProps = {
3
+ interface OuterProps {
5
4
  maxGridWidth?: boolean | 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
6
5
  subTitle?: string;
7
6
  title?: string;
8
7
  children?: ReactNode;
9
- titlePadding?: 'small' | 'medium';
10
- };
11
- declare const GenericTableTitle: ({ maxGridWidth, subTitle, title, children, titlePadding }: OuterProps) => react_jsx_runtime.JSX.Element;
8
+ titlePadding?: 'medium' | 'small';
9
+ }
10
+ declare const GenericTableTitle: ({ maxGridWidth, subTitle, title, children, titlePadding, }: OuterProps) => JSX.Element;
12
11
 
13
12
  export { GenericTableTitle as default };
@@ -1,2 +1,2 @@
1
- import{jsxs as i,jsx as t}from"react/jsx-runtime";import"react";import r from"@mui/material/Grid";import e from"@mui/material/Typography";import{styled as a}from"@mui/material/styles";const d=a(r,{shouldForwardProp:i=>"titlePadding"!==i})((({theme:i,titlePadding:t})=>{switch(t){case"small":return{padding:i.spacing(3,0,1.5),[i.breakpoints.down("md")]:{padding:i.spacing(3,2,1.5)}};case"medium":return{padding:i.spacing(4,0,2),[i.breakpoints.down("md")]:{padding:i.spacing(4,2,2)}};default:return{padding:0}}})),n=a(e)({width:191,height:16,fontSize:12,fontWeight:"normal",lineHeight:1.33,letterSpacing:.4,color:"rgba(0, 0, 0, 0.38)"}),m=({maxGridWidth:a=12,subTitle:m,title:o,children:l,titlePadding:p="medium"})=>i(d,{container:!0,titlePadding:p,children:[i(r,{item:!0,xs:a,sm:a,children:[o&&t(e,{variant:"h5",children:o}),m&&t("div",{children:t(n,{variant:"caption",children:m})})]}),l]});export{m as default};
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};
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';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\n\ntype 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?: 'small' | 'medium';\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('md')]: {\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('md')]: {\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 = ({ maxGridWidth = 12, subTitle, title, children, titlePadding = 'medium' }: OuterProps) => {\n return (\n <HeaderContainer container titlePadding={titlePadding}>\n <Grid item xs={maxGridWidth} sm={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","xs","sm","_jsx","variant"],"mappings":"wLAaA,MAAMA,EAAkBC,EAAOC,EAAM,CACjCC,kBAAoBC,GAAkB,iBAATA,GADTH,EAEyB,EAAGI,QAAOC,mBACvD,OAAQA,GACJ,IAAK,QACD,MAAO,CACHC,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAC7B,CAACH,EAAMI,YAAYC,KAAK,OAAQ,CAC5BH,QAASF,EAAMG,QAAQ,EAAG,EAAG,OAGzC,IAAK,SACD,MAAO,CACHD,QAASF,EAAMG,QAAQ,EAAG,EAAG,GAC7B,CAACH,EAAMI,YAAYC,KAAK,OAAQ,CAC5BH,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAGzC,QACI,MAAO,CAAED,QAAS,OAIxBI,EAAWV,EAAOW,EAAPX,CAAmB,CAChCY,MAAO,IACPC,OAAQ,GACRC,SAAU,GACVC,WAAY,SACZC,WAAY,KACZC,cAAe,GACfC,MAAO,wBAGLC,EAAoB,EAAGC,eAAe,GAAIC,WAAUC,QAAOC,WAAUlB,eAAe,YAElFmB,EAACzB,EAAgB,CAAA0B,aAAUpB,aAAcA,EAAYkB,SAAA,CACjDC,EAACvB,GAAKyB,MAAI,EAACC,GAAIP,EAAcQ,GAAIR,EAAYG,SAAA,CACxCD,GAASO,EAAClB,GAAWmB,QAAQ,KAAIP,SAAED,IACnCD,GACGQ,EACI,MAAA,CAAAN,SAAAM,EAACnB,EAAQ,CAACoB,QAAQ,UAAWP,SAAAF,SAKxCE"}
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,EAAgB,CAAA0B,aAAUpB,aAAcA,EAAYkB,SAAA,CACnDC,EAACvB,GAAKyB,MAAI,EAACC,KAAMP,EAAcQ,OAAQR,EAAYG,SAAA,CAChDD,GAASO,EAAClB,GAAWmB,QAAQ,KAAIP,SAAED,IACnCD,GACCQ,EACE,MAAA,CAAAN,SAAAM,EAACnB,EAAQ,CAACoB,QAAQ,UAAWP,SAAAF,SAKlCE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("../../icons/ArrowRight01/index.cjs.js"),i=require("@mui/material/IconButton"),r=require("@mui/material/ListItemIcon"),o=require("@mui/material/ListItemText"),n=require("@mui/material/styles/useTheme"),s=require("@mui/material/useMediaQuery"),a=require("@mui/material/styles/styled");const d=a(require("../ListItemLink/index.cjs.js"),{shouldForwardProp:e=>!["borderBottom"].includes(e)&&!["disabled"].includes(e)&&!["selected"].includes(e)})((({theme:e,borderBottom:t,selected:i})=>({borderBottom:t??"1px solid #cecece",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:e.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),c=a(r,{shouldForwardProp:e=>!["iconMargin"].includes(e)})((({iconMargin:e})=>({margin:e||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),l=a(o)((({theme:e})=>({"& .MuiListItemText-primary":{color:e.palette.text.primary},"& .MuiListItemText-secondary":{color:e.palette.text.secondary}}))),u=({borderBottom:r,customTitle:o,customSubtitle:a,disabled:u=!1,onClick:m,title:p,subtitle:x,icon:b,iconMargin:g,hideIcon:f=!1,link:h,isLast:j,customButton:y,iconComponent:k,dataFd:L="",isSelected:q=!1})=>{const I=n(),M=s(I.breakpoints.down("md")),B=!j||M,C=o||p,v=a||x;return e.jsxs(d,{borderBottom:B?r:"none",divider:B,button:!0,fdKey:L||`link-button-${p}`,to:h,onClick:m,disabled:u,selected:q,children:[b&&e.jsx(c,{iconMargin:g,children:e.jsx("img",{src:b,alt:""})}),k&&e.jsx(c,{iconMargin:g,children:k}),e.jsx(l,{primary:C,secondary:v,sx:{pr:"60px"}}),!f&&(y||e.jsx(i,{"aria-label":`link-button-${p}`,children:e.jsx(t,{})}))]})};exports.ListItemLinkButton=u,exports.default=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/material/IconButton"),i=require("@mui/material/ListItemIcon"),r=require("@mui/material/ListItemText"),o=require("@mui/material/styles/styled"),n=require("@mui/material/styles/useTheme"),s=require("@mui/material/useMediaQuery"),a=require("../../icons/ArrowRight01/index.cjs.js");const d=o(require("../ListItemLink/index.cjs.js"),{shouldForwardProp:e=>!["borderBottom"].includes(e)&&!["disabled"].includes(e)&&!["selected"].includes(e)})((({theme:e,borderBottom:t,selected:i})=>({borderBottom:t??"1px solid #cecece",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:e.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),c=o(i,{shouldForwardProp:e=>!["iconMargin"].includes(e)})((({iconMargin:e})=>({margin:e||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),l=o(r)((({theme:e})=>({"& .MuiListItemText-primary":{color:e.palette.text.primary},"& .MuiListItemText-secondary":{color:e.palette.text.secondary}}))),u=({borderBottom:i,customTitle:r,customSubtitle:o,disabled:u=!1,onClick:m,title:p,subtitle:x,icon:b,iconMargin:g,hideIcon:f=!1,link:h,isLast:j,customButton:y,iconComponent:k,dataFd:L="",isSelected:q=!1})=>{const I=n(),M=s(I.breakpoints.down("tablet")),B=!j||M,C=r||p,v=o||x;return e.jsxs(d,{button:!0,borderBottom:B?i:"none",disabled:u,divider:B,fdKey:L||`link-button-${p}`,selected:q,to:h,onClick:m,children:[b&&e.jsx(c,{iconMargin:g,children:e.jsx("img",{alt:"",src:b})}),k&&e.jsx(c,{iconMargin:g,children:k}),e.jsx(l,{primary:C,secondary:v,sx:{pr:"60px"}}),!f&&(y||e.jsx(t,{"aria-label":`link-button-${p}`,children:e.jsx(a,{})}))]})};exports.ListItemLinkButton=u,exports.default=u;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/ListItemLinkButton/index.tsx"],"sourcesContent":["import React from 'react';\nimport KeyboardArrowRight from '../../icons/ArrowRight01';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport ListItemLink from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"kaAaA,MAAMA,EAAqBC,0CAAqB,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FF,EAG0C,EAAGI,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBhB,EAAOiB,EAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BF,EAEK,EAAGkB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBvB,EAAOwB,EAAPxB,EAAqB,EAAGI,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAAAA,KAAClD,EAAkB,CACfM,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAAAC,IAACxC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,EAAAA,WAAKE,IAAKxB,EAAMyB,IAAI,OAI3BpB,GAAiBiB,EAAAA,IAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAACC,IAAAjC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcW,GAAI,CAAEC,GAAI,WAEzE1B,IACGG,GACGkB,MAACM,EAAU,CAAA,aAAa,eAAe9B,IACnCuB,SAAAC,EAAAA,IAACO,EAAqB,CAAA,QAGjB"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/ListItemLinkButton/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport styled from '@mui/material/styles/styled';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport KeyboardArrowRight from '../../icons/ArrowRight01';\nimport ListItemLink from '../ListItemLink';\n\ntype MarginType = number | string;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) &&\n !['disabled'].includes(prop as string) &&\n !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('tablet'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n button\n borderBottom={hasDivider ? borderBottom : 'none'}\n disabled={disabled}\n divider={hasDivider}\n fdKey={dataFd || `link-button-${title}`}\n selected={isSelected}\n to={link}\n onClick={onClick}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img alt=\"\" src={icon} />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","button","divider","fdKey","to","children","_jsx","jsx","alt","src","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"kaAeA,MAAMA,EAAqBC,0CAAqB,CAC9CC,kBAAoBC,IACjB,CAAC,gBAAgBC,SAASD,KAC1B,CAAC,YAAYC,SAASD,KACtB,CAAC,YAAYC,SAASD,IAJAF,EAK0C,EAAGI,QAAOC,eAAcC,eAAgB,CAC3GD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACTE,gBAAiB,WAEnB,UAAW,CACTA,gBAAiB,WAGnBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGpCU,EAAqBhB,EAAOiB,EAAc,CAC9ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD7BF,EAEK,EAAGkB,iBAAkB,CACnDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGNC,EAAqBvB,EAAOwB,EAAPxB,EAAqB,EAAGI,YAAa,CAC9D,6BAA8B,CAC5BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE5B,+BAAgC,CAC9BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBjBC,EAAqB,EAChCrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,WAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACEiB,EAAAA,KAAClD,EAAkB,CACjBmD,QACA,EAAA7C,aAAcyC,EAAazC,EAAe,OAC1CwB,SAAUA,EACVsB,QAASL,EACTM,MAAOb,GAAU,eAAeR,IAChCzB,SAAUkC,EACVa,GAAIlB,EACJL,QAASA,EAAOwB,SAAA,CAEfrB,GACCsB,EAAAC,IAACxC,EAAmB,CAAAE,WAAYA,EAAUoC,SACxCC,EAAAA,WAAKE,IAAI,GAAGC,IAAKzB,MAIpBK,GAAiBiB,EAAAA,IAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAACC,IAAAjC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcW,GAAI,CAAEC,GAAI,WAEzE1B,IACCG,GACCkB,MAACM,EAAU,CAAA,aAAa,eAAe9B,IACrCuB,SAAAC,EAAAA,IAACO,EAAqB,CAAA,QAGT"}
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import react__default from 'react';
3
3
 
4
- type MarginType = string | number;
4
+ type MarginType = number | string;
5
5
  interface ListItemLinkButtonProps {
6
6
  customTitle?: string;
7
7
  customSubtitle?: react__default.ReactNode;
@@ -1,2 +1,2 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react";import o from"../../icons/ArrowRight01/index.js";import i from"@mui/material/IconButton";import r from"@mui/material/ListItemIcon";import n from"@mui/material/ListItemText";import a from"@mui/material/styles/useTheme";import m from"@mui/material/useMediaQuery";import d from"@mui/material/styles/styled";import c from"../ListItemLink/index.js";const l=d(c,{shouldForwardProp:t=>!["borderBottom"].includes(t)&&!["disabled"].includes(t)&&!["selected"].includes(t)})((({theme:t,borderBottom:e,selected:o})=>({borderBottom:e??"1px solid #cecece",paddingLeft:t.spacing(4),paddingRight:t.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:t.palette.text.primary,textDecoration:"none",backgroundColor:o?"#eaf2ff":"inherit"}))),s=d(r,{shouldForwardProp:t=>!["iconMargin"].includes(t)})((({iconMargin:t})=>({margin:t||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),u=d(n)((({theme:t})=>({"& .MuiListItemText-primary":{color:t.palette.text.primary},"& .MuiListItemText-secondary":{color:t.palette.text.secondary}}))),p=({borderBottom:r,customTitle:n,customSubtitle:d,disabled:c=!1,onClick:p,title:f,subtitle:b,icon:g,iconMargin:x,hideIcon:h=!1,link:y,isLast:k,customButton:L,iconComponent:I,dataFd:M="",isSelected:B=!1})=>{const C=a(),T=m(C.breakpoints.down("md")),w=!k||T,j=n||f,F=d||b;return t(l,{borderBottom:w?r:"none",divider:w,button:!0,fdKey:M||`link-button-${f}`,to:y,onClick:p,disabled:c,selected:B,children:[g&&e(s,{iconMargin:x,children:e("img",{src:g,alt:""})}),I&&e(s,{iconMargin:x,children:I}),e(u,{primary:j,secondary:F,sx:{pr:"60px"}}),!h&&(L||e(i,{"aria-label":`link-button-${f}`,children:e(o,{})}))]})};export{p as ListItemLinkButton,p as default};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react";import o from"@mui/material/IconButton";import i from"@mui/material/ListItemIcon";import r from"@mui/material/ListItemText";import n from"@mui/material/styles/styled";import a from"@mui/material/styles/useTheme";import m from"@mui/material/useMediaQuery";import d from"../../icons/ArrowRight01/index.js";import l from"../ListItemLink/index.js";const c=n(l,{shouldForwardProp:t=>!["borderBottom"].includes(t)&&!["disabled"].includes(t)&&!["selected"].includes(t)})((({theme:t,borderBottom:e,selected:o})=>({borderBottom:e??"1px solid #cecece",paddingLeft:t.spacing(4),paddingRight:t.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:t.palette.text.primary,textDecoration:"none",backgroundColor:o?"#eaf2ff":"inherit"}))),s=n(i,{shouldForwardProp:t=>!["iconMargin"].includes(t)})((({iconMargin:t})=>({margin:t||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),u=n(r)((({theme:t})=>({"& .MuiListItemText-primary":{color:t.palette.text.primary},"& .MuiListItemText-secondary":{color:t.palette.text.secondary}}))),p=({borderBottom:i,customTitle:r,customSubtitle:n,disabled:l=!1,onClick:p,title:f,subtitle:b,icon:g,iconMargin:x,hideIcon:h=!1,link:y,isLast:k,customButton:L,iconComponent:I,dataFd:M="",isSelected:B=!1})=>{const C=a(),T=m(C.breakpoints.down("tablet")),w=!k||T,j=r||f,F=n||b;return t(c,{button:!0,borderBottom:w?i:"none",disabled:l,divider:w,fdKey:M||`link-button-${f}`,selected:B,to:y,onClick:p,children:[g&&e(s,{iconMargin:x,children:e("img",{alt:"",src:g})}),I&&e(s,{iconMargin:x,children:I}),e(u,{primary:j,secondary:F,sx:{pr:"60px"}}),!h&&(L||e(o,{"aria-label":`link-button-${f}`,children:e(d,{})}))]})};export{p as ListItemLinkButton,p as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/ListItemLinkButton/index.tsx"],"sourcesContent":["import React from 'react';\nimport KeyboardArrowRight from '../../icons/ArrowRight01';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport ListItemLink from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"wZAaA,MAAMA,EAAqBC,EAAOC,EAAc,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FH,EAG0C,EAAGK,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBjB,EAAOkB,EAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BH,EAEK,EAAGmB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBxB,EAAOyB,EAAPzB,EAAqB,EAAGK,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAACnD,EAAkB,CACfO,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAACvC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,SAAKC,IAAKvB,EAAMwB,IAAI,OAI3BnB,GAAiBiB,EAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAAChC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcU,GAAI,CAAEC,GAAI,WAEzEzB,IACGG,GACGkB,EAACK,EAAU,CAAA,aAAa,eAAe7B,IACnCuB,SAAAC,EAACM,EAAqB,CAAA,QAGjB"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/ListItemLinkButton/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport styled from '@mui/material/styles/styled';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport KeyboardArrowRight from '../../icons/ArrowRight01';\nimport ListItemLink from '../ListItemLink';\n\ntype MarginType = number | string;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) &&\n !['disabled'].includes(prop as string) &&\n !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('tablet'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n button\n borderBottom={hasDivider ? borderBottom : 'none'}\n disabled={disabled}\n divider={hasDivider}\n fdKey={dataFd || `link-button-${title}`}\n selected={isSelected}\n to={link}\n onClick={onClick}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img alt=\"\" src={icon} />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","button","divider","fdKey","to","children","_jsx","alt","src","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"wZAeA,MAAMA,EAAqBC,EAAOC,EAAc,CAC9CC,kBAAoBC,IACjB,CAAC,gBAAgBC,SAASD,KAC1B,CAAC,YAAYC,SAASD,KACtB,CAAC,YAAYC,SAASD,IAJAH,EAK0C,EAAGK,QAAOC,eAAcC,eAAgB,CAC3GD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACTE,gBAAiB,WAEnB,UAAW,CACTA,gBAAiB,WAGnBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGpCU,EAAqBjB,EAAOkB,EAAc,CAC9ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD7BH,EAEK,EAAGmB,iBAAkB,CACnDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGNC,EAAqBxB,EAAOyB,EAAPzB,EAAqB,EAAGK,YAAa,CAC9D,6BAA8B,CAC5BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE5B,+BAAgC,CAC9BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBjBC,EAAqB,EAChCrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,WAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACEiB,EAACnD,EAAkB,CACjBoD,QACA,EAAA7C,aAAcyC,EAAazC,EAAe,OAC1CwB,SAAUA,EACVsB,QAASL,EACTM,MAAOb,GAAU,eAAeR,IAChCzB,SAAUkC,EACVa,GAAIlB,EACJL,QAASA,EAAOwB,SAAA,CAEfrB,GACCsB,EAACvC,EAAmB,CAAAE,WAAYA,EAAUoC,SACxCC,SAAKC,IAAI,GAAGC,IAAKxB,MAIpBK,GAAiBiB,EAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAAChC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcU,GAAI,CAAEC,GAAI,WAEzEzB,IACCG,GACCkB,EAACK,EAAU,CAAA,aAAa,eAAe7B,IACrCuB,SAAAC,EAACM,EAAqB,CAAA,QAGT"}
@@ -1,2 +1,2 @@
1
- "use strict";var i=require("react/jsx-runtime");require("react");var a=require("@mui/material/styles");module.exports=({children:r,className:e="",fullWidth:n,fullSize:s,noTopSpace:t})=>{const g=a.useTheme(),m=a.styled("div")((()=>({...n&&{marginLeft:-20,marginRight:-20},...s&&{[g.breakpoints.up("sm")]:{marginLeft:g.spacing(-3),marginRight:g.spacing(-3)}},...t&&{marginTop:`${g.spacing(-3)} !important`,[g.breakpoints.only("xs")]:{marginTop:`${g.spacing(-2)} !important`}},[g.breakpoints.only("sm")]:{marginLeft:g.spacing(-3),marginRight:g.spacing(-3)},[g.breakpoints.only("xs")]:{marginLeft:g.spacing(-2),marginRight:g.spacing(-2)}})));return i.jsx(m,{className:e,children:r})};
1
+ "use strict";var i=require("react/jsx-runtime");require("react");var a=require("@mui/material/styles");module.exports=({children:e,className:r="",fullWidth:n,fullSize:s,noTopSpace:t})=>{const g=a.useTheme(),m=a.styled("div")((()=>({...n&&{marginLeft:-20,marginRight:-20},...s&&{[g.breakpoints.up("mobile")]:{marginLeft:g.spacing(-3),marginRight:g.spacing(-3)}},...t&&{marginTop:`${g.spacing(-3)} !important`,[g.breakpoints.only("base")]:{marginTop:`${g.spacing(-2)} !important`}},[g.breakpoints.only("mobile")]:{marginLeft:g.spacing(-3),marginRight:g.spacing(-3)},[g.breakpoints.only("base")]:{marginLeft:g.spacing(-2),marginRight:g.spacing(-2)}})));return i.jsx(m,{className:r,children:e})};
2
2
  //# sourceMappingURL=FullWidthContainer.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FullWidthContainer.cjs.js","sources":["../../../src/components/PageLayout/FullWidthContainer.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport { styled, useTheme, type Theme } from '@mui/material/styles';\n\ntype Props = {\n className?: string;\n children: ReactNode;\n fullWidth?: boolean;\n fullSize?: boolean;\n noTopSpace?: boolean;\n};\n\nconst FullWidthContainer = ({ children, className = '', fullWidth, fullSize, noTopSpace }: Props) => {\n const theme = useTheme<Theme>();\n\n const FullWidthDiv = styled('div')(() => ({\n // Base styles\n ...(fullWidth && {\n marginLeft: -20,\n marginRight: -20,\n }),\n ...(fullSize && {\n [theme.breakpoints.up('sm')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n }),\n ...(noTopSpace && {\n marginTop: `${theme.spacing(-3)} !important`,\n [theme.breakpoints.only('xs')]: {\n marginTop: `${theme.spacing(-2)} !important`,\n },\n }),\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n },\n }));\n\n return <FullWidthDiv className={className}>{children}</FullWidthDiv>;\n};\n\nexport default FullWidthContainer;\n"],"names":["children","className","fullWidth","fullSize","noTopSpace","theme","useTheme","FullWidthDiv","styled","marginLeft","marginRight","breakpoints","up","spacing","marginTop","only","_jsx"],"mappings":"sHAW2B,EAAGA,WAAUC,YAAY,GAAIC,YAAWC,WAAUC,iBACzE,MAAMC,EAAQC,EAAAA,WAERC,EAAeC,EAAAA,OAAO,MAAPA,EAAc,KAAO,IAElCN,GAAa,CACbO,YAAe,GACfC,aAAgB,OAEhBP,GAAY,CACZ,CAACE,EAAMM,YAAYC,GAAG,OAAQ,CAC1BH,WAAYJ,EAAMQ,YAClBH,YAAaL,EAAMQ,iBAGvBT,GAAc,CACdU,UAAW,GAAGT,EAAMQ,SAAU,gBAC9B,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BD,UAAW,GAAGT,EAAMQ,SAAU,kBAGtC,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BN,WAAYJ,EAAMQ,YAClBH,YAAaL,EAAMQ,aAEvB,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BN,WAAYJ,EAAMQ,YAClBH,YAAaL,EAAMQ,iBAI3B,OAAOG,EAAAA,IAACT,EAAa,CAAAN,UAAWA,EAASD,SAAGA,GAAwB"}
1
+ {"version":3,"file":"FullWidthContainer.cjs.js","sources":["../../../src/components/PageLayout/FullWidthContainer.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nimport { styled, type Theme, useTheme } from '@mui/material/styles';\n\ninterface Props {\n className?: string;\n children: ReactNode;\n fullWidth?: boolean;\n fullSize?: boolean;\n noTopSpace?: boolean;\n}\n\nconst FullWidthContainer = ({ children, className = '', fullWidth, fullSize, noTopSpace }: Props) => {\n const theme = useTheme<Theme>();\n\n const FullWidthDiv = styled('div')(() => ({\n // Base styles\n ...(fullWidth && {\n marginLeft: -20,\n marginRight: -20,\n }),\n ...(fullSize && {\n [theme.breakpoints.up('mobile')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n }),\n ...(noTopSpace && {\n marginTop: `${theme.spacing(-3)} !important`,\n [theme.breakpoints.only('base')]: {\n marginTop: `${theme.spacing(-2)} !important`,\n },\n }),\n [theme.breakpoints.only('mobile')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n [theme.breakpoints.only('base')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n },\n }));\n\n return <FullWidthDiv className={className}>{children}</FullWidthDiv>;\n};\n\nexport default FullWidthContainer;\n"],"names":["children","className","fullWidth","fullSize","noTopSpace","theme","useTheme","FullWidthDiv","styled","marginLeft","marginRight","breakpoints","up","spacing","marginTop","only","_jsx"],"mappings":"sHAY2B,EAAGA,WAAUC,YAAY,GAAIC,YAAWC,WAAUC,iBAC3E,MAAMC,EAAQC,EAAAA,WAERC,EAAeC,EAAAA,OAAO,MAAPA,EAAc,KAAO,IAEpCN,GAAa,CACfO,YAAe,GACfC,aAAgB,OAEdP,GAAY,CACd,CAACE,EAAMM,YAAYC,GAAG,WAAY,CAChCH,WAAYJ,EAAMQ,YAClBH,YAAaL,EAAMQ,iBAGnBT,GAAc,CAChBU,UAAW,GAAGT,EAAMQ,SAAU,gBAC9B,CAACR,EAAMM,YAAYI,KAAK,SAAU,CAChCD,UAAW,GAAGT,EAAMQ,SAAU,kBAGlC,CAACR,EAAMM,YAAYI,KAAK,WAAY,CAClCN,WAAYJ,EAAMQ,YAClBH,YAAaL,EAAMQ,aAErB,CAACR,EAAMM,YAAYI,KAAK,SAAU,CAChCN,WAAYJ,EAAMQ,YAClBH,YAAaL,EAAMQ,iBAIvB,OAAOG,EAAAA,IAACT,EAAa,CAAAN,UAAWA,EAASD,SAAGA,GAAwB"}
@@ -1,13 +1,13 @@
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
  className?: string;
6
6
  children: ReactNode;
7
7
  fullWidth?: boolean;
8
8
  fullSize?: boolean;
9
9
  noTopSpace?: boolean;
10
- };
10
+ }
11
11
  declare const FullWidthContainer: ({ children, className, fullWidth, fullSize, noTopSpace }: Props) => react_jsx_runtime.JSX.Element;
12
12
 
13
13
  export { FullWidthContainer as default };