@foodpilot/foods 2.11.49 → 2.11.50
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/Banner/variants/ClassicBanner.js +3 -3
- package/dist/components/Button/FoodsIconButton.js +2 -2
- package/dist/components/CMS/ArticleBlock/Article.js +2 -2
- package/dist/components/CMS/ArticleBlock/ArticleContent.js +3 -3
- package/dist/components/CMS/HeroBlock/HeroBlock.js +4 -4
- package/dist/components/CMS/IndicatorBlock/IndicatorBlock.js +3 -3
- package/dist/components/CMS/IndicatorBlock/LightIndicatorBlock.js +2 -2
- package/dist/components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.js +5 -5
- package/dist/components/Cards/ScoreCard/ScoreCard.js +4 -4
- package/dist/components/Chart/ScatterPlot/ScatterPlotTooltip.js +2 -2
- package/dist/components/Chart/TrajectoryChart/TrajectoryLegend/LegendBlockComponent.js +3 -3
- package/dist/components/Icons/index.d.ts +7 -4
- package/dist/components/Icons/index.js +1 -0
- package/dist/components/Input/Pills/Pills.js +2 -2
- package/dist/components/Input/SearchBox.js +2 -2
- package/dist/components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.js +3 -3
- package/dist/components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.js +3 -3
- package/dist/components/Layout/BlockList/Headers/InitHeader.js +3 -3
- package/dist/components/Layout/BlockList/Headers/ListHeader.js +3 -3
- package/dist/components/Navigation/FoodsNavBar/Sections/ExpandButton/ExpandButton.js +3 -3
- package/dist/components/Navigation/FoodsNavBar/Sections/Organization/Organization.js +4 -4
- package/dist/components/Navigation/FoodsNavBar/Sections/Profile/UserButton.js +4 -4
- package/dist/components/Navigation/FoodsNavBar/Sections/UserButtons/Button/DrawerAction.js +2 -2
- package/dist/components/Progress/Progress.js +3 -3
- package/dist/components/ProgressCard/ProgressCard.js +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as r}from"react/jsx-runtime";import{useTheme as i,Stack as n,Typography as c}from"@mui/material";import{
|
|
2
|
-
return o(
|
|
3
|
-
/* @__PURE__ */o(
|
|
1
|
+
import{jsx as o,jsxs as r}from"react/jsx-runtime";import{useTheme as i,Stack as n,Typography as c}from"@mui/material";import{FoodsIcon as t}from"../../Icons/FoodsIcon.js";import{WhiteBox as e}from"../../Box/WhiteBox.js";const m=m=>{const a=i(),{BoxProps:l,children:s,variant:d="info"}=m,p={info:{icon:"information",color:a.custom.grey[2800]},error:{icon:"warning",color:a.custom.red[600]}}[d];/* @__PURE__ */
|
|
2
|
+
return o(e,{padding:a.spacing(2),...l,children:/* @__PURE__ */r(n,{direction:"row",alignItems:"center",gap:a.spacing(1.5),color:p.color,children:[
|
|
3
|
+
/* @__PURE__ */o(t,{icon:p.icon,size:3,color:p.color}),
|
|
4
4
|
/* @__PURE__ */o(c,{variant:"body",color:p.color,children:s})]})})};export{m as ClassicBanner};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o,Fragment as t}from"react/jsx-runtime";import{Button as r}from"@mui/material";import{
|
|
2
|
-
return o(t,{children:/* @__PURE__ */o(
|
|
1
|
+
import{jsx as o,Fragment as t}from"react/jsx-runtime";import{Button as r}from"@mui/material";import{FoodsIcon as i}from"../Icons/FoodsIcon.js";import{FoodsTooltip as n}from"../Tooltip/FoodsTooltip.js";const c=c=>{const{buttonProps:s={},tooltip:e,icon:m,size:p,withBackground:a=!1}=c,d=`icon-${p}-${a?"withbackground":"nobackground"}`,l=e?.props||{};/* @__PURE__ */
|
|
2
|
+
return o(t,{children:/* @__PURE__ */o(n,{title:e?.text,arrow:!0,...l,width:"auto",children:/* @__PURE__ */o(r,{variant:d,...s,children:/* @__PURE__ */o(i,{icon:m,size:{xs:1,s:2,m:4}[p]})})})})};export{c as FoodsIconButton};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as i,Fragment as e,jsx as o}from"react/jsx-runtime";import{styled as t}from"@mui/material/styles";import{Box as r,Typography as n,Stack as l,Link as s,Button as a}from"@mui/material";import{greyTheme as d}from"../../../themes/common/colors.js";import{
|
|
1
|
+
import{jsxs as i,Fragment as e,jsx as o}from"react/jsx-runtime";import{styled as t}from"@mui/material/styles";import{Box as r,Typography as n,Stack as l,Link as s,Button as a}from"@mui/material";import{greyTheme as d}from"../../../themes/common/colors.js";import{FoodsIcon as m}from"../../Icons/FoodsIcon.js";import{useState as c}from"react";import{ArticleContent as p}from"./ArticleContent.js";const h=[3,5,9,3],g=t(l,{shouldForwardProp:i=>"isRightColumn"!==i})(({isRightColumn:i,theme:e})=>({border:`1px solid ${d[500]}`,borderRadius:e.spacing(1),overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",flexDirection:i?"row":"column",[e.breakpoints.down("md")]:{flexDirection:"column"},boxShadow:e.custom.shadows.grey})),b=t(r,{shouldForwardProp:i=>"isRightColumn"!==i})(({isRightColumn:i,theme:e})=>({flex:i?"0 0 35%":"1 1 auto",lineHeight:0,position:"relative",width:"100%",height:i?"100%":"380px",backgroundColor:e.palette.grey[400],overflow:"hidden","& img":{width:"100%",height:"100%",objectFit:"cover",objectPosition:"center",display:"block",[e.breakpoints.down("md")]:{height:"200px"}},[e.breakpoints.down("md")]:{height:"140px"},[e.breakpoints.down("md")]:{flex:2}})),u=t(l)(({theme:i})=>({flex:"1 1 0",backgroundColor:i.palette.background.paper,padding:i.spacing(3,3,2,3),justifyContent:"space-between",gap:i.spacing(1),[i.breakpoints.down("md")]:{padding:i.spacing(2,2,1.5,2)},[i.breakpoints.down("md")]:{flex:"1 1 0"}})),f=t(s)({display:"block",width:"100%",height:"100%",cursor:"pointer"}),w=t(a)(({theme:i})=>({display:"inline-flex",alignSelf:"flex-start",fontWeight:700,gap:i.spacing(1)})),x=t(n,{shouldForwardProp:i=>"isFirst"!==i})(({isFirst:i,articlesNumber:e,theme:o})=>({display:"-webkit-box",WebkitLineClamp:i?5:h[e-1]||3,marginTop:o.spacing(2),WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",[o.breakpoints.down("md")]:{WebkitLineClamp:i?3:2,marginTop:o.spacing(1)}})),k=t=>{const[l,s]=c(!1),{title:a,description:d,imageSrc:h,content:k,onClick:C,isFirst:v=!1,articlesNumber:y=1,isRightColumn:F=!1,readMoreText:R="Lire l'article"}=t,j=()=>{C?C():s(!0)};/* @__PURE__ */
|
|
2
2
|
return i(e,{children:[
|
|
3
3
|
/* @__PURE__ */i(g,{isRightColumn:F,children:[
|
|
4
4
|
/* @__PURE__ */o(b,{isRightColumn:F,children:/* @__PURE__ */o(f,{onClick:j,children:/* @__PURE__ */o("img",{src:h,alt:a})})}),
|
|
@@ -8,4 +8,4 @@ return i(e,{children:[
|
|
|
8
8
|
/* @__PURE__ */o(x,{variant:"body",mb:"1rem",isFirst:v,articlesNumber:y,dangerouslySetInnerHTML:{__html:d}})]}),
|
|
9
9
|
/* @__PURE__ */i(w,{variant:"text",onClick:j,children:[
|
|
10
10
|
/* @__PURE__ */o(n,{fontWeight:700,fontSize:"0.875rem",children:R}),
|
|
11
|
-
/* @__PURE__ */o(
|
|
11
|
+
/* @__PURE__ */o(m,{size:2,icon:"arrowRight"})]})]})]}),!C&&/* @__PURE__ */o(p,{isOpen:l,onClose:()=>s(!1),article:{title:a,description:d,imageSrc:h,content:k||d}})]})};export{k as Article};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsxs as i,Fragment as o,jsx as t}from"react/jsx-runtime";import{styled as e}from"@mui/material/styles";import{Typography as r,Box as n,IconButton as a,Stack as s}from"@mui/material";import{
|
|
1
|
+
import{jsxs as i,Fragment as o,jsx as t}from"react/jsx-runtime";import{styled as e}from"@mui/material/styles";import{Typography as r,Box as n,IconButton as a,Stack as s}from"@mui/material";import{FoodsIcon as l}from"../../Icons/FoodsIcon.js";import{useEffect as c,Suspense as d}from"react";const b=e(n)(()=>({position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0)",zIndex:1e3,transition:"background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1)",visibility:"hidden","&.open":{backgroundColor:"rgba(0, 0, 0, 0.5)",visibility:"visible"}})),p=e(n)(({theme:i})=>({position:"fixed",top:0,right:0,bottom:0,width:"75%",backgroundColor:i.palette.background.paper,zIndex:1001,overflowY:"auto",transform:"translateX(100%)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",opacity:0,borderRadius:`${i.spacing(1)} 0 0 ${i.spacing(1)}`,"&.open":{transform:"translateX(0)",opacity:1,visibility:"visible",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},[i.breakpoints.down("md")]:{width:"100%"}})),m=e(n)({width:"100%",height:"400px",backgroundColor:"#f0f0f0","& img":{width:"100%",height:"100%",objectFit:"cover",transition:"opacity 0.3s ease-in-out"}}),g=e(a)(({theme:i})=>({position:"fixed",top:i.spacing(2),right:i.spacing(2.5),zIndex:1002,backgroundColor:"white",visibility:"hidden",transform:"translateX(200%)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.8)"},"&.open":{transform:"translateX(0)",opacity:1,visibility:"visible",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}})),h=e(s)({padding:"2rem 4rem"}),u=({isOpen:e,onClose:n,article:a})=>(c(()=>(document.body.style.overflow=e?"hidden":"unset",()=>{document.body.style.overflow="unset"}),[e]),/* @__PURE__ */i(o,{children:[
|
|
2
2
|
/* @__PURE__ */t(b,{className:e?"open":"",onClick:n}),
|
|
3
|
-
/* @__PURE__ */t(g,{className:e?"open":"",onClick:n,children:/* @__PURE__ */t(
|
|
3
|
+
/* @__PURE__ */t(g,{className:e?"open":"",onClick:n,children:/* @__PURE__ */t(l,{size:2,icon:"close"})}),
|
|
4
4
|
/* @__PURE__ */i(p,{className:e?"open":"",children:[
|
|
5
|
-
/* @__PURE__ */t(
|
|
5
|
+
/* @__PURE__ */t(d,{fallback:/* @__PURE__ */t(m,{}),children:/* @__PURE__ */t(m,{children:/* @__PURE__ */t("img",{src:a.imageSrc,alt:a.title,loading:"lazy",onLoad:i=>{i.target.style.opacity="1"},style:{opacity:0}})})}),
|
|
6
6
|
/* @__PURE__ */i(h,{spacing:3,children:[
|
|
7
7
|
/* @__PURE__ */t(r,{variant:"h2",children:a.title}),
|
|
8
8
|
/* @__PURE__ */t(r,{variant:"body1",dangerouslySetInnerHTML:{__html:a.content}})]})]})]}));export{u as ArticleContent};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsxs as t,jsx as i}from"react/jsx-runtime";import{useTheme as o}from"@mui/material";import{
|
|
2
|
-
return t(
|
|
3
|
-
/* @__PURE__ */t(p,{children:[
|
|
1
|
+
import{jsxs as t,jsx as i}from"react/jsx-runtime";import{useTheme as o}from"@mui/material";import{FoodsIcon as r}from"../../Icons/FoodsIcon.js";import{FlexibleTypography as n}from"../../../innerComponents/FlexibleTypography.js";import{FlexibleButton as e}from"../../../innerComponents/FlexibleButton.js";import{HeroContainer as s,ImageWrapper as a,HeroImage as p,ContentWrapper as l,TextContent as c,DescriptionWrapper as m,ActionWrapper as d}from"./styles.js";const g=g=>{const{title:h,subtitle:f,description:y,imageUrl:u,callToAction:x,sxProps:b={}}=g,j=o();/* @__PURE__ */
|
|
2
|
+
return t(s,{sx:b,children:[u&&/* @__PURE__ */i(a,{children:/* @__PURE__ */i(p,{src:u,alt:"hero image"})}),
|
|
4
3
|
/* @__PURE__ */t(l,{children:[
|
|
5
|
-
/* @__PURE__ */
|
|
4
|
+
/* @__PURE__ */t(c,{children:[
|
|
5
|
+
/* @__PURE__ */i(n,{defaultVariant:"h2",text:h}),f&&/* @__PURE__ */i(n,{defaultVariant:"h5",text:f,typographyProps:{color:j.custom.grey[2e3],padding:j.spacing(.5,0,.5,0)}}),y&&/* @__PURE__ */i(m,{children:y})]}),x&&/* @__PURE__ */i(d,{children:/* @__PURE__ */i(e,{buttonOptions:x,defaultOptions:{sx:{display:"inline-flex",padding:j.spacing(3),letterSpacing:j.spacing(.02),fontWeight:j.typography["body-bold"].fontWeight},variant:"primary",endIcon:/* @__PURE__ */i(r,{size:2,icon:"arrowRight"})}})})]})]})};export{g as HeroBlock};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useTheme as i,Stack as o,Box as t,Typography as n}from"@mui/material";import{
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useTheme as i,Stack as o,Box as t,Typography as n}from"@mui/material";import{FoodsIcon as m}from"../../Icons/FoodsIcon.js";import{ScoreContainer as a}from"../../Badge/ScoreContainer.js";const d=d=>{const{title:p,children:c,objectives:l=[],tooltipMessage:s}=d,x=i();/* @__PURE__ */
|
|
2
2
|
return e(o,{sx:{borderRadius:"12px",border:`1px solid ${x.palette.grey[500]}`,padding:"34px",maxWidth:"360px",background:x.palette.background.paper},children:[
|
|
3
3
|
/* @__PURE__ */e(t,{display:"flex",children:[
|
|
4
|
-
/* @__PURE__ */r(n,{variant:"h3",component:"h3",mb:"1.5rem",children:p}),s&&/* @__PURE__ */r(
|
|
4
|
+
/* @__PURE__ */r(n,{variant:"h3",component:"h3",mb:"1.5rem",children:p}),s&&/* @__PURE__ */r(m,{size:3,icon:"information"})]}),
|
|
5
5
|
/* @__PURE__ */r(t,{fontWeight:700,display:"flex",gap:"0.5rem",mb:"1rem",children:c}),
|
|
6
6
|
/* @__PURE__ */r(o,{sx:{"> div:not(:last-of-type)":{mb:"1rem"}},children:l.map((i,t)=>/* @__PURE__ */e(o,{flexDirection:"row",alignItems:"center",gap:".5rem",children:[
|
|
7
7
|
/* @__PURE__ */r(n,{variant:"small-medium",children:i.objective}),
|
|
8
|
-
/* @__PURE__ */r(
|
|
8
|
+
/* @__PURE__ */r(a,{boxProps:{sx:{padding:"0.1rem 0.5rem"}},children:i.component})]},t))})]})};export{d as IndicatorBlock};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useTheme as r,Stack as n,Typography as o,Box as i}from"@mui/material";import{
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useTheme as r,Stack as n,Typography as o,Box as i}from"@mui/material";import{FoodsIcon as c}from"../../Icons/FoodsIcon.js";import{FoodsTooltip as d}from"../../Tooltip/FoodsTooltip.js";const a=c=>{const{title:d,subtitle:a,description:m}=c,p=r();/* @__PURE__ */
|
|
2
2
|
return t(n,{sx:{borderRadius:"12px",border:`1px solid ${p.palette.grey[500]}`,padding:"34px",maxWidth:"360px",background:p.palette.background.paper},children:[
|
|
3
3
|
/* @__PURE__ */t(n,{flexDirection:"row",alignContent:"center",justifyContent:"space-between",children:[
|
|
4
4
|
/* @__PURE__ */e(o,{variant:"h3",component:"h3",mb:"1.5rem",children:d}),a&&/* @__PURE__ */e(l,{text:a})]}),
|
|
5
5
|
/* @__PURE__ */e(n,{children:/* @__PURE__ */e(o,{variant:"body-medium",children:/* @__PURE__ */e(i,{dangerouslySetInnerHTML:{__html:m}})})})]})};function l(t){const{text:r}=t;/* @__PURE__ */
|
|
6
|
-
return e(
|
|
6
|
+
return e(d,{sx:{textAlign:"center"},arrow:!1,title:/* @__PURE__ */e(o,{variant:"body-medium",children:r}),placement:"top",children:/* @__PURE__ */e(i,{children:/* @__PURE__ */e(c,{size:3,icon:"information"})})})}export{a as LightIndicatorBlock};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{Stack as n,useTheme as t,Typography as i,Box as c}from"@mui/material";import{useState as s}from"react";import{
|
|
2
|
-
return e(n,{sx:{...s?{}:p(
|
|
3
|
-
/* @__PURE__ */o(i,{variant:"body",sx:{color:
|
|
4
|
-
return o(c,{sx:{...p(e),width:e.spacing(4),height:e.spacing(4),justifyContent:"center"},children:/* @__PURE__ */o(
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{Stack as n,useTheme as t,Typography as i,Box as c}from"@mui/material";import{useState as s}from"react";import{FoodsIcon as a}from"../../../../Icons/FoodsIcon.js";import{ValuePopover as l}from"./ValuePopover.js";import{OptionsPopover as d}from"../../../../Popover/OptionsPopover.js";const p=e=>({"&:hover":{backgroundColor:e.custom.grey[600]},"&:active":{backgroundColor:e.custom.grey[1e3]},transition:"ease-in-out 0.2s all",borderRadius:e.spacing(2),display:"flex",alignItems:"center"}),m=r=>{const{selectedItem:c,disabled:s}=r,l=t();/* @__PURE__ */
|
|
2
|
+
return e(n,{sx:{...s?{}:p(l),padding:l.spacing(0,1),marginLeft:l.spacing(-1),justifyContent:"space-between",gap:l.spacing(1),flexDirection:"row"},children:[
|
|
3
|
+
/* @__PURE__ */o(i,{variant:"body",sx:{color:l.custom.grey[2500]},children:c?.label}),!s&&/* @__PURE__ */o(a,{size:1,icon:"arrowDownShort"})]})},u=()=>{const e=t();/* @__PURE__ */
|
|
4
|
+
return o(c,{sx:{...p(e),width:e.spacing(4),height:e.spacing(4),justifyContent:"center"},children:/* @__PURE__ */o(a,{size:2,icon:"arrowDownShort"})})},g=t=>{const{optionsProps:i,selectedItem:c,setSelectedItem:a,variant:p="primary"}=t,[g,h]=s(null),f=Boolean(g),x=!i.content;/* @__PURE__ */
|
|
5
5
|
return e(r,{children:[
|
|
6
|
-
/* @__PURE__ */e(n,{direction:"row",alignItems:"center",gap:"4px",...x?{}:{onClick:e=>{h(f?null:e.currentTarget)},sx:{cursor:"pointer"}},children:["primary"===p&&/* @__PURE__ */o(m,{selectedItem:c,disabled:x}),"secondary"===p&&/* @__PURE__ */o(u,{})]}),f&&/* @__PURE__ */o(
|
|
6
|
+
/* @__PURE__ */e(n,{direction:"row",alignItems:"center",gap:"4px",...x?{}:{onClick:e=>{h(f?null:e.currentTarget)},sx:{cursor:"pointer"}},children:["primary"===p&&/* @__PURE__ */o(m,{selectedItem:c,disabled:x}),"secondary"===p&&/* @__PURE__ */o(u,{})]}),f&&/* @__PURE__ */o(l,{anchor:g,setAnchor:h,paperOverrides:void 0,children:/* @__PURE__ */o(d,{content:i.content,onChange:e=>{a(Number(e.id));const r=Number(e.id);i.onChange?.(r),h(null)},defaultIndex:c?.id,minWidth:"287px"})})]})};export{g as ValueSwitcher};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{useTheme as i,Box as r,Stack as t,Button as n}from"@mui/material";import{
|
|
2
|
-
return o(
|
|
1
|
+
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{useTheme as i,Box as r,Stack as t,Button as n}from"@mui/material";import{FoodsIcon as d}from"../../Icons/FoodsIcon.js";import{ScoreCardHeader as a}from"./Header/ScoreCardHeader.js";import{ComingSoonBadge as s}from"../../Badge/ComingSoonBadge.js";import{WhiteBox as c}from"../../Box/WhiteBox.js";const p=p=>{const{header:m,children:l,seeMoreText:x="Voir plus de détail",soonAvailableText:g,disableFooter:h=!1}=p,f=i();/* @__PURE__ */
|
|
2
|
+
return o(c,{sx:{flex:"0 0 calc(33.33% - 14px)",minWidth:"fit-content"},children:[
|
|
3
3
|
/* @__PURE__ */o(r,{sx:{height:"70%"},children:[
|
|
4
|
-
/* @__PURE__ */e(t,{sx:{..."secondary"===m.variant&&{backgroundColor:f.custom.grey[200],borderTopLeftRadius:f.spacing(2),borderTopRightRadius:f.spacing(2),borderBottom:`1px solid ${f.custom.grey[500]}`}},children:/* @__PURE__ */e(
|
|
4
|
+
/* @__PURE__ */e(t,{sx:{..."secondary"===m.variant&&{backgroundColor:f.custom.grey[200],borderTopLeftRadius:f.spacing(2),borderTopRightRadius:f.spacing(2),borderBottom:`1px solid ${f.custom.grey[500]}`}},children:/* @__PURE__ */e(a,{...m})}),
|
|
5
5
|
/* @__PURE__ */e(t,{padding:{xs:"16px",md:"28px 32px"},paddingBottom:{xs:"16px",md:"37px"},gap:"40px",children:l})]}),!1===h&&/* @__PURE__ */o(t,{direction:"row",alignItems:"center",gap:f.spacing(3.5),padding:f.spacing(3.5,4),borderTop:`1px solid ${f.custom.grey[500]}`,children:[
|
|
6
|
-
/* @__PURE__ */e(n,{variant:"ternary",endIcon:/* @__PURE__ */e(
|
|
6
|
+
/* @__PURE__ */e(n,{variant:"ternary",endIcon:/* @__PURE__ */e(d,{size:2,icon:"arrowRight"}),disabled:void 0===p.moreDetailAction,onClick:p.moreDetailAction,sx:{width:"100%",justifyContent:"space-between",fontWeight:700},children:x}),void 0!==g&&/* @__PURE__ */e(s,{soonAvailableText:g})]})]})};export{p as ScoreCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as t,jsx as n}from"react/jsx-runtime";import{useTheme as i,Stack as e,Typography as o,Box as r,Link as a,Button as s}from"@mui/material";import{calculateTooltipPosition as c,getTooltipContainerStyles as l}from"../shared/tooltipPositioning.js";import{forwardRef as p}from"react";import{
|
|
1
|
+
import{jsxs as t,jsx as n}from"react/jsx-runtime";import{useTheme as i,Stack as e,Typography as o,Box as r,Link as a,Button as s}from"@mui/material";import{calculateTooltipPosition as c,getTooltipContainerStyles as l}from"../shared/tooltipPositioning.js";import{forwardRef as p}from"react";import{FoodsIcon as d}from"../../Icons/FoodsIcon.js";import{FoodsTooltip as g}from"../../Tooltip/FoodsTooltip.js";const h={x:0,y:-5},u=p((p,u)=>{const m=i(),{point:x,coordinate:b,valueFormatterFn:f=m.numbers.valueFormatterFn,precision:y,unit:v,xUnit:w,yUnit:C,textOptions:I,showSeriesInTooltip:k=!0,tooltipOptions:j,onTooltipEnter:z,onTooltipLeave:H,handleDismissTooltip:F}=p,T=x.seriesName,E=C??v,P=w??v,$=I?.for??"for",L=()=>/* @__PURE__ */n(r,{role:"button",onClick:()=>F?.(),sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:m.spacing(.25),height:m.spacing(2.75),width:m.spacing(2.75),transform:`translate(${m.spacing(1.25)}, -${m.spacing(1.25)}) rotate(45deg)`,borderRadius:"50%","&:hover":{color:m.palette.common.white,backgroundColor:"text.secondary",boxShadow:"0px 0px 4px rgba(0, 0, 0, 0.1)"}},children:/* @__PURE__ */n(d,{icon:"plus",size:2})}),M=/* @__PURE__ */t(e,{direction:"column",spacing:m.spacing(.5),pb:m.spacing(.25),onClick:t=>t.stopPropagation(),onMouseLeave:()=>H?.(),sx:{pointerEvents:"auto"},children:[
|
|
2
2
|
/* @__PURE__ */t(e,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:m.spacing(1),children:[
|
|
3
3
|
/* @__PURE__ */n(o,{variant:"h4",lineHeight:m.spacing(2),children:x.label}),
|
|
4
4
|
/* @__PURE__ */n(L,{})]}),
|
|
@@ -10,4 +10,4 @@ import{jsxs as t,jsx as n}from"react/jsx-runtime";import{useTheme as i,Stack as
|
|
|
10
10
|
/* @__PURE__ */n(o,{variant:"body2",lineHeight:m.spacing(2),color:"text.secondary",children:P?` ${P}`:""})]}),x.additionalContent&&/* @__PURE__ */n(r,{sx:{pt:m.spacing(2)},children:x.additionalContent}),T&&k&&/* @__PURE__ */n(e,{direction:"row",alignItems:"flex-end",justifyContent:"flex-end",spacing:m.spacing(1),pt:m.spacing(2),children:/* @__PURE__ */t(e,{direction:"row",alignItems:"center",spacing:m.spacing(1),children:[
|
|
11
11
|
/* @__PURE__ */n(r,{sx:{width:m.spacing(1.5),height:m.spacing(1.5),borderRadius:"50%",backgroundColor:x.seriesColor}}),
|
|
12
12
|
/* @__PURE__ */n(o,{variant:"body2",lineHeight:m.spacing(2),color:"text.secondary",fontWeight:500,children:T})]})}),j?.button?j.button.href?/* @__PURE__ */n(a,{href:j.button.href,target:"_blank",rel:"noopener noreferrer",children:/* @__PURE__ */n(s,{sx:{color:m.palette.text.primary,mt:m.spacing(2)},variant:j?.button?.variant,size:j?.button?.size,startIcon:j?.button?.startIcon,onClick:t=>{t.stopPropagation(),j?.button?.onClick?.()},children:j.button.text})}):/* @__PURE__ */n(s,{sx:{mt:m.spacing(2)},variant:j?.button?.variant,size:j?.button?.size,startIcon:j?.button?.startIcon,onClick:t=>{t.stopPropagation(),j?.button?.onClick?.()},children:j?.button?.text}):null]}),O=c({coordinate:{x:b.xValue,y:b.yValue},placement:"top",offset:h});/* @__PURE__ */
|
|
13
|
-
return n(r,{ref:u,style:{position:"absolute",...O,zIndex:m.zIndex.tooltip,pointerEvents:"auto"},onMouseEnter:z,onMouseLeave:H,children:/* @__PURE__ */n(
|
|
13
|
+
return n(r,{ref:u,style:{position:"absolute",...O,zIndex:m.zIndex.tooltip,pointerEvents:"auto"},onMouseEnter:z,onMouseLeave:H,children:/* @__PURE__ */n(g,{width:"inherit",title:M,placement:"top",arrow:!0,open:!0,sx:{...l()},children:/* @__PURE__ */n("div",{style:{width:1,height:1,visibility:"hidden",pointerEvents:"none"}})})})});export{u as ScatterPlotTooltip};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useTheme as t,Box as a,Stack as n,Typography as r,Link as o}from"@mui/material";import{
|
|
1
|
+
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useTheme as t,Box as a,Stack as n,Typography as r,Link as o}from"@mui/material";import{FoodsIcon as l}from"../../../Icons/FoodsIcon.js";import{FoodsTags as s}from"../../../Tags/FoodsTags.js";import{ComparisonBlock as c}from"../../../ComparisonBlock/ComparisonBlock.js";const d=d=>{const{block:p,improvement:g,textOptions:m}=d,h=t();/* @__PURE__ */
|
|
2
2
|
return e(a,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",padding:h.spacing(2,3),border:`1px solid ${h.palette.divider}`,backgroundColor:h.palette.background.paper,borderRadius:h.spacing(1),height:"100%",position:"relative"},children:[
|
|
3
3
|
/* @__PURE__ */e(n,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",spacing:h.spacing(2),minHeight:h.spacing(4),sx:{width:"100%"},children:[
|
|
4
4
|
/* @__PURE__ */e(n,{direction:"row",alignItems:"flex-start",spacing:1.5,children:[p.isLine?/* @__PURE__ */i(a,{sx:{width:h.spacing(2),transform:`translateY(${h.spacing(1)})`,height:h.spacing(.25),backgroundColor:p.color}}):/* @__PURE__ */i(a,{sx:{minWidth:h.spacing(2),transform:`translateY(${h.spacing(.25)})`,height:h.spacing(2),backgroundColor:p.color,borderRadius:h.spacing(.5)}}),
|
|
5
5
|
/* @__PURE__ */i(r,{variant:"body2",sx:{fontWeight:h.typography.fontWeightBold},children:p.label})]}),
|
|
6
|
-
/* @__PURE__ */i(n,{children:p.complete&&/* @__PURE__ */i(
|
|
6
|
+
/* @__PURE__ */i(n,{children:p.complete&&/* @__PURE__ */i(s,{startIcon:"circleCheck",variant:"tags-green",label:m.complete||"",disabled:!0})})]}),p.dataPoints&&p.dataPoints.length>0&&/* @__PURE__ */i(n,{spacing:2,sx:{mt:p.dataPoints[0].startValue&&p.dataPoints[0].endValue?h.spacing(1):0},children:p.dataPoints.map((t,a)=>/* @__PURE__ */e(n,{direction:"row",alignItems:"center",spacing:.5,children:[!!t.startValue&&!!t.endValue&&/* @__PURE__ */i(c,{currentValue:t.endValue,comparedTo:{value:t.startValue,label:t.label},improvement:g,layout:{direction:"horizontal",size:"M"},disableText:!0}),
|
|
7
7
|
/* @__PURE__ */i(n,{direction:"column",alignItems:"flex-start",spacing:1,children:t.label&&/* @__PURE__ */i(r,{variant:"small",children:t.label})})]},`${p.key}-${a}`))}),
|
|
8
8
|
/* @__PURE__ */i(a,{children:p.dataPoints&&p.dataPoints.map((t,a)=>t.link&&/* @__PURE__ */i(o,{href:t.link.url,target:"_blank",rel:"noopener noreferrer",sx:{display:"flex",alignItems:"center",textDecoration:"none",gap:h.spacing(1),cursor:"pointer"},children:/* @__PURE__ */e(n,{direction:"row",alignItems:"center",spacing:h.spacing(1),color:h.palette.primary.main,mt:h.spacing(2),sx:{"&:hover":{opacity:.8}},children:[
|
|
9
|
-
/* @__PURE__ */i(
|
|
9
|
+
/* @__PURE__ */i(l,{icon:t.link.icon,size:1}),
|
|
10
10
|
/* @__PURE__ */i(r,{variant:"body-medium",sx:{fontWeight:h.typography.fontWeightBold},color:h.palette.primary.main,children:t.link.label})]})},`link-${p.key}-${a}`))})]})};export{d as LegendBlockComponent};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export { FoodsIcon } from './FoodsIcon';
|
|
2
|
+
export type { FoodsIconProps, IconMapping, IconMappingProps } from './FoodsIcon';
|
|
3
|
+
export { FoodsIllustrations } from './FoodsIllustrations';
|
|
4
|
+
export type { FoodsIllustrationsProps, IllustrationMapping } from './FoodsIllustrations';
|
|
5
|
+
export { computeSize, iconMapping } from './iconConfig';
|
|
6
|
+
export type { WidthHeight } from './iconConfig';
|
|
7
|
+
export { illustationsMapping } from './illustrationsConfig';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FoodsIcon as o}from"./FoodsIcon.js";import{FoodsIllustrations as r}from"./FoodsIllustrations.js";import{computeSize as i,iconMapping as s}from"./iconConfig.js";import{illustationsMapping as t}from"./illustrationsConfig.js";export{o as FoodsIcon,r as FoodsIllustrations,i as computeSize,s as iconMapping,t as illustationsMapping};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{useTheme as r,Chip as t}from"@mui/material";import{
|
|
2
|
-
return o(t,{icon:void 0===s?void 0:/* @__PURE__ */o(
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{useTheme as r,Chip as t}from"@mui/material";import{FoodsIcon as e}from"../../Icons/FoodsIcon.js";import{FoodsIconButton as n}from"../../Button/FoodsIconButton.js";const i=i=>{const{icon:s,label:c,variant:a,onDelete:m,ChipProps:l}=i,p=r(),u="brand"===a?p.palette.primary[100]:p.custom.grey[600];/* @__PURE__ */
|
|
2
|
+
return o(t,{icon:void 0===s?void 0:/* @__PURE__ */o(e,{size:1,icon:s}),variant:a,label:c,onDelete:m,deleteIcon:/* @__PURE__ */o(n,{buttonProps:{onClick:m,sx:{":hover":{backgroundColor:u}}},icon:"close",size:"xs"}),...l})};export{i as FoodsPills};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{
|
|
2
|
-
return o(
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{FoodsIcon as e}from"../Icons/FoodsIcon.js";import{FoodsTextInput as r}from"../Form/FoodsFormFields/FoodsTextInput.js";function n(n){/* @__PURE__ */
|
|
2
|
+
return o(r,{value:n.value??"",onChange:o=>{n.onChange(o)},ExtraInputProps:{type:"search",placeholder:n.placeholder,endAdornment:/* @__PURE__ */o(e,{size:2,icon:"search"})}})}export{n as SearchBox};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useTheme as r,Stack as o,Box as n}from"@mui/material";import{
|
|
2
|
-
return t(
|
|
3
|
-
/* @__PURE__ */t(
|
|
1
|
+
import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useTheme as r,Stack as o,Box as n}from"@mui/material";import{FoodsIllustrations as e}from"../../../../Icons/FoodsIllustrations.js";import{WhiteBox as s}from"../../../../Box/WhiteBox.js";const m=m=>{const a=r(),{emptyText:c,illustration:l}=m;/* @__PURE__ */
|
|
2
|
+
return t(s,{children:/* @__PURE__ */i(o,{justifyContent:"center",alignItems:"center",padding:a.spacing(2,0,2,0),gap:a.spacing(2.5),children:[
|
|
3
|
+
/* @__PURE__ */t(e,{width:60,height:60,illustration:l}),
|
|
4
4
|
/* @__PURE__ */t(n,{children:c})]})})};export{m as EmptyForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as i}from"react/jsx-runtime";import{useTheme as t,Stack as e}from"@mui/material";import{
|
|
2
|
-
return o(
|
|
3
|
-
/* @__PURE__ */o(
|
|
1
|
+
import{jsx as o,jsxs as i}from"react/jsx-runtime";import{useTheme as t,Stack as e}from"@mui/material";import{FoodsIcon as n}from"../../../../Icons/FoodsIcon.js";import{ContextualContentBox as r}from"../../../../Box/ContextualContentBox.js";const s=s=>{const c=t(),{suggestionTitle:m,text:l}=s;/* @__PURE__ */
|
|
2
|
+
return o(r,{size:"small",children:/* @__PURE__ */i(e,{flexDirection:"row",gap:c.spacing(3),children:[
|
|
3
|
+
/* @__PURE__ */o(n,{size:8,icon:"suggestions"}),
|
|
4
4
|
/* @__PURE__ */i(e,{flexDirection:"column",gap:c.spacing(1),children:[m,l]})]})})};export{s as SuggestionBlock};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as t,jsx as n}from"react/jsx-runtime";import{useTheme as o,Stack as i,Box as e}from"@mui/material";import{
|
|
1
|
+
import{jsxs as t,jsx as n}from"react/jsx-runtime";import{useTheme as o,Stack as i,Box as e}from"@mui/material";import{FoodsIcon as r}from"../../../Icons/FoodsIcon.js";import{FlexibleTypography as a}from"../../../../innerComponents/FlexibleTypography.js";import{FlexibleButton as s}from"../../../../innerComponents/FlexibleButton.js";const p=p=>{const{title:c,actionButton:m,cancelButton:l}=p,u=o();/* @__PURE__ */
|
|
2
2
|
return t(i,{flexDirection:"row",gap:u.spacing(4),sx:{justifyContent:"space-between",alignItems:"center",padding:u.spacing(3,4,3,4)},children:[
|
|
3
|
-
/* @__PURE__ */n(
|
|
4
|
-
/* @__PURE__ */t(e,{sx:{display:"flex",gap:u.spacing(2)},children:[l&&/* @__PURE__ */n(
|
|
3
|
+
/* @__PURE__ */n(a,{text:c,defaultVariant:"h3"}),
|
|
4
|
+
/* @__PURE__ */t(e,{sx:{display:"flex",gap:u.spacing(2)},children:[l&&/* @__PURE__ */n(s,{buttonOptions:l,defaultOptions:{variant:"ternary"}}),m&&/* @__PURE__ */n(s,{buttonOptions:m,defaultOptions:{variant:"primary",endIcon:/* @__PURE__ */n(r,{size:2,icon:"arrowRight"})}})]})]})};export{p as InitHeader};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useTheme as n,Stack as t,Box as a,Button as r}from"@mui/material";import{
|
|
1
|
+
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useTheme as n,Stack as t,Box as a,Button as r}from"@mui/material";import{FoodsIcon as o}from"../../../Icons/FoodsIcon.js";import{FlexibleTypography as c}from"../../../../innerComponents/FlexibleTypography.js";const l=l=>{const{title:s,cancel:p,confirm:d}=l,m=n();/* @__PURE__ */
|
|
2
2
|
return e(t,{flexDirection:"row",gap:m.spacing(4),sx:{justifyContent:"space-between",alignItems:"center",padding:m.spacing(3,4,3,4)},children:[
|
|
3
|
-
/* @__PURE__ */i(
|
|
3
|
+
/* @__PURE__ */i(c,{text:s,defaultVariant:"h3"}),
|
|
4
4
|
/* @__PURE__ */e(a,{sx:{display:"flex",gap:m.spacing(2)},children:[
|
|
5
5
|
/* @__PURE__ */i(r,{variant:"ternary",onClick:p.action,children:p.label}),
|
|
6
|
-
/* @__PURE__ */i(r,{variant:"validate",onClick:d.action,disabled:d.disabled??!1,startIcon:/* @__PURE__ */i(
|
|
6
|
+
/* @__PURE__ */i(r,{variant:"validate",onClick:d.action,disabled:d.disabled??!1,startIcon:/* @__PURE__ */i(o,{size:2,icon:"check"}),children:d.label})]})]})};export{l as ListHeader};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o,Fragment as t}from"react/jsx-runtime";import{useTheme as r,Box as n,Typography as i}from"@mui/material";import{
|
|
2
|
-
return e(n,{sx:{display:"flex",alignItems:"center",width:"100%",height:"32px",paddingInline:a?
|
|
1
|
+
import{jsxs as e,jsx as o,Fragment as t}from"react/jsx-runtime";import{useTheme as r,Box as n,Typography as i}from"@mui/material";import{FoodsIcon as s}from"../../../../Icons/FoodsIcon.js";import{NAVBAR_EXPANDED_INLINE_PADDING as c}from"../../constants.js";const l=l=>{const d=r(),{isExpanded:a,toggleSidebar:m,textOptions:p}=l;/* @__PURE__ */
|
|
2
|
+
return e(n,{sx:{display:"flex",alignItems:"center",width:"100%",height:"32px",paddingInline:a?c:0,...a?{justifyContent:"space-between"}:{justifyContent:"center"},borderBlock:"1px solid",borderColor:d.custom.grey[2700],"& > *":{color:d.custom.grey[100]},"&:hover > *":{cursor:"pointer",color:d.custom.grey[1e3]}},onClick:m,children:[!a&&/* @__PURE__ */o(s,{size:1,icon:"openPanel"}),a&&/* @__PURE__ */e(t,{children:[
|
|
3
3
|
/* @__PURE__ */o(i,{title:p.shortenSidebar,variant:"small-bold",sx:{color:d.custom.grey[100],overflow:"hidden",width:"fit-content",maxWidth:"218px",whiteSpace:"nowrap"},children:p.shortenSidebar}),
|
|
4
|
-
/* @__PURE__ */o(
|
|
4
|
+
/* @__PURE__ */o(s,{size:1,icon:"closePanel"})]})]})};export{l as ExpandButton};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{useTheme as t,Button as i,Box as n,Avatar as l,Typography as a}from"@mui/material";import{useState as d}from"react";import{
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{useTheme as t,Button as i,Box as n,Avatar as l,Typography as a}from"@mui/material";import{useState as d}from"react";import{FoodsIcon as s}from"../../../../Icons/FoodsIcon.js";import{ButtonPopover as c}from"./ButtonPopover.js";import{NavbarTooltip as p}from"../../NavbarTooltip.js";import{NAVBAR_ACTION_BUTTON_PADDING_BLOCK as m,NAVBAR_ACTION_BUTTON_PADDING_INLINE as h,NAVBAR_ACTION_BUTTON_MIN_HEIGHT as g,NAVBAR_COLLAPSED_ACTION_BUTTON_PADDING as u,NAVBAR_COLLAPSED_ACTION_BUTTON_SIZE as x}from"../../constants.js";const v=v=>{const{isExtended:f,name:b,picture:w,popover:y,tooltipLabel:k}=v,j=t(),[C,I]=d(null),W=Boolean(C),B={closePopover:()=>I(null)},P=k??b,A=y?.renderPopover?y.renderPopover(B):y?.element,L=void 0!==y,O=/* @__PURE__ */e(i,{fullWidth:f,sx:{justifyContent:f?"space-between":"center",alignItems:"center",color:j.custom.grey[100],border:"1px solid transparent",borderRadius:"12px",...f?{minHeight:g,paddingInline:h,paddingBlock:m}:{width:x,minWidth:x,height:x,padding:u},textTransform:"none",...L&&{"&:hover":{borderColor:j.custom.grey[600],backgroundColor:j.custom.grey[2e3]},"&:active":{backgroundColor:j.custom.grey[2500]},cursor:"pointer"},...!L&&{cursor:"default"}},onClick:e=>{void 0!==y&&I(e.currentTarget)},children:[
|
|
2
2
|
/* @__PURE__ */e(n,{lang:window.navigator.language,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:j.spacing(2),hyphens:"auto",overflowWrap:"break-word",wordBreak:"break-word",maxWidth:"100%",flex:f?"1":"0"},children:[
|
|
3
|
-
/* @__PURE__ */r(l,{alt:"app-logo",src:w||"",sx:{width:"40px",height:"40px"},children:w??b.charAt(0)}),f&&/* @__PURE__ */r(a,{variant:"body-bold",sx:{color:j.custom.grey[100],display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},children:b})]}),f&&void 0!==y&&/* @__PURE__ */r(
|
|
3
|
+
/* @__PURE__ */r(l,{alt:"app-logo",src:w||"",sx:{width:"40px",height:"40px"},children:w??b.charAt(0)}),f&&/* @__PURE__ */r(a,{variant:"body-bold",sx:{color:j.custom.grey[100],display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},children:b})]}),f&&void 0!==y&&/* @__PURE__ */r(s,{size:2,icon:W?"arrowUpShort":"arrowDownShort"})]});/* @__PURE__ */
|
|
4
4
|
return e(o,{children:[
|
|
5
|
-
/* @__PURE__ */r(n,{sx:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:f?"flex-start":"center"},children:void 0!==y?/* @__PURE__ */r(
|
|
6
|
-
/* @__PURE__ */r(
|
|
5
|
+
/* @__PURE__ */r(n,{sx:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:f?"flex-start":"center"},children:void 0!==y?/* @__PURE__ */r(p,{title:/* @__PURE__ */r(a,{variant:"body-bold",children:P}),placement:"right",disableHoverListener:f||W,children:O}):O}),
|
|
6
|
+
/* @__PURE__ */r(c,{anchor:C,setAnchor:I,paperOverrides:void 0,children:A})]})};export{v as Organization};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r}from"react";import{useTheme as o,Box as i,Button as n,Avatar as l,Typography as a}from"@mui/material";import{
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r}from"react";import{useTheme as o,Box as i,Button as n,Avatar as l,Typography as a}from"@mui/material";import{FoodsIcon as s}from"../../../../Icons/FoodsIcon.js";import{UserPopover as c}from"./UserPopover.js";import{NavbarTooltip as d}from"../../NavbarTooltip.js";import{NAVBAR_ACTION_BUTTON_PADDING_BLOCK as p,NAVBAR_ACTION_BUTTON_PADDING_INLINE as m,NAVBAR_ACTION_BUTTON_MIN_HEIGHT as h,NAVBAR_COLLAPSED_ACTION_BUTTON_PADDING as u,NAVBAR_COLLAPSED_ACTION_BUTTON_SIZE as x}from"../../constants.js";const f=e=>e.firstname.charAt(0).concat(e.lastname.charAt(0)),g=g=>{const{user:b,userActions:y,isExpanded:v,textOptions:w,logout:C}=g,j=o(),[k,A]=r(null),I=Boolean(k),O=`${b.firstname} ${b.lastname}`,W=b.tooltipLabel??O,B=b.firstname.replaceAll(" "," "),D=b.lastname.replaceAll(" "," ");/* @__PURE__ */
|
|
2
2
|
return e(i,{sx:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:v?"flex-start":"center",color:j.custom.grey[100]},children:[
|
|
3
|
-
/* @__PURE__ */t(
|
|
3
|
+
/* @__PURE__ */t(d,{title:/* @__PURE__ */t(a,{variant:"body-bold",children:W}),placement:"right",disableHoverListener:v||I,children:/* @__PURE__ */e(n,{fullWidth:v,sx:{border:"1px solid transparent",borderRadius:"12px",...v?{minHeight:h,paddingInline:m,paddingBlock:p}:{width:x,minWidth:x,height:x,padding:u},textTransform:"none","&:hover":{borderColor:j.custom.grey[600],backgroundColor:j.custom.grey[2e3],textDecoration:"none"},"&:active":{backgroundColor:j.custom.grey[2500]},color:j.custom.grey[100],justifyContent:v?"space-between":"center"},onClick:e=>A(e.currentTarget),children:[
|
|
4
4
|
/* @__PURE__ */e(i,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"16px"},children:[
|
|
5
|
-
/* @__PURE__ */t(l,{alt:"profile-picture",src:b.picture||"",children:b.picture??f(b)}),v&&/* @__PURE__ */e(a,{title:O,variant:"body-bold",sx:{color:j.custom.grey[100],textOverflow:"ellipsis",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",width:"fit-content",maxWidth:"150px"},children:[B," ",D]})]}),v&&/* @__PURE__ */t(
|
|
6
|
-
/* @__PURE__ */t(
|
|
5
|
+
/* @__PURE__ */t(l,{alt:"profile-picture",src:b.picture||"",children:b.picture??f(b)}),v&&/* @__PURE__ */e(a,{title:O,variant:"body-bold",sx:{color:j.custom.grey[100],textOverflow:"ellipsis",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",width:"fit-content",maxWidth:"150px"},children:[B," ",D]})]}),v&&/* @__PURE__ */t(s,{size:2,icon:I?"arrowUpShort":"arrowDownShort"})]})}),
|
|
6
|
+
/* @__PURE__ */t(c,{isExpanded:v,userActions:y,isPopoverOpen:I,anchor:k,onClose:()=>A(null),logout:C,textOptions:w})]})};export{g as UserButton};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{ButtonGroup as t,Button as i,Box as n}from"@mui/material";import{useState as o,Fragment as l}from"react";import{LinkAction as s}from"./LinkAction.js";import{
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{ButtonGroup as t,Button as i,Box as n}from"@mui/material";import{useState as o,Fragment as l}from"react";import{LinkAction as s}from"./LinkAction.js";import{FoodsIcon as a}from"../../../../../Icons/FoodsIcon.js";import{CustomRender as d}from"./CustomRender.js";import{Separator as p}from"./Separator.js";const m=m=>{const{button:c,isExpanded:x,extendSidebar:f,onMobileDrawerClose:u}=m,b=c.items.some(e=>"separator"!==e.type&&e.isSelected),[h,w]=o(b),y=/* @__PURE__ */r(a,h?{icon:"arrowUpShort",size:2}:{icon:"arrowDownShort",size:2});/* @__PURE__ */
|
|
2
2
|
return e(l,{children:[
|
|
3
3
|
/* @__PURE__ */r(t,{style:{display:"flex",justifyContent:"center"},children:/* @__PURE__ */e(i,{variant:b?"selected-menu":"default-menu","aria-label":"link",title:c.label,sx:x?{flex:1,gap:"8px",padding:"8px"}:{},onClick:()=>{if(x)return w(!h);f(),h||w(!0)},children:[
|
|
4
4
|
/* @__PURE__ */e(n,{sx:{display:"flex",alignItems:"center",justifyContent:x?"none":"center",gap:".5rem",width:"100%"},children:[c.icon,x&&/* @__PURE__ */r(n,{sx:{display:"-webkit-box",WebkitLineClamp:1,flex:1,overflow:"hidden",WebkitBoxOrient:"vertical",textOverflow:"ellipsis",textAlign:"left"},children:c.label})]}),
|
|
5
5
|
/* @__PURE__ */r(n,{sx:{display:"flex",alignItems:"center"},children:x&&y})]})}),x&&h&&/* @__PURE__ */r(n,{sx:{paddingLeft:"30px"},children:c.items.map((e,t)=>{if("custom"===e.type){const i=e.render({isExpanded:x,extendSidebar:f,onMobileDrawerClose:u});/* @__PURE__ */
|
|
6
|
-
return r(
|
|
6
|
+
return r(d,{isExpanded:x,children:i},t)}return"separator"===e.type?/* @__PURE__ */r(p,{isExpanded:x},t):/* @__PURE__ */r(s,{button:e,isExpanded:x,onMobileDrawerClose:u},t)})})]})};export{m as DrawerAction};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Stepper as o,Step as r,StepLabel as i,Stack as n,Typography as a,Box as l}from"@mui/material";import{
|
|
2
|
-
return e(l,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:e=>`1px solid ${e.palette.primary.main}`,borderColor:e=>o?e.palette.common.black:e.palette.grey[500],backgroundColor:e=>t.active?e.palette.primary[100]:e.palette.common.white,color:e=>e.palette.text.primary,borderRadius:"50%",width:e=>e.spacing(4.5),height:e=>e.spacing(4.5),fontWeight:e=>e.typography.fontWeightBold,...t.active&&"forward"===u&&{animation:"fillBackground 0.8s forwards","@keyframes fillBackground":{from:{backgroundColor:e=>e.palette.common.white},to:{backgroundColor:e=>e.palette.primary[100]}}}},children:t.completed?/* @__PURE__ */e(
|
|
3
|
-
/* @__PURE__ */e(a,{variant:"body-medium",children:o}),
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Stepper as o,Step as r,StepLabel as i,Stack as n,Typography as a,Box as l}from"@mui/material";import{FoodsIcon as c}from"../Icons/FoodsIcon.js";import{useState as p,useEffect as m}from"react";const s=s=>{const{steps:d=[],currentStep:f=0}=s,[u,h]=p("forward"),[g,b]=p(f);return m(()=>{h(f>g?"forward":"backward"),b(f)},[f]),/* @__PURE__ */e(o,{activeStep:f,sx:{width:"100%","& .MuiStepConnector-root":{position:"relative"},".MuiStepConnector-line":{height:e=>e.spacing(.125),backgroundColor:e=>e.palette.grey[500]},"& .MuiStepConnector-root.Mui-active .MuiStepConnector-line, & .MuiStepConnector-root.Mui-completed .MuiStepConnector-line":{"&::after":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:e=>e.palette.common.black}},"& .MuiStepConnector-root.Mui-active .MuiStepConnector-line::after":{animation:"fillLine 0.8s forwards "+("forward"===u?"normal":"none"),"@keyframes fillLine":{from:{transform:"scaleX(0)"},to:{transform:"scaleX(1)"}},transformOrigin:"left"}},children:d.map(({title:o,description:p},m)=>/* @__PURE__ */e(r,{children:/* @__PURE__ */e(i,{StepIconComponent:t=>{const o=t.active||t.completed;/* @__PURE__ */
|
|
2
|
+
return e(l,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:e=>`1px solid ${e.palette.primary.main}`,borderColor:e=>o?e.palette.common.black:e.palette.grey[500],backgroundColor:e=>t.active?e.palette.primary[100]:e.palette.common.white,color:e=>e.palette.text.primary,borderRadius:"50%",width:e=>e.spacing(4.5),height:e=>e.spacing(4.5),fontWeight:e=>e.typography.fontWeightBold,...t.active&&"forward"===u&&{animation:"fillBackground 0.8s forwards","@keyframes fillBackground":{from:{backgroundColor:e=>e.palette.common.white},to:{backgroundColor:e=>e.palette.primary[100]}}}},children:t.completed?/* @__PURE__ */e(c,{icon:"check",size:2}):m+1})},sx:{"& .MuiStepLabel-label":{fontSize:"0.875rem",color:e=>e.palette.text.primary},"& .MuiStepLabel-iconContainer":{display:"flex",borderColor:"transparent"},"& .MuiStepLabel-completed":{color:e=>e.palette.primary[100]},"& .MuiStepLabel-active":{color:e=>e.palette.primary[100]}},children:/* @__PURE__ */t(n,{children:[
|
|
3
|
+
/* @__PURE__ */e(a,{variant:"body-medium",children:o}),p&&/* @__PURE__ */e(a,{variant:"small",children:p})]})})},`progress-step-${m}`))})};export{s as Progress};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{jsx as e,jsxs as i,Fragment as o}from"react/jsx-runtime";import t from"@mui/material/Box";import n from"@mui/material/Typography";import r from"@mui/material/CardContent";import a from"@mui/material/Button";import{useTheme as l}from"@mui/material/styles";import{LinearProgress as s}from"../LinearProgress.js";import{
|
|
2
|
-
return e(
|
|
1
|
+
import{jsx as e,jsxs as i,Fragment as o}from"react/jsx-runtime";import t from"@mui/material/Box";import n from"@mui/material/Typography";import r from"@mui/material/CardContent";import a from"@mui/material/Button";import{useTheme as l}from"@mui/material/styles";import{LinearProgress as s}from"../LinearProgress.js";import{FoodsIcon as m}from"../Icons/FoodsIcon.js";import{Stack as c}from"@mui/material";import p from"i18next";import{WhiteBox as d}from"../Box/WhiteBox.js";import{FoodsTags as g}from"../Tags/FoodsTags.js";const h=h=>{const{progress:u,onAction:f,isValidated:x=!1,textOptions:y,headingOptions:b,sx:C={}}=h,v=l(),{heading:w,actionText:j,progressLabel:I,validatedLabel:V}=y,k=!b||!0===b?.hidden,B=!(k||!b||!("showIcon"in b))&&b.showIcon,F=!k&&b&&"icon"in b&&b.icon?b.icon:"default",W=!k&&b&&"headingValue"in b&&void 0!==b.headingValue?b.headingValue:"",D=!k&&b&&"headingValueColor"in b&&b.headingValueColor?b.headingValueColor:v.palette.common.black,L=100===u?v.custom.green[600]:v.palette.primary.main;/* @__PURE__ */
|
|
2
|
+
return e(d,{sx:{display:"flex",flexDirection:"column",borderRadius:v.spacing(1),width:"100%",minWidth:"280px",border:`1px solid ${v.palette.grey[100]}`,...C},children:/* @__PURE__ */i(r,{sx:{padding:v.spacing(2),"&:last-child":{paddingBottom:v.spacing(2)},display:"flex",flexDirection:"column",gap:v.spacing(1.25)},children:[k?/* @__PURE__ */e(o,{}):/* @__PURE__ */i(c,{flexDirection:"row",justifyContent:"space-between",children:[B?/* @__PURE__ */e(m,{icon:F,size:5}):/* @__PURE__ */e(t,{sx:{width:v.spacing(3),height:v.spacing(3),borderRadius:"50%",backgroundColor:v.palette.common.black||D,display:"flex",alignItems:"center",justifyContent:"center",color:v.palette.common.white,fontSize:"0.875rem",fontWeight:v.typography.fontWeightBold},children:W}),x&&/* @__PURE__ */e(g,{label:V||"",variant:"tags-green",startIcon:"check",sx:{pointerEvents:"none"}})]}),
|
|
3
3
|
/* @__PURE__ */e(n,{variant:"h3",children:w}),
|
|
4
|
-
/* @__PURE__ */i(
|
|
5
|
-
/* @__PURE__ */e(t,{children:/* @__PURE__ */i(
|
|
4
|
+
/* @__PURE__ */i(c,{gap:v.spacing(4),children:[
|
|
5
|
+
/* @__PURE__ */e(t,{children:/* @__PURE__ */i(c,{gap:v.spacing(.5),children:[
|
|
6
6
|
/* @__PURE__ */i(t,{children:[
|
|
7
|
-
/* @__PURE__ */e(n,{variant:"big-bold",color:L,children:Intl.NumberFormat(
|
|
7
|
+
/* @__PURE__ */e(n,{variant:"big-bold",color:L,children:Intl.NumberFormat(p.language,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}).format(u/100)})," ",
|
|
8
8
|
/* @__PURE__ */e(n,{variant:"body-medium",color:"textSecondary",children:I})]}),
|
|
9
9
|
/* @__PURE__ */e(s,{value:u,height:v.spacing(1.5),hideValueLabel:!0,styleProperties:{lineColor:v.palette.primary.main,fontColor:L,fullUpLineColor:v.custom.green[600],fullUpFontColor:v.custom.green[600]}})]})}),
|
|
10
|
-
/* @__PURE__ */e(a,{onClick:f,variant:"ternary",endIcon:/* @__PURE__ */e(
|
|
10
|
+
/* @__PURE__ */e(a,{onClick:f,variant:"ternary",endIcon:/* @__PURE__ */e(m,{icon:"arrowRight",size:1.5}),sx:{justifyContent:"space-between",mt:v.spacing(.25),textTransform:"none",fontWeight:v.typography.fontWeightMedium,fontSize:"0.875rem",lineHeight:v.spacing(.75),"&:hover":{backgroundColor:"transparent",color:v.palette.primary.dark,"& svg":{transform:"translateX(2px)",transition:"transform 0.2s ease-in-out"}},"& svg":{transition:"transform 0.2s ease-in-out"}},children:j})]})]})})};export{h as ProgressCard};
|