@flipdish/portal-library 2.1.4 → 3.0.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.
- package/dist/components/Form/FormItemLayout/index.cjs.js +1 -1
- package/dist/components/Form/FormItemLayout/index.cjs.js.map +1 -1
- package/dist/components/Form/FormItemLayout/index.js +1 -1
- package/dist/components/Form/FormItemLayout/index.js.map +1 -1
- package/dist/components/GenericTable/index.cjs.js +17 -17
- package/dist/components/GenericTable/index.cjs.js.map +1 -1
- package/dist/components/GenericTable/index.d.ts +3 -3
- package/dist/components/GenericTable/index.js +17 -17
- package/dist/components/GenericTable/index.js.map +1 -1
- package/dist/components/GenericTableTitle/index.cjs.js +1 -1
- package/dist/components/GenericTableTitle/index.cjs.js.map +1 -1
- package/dist/components/GenericTableTitle/index.d.ts +4 -5
- package/dist/components/GenericTableTitle/index.js +1 -1
- package/dist/components/GenericTableTitle/index.js.map +1 -1
- package/dist/components/ListItemLinkButton/index.cjs.js +1 -1
- package/dist/components/ListItemLinkButton/index.cjs.js.map +1 -1
- package/dist/components/ListItemLinkButton/index.d.ts +1 -1
- package/dist/components/ListItemLinkButton/index.js +1 -1
- package/dist/components/ListItemLinkButton/index.js.map +1 -1
- package/dist/components/PageLayout/FullWidthContainer.cjs.js +1 -1
- package/dist/components/PageLayout/FullWidthContainer.cjs.js.map +1 -1
- package/dist/components/PageLayout/FullWidthContainer.d.ts +2 -2
- package/dist/components/PageLayout/FullWidthContainer.js +1 -1
- package/dist/components/PageLayout/FullWidthContainer.js.map +1 -1
- package/dist/components/PageLayout/GlobalSpacingStyles.cjs.js +1 -1
- package/dist/components/PageLayout/GlobalSpacingStyles.cjs.js.map +1 -1
- package/dist/components/PageLayout/GlobalSpacingStyles.js +1 -1
- package/dist/components/PageLayout/GlobalSpacingStyles.js.map +1 -1
- package/dist/components/PageLayout/index.cjs.js +1 -1
- package/dist/components/PageLayout/index.cjs.js.map +1 -1
- package/dist/components/PageLayout/index.d.ts +4 -4
- package/dist/components/PageLayout/index.js +1 -1
- package/dist/components/PageLayout/index.js.map +1 -1
- package/dist/components/PortalMock/index.cjs.js +22 -22
- package/dist/components/PortalMock/index.cjs.js.map +1 -1
- package/dist/components/PortalMock/index.d.ts +2 -2
- package/dist/components/PortalMock/index.js +22 -22
- package/dist/components/PortalMock/index.js.map +1 -1
- package/dist/components/atoms/Typography/index.cjs.js +2 -0
- package/dist/components/atoms/Typography/index.cjs.js.map +1 -0
- package/dist/components/atoms/Typography/index.d.ts +2 -0
- package/dist/components/atoms/Typography/index.js +2 -0
- package/dist/components/atoms/Typography/index.js.map +1 -0
- package/dist/themes/flipdishPublicTheme.cjs.js +1 -1
- package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -1
- package/dist/themes/flipdishPublicTheme.d.ts +3 -3
- package/dist/themes/flipdishPublicTheme.js +1 -1
- package/dist/themes/flipdishPublicTheme.js.map +1 -1
- package/dist/themes/tokens/breakpoints/breakpoints.cjs.js +2 -0
- package/dist/themes/tokens/breakpoints/breakpoints.cjs.js.map +1 -0
- package/dist/themes/tokens/breakpoints/breakpoints.d.ts +20 -0
- package/dist/themes/tokens/breakpoints/breakpoints.js +2 -0
- package/dist/themes/tokens/breakpoints/breakpoints.js.map +1 -0
- package/dist/themes/tokens/radius/radius.cjs.js +2 -0
- package/dist/themes/tokens/radius/radius.cjs.js.map +1 -0
- package/dist/themes/tokens/radius/radius.d.ts +17 -0
- package/dist/themes/tokens/radius/radius.js +2 -0
- package/dist/themes/tokens/radius/radius.js.map +1 -0
- package/dist/themes/tokens/spacing/spacing.cjs.js +2 -0
- package/dist/themes/tokens/spacing/spacing.cjs.js.map +1 -0
- package/dist/themes/tokens/spacing/spacing.d.ts +23 -0
- package/dist/themes/tokens/spacing/spacing.js +2 -0
- package/dist/themes/tokens/spacing/spacing.js.map +1 -0
- package/dist/themes/tokens/typography/font-family.cjs.js +2 -0
- package/dist/themes/tokens/typography/font-family.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/font-family.d.ts +14 -0
- package/dist/themes/tokens/typography/font-family.js +2 -0
- package/dist/themes/tokens/typography/font-family.js.map +1 -0
- package/dist/themes/tokens/typography/font-size.cjs.js +2 -0
- package/dist/themes/tokens/typography/font-size.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/font-size.d.ts +28 -0
- package/dist/themes/tokens/typography/font-size.js +2 -0
- package/dist/themes/tokens/typography/font-size.js.map +1 -0
- package/dist/themes/tokens/typography/letter-spacing.cjs.js +2 -0
- package/dist/themes/tokens/typography/letter-spacing.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/letter-spacing.d.ts +28 -0
- package/dist/themes/tokens/typography/letter-spacing.js +2 -0
- package/dist/themes/tokens/typography/letter-spacing.js.map +1 -0
- package/dist/themes/tokens/typography/line-height.cjs.js +2 -0
- package/dist/themes/tokens/typography/line-height.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/line-height.d.ts +28 -0
- package/dist/themes/tokens/typography/line-height.js +2 -0
- package/dist/themes/tokens/typography/line-height.js.map +1 -0
- package/dist/themes/tokens/typography/variant-mapping.cjs.js +2 -0
- package/dist/themes/tokens/typography/variant-mapping.cjs.js.map +1 -0
- package/dist/themes/tokens/typography/variant-mapping.d.ts +32 -0
- package/dist/themes/tokens/typography/variant-mapping.js +2 -0
- package/dist/themes/tokens/typography/variant-mapping.js.map +1 -0
- package/dist/themes/typography.cjs.js +1 -1
- package/dist/themes/typography.cjs.js.map +1 -1
- package/dist/themes/typography.d.ts +3 -1
- package/dist/themes/typography.js +1 -1
- package/dist/themes/typography.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
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
|
|
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
|
|
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
|
|
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/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`,x=
|
|
16
|
-
|
|
17
|
-
`,g=
|
|
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';\
|
|
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
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`,g=
|
|
16
|
-
|
|
17
|
-
`,w=
|
|
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';\
|
|
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"),
|
|
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
|
|
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
|
-
|
|
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?: '
|
|
10
|
-
}
|
|
11
|
-
declare const GenericTableTitle: ({ maxGridWidth, subTitle, title, children, titlePadding }: OuterProps) =>
|
|
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
|
|
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
|
|
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("
|
|
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
|
|
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 =
|
|
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"
|
|
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
|
|
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:
|
|
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,
|
|
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
|
-
|
|
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 };
|