@foodpilot/foods 2.18.1 → 2.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
- import{jsxs as t,jsx as i}from"react/jsx-runtime";import{useMemo as e,useState as o,useRef as n,useCallback as a,useEffect as r}from"react";import{useTheme as s,Box as l}from"@mui/material";import{ResponsiveContainer as m,ScatterChart as h,CartesianGrid as c,XAxis as d,YAxis as p}from"recharts";import{useScatterPlotInteraction as u}from"./useScatterPlotInteraction.js";import{ScatterPlotHoverOverlay as v}from"./ScatterPlotHoverOverlay.js";import{ScatterPlotTooltip as x}from"./ScatterPlotTooltip.js";import{ScatterPlotPoints as f}from"./ScatterPlotPoints.js";import{processScatterPlotData as g,createGroupedData as y,ANIMATION_DURATION as M,CHART_MARGIN_BOTTOM as w,CHART_MARGIN_LEFT as D,CHART_MARGIN_RIGHT as P,CHART_MARGIN_TOP as k}from"./utils.js";import L from"i18next";const F=F=>{const T=s(),{values:E,xMin:S,xMax:b,yMin:z,yMax:I,valueFormatterFn:j=T.numbers.valueFormatterFn,precision:O,language:C,unit:W,xUnit:R,yUnit:U,textOptions:A,showSeriesInTooltip:H=!0,tooltipOptions:K}=F,{hoveredIndex:$,hover:B,pinnedIndex:X,pinnedHover:Y,isPinned:q,handlePointEnter:G,handlePointClick:J,handlePointLeave:N,handleTooltipEnter:Q,handleTooltipLeave:V,handleChartMouseLeave:Z,handleDismissTooltip:_}=u(),{allPoints:tt,shouldShowLabels:it}=e(()=>g(E,T.custom.dataviz.colorsWithExtra),[E,T.custom.dataviz.colorsWithExtra]),et=e(()=>y(E,T.custom.dataviz.colorsWithExtra,tt),[E,T.custom.dataviz.colorsWithExtra,tt]),{xDomain:ot,yDomain:nt}=e(()=>{const t=E.flatMap(t=>t.data);if(0===t.length)return{xDomain:void 0!==S&&void 0!==b?[S,b]:[0,100],yDomain:void 0!==z&&void 0!==I?[z,I]:[0,100]};const i=t.map(t=>t.x),e=t.map(t=>t.y),o=Math.min(...i),n=Math.max(...i),a=Math.min(...e),r=Math.max(...e);return{xDomain:void 0!==S&&void 0!==b?[S,b]:[Math.max(0,o),n],yDomain:void 0!==z&&void 0!==I?[z,I]:[Math.max(0,a),r]}},[E,S,b,z,I]),[at,rt]=o(!0),st=n(null),lt=n(null),[mt,ht]=o({height:0,width:0}),ct=C??L.language,dt="number"==typeof O?Math.min(100,Math.max(0,O)):void 0,pt=a(t=>j(t,dt),[j,dt]);return r(()=>{const t=setTimeout(()=>{rt(!1)},M);return()=>clearTimeout(t)},[]),r(()=>{const t=st.current;if(!t)return;const i=(t,i)=>{ht(e=>e.width===t&&e.height===i?e:{width:t,height:i})},e=t.getBoundingClientRect();i(e.width,e.height);const o=new ResizeObserver(([t])=>{t&&i(t.contentRect.width,t.contentRect.height)});return o.observe(t),()=>o.disconnect()},[]),/* @__PURE__ */t(l,{onClick:t=>{const i=t.target;if(i.classList.contains("recharts-dot"))return;const e=lt.current;e&&e.contains(i)||_()},onMouseLeave:Z,ref:st,sx:{position:"relative",width:"100%",height:"100%"},children:[mt.width>0&&mt.height>0&&/* @__PURE__ */i(m,{width:"100%",height:"100%",initialDimension:mt,children:/* @__PURE__ */t(h,{margin:{top:k,right:P,left:D,bottom:w},children:[
2
- /* @__PURE__ */i(c,{strokeDasharray:"4 4",stroke:T.palette.divider}),
3
- /* @__PURE__ */i(d,{type:"number",dataKey:"x",domain:ot,tickLine:!1,axisLine:{stroke:T.palette.divider},tick:{fontFamily:"Montserrat",fontSize:14,style:{transform:`translateY(${T.spacing(2)})`}},tickFormatter:pt,allowDecimals:!0}),
1
+ import{jsxs as t,jsx as i}from"react/jsx-runtime";import{useMemo as o,useState as e,useRef as n,useCallback as r,useEffect as a}from"react";import{useTheme as s,Box as l}from"@mui/material";import{ResponsiveContainer as m,ScatterChart as c,CartesianGrid as h,XAxis as d,YAxis as p}from"recharts";import{useScatterPlotInteraction as u}from"./useScatterPlotInteraction.js";import{ScatterPlotHoverOverlay as v}from"./ScatterPlotHoverOverlay.js";import{ScatterPlotTooltip as x}from"./ScatterPlotTooltip.js";import{ScatterPlotPoints as f}from"./ScatterPlotPoints.js";import{processScatterPlotData as g,createGroupedData as y,ANIMATION_DURATION as M,CHART_MARGIN_BOTTOM as w,CHART_MARGIN_LEFT as P,CHART_MARGIN_RIGHT as D,CHART_MARGIN_TOP as k}from"./utils.js";import L from"i18next";const F=F=>{const T=s(),{values:S,xMin:E,xMax:b,yMin:z,yMax:C,valueFormatterFn:I=T.numbers.valueFormatterFn,precision:j,language:O,unit:W,xUnit:R,yUnit:U,textOptions:A,showSeriesInTooltip:H=!0,tooltipOptions:K}=F,{hoveredIndex:$,hover:B,pinnedIndex:X,pinnedHover:Y,isPinned:q,handlePointEnter:G,handlePointClick:J,handlePointLeave:N,handleTooltipEnter:Q,handleTooltipLeave:V,handleChartMouseLeave:Z,handleDismissTooltip:_}=u(),{allPoints:tt,shouldShowLabels:it}=o(()=>g(S,T.custom.dataviz.colorsWithExtra),[S,T.custom.dataviz.colorsWithExtra]),ot=o(()=>y(S,T.custom.dataviz.colorsWithExtra,tt),[S,T.custom.dataviz.colorsWithExtra,tt]),{xDomain:et,yDomain:nt}=o(()=>{const t=S.flatMap(t=>t.data);if(0===t.length)return{xDomain:void 0!==E&&void 0!==b?[E,b]:[0,100],yDomain:void 0!==z&&void 0!==C?[z,C]:[0,100]};const i=t.map(t=>t.x),o=t.map(t=>t.y),e=Math.min(...i),n=Math.max(...i),r=Math.min(...o),a=Math.max(...o);return{xDomain:void 0!==E&&void 0!==b?[E,b]:[Math.max(0,e),n],yDomain:void 0!==z&&void 0!==C?[z,C]:[Math.max(0,r),a]}},[S,E,b,z,C]),[rt,at]=e(!0),st=n(null),lt=n(null),[mt,ct]=e({height:0,width:0}),ht=O??L.language,dt="number"==typeof j?Math.min(100,Math.max(0,j)):void 0,pt=r(t=>I(t,dt),[I,dt]);a(()=>{const t=setTimeout(()=>{at(!1)},M);return()=>clearTimeout(t)},[]),a(()=>{const t=st.current;if(!t)return;const i=(t,i)=>{ct(o=>o.width===t&&o.height===i?o:{width:t,height:i})},o=t.getBoundingClientRect();i(o.width,o.height);const e=new ResizeObserver(([t])=>{t&&i(t.contentRect.width,t.contentRect.height)});return e.observe(t),()=>e.disconnect()},[]);const ut=!!(q&&null!==X&&Y&&tt[X]),vt=null!==$?tt[$]:void 0;/* @__PURE__ */
2
+ return t(l,{onClick:t=>{const i=t.target;if(i.classList.contains("recharts-dot"))return;const o=lt.current;o&&o.contains(i)||_()},onMouseLeave:Z,ref:st,sx:{position:"relative",width:"100%",height:"100%"},children:[mt.width>0&&mt.height>0&&/* @__PURE__ */i(m,{width:"100%",height:"100%",initialDimension:mt,children:/* @__PURE__ */t(c,{margin:{top:k,right:D,left:P,bottom:w},children:[
3
+ /* @__PURE__ */i(h,{strokeDasharray:"4 4",stroke:T.palette.divider}),
4
+ /* @__PURE__ */i(d,{type:"number",dataKey:"x",domain:et,tickLine:!1,axisLine:{stroke:T.palette.divider},tick:{fontFamily:"Montserrat",fontSize:14,style:{transform:`translateY(${T.spacing(2)})`}},tickFormatter:pt,allowDecimals:!0}),
4
5
  /* @__PURE__ */i(p,{type:"number",dataKey:"y",domain:nt,tickLine:!1,axisLine:{stroke:T.palette.divider},tick:{fontFamily:"Montserrat",fontSize:14,style:{transform:`translateX(-${T.spacing(2)})`,pointerEvents:"none"}},tickFormatter:pt,allowDecimals:!0,style:{pointerEvents:"none"}}),
5
- /* @__PURE__ */i(v,{hover:B,valueFormatterFn:j,precision:dt,language:ct,xDomain:ot,yDomain:nt}),
6
- /* @__PURE__ */i(f,{groupedData:et,allPoints:tt,hoveredIndex:$,pinnedIndex:X,isTooltipActive:!!(q&&null!==X&&Y&&tt[X]),isAnimationActive:at,shouldShowLabels:it,containerWidth:mt.width,onPointEnter:G,onPointLeave:N,onPointClick:(t,i,e,o)=>{o.stopPropagation(),J(t,i,e)}})]})}),!!(q&&null!==X&&Y&&tt[X])&&/* @__PURE__ */i(x,{ref:lt,point:tt[X],coordinate:Y,series:E,valueFormatterFn:j,precision:O,unit:W,xUnit:R,yUnit:U,textOptions:A,showSeriesInTooltip:H,handleDismissTooltip:_,tooltipOptions:K,onTooltipEnter:Q,onTooltipLeave:V})]})};export{F as ScatterPlotCore};
6
+ /* @__PURE__ */i(v,{hover:B,valueFormatterFn:I,precision:dt,language:ht,xDomain:et,yDomain:nt,pointColor:vt?.seriesColor,isPointSelected:ut&&$===X}),
7
+ /* @__PURE__ */i(f,{groupedData:ot,allPoints:tt,hoveredIndex:$,pinnedIndex:X,isTooltipActive:ut,isAnimationActive:rt,shouldShowLabels:it,containerWidth:mt.width,onPointEnter:G,onPointLeave:N,onPointClick:(t,i,o,e)=>{e.stopPropagation(),J(t,i,o)}})]})}),!!(q&&null!==X&&Y&&tt[X])&&/* @__PURE__ */i(x,{ref:lt,point:tt[X],coordinate:Y,series:S,valueFormatterFn:I,precision:j,unit:W,xUnit:R,yUnit:U,textOptions:A,showSeriesInTooltip:H,handleDismissTooltip:_,tooltipOptions:K,onTooltipEnter:Q,onTooltipLeave:V})]})};export{F as ScatterPlotCore};
@@ -6,6 +6,8 @@ type OverlayProps = {
6
6
  language?: string;
7
7
  xDomain: number[];
8
8
  yDomain: number[];
9
+ pointColor?: string;
10
+ isPointSelected?: boolean;
9
11
  };
10
12
  export declare const ScatterPlotHoverOverlay: (props: OverlayProps) => import("react/jsx-runtime").JSX.Element | null;
11
13
  export {};
@@ -1,12 +1,13 @@
1
- import{jsxs as t,Fragment as e,jsx as r}from"react/jsx-runtime";import{useTheme as i}from"@mui/material";import{ReferenceLine as n}from"recharts";const a=a=>{const o=i(),{hover:l,valueFormatterFn:x=o.numbers.valueFormatterFn,precision:d,xDomain:m,yDomain:s}=a;if(!l)return null;const h=t=>parseFloat(o.spacing(t)),y=h(1),c=h(2.5),p=h(3.75),u=h(0),f=o.shape.borderRadius??4,g=o.custom.grey[2800],v=o.palette.common.white,k=t=>x(t,d),w=t=>Math.max(p,Math.round(12*t.length*.6)+2*y);/* @__PURE__ */
2
- return t(e,{children:[
3
- /* @__PURE__ */r(n,{segment:[{x:m[0],y:l.dataY},{x:l.dataX,y:l.dataY}],stroke:o.palette.text.primary,label:e=>{const{viewBox:i}=e;if(!i||!l)/* @__PURE__ */return r("g",{});const n=k(l.dataY),a=w(n),x=i.x-u-a-15,d=i.y-c/2,m=x+a/2,s=d+c/2+1;/* @__PURE__ */
4
- return t("g",{style:{pointerEvents:"none"},children:[
5
- /* @__PURE__ */r("line",{x1:i.x,y1:i.y,x2:i.x-15,y2:i.y,stroke:o.palette.text.primary,strokeWidth:1}),
6
- /* @__PURE__ */r("rect",{x:x,y:d,width:a,height:c,fill:g,rx:f}),
7
- /* @__PURE__ */r("text",{x:m,y:s,fill:v,fontSize:12,fontWeight:600,textAnchor:"middle",dominantBaseline:"middle",children:n})]})}}),
8
- /* @__PURE__ */r(n,{segment:[{x:l.dataX,y:s[0]},{x:l.dataX,y:l.dataY}],stroke:o.palette.text.primary,label:e=>{const{viewBox:i}=e;if(!i||!l)/* @__PURE__ */return r("g",{});const n=k(l.dataX),a=w(n),x=i.x-a/2,d=i.y+i.height+20,m=x+a/2,s=d+c/2+1;/* @__PURE__ */
9
- return t("g",{style:{pointerEvents:"none"},children:[
10
- /* @__PURE__ */r("line",{x1:x+a/2,y1:d+c,x2:x+a/2,y2:d-c,stroke:o.palette.text.primary,strokeWidth:1}),
11
- /* @__PURE__ */r("rect",{x:x,y:d,width:a,height:c,fill:g,rx:f}),
12
- /* @__PURE__ */r("text",{x:m,y:s,fill:v,fontSize:12,fontWeight:600,textAnchor:"middle",dominantBaseline:"middle",children:n})]})}})]})};export{a as ScatterPlotHoverOverlay};
1
+ import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useTheme as i}from"@mui/material";import{usePlotArea as n,ReferenceLine as o,DefaultZIndexes as a,ZIndexLayer as l,Dot as x}from"recharts";import{POINT_RADIUS as d}from"./utils.js";const s=a.cursorLine,p=a.label+1,m=m=>{const h=i(),c=n(),{hover:y,valueFormatterFn:f=h.numbers.valueFormatterFn,precision:u,xDomain:g,yDomain:v,pointColor:k,isPointSelected:X=!1}=m;if(!y||!c)return null;const Y=e=>parseFloat(h.spacing(e)),z=Y(1),E=Y(2.5),F=Y(3.75),W=Y(0),b=h.shape.borderRadius??4,w=h.custom.grey[2800],I=h.palette.common.white,D=e=>f(e,u),S=e=>Math.max(F,Math.round(12*e.length*.6)+2*z),j=D(y.dataY),A=S(j),B=c.x-W-A-15,M=y.pixelY-E/2,C=B+A/2,L=M+E/2+1,P=D(y.dataX),R=S(P),q=y.pixelX-R/2,G=c.y+c.height+20,H=q+R/2,J=G+E/2+1;/* @__PURE__ */
2
+ return e(t,{children:[
3
+ /* @__PURE__ */r(o,{segment:[{x:g[0],y:y.dataY},{x:y.dataX,y:y.dataY}],stroke:h.palette.text.primary,style:{pointerEvents:"none"},zIndex:s}),
4
+ /* @__PURE__ */r(o,{segment:[{x:y.dataX,y:v[0]},{x:y.dataX,y:y.dataY}],stroke:h.palette.text.primary,style:{pointerEvents:"none"},zIndex:s}),k&&/* @__PURE__ */r(l,{zIndex:a.activeDot,children:/* @__PURE__ */r(x,{cx:y.pixelX,cy:y.pixelY,r:d,fill:k,"data-scatter-hovered-point":"true",style:{pointerEvents:"none",...X?{filter:"drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5))",stroke:"#fff",strokeWidth:2}:{filter:"none"}}})}),
5
+ /* @__PURE__ */e(l,{zIndex:p,children:[
6
+ /* @__PURE__ */e("g",{"data-scatter-hover-marker":"y",style:{pointerEvents:"none"},children:[
7
+ /* @__PURE__ */r("line",{x1:c.x,y1:y.pixelY,x2:c.x-15,y2:y.pixelY,stroke:h.palette.text.primary,strokeWidth:1}),
8
+ /* @__PURE__ */r("rect",{x:B,y:M,width:A,height:E,fill:w,rx:b}),
9
+ /* @__PURE__ */r("text",{x:C,y:L,fill:I,fontSize:12,fontWeight:600,textAnchor:"middle",dominantBaseline:"middle",children:j})]}),
10
+ /* @__PURE__ */e("g",{"data-scatter-hover-marker":"x",style:{pointerEvents:"none"},children:[
11
+ /* @__PURE__ */r("line",{x1:y.pixelX,y1:G+E,x2:y.pixelX,y2:G-E,stroke:h.palette.text.primary,strokeWidth:1}),
12
+ /* @__PURE__ */r("rect",{x:q,y:G,width:R,height:E,fill:w,rx:b}),
13
+ /* @__PURE__ */r("text",{x:H,y:J,fill:I,fontSize:12,fontWeight:600,textAnchor:"middle",dominantBaseline:"middle",children:P})]})]})]})};export{m as ScatterPlotHoverOverlay};
@@ -1,4 +1,4 @@
1
- import{jsx as t,Fragment as e}from"react/jsx-runtime";import{Scatter as n,LabelList as o,DefaultZIndexes as i,Dot as r}from"recharts";import{useTheme as l}from"@mui/material";import{ANIMATION_DURATION as a,DISABLE_ANIMATIONS_THRESHOLD_POINTS as c,POINT_RADIUS as s,calculateLabelPosition as p,LABEL_FONT_SIZE as d}from"./utils.js";const f=f=>{const{groupedData:m,allPoints:u,hoveredIndex:y,pinnedIndex:x,isTooltipActive:h,isAnimationActive:b,shouldShowLabels:v,containerWidth:g,onPointEnter:I,onPointLeave:A,onPointClick:k}=f,P=l(),S=e=>{const{x:n,y:o,cx:i,cy:r,value:l,payload:a}=e,c=a?.label,s=c||("number"==typeof l?String(l):(l??"").toString());if(!s)return null;const f="number"==typeof i?i:"number"==typeof n?n:void 0,m="number"==typeof r?r:"number"==typeof o?o:void 0;if(void 0===f||void 0===m)return null;const{x:u,y:y,anchor:x}=p(f,m,s,g);/* @__PURE__ */
2
- return t("g",{style:{pointerEvents:"none"},children:/* @__PURE__ */t("text",{x:u,y:y+1,fill:P.palette.text.primary,fontSize:d,fontWeight:600,textAnchor:x,dominantBaseline:"middle",children:s})})};/* @__PURE__ */
3
- return t(e,{children:m.map(e=>/* @__PURE__ */t(n,{isAnimationActive:!1,fill:e.color,data:e.points.map(t=>{const n=null!==y&&t.pointIndex!==y;return{...t,label:t.label,fill:e.color,opacity:n?.4:1,r:s}}),shape:e=>{const{cx:n,cy:o,r:i,fill:l}=e,{pointIndex:s,payload:p}=e,d=p?.pointIndex??s,f=null!==y&&d!==y,m={cursor:"pointer",...void 0!==d&&d===x&&h?{filter:"drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5))",stroke:"#fff",strokeWidth:2}:{filter:"none"}};/* @__PURE__ */
4
- return t(r,{cx:n,cy:o,r:i,fill:l,"data-scatter-point":"true",style:c<=u.length?m:{...m,transform:`scale(${b?0:1})`,transformOrigin:"50% 50%",opacity:f?.4:1,transition:`all ${a}ms cubic-bezier(0.86, 0, 0.07, 1)`},onMouseEnter:()=>{if("number"==typeof d){const t=u[d];t&&I(t,d,{x:n,y:o})}},onMouseLeave:()=>{A()},onClick:(t,e)=>{if("number"==typeof d){const t=u[d];t&&k(t,d,{x:n,y:o},e)}}})},children:v&&/* @__PURE__ */t(o,{dataKey:"label",content:S,zIndex:i.line})},e.seriesId))})};export{f as ScatterPlotPoints};
1
+ import{jsx as t,Fragment as e}from"react/jsx-runtime";import{Scatter as n,LabelList as o,Dot as i}from"recharts";import{useTheme as r}from"@mui/material";import{ANIMATION_DURATION as l,DISABLE_ANIMATIONS_THRESHOLD_POINTS as a,POINT_RADIUS as c,calculateLabelPosition as s,LABEL_FONT_SIZE as p}from"./utils.js";const d=d=>{const{groupedData:f,allPoints:m,hoveredIndex:u,pinnedIndex:y,isTooltipActive:x,isAnimationActive:h,shouldShowLabels:b,containerWidth:v,onPointEnter:g,onPointLeave:A,onPointClick:I}=d,k=r(),P=e=>{const{x:n,y:o,cx:i,cy:r,value:l,payload:a}=e,c=a?.label,d=c||("number"==typeof l?String(l):(l??"").toString());if(!d)return null;const f="number"==typeof i?i:"number"==typeof n?n:void 0,m="number"==typeof r?r:"number"==typeof o?o:void 0;if(void 0===f||void 0===m)return null;const{x:u,y:y,anchor:x}=s(f,m,d,v);/* @__PURE__ */
2
+ return t("g",{style:{pointerEvents:"none"},children:/* @__PURE__ */t("text",{x:u,y:y+1,fill:k.palette.text.primary,fontSize:p,fontWeight:600,textAnchor:x,dominantBaseline:"middle",children:d})})};/* @__PURE__ */
3
+ return t(e,{children:f.map(e=>/* @__PURE__ */t(n,{isAnimationActive:!1,fill:e.color,data:e.points.map(t=>{const n=null!==u&&t.pointIndex!==u;return{...t,label:t.label,fill:e.color,opacity:n?.4:1,r:c}}),shape:e=>{const{cx:n,cy:o,r:r,fill:c}=e,{pointIndex:s,payload:p}=e,d=p?.pointIndex??s,f=null!==u&&d!==u,b={cursor:"pointer",...void 0!==d&&d===y&&x?{filter:"drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5))",stroke:"#fff",strokeWidth:2}:{filter:"none"}};/* @__PURE__ */
4
+ return t(i,{cx:n,cy:o,r:r,fill:c,"data-scatter-point":"true",style:a<=m.length?b:{...b,transform:`scale(${h?0:1})`,transformOrigin:"50% 50%",opacity:f?.4:1,transition:`all ${l}ms cubic-bezier(0.86, 0, 0.07, 1)`},onMouseEnter:()=>{if("number"==typeof d){const t=m[d];t&&g(t,d,{x:n,y:o})}},onMouseLeave:()=>{A()},onClick:(t,e)=>{if("number"==typeof d){const t=m[d];t&&I(t,d,{x:n,y:o},e)}}})},children:b&&/* @__PURE__ */t(o,{dataKey:"label",content:P})},e.seriesId))})};export{d as ScatterPlotPoints};
@@ -1,13 +1,13 @@
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
- /* @__PURE__ */t(e,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:m.spacing(1),children:[
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:F,handleDismissTooltip:H}=p,T=x.seriesName,E=C??v,P=w??v,L=I?.for??"for",M=()=>/* @__PURE__ */n(r,{role:"button",onClick:()=>H?.(),sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:m.spacing(.25),height:m.spacing(2.75),width:m.spacing(2.75),position:"absolute",top:m.spacing(-1),right:m.spacing(-1.5),borderRadius:"50%","&:hover":{color:m.palette.common.white,backgroundColor:"text.secondary",boxShadow:"0px 0px 4px rgba(0, 0, 0, 0.1)"}},children:/* @__PURE__ */n(r,{sx:{display:"flex",transform:"rotate(45deg)"},children:/* @__PURE__ */n(d,{icon:"plus",size:2})})}),O=/* @__PURE__ */t(e,{direction:"column",spacing:m.spacing(.5),pb:m.spacing(.25),onClick:t=>t.stopPropagation(),onMouseLeave:()=>F?.(),sx:{pointerEvents:"auto",position:"relative"},children:[
2
+ /* @__PURE__ */t(e,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:m.spacing(1),useFlexGap:!0,pr:m.spacing(2),children:[
3
3
  /* @__PURE__ */n(o,{variant:"h4",lineHeight:m.spacing(2),children:x.label}),
4
- /* @__PURE__ */n(L,{})]}),
4
+ /* @__PURE__ */n(M,{})]}),
5
5
  /* @__PURE__ */t(e,{pt:m.spacing(1),direction:"row",spacing:m.spacing(.5),alignItems:"center",flexWrap:"wrap",children:[
6
6
  /* @__PURE__ */n(o,{variant:"number-small",lineHeight:m.spacing(2),color:"text.primary",children:f(x.y,y)}),
7
7
  /* @__PURE__ */n(o,{variant:"body2",lineHeight:m.spacing(2),color:"text.secondary",children:E?` ${E}`:""}),
8
- /* @__PURE__ */n(o,{variant:"body2",lineHeight:m.spacing(2),color:"text.primary",children:$}),
8
+ /* @__PURE__ */n(o,{variant:"body2",lineHeight:m.spacing(2),color:"text.primary",children:L}),
9
9
  /* @__PURE__ */n(o,{variant:"number-small",lineHeight:m.spacing(2),color:"text.primary",children:f(x.x,y)}),
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
- /* @__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(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};
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]}),R=c({coordinate:{x:b.xValue,y:b.yValue},placement:"top",offset:h});/* @__PURE__ */
13
+ return n(r,{ref:u,style:{position:"absolute",...R,zIndex:m.zIndex.tooltip,pointerEvents:"auto"},onMouseEnter:z,onMouseLeave:F,children:/* @__PURE__ */n(g,{width:"inherit",title:O,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 +1 @@
1
- import{useState as l,useRef as e,useEffect as n,useCallback as a}from"react";const t=()=>{const[t,u]=l(null),[r,x]=l(null),[i,o]=l(null),[d,c]=l(null),[p,y]=l(!1),h=e(null),s=e(!1);n(()=>{s.current=p},[p]);const V=a(()=>{h.current&&(clearTimeout(h.current),h.current=null)},[]),X=a((l,e,n)=>{V(),y(!1),u(e);const a={xValue:n?.x??l.x,yValue:n?.y??l.y,dataX:l.x,dataY:l.y,pixelX:n?.x??l.x,pixelY:n?.y??l.y};x(l=>l&&l.xValue===a.xValue&&l.yValue===a.yValue&&l.dataX===a.dataX&&l.dataY===a.dataY&&l.pixelX===a.pixelX&&l.pixelY===a.pixelY?l:a)},[V]),Y=a((l,e,n)=>{V(),o(e),c({xValue:n?.x??l.x,yValue:n?.y??l.y,dataX:l.x,dataY:l.y,pixelX:n?.x??l.x,pixelY:n?.y??l.y}),y(!0)},[V]),v=a(()=>{V(),s.current||(u(null),x(null))},[V]),m=a(()=>{V()},[V]),T=a(()=>{V(),s.current||(h.current=setTimeout(()=>{u(null),x(null)},1e3))},[V]),P=a(()=>{s.current||(V(),u(null),x(null))},[V]),L=a(()=>{V(),o(null),c(null),x(null),y(!1)},[V]);return{hoveredIndex:t,hover:r,pinnedIndex:i,pinnedHover:d,isPinned:p,handlePointEnter:X,handlePointClick:Y,handlePointLeave:v,handleTooltipEnter:m,handleTooltipLeave:T,handleChartMouseLeave:P,handleDismissTooltip:L}};export{t as useScatterPlotInteraction};
1
+ import{useState as l,useRef as e,useEffect as n,useCallback as a}from"react";const t=()=>{const[t,u]=l(null),[r,x]=l(null),[i,o]=l(null),[d,c]=l(null),[p,y]=l(!1),h=e(null),s=e(!1);n(()=>{s.current=p},[p]);const V=a(()=>{h.current&&(clearTimeout(h.current),h.current=null)},[]),X=a((l,e,n)=>{V(),u(e);const a={xValue:n?.x??l.x,yValue:n?.y??l.y,dataX:l.x,dataY:l.y,pixelX:n?.x??l.x,pixelY:n?.y??l.y};x(l=>l&&l.xValue===a.xValue&&l.yValue===a.yValue&&l.dataX===a.dataX&&l.dataY===a.dataY&&l.pixelX===a.pixelX&&l.pixelY===a.pixelY?l:a)},[V]),Y=a((l,e,n)=>{V(),o(e),c({xValue:n?.x??l.x,yValue:n?.y??l.y,dataX:l.x,dataY:l.y,pixelX:n?.x??l.x,pixelY:n?.y??l.y}),y(!0)},[V]),v=a(()=>{V(),s.current||(u(null),x(null))},[V]),m=a(()=>{V()},[V]),T=a(()=>{V(),s.current||(h.current=setTimeout(()=>{u(null),x(null)},1e3))},[V]),P=a(()=>{s.current||(V(),u(null),x(null))},[V]),L=a(()=>{V(),o(null),c(null),x(null),y(!1)},[V]);return{hoveredIndex:t,hover:r,pinnedIndex:i,pinnedHover:d,isPinned:p,handlePointEnter:X,handlePointClick:Y,handlePointLeave:v,handleTooltipEnter:m,handleTooltipLeave:T,handleChartMouseLeave:P,handleDismissTooltip:L}};export{t as useScatterPlotInteraction};
@@ -1,8 +1,8 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useTheme as r,Stack as o,Typography as a,Button as t,Box as s}from"@mui/material";import{ScoreDistributionRow as n}from"./ScoreDistributionRow.js";import{ScoreDistributionSummary as d}from"./ScoreDistributionSummary.js";import{getScoreDistributionScale as l}from"./scoreDistributionScale.js";const c=({displayByLabel:c,emptyLabel:m,getCollapseLabel:p,getExpandLabel:g,items:b,modes:u,onModeChange:h,selectedMode:x,showSummary:y=!0,summary:f})=>{const w=r(),v=l(b);/* @__PURE__ */
1
+ import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useTheme as r,Stack as o,Typography as a,Button as t,Box as s}from"@mui/material";import{ScoreDistributionRow as d}from"./ScoreDistributionRow.js";import{ScoreDistributionSummary as n}from"./ScoreDistributionSummary.js";import{getScoreDistributionScale as l}from"./scoreDistributionScale.js";const c=({displayByLabel:c,emptyLabel:m,getCollapseLabel:p,getExpandLabel:g,items:b,modes:u,onModeChange:h,selectedMode:y,showSummary:x=!0,summary:f})=>{const w=r(),{color:v,...S}=w.typography["body-medium"],k=l(b);/* @__PURE__ */
2
2
  return e(o,{"data-testid":"score-distribution",gap:w.spacing(3),children:[
3
3
  /* @__PURE__ */e(o,{direction:"row",alignItems:"center",flexWrap:"wrap",gap:w.spacing(2),children:[
4
- /* @__PURE__ */i(a,{variant:"body-semibold",children:c}),
5
- /* @__PURE__ */i(o,{direction:"row",flexWrap:"wrap",gap:w.spacing(2),children:u.map(e=>/* @__PURE__ */i(t,{variant:x===e.id?"black-filled":"white-filled","aria-pressed":x===e.id,onClick:()=>h(e.id),children:e.label},e.id))})]}),
6
- /* @__PURE__ */e(s,{sx:{alignItems:"flex-start",display:"flex",flexWrap:"wrap",gap:w.spacing(3)},children:[y&&/* @__PURE__ */i(d,{summary:f}),
7
- /* @__PURE__ */e(o,{"data-testid":"score-distribution-breakdown",gap:w.spacing(2),sx:{backgroundColor:w.custom.grey[100],borderRadius:w.spacing(1.5),boxShadow:w.custom.shadows.grey,isolation:"isolate",flex:`1 1 ${w.custom.scoreDetail.summaryWidth}`,minWidth:0,padding:w.spacing(2),position:"relative"},children:[b.length>0?b.map((e,r)=>/* @__PURE__ */i(n,{getCollapseLabel:p,getExpandLabel:g,item:e,isLast:r===b.length-1,mode:x,scale:v},`${x}:${e.id}`)):/* @__PURE__ */i(a,{variant:"body-regular",color:w.custom.grey[2500],children:m}),
4
+ /* @__PURE__ */i(a,{variant:"body-regular",children:c}),
5
+ /* @__PURE__ */i(o,{direction:"row",flexWrap:"wrap",gap:w.spacing(2),children:u.map(e=>/* @__PURE__ */i(t,{variant:y===e.id?"black-filled":"white-filled","aria-pressed":y===e.id,onClick:()=>h(e.id),sx:S,children:e.label},e.id))})]}),
6
+ /* @__PURE__ */e(s,{sx:{alignItems:"flex-start",display:"flex",flexWrap:"wrap",gap:w.spacing(3)},children:[x&&/* @__PURE__ */i(n,{summary:f}),
7
+ /* @__PURE__ */e(o,{"data-testid":"score-distribution-breakdown",gap:w.spacing(2),sx:{backgroundColor:w.custom.grey[100],borderRadius:w.spacing(1.5),boxShadow:w.custom.shadows.grey,isolation:"isolate",flex:`1 1 ${w.custom.scoreDetail.summaryWidth}`,minWidth:0,padding:w.spacing(2),position:"relative"},children:[b.length>0?b.map((e,r)=>/* @__PURE__ */i(d,{getCollapseLabel:p,getExpandLabel:g,item:e,isLast:r===b.length-1,mode:y,scale:k},`${y}:${e.id}`)):/* @__PURE__ */i(a,{variant:"body-regular",color:w.custom.grey[2500],children:m}),
8
8
  /* @__PURE__ */i(s,{"aria-hidden":!0,sx:{borderColor:w.custom.strokes.containerDivider.color,borderRadius:w.spacing(1.5),borderStyle:w.custom.strokes.containerDivider.style,borderWidth:w.custom.strokes.containerDivider.width,boxSizing:"border-box",inset:0,pointerEvents:"none",position:"absolute"}})]})]})]})};export{c as ScoreDistribution};
@@ -8,5 +8,6 @@ export type CountTabsProps<Id extends string = string> = {
8
8
  activeId: Id;
9
9
  onChange: (id: Id) => void;
10
10
  isLoading?: boolean;
11
+ ariaLabel?: string;
11
12
  };
12
13
  export declare const CountTabs: <Id extends string = string>(props: CountTabsProps<Id>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import{jsx as r,jsxs as o}from"react/jsx-runtime";import{useTheme as e,Stack as i,ButtonBase as n,Typography as t,Skeleton as a}from"@mui/material";const d=d=>{const{tabs:c,activeId:p,onChange:s,isLoading:g=!1}=d,l=e();/* @__PURE__ */
2
- return r(i,{direction:"row",flexWrap:"wrap",gap:"8px",children:c.map(e=>{const i=e.id===p;/* @__PURE__ */
3
- return o(n,{"aria-pressed":i,onClick:()=>s(e.id),sx:{alignItems:"center",border:`1px solid ${i?l.custom.grey[2800]:l.custom.grey[500]}`,borderRadius:"8px",boxShadow:i?"0px 4px 8px 0px #2A2B2714":"0px 2px 8px 0px #2A2B270A",color:i?l.custom.grey[100]:l.custom.grey[2800],display:"inline-flex",minHeight:"36px",padding:"8px 12px",background:i?`linear-gradient(180deg, ${l.custom.grey[2600]} 0%, ${l.custom.grey[3e3]} 100%)`:`linear-gradient(180deg, ${l.custom.grey[100]} 0%, ${l.custom.grey[300]} 154.5%)`,"&:hover":{background:i?l.custom.grey[2800]:`linear-gradient(180deg, ${l.custom.grey[100]} 0%, ${l.custom.grey[400]} 154.5%)`}},children:[
4
- /* @__PURE__ */r(t,{component:"span",variant:"body-bold",color:"inherit",children:e.label}),
5
- /* @__PURE__ */r(t,{component:"span",variant:"body-bold",color:"inherit",sx:{px:"4px"},children:"-"}),g?/* @__PURE__ */r(a,{variant:"text",width:24,sx:{bgcolor:i?"rgba(255,255,255,0.3)":void 0}}):/* @__PURE__ */r(t,{component:"span",variant:"body-bold",color:"inherit",children:e.count})]},e.id)})})};export{d as CountTabs};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useTheme as r,Stack as t,ButtonBase as n,Typography as a,Skeleton as i,alpha as l}from"@mui/material";import{useRef as d}from"react";const c=c=>{const{tabs:s,activeId:b,onChange:g,isLoading:h=!1,ariaLabel:p}=c,m=r(),u=d([]),y=m.custom.countTabs;/* @__PURE__ */
2
+ return e(t,{role:"tablist","aria-label":p,direction:"row",flexWrap:"wrap",gap:y.gap,children:s.map((r,t)=>{const d=r.id===b,c=d?y.selected:y.default;/* @__PURE__ */
3
+ return o(n,{ref:e=>{u.current[t]=e},role:"tab","aria-label":h?r.label:`${r.label} - ${r.count}`,"aria-selected":d,tabIndex:d?0:-1,onKeyDown:e=>((e,o)=>{let r;"ArrowRight"===e.key&&(r=(o+1)%s.length),"ArrowLeft"===e.key&&(r=(o-1+s.length)%s.length),"Home"===e.key&&(r=0),"End"===e.key&&(r=s.length-1),void 0!==r&&(e.preventDefault(),u.current[r]?.focus())})(e,t),onClick:()=>g(r.id),sx:{alignItems:"center",background:c.background,border:`${m.custom.strokes.containerDivider.width} ${m.custom.strokes.containerDivider.style} ${c.borderColor}`,borderRadius:y.borderRadius,boxShadow:c.boxShadow,color:c.color,display:"inline-flex",fontFamily:m.typography.fontFamily,minHeight:y.minHeight,padding:y.padding,"&:hover":{background:c.hoverBackground}},children:[
4
+ /* @__PURE__ */e(a,{component:"span",variant:"body-bold",color:"inherit",children:r.label}),
5
+ /* @__PURE__ */e(a,{component:"span",variant:"body-bold",color:"inherit",sx:{px:y.separatorPaddingInline},children:"-"}),h?/* @__PURE__ */e(i,{variant:"text",width:y.loadingWidth,sx:{bgcolor:d?l(m.custom.grey[100],y.loadingSelectedOpacity):void 0}}):/* @__PURE__ */e(a,{component:"span",variant:"body-bold",color:"inherit",children:r.count})]},r.id)})})};export{c as CountTabs};
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- import{getThemeLogo as o,isTheme as r,themeLogos as t,themeOptions as m,themes as s}from"./themes/index.js";import{Button as n,Typography as e}from"@mui/material";import{AccordionProduct as i}from"./components/Accordion/ProductAccordion.js";import{AdditionalContentBox as p}from"./components/Box/AdditionalContentBox.js";import{AnchoredPopover as c,HeadlessPopover as a,ThemedPopover as f}from"./components/Popover/AnchoredPopover.js";import{Article as j}from"./components/CMS/ArticleBlock/Article.js";import{ArticlesBox as l}from"./components/CMS/ArticleBlock/ArticlesBox.js";import{Badge as d}from"./components/Badge/Badge.js";import{Banner as B}from"./components/Banner/Banner.js";import{BigPopoverLayout as C}from"./components/Popover/BigPopoverLayout.js";import{BlockItemContainer as u}from"./components/Layout/BlockList/Blocks/Container/BlockItemContainer.js";import{BlockItemInner as h}from"./components/Layout/BlockList/Blocks/Container/BlockItemInner.js";import{BlockListContainer as g}from"./components/Layout/BlockList/BlockListContainer.js";import{BottomSheetDialog as F}from"./components/Dialog/BottomSheetDialog.js";import{BoxStyled as T,SecondaryTabs as k}from"./components/Tabs/SecondaryTabs.js";import{BreadcrumbItem as S}from"./components/Navigation/Breadcrumbs/BreadcrumbItem.js";import{Breadcrumbs as x}from"./components/Navigation/Breadcrumbs/Breadcrumbs.js";import{BreakdownTable as P}from"./components/Chart/BreakdownTable/BreakdownTable.js";import{ButtonTabs as v}from"./components/Tabs/ButtonTabs.js";import{CardImage as I}from"./components/CardImage.js";import{CategoryBox as y}from"./components/Box/CategoryBox.js";import{CheckboxBlock as L}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/CheckboxBlock.js";import{CollectiveTheme as b,CollectiveThemeOptions as N}from"./themes/themes/CollectiveTheme.js";import{ComingSoonBadge as A}from"./components/Badge/ComingSoonBadge.js";import{ComparisonArrow as H}from"./components/ComparisonBlock/ComparisonArrow.js";import{ComparisonBlock as D}from"./components/ComparisonBlock/ComparisonBlock.js";import{ComparisonLabel as R}from"./components/Chart/HistogramComparisonChart/ComparisonLabel.js";import{ConfirmDialog as w}from"./components/Form/FoodsFormBase/ConfirmDialog.js";import{ContextualContentBox as G}from"./components/Box/ContextualContentBox.js";import{CoordinatePopover as U}from"./components/Popover/CoordinatePopover.js";import{CountTabs as M}from"./components/Tabs/CountTabs/CountTabs.js";import{CustomRender as W}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/CustomRender.js";import{CustomToggleButton as E,TertiaryToggleButton as V}from"./components/Button/TertiaryToggleButton.js";import{CustomToggleButtonNodeTitle as O,TertiaryToggleButtonNodeTitle as z}from"./components/Button/TertiaryToggleButtonNodeTitle.js";import{CustomTypography as Q}from"./components/CustomTypography/CustomTypography.js";import{CustomizedAxisTick as q}from"./components/Chart/HistogramComparisonChart/CustomizedAxisTick.js";import{DefaultUserAction as J}from"./components/Navigation/FoodsNavBar/Plugin/DefaultUserAction.js";import{DottedBox as K}from"./components/Box/DottedBox.js";import{DoughnutCard as X}from"./components/Cards/DoughnutCard/DoughnutCard.js";import{DoughnutChart as Y}from"./components/Chart/DoughnutChart/DoughnutChart.js";import{DrawerAction as Z}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/DrawerAction.js";import{EcoScoreCell as $}from"./components/Grid/Cell/EcoScoreCell.js";import{EditHeader as _}from"./components/Layout/BlockList/Headers/EditHeader.js";import{EllipsisItem as oo}from"./components/Pagination/PageItems/EllipsisItem.js";import{EmptyForm as ro}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.js";import{EvolutionChart as to}from"./components/Chart/EvolutionChart/EvolutionChart.js";import{FixedMultiValueFilter as mo}from"./components/Filter/FixedMultiValueFilter.js";import{FoodPilotTheme as so,FoodpilotThemeOptions as no}from"./themes/themes/FoodPilotTheme.js";import{FoodsBadge as eo}from"./components/Badge/FoodsBadge.js";import{FoodsCheckbox as io}from"./components/Checkbox/FoodsCheckbox.js";import{FoodsDeleteButton as po}from"./components/Button/FoodsDeleteButton.js";import{FoodsFormBase as co}from"./components/Form/FoodsFormBase/FoodsFormBase.js";import{FoodsIcon as ao}from"./components/Icons/FoodsIcon.js";import{FoodsIconButton as fo}from"./components/Button/FoodsIconButton.js";import{FoodsIllustrations as jo}from"./components/Icons/FoodsIllustrations.js";import{FoodsNavbar as lo}from"./components/Navigation/FoodsNavBar/FoodsNavbar.js";import{FoodsPagination as Bo}from"./components/Pagination/FoodsPagination.js";import{FoodsPaginationItem as Co}from"./components/Pagination/FoodsPaginationItem.js";import{FoodsRadioList as uo}from"./components/Radio/FoodsRadioList.js";import{FoodsSearch as ho}from"./components/Search/FoodsSearch.js";import{FoodsSelect as go,FoodsSelectServerPagination as Fo}from"./components/Select/FoodsSelect/FoodsSelect.js";import{FoodsTabs as To,SpecialTabs as ko}from"./components/Tabs/FoodsTabs/FoodsTabs.js";import{FoodsTags as So}from"./components/Tags/FoodsTags.js";import{FoodsTextInput as xo}from"./components/Form/FoodsFormFields/FoodsTextInput.js";import{FoodsThemeOptionsProvider as Po,FoodsThemeProvider as vo}from"./themes/FoodsThemeProvider.js";import{FoodsToggleButton as Io}from"./components/Button/FoodsToggleButton.js";import{FoodsTooltip as yo}from"./components/Tooltip/FoodsTooltip.js";import{FoodsTreeview as Lo}from"./components/Treeview/Treeview.js";import{FoodsUserTags as bo}from"./components/Tags/FoodsUserTags.js";import{FormAccordion as No}from"./components/Accordion/FormAccordion.js";import{FormBase as Ao}from"./components/Form/FormBase.js";import{FormBaseContextProvider as Ho,useFormBaseContext as Do}from"./components/Form/FoodsFormBase/FormBaseContext.js";import{FormBox as Ro}from"./components/Form/FormBox.js";import{FormPropertyBox as wo}from"./components/Form/FormPropertyBox.js";import{FormTopBar as Go}from"./components/Form/FoodsFormBase/FormTopBar/FormTopBar.js";import{FormUnit as Uo}from"./components/Form/FormUnit.js";import{GenericAccordion as Mo}from"./components/Accordion/GenericAccordion.js";import{GreyTextCell as Wo}from"./components/Grid/Cell/GreyCell.js";import{HeaderNav as Eo,NavBarLink as Vo,Navbar as Oo,SubMenu as zo,UserNav as Qo}from"./components/Navigation/Navbar.js";import{HelperBox as qo}from"./components/Box/HelperBox.js";import{HeroBlock as Jo}from"./components/CMS/HeroBlock/HeroBlock.js";import{HistogramComparisonChart as Ko}from"./components/Chart/HistogramComparisonChart/HistogramComparisonChart.js";import{HorizontalGaugeChart as Xo}from"./components/Chart/HorizontalGauge/HorizontalGaugeChart.js";import{IconThread as Yo}from"./components/Navigation/IconThread.js";import{IndicatorBlock as Zo}from"./components/CMS/IndicatorBlock/IndicatorBlock.js";import{InfoBox as $o}from"./components/Box/InfoBox.js";import{InfoHeaderWithIllustration as _o}from"./components/Layout/InfoHeaderWithIllustration.js";import{InitHeader as or}from"./components/Layout/BlockList/Headers/InitHeader.js";import{LeftComparisonPart as rr}from"./components/Layout/BlockList/Blocks/Common/LeftComparisonPart.js";import{LightIndicatorBlock as tr}from"./components/CMS/IndicatorBlock/LightIndicatorBlock.js";import{LineGroupBox as mr}from"./components/Box/LineGroupBox.js";import{LinearProgress as sr}from"./components/LinearProgress.js";import{LinkAction as nr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/LinkAction.js";import{ListHeader as er}from"./components/Layout/BlockList/Headers/ListHeader.js";import{MRTGrid as ir}from"./components/Grid/MRTGrid.js";import{MultiValueFilter as pr}from"./components/Filter/MultiValueFilter.js";import{NumberField as cr}from"./components/Field/NumberField.js";import{NumberWithUnit as ar}from"./components/Number/NumberWithUnit.js";import{OptionsPopover as fr}from"./components/Popover/OptionsPopover.js";import{PageItem as jr}from"./components/Pagination/PageItems/PageItem.js";import{PageUpAndDownItem as lr}from"./components/Pagination/PageItems/PageUpAndDownItem.js";import{FoodsPills as dr}from"./components/Input/Pills/Pills.js";import{PointsCell as Br}from"./components/Grid/Cell/PointsCell.js";import{PolymorphicChart as Cr}from"./components/Chart/PolymorphicChart/PolymorphicChart.js";import{PolymorphicChartRenderer as ur}from"./components/Chart/PolymorphicChart/PolymorphicChartRenderer.js";import{PrimaryCheckbox as hr}from"./components/Checkbox/PrimaryCheckbox.js";import{PrimaryDialog as gr}from"./components/Dialog/PrimaryDialog.js";import{Progress as Fr}from"./components/Progress/Progress.js";import{ProgressCard as Tr}from"./components/ProgressCard/ProgressCard.js";import{QuoteBox as kr}from"./components/Box/QuoteBox.js";import{RadioBlock as Sr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.js";import{RadioBoolean as xr}from"./components/Radio/RadioBoolean.js";import{RadioList as Pr}from"./components/Radio/RadioList.js";import{RichTextEditor as vr}from"./components/RichTextEditor/RichTextEditor.js";import{RoundInput as Ir}from"./components/Input/RoundInput.js";import{RoundNumberInput as yr}from"./components/Input/RoundNumberInput.js";import{ScatterPlot as Lr}from"./components/Chart/ScatterPlot/ScatterPlot.js";import{Score as br}from"./components/Number/Score.js";import{ScoreCard as Nr}from"./components/Cards/ScoreCard/ScoreCard.js";import{ScoreCardHeader as Ar}from"./components/Cards/ScoreCard/Header/ScoreCardHeader.js";import{ScoreContainer as Hr}from"./components/Badge/ScoreContainer.js";import{ScoreDistribution as Dr}from"./components/Chart/ScoreDistribution/ScoreDistribution.js";import{ScoreOverviewCard as Rr}from"./components/Cards/ScoreOverviewCard/ScoreOverviewCard.js";import{ScoreSelect as wr}from"./components/Select/ScoreSelect/ScoreSelect.js";import{ScoreValue as Gr}from"./components/Number/ScoreValue.js";import{SearchBox as Ur}from"./components/Input/SearchBox.js";import{SectionBox as Mr}from"./components/Box/SectionBox.js";import{SectionTabs as Wr}from"./components/Tabs/SectionTabs/SectionTabs.js";import{SeeMoreCard as Er}from"./components/Cards/SeeMoreCard/SeeMoreCard.js";import{SelectBlock as Vr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.js";import{SelectionCard as Or}from"./components/Cards/SelectionCard/SelectionCard.js";import{SelectionCardGroup as zr}from"./components/Cards/SelectionCard/SelectionCardGroup.js";import{Separator as Qr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/Separator.js";import{SolidGreyBox as qr}from"./components/Box/SolidGreyBox.js";import{SpecialTab as Jr}from"./components/Tabs/FoodsTabs/FoodsTabTemplate.js";import{SuggestionBlock as Kr}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.js";import{TextArrowList as Xr}from"./components/Text/TextArrowList.js";import{TextField as Yr}from"./components/Field/TextField.js";import{TextTitle as Zr}from"./components/Text/TextTitle.js";import{TextTitleGreyIcon as $r}from"./components/Text/TextTitleGreyIcon.js";import{Textarea as _r}from"./components/Textarea/Textarea.js";import{ToggleSwitch as ot}from"./components/ToggleSwitch/ToggleSwitch.js";import{TopLinkAction as rt}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.js";import{TrajectoryCards as tt}from"./components/Cards/TrajectoryCards/TrajectoryCards.js";import{TrajectoryChart as mt}from"./components/Chart/TrajectoryChart/TrajectoryChart.js";import{TypographyList as st}from"./components/CustomTypography/TypographyList.js";import{UnitConverterPopover as nt}from"./components/Form/UnitConverterPopover.js";import{ValueDisplay as et}from"./components/Layout/BlockList/Blocks/Common/ValueDisplay.js";import{ValueLabel as it}from"./components/Chart/HistogramComparisonChart/ValueLabel.js";import{ValueSwitcher as pt}from"./components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.js";import{WarningBox as ct}from"./components/Box/WarningBox.js";import{WaterfallChart as at}from"./components/Chart/WaterfallChart/WaterfallChart.js";import{WhiteBox as ft}from"./components/Box/WhiteBox.js";import{WhiteGrid as jt}from"./components/Box/WhiteGrid.js";import{WhitePopover as lt}from"./components/Popover/WhitePopover.js";import{WhitePopoverOnIcon as dt}from"./components/Popover/WhitePopoverOnIcon.js";import{WinePilotTheme as Bt,WinepilotThemeOptions as Ct}from"./themes/themes/WinePilotTheme.js";import{allColors as ut,allMainColors as ht,blueTheme as gt,coralTheme as Ft,dataVisualizationColors as Tt,extraColors as kt,greenTheme as St,greyTheme as xt,orangeTheme as Pt,redTheme as vt,shadows as It,yellowTheme as yt}from"./themes/common/colors.js";import{allTypographyVariants as Lt,deprecatedVariants as bt,typographyConfig as Nt}from"./themes/common/MUIComponents/typography.js";import{anyToCheckbox as At,checkboxToAny as Ht}from"./components/Checkbox/helperFunctions.js";import{barChart as Dt,breadcrumb as Rt,custom as wt,deleteButton as Gt,doughnutCard as Ut,formField as Mt,ingredientCard as Wt,mediaUpload as Et,numberWithUnit as Vt,numbers as Ot,scoreCard as zt,scoreDetail as Qt,scoreOverviewCard as qt,scoreValue as Jt,status as Kt,strokes as Xt,tabs as Yt,tags as Zt,toggleSwitch as $t,tooltip as _t}from"./themes/common/custom.js";import{components as om}from"./themes/common/components.js";import{computeSize as rm,iconMapping as tm}from"./components/Icons/iconConfig.js";import{illustationsMapping as mm}from"./components/Icons/illustrationsConfig.js";import{spacing as sm}from"./themes/common/spacing.js";import{useResponsiveBreakpoints as nm}from"./themes/responsive/useResponsiveBreakpoints.js";import{useResponsivePadding as em}from"./themes/responsive/useResponsivePadding.js";export{i as AccordionProduct,p as AdditionalContentBox,c as AnchoredPopover,j as Article,l as ArticlesBox,d as Badge,B as Banner,C as BigPopoverLayout,u as BlockItemContainer,h as BlockItemInner,g as BlockListContainer,F as BottomSheetDialog,T as BoxStyled,S as BreadcrumbItem,x as Breadcrumbs,P as BreakdownTable,n as Button,v as ButtonTabs,I as CardImage,y as CategoryBox,L as CheckboxBlock,b as CollectiveTheme,N as CollectiveThemeOptions,A as ComingSoonBadge,H as ComparisonArrow,D as ComparisonBlock,R as ComparisonLabel,w as ConfirmDialog,G as ContextualContentBox,U as CoordinatePopover,M as CountTabs,W as CustomRender,E as CustomToggleButton,O as CustomToggleButtonNodeTitle,Q as CustomTypography,q as CustomizedAxisTick,J as DefaultUserAction,K as DottedBox,X as DoughnutCard,Y as DoughnutChart,Z as DrawerAction,$ as EcoScoreCell,_ as EditHeader,oo as EllipsisItem,ro as EmptyForm,to as EvolutionChart,mo as FixedMultiValueFilter,so as FoodPilotTheme,no as FoodpilotThemeOptions,eo as FoodsBadge,io as FoodsCheckbox,po as FoodsDeleteButton,co as FoodsFormBase,ao as FoodsIcon,fo as FoodsIconButton,jo as FoodsIllustrations,lo as FoodsNavbar,Bo as FoodsPagination,Co as FoodsPaginationItem,uo as FoodsRadioList,ho as FoodsSearch,go as FoodsSelect,Fo as FoodsSelectServerPagination,To as FoodsTabs,So as FoodsTags,xo as FoodsTextInput,Po as FoodsThemeOptionsProvider,vo as FoodsThemeProvider,Io as FoodsToggleButton,yo as FoodsTooltip,Lo as FoodsTreeview,bo as FoodsUserTags,No as FormAccordion,Ao as FormBase,Ho as FormBaseContextProvider,Ro as FormBox,wo as FormPropertyBox,Go as FormTopBar,Uo as FormUnit,Mo as GenericAccordion,Wo as GreyTextCell,Eo as HeaderNav,a as HeadlessPopover,qo as HelperBox,Jo as HeroBlock,Ko as HistogramComparisonChart,Xo as HorizontalGaugeChart,Yo as IconThread,Zo as IndicatorBlock,$o as InfoBox,_o as InfoHeaderWithIllustration,or as InitHeader,rr as LeftComparisonPart,tr as LightIndicatorBlock,mr as LineGroupBox,sr as LinearProgress,nr as LinkAction,er as ListHeader,ir as MRTGrid,pr as MultiValueFilter,Vo as NavBarLink,Oo as Navbar,cr as NumberField,ar as NumberWithUnit,fr as OptionsPopover,jr as PageItem,lr as PageUpAndDownItem,dr as Pills,Br as PointsCell,Cr as PolymorphicChart,ur as PolymorphicChartRenderer,hr as PrimaryCheckbox,gr as PrimaryDialog,Fr as Progress,Tr as ProgressCard,kr as QuoteBox,Sr as RadioBlock,xr as RadioBoolean,Pr as RadioList,vr as RichTextEditor,Ir as RoundInput,yr as RoundNumberInput,Lr as ScatterPlot,br as Score,Nr as ScoreCard,Ar as ScoreCardHeader,Hr as ScoreContainer,Dr as ScoreDistribution,Rr as ScoreOverviewCard,wr as ScoreSelect,Gr as ScoreValue,Ur as SearchBox,k as SecondaryTabs,Mr as SectionBox,Wr as SectionTabs,Er as SeeMoreCard,Vr as SelectBlock,Or as SelectionCard,zr as SelectionCardGroup,Qr as Separator,qr as SolidGreyBox,Jr as SpecialTab,ko as SpecialTabs,zo as SubMenu,Kr as SuggestionBlock,V as TertiaryToggleButton,z as TertiaryToggleButtonNodeTitle,Xr as TextArrowList,Yr as TextField,Zr as TextTitle,$r as TextTitleGreyIcon,_r as Textarea,f as ThemedPopover,ot as ToggleSwitch,rt as TopLinkAction,tt as TrajectoryCards,mt as TrajectoryChart,e as Typography,st as TypographyList,nt as UnitConverterPopover,Qo as UserNav,et as ValueDisplay,it as ValueLabel,pt as ValueSwitcher,ct as WarningBox,at as WaterfallChart,ft as WhiteBox,jt as WhiteGrid,lt as WhitePopover,dt as WhitePopoverOnIcon,Bt as WinePilotTheme,Ct as WinepilotThemeOptions,ut as allColors,ht as allMainColors,Lt as allTypographyVariants,At as anyToCheckbox,Dt as barChart,gt as blueTheme,Rt as breadcrumb,Ht as checkboxToAny,om as components,rm as computeSize,Ft as coralTheme,wt as custom,Tt as dataVisualizationColors,Gt as deleteButton,bt as deprecatedVariants,Ut as doughnutCard,kt as extraColors,Mt as formField,o as getThemeLogo,St as greenTheme,xt as greyTheme,tm as iconMapping,mm as illustationsMapping,Wt as ingredientCard,r as isTheme,Et as mediaUpload,Vt as numberWithUnit,Ot as numbers,Pt as orangeTheme,vt as redTheme,zt as scoreCard,Qt as scoreDetail,qt as scoreOverviewCard,Jt as scoreValue,It as shadows,sm as spacing,Kt as status,Xt as strokes,Yt as tabs,Zt as tags,t as themeLogos,m as themeOptions,s as themes,$t as toggleSwitch,_t as tooltip,Nt as typographyConfig,Do as useFormBaseContext,nm as useResponsiveBreakpoints,em as useResponsivePadding,yt as yellowTheme};
1
+ import{getThemeLogo as o,isTheme as r,themeLogos as t,themeOptions as m,themes as s}from"./themes/index.js";import{Button as n,Typography as e}from"@mui/material";import{AccordionProduct as i}from"./components/Accordion/ProductAccordion.js";import{AdditionalContentBox as p}from"./components/Box/AdditionalContentBox.js";import{AnchoredPopover as c,HeadlessPopover as a,ThemedPopover as f}from"./components/Popover/AnchoredPopover.js";import{Article as j}from"./components/CMS/ArticleBlock/Article.js";import{ArticlesBox as l}from"./components/CMS/ArticleBlock/ArticlesBox.js";import{Badge as d}from"./components/Badge/Badge.js";import{Banner as B}from"./components/Banner/Banner.js";import{BigPopoverLayout as C}from"./components/Popover/BigPopoverLayout.js";import{BlockItemContainer as u}from"./components/Layout/BlockList/Blocks/Container/BlockItemContainer.js";import{BlockItemInner as h}from"./components/Layout/BlockList/Blocks/Container/BlockItemInner.js";import{BlockListContainer as g}from"./components/Layout/BlockList/BlockListContainer.js";import{BottomSheetDialog as F}from"./components/Dialog/BottomSheetDialog.js";import{BoxStyled as T,SecondaryTabs as k}from"./components/Tabs/SecondaryTabs.js";import{BreadcrumbItem as S}from"./components/Navigation/Breadcrumbs/BreadcrumbItem.js";import{Breadcrumbs as x}from"./components/Navigation/Breadcrumbs/Breadcrumbs.js";import{BreakdownTable as P}from"./components/Chart/BreakdownTable/BreakdownTable.js";import{ButtonTabs as v}from"./components/Tabs/ButtonTabs.js";import{CardImage as I}from"./components/CardImage.js";import{CategoryBox as y}from"./components/Box/CategoryBox.js";import{CheckboxBlock as L}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/CheckboxBlock.js";import{CollectiveTheme as b,CollectiveThemeOptions as N}from"./themes/themes/CollectiveTheme.js";import{ComingSoonBadge as A}from"./components/Badge/ComingSoonBadge.js";import{ComparisonArrow as H}from"./components/ComparisonBlock/ComparisonArrow.js";import{ComparisonBlock as D}from"./components/ComparisonBlock/ComparisonBlock.js";import{ComparisonLabel as R}from"./components/Chart/HistogramComparisonChart/ComparisonLabel.js";import{ConfirmDialog as w}from"./components/Form/FoodsFormBase/ConfirmDialog.js";import{ContextualContentBox as G}from"./components/Box/ContextualContentBox.js";import{CoordinatePopover as U}from"./components/Popover/CoordinatePopover.js";import{CountTabs as M}from"./components/Tabs/CountTabs/CountTabs.js";import{CustomRender as W}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/CustomRender.js";import{CustomToggleButton as E,TertiaryToggleButton as V}from"./components/Button/TertiaryToggleButton.js";import{CustomToggleButtonNodeTitle as O,TertiaryToggleButtonNodeTitle as z}from"./components/Button/TertiaryToggleButtonNodeTitle.js";import{CustomTypography as Q}from"./components/CustomTypography/CustomTypography.js";import{CustomizedAxisTick as q}from"./components/Chart/HistogramComparisonChart/CustomizedAxisTick.js";import{DefaultUserAction as J}from"./components/Navigation/FoodsNavBar/Plugin/DefaultUserAction.js";import{DottedBox as K}from"./components/Box/DottedBox.js";import{DoughnutCard as X}from"./components/Cards/DoughnutCard/DoughnutCard.js";import{DoughnutChart as Y}from"./components/Chart/DoughnutChart/DoughnutChart.js";import{DrawerAction as Z}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/DrawerAction.js";import{EcoScoreCell as $}from"./components/Grid/Cell/EcoScoreCell.js";import{EditHeader as _}from"./components/Layout/BlockList/Headers/EditHeader.js";import{EllipsisItem as oo}from"./components/Pagination/PageItems/EllipsisItem.js";import{EmptyForm as ro}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.js";import{EvolutionChart as to}from"./components/Chart/EvolutionChart/EvolutionChart.js";import{FixedMultiValueFilter as mo}from"./components/Filter/FixedMultiValueFilter.js";import{FoodPilotTheme as so,FoodpilotThemeOptions as no}from"./themes/themes/FoodPilotTheme.js";import{FoodsBadge as eo}from"./components/Badge/FoodsBadge.js";import{FoodsCheckbox as io}from"./components/Checkbox/FoodsCheckbox.js";import{FoodsDeleteButton as po}from"./components/Button/FoodsDeleteButton.js";import{FoodsFormBase as co}from"./components/Form/FoodsFormBase/FoodsFormBase.js";import{FoodsIcon as ao}from"./components/Icons/FoodsIcon.js";import{FoodsIconButton as fo}from"./components/Button/FoodsIconButton.js";import{FoodsIllustrations as jo}from"./components/Icons/FoodsIllustrations.js";import{FoodsNavbar as lo}from"./components/Navigation/FoodsNavBar/FoodsNavbar.js";import{FoodsPagination as Bo}from"./components/Pagination/FoodsPagination.js";import{FoodsPaginationItem as Co}from"./components/Pagination/FoodsPaginationItem.js";import{FoodsRadioList as uo}from"./components/Radio/FoodsRadioList.js";import{FoodsSearch as ho}from"./components/Search/FoodsSearch.js";import{FoodsSelect as go,FoodsSelectServerPagination as Fo}from"./components/Select/FoodsSelect/FoodsSelect.js";import{FoodsTabs as To,SpecialTabs as ko}from"./components/Tabs/FoodsTabs/FoodsTabs.js";import{FoodsTags as So}from"./components/Tags/FoodsTags.js";import{FoodsTextInput as xo}from"./components/Form/FoodsFormFields/FoodsTextInput.js";import{FoodsThemeOptionsProvider as Po,FoodsThemeProvider as vo}from"./themes/FoodsThemeProvider.js";import{FoodsToggleButton as Io}from"./components/Button/FoodsToggleButton.js";import{FoodsTooltip as yo}from"./components/Tooltip/FoodsTooltip.js";import{FoodsTreeview as Lo}from"./components/Treeview/Treeview.js";import{FoodsUserTags as bo}from"./components/Tags/FoodsUserTags.js";import{FormAccordion as No}from"./components/Accordion/FormAccordion.js";import{FormBase as Ao}from"./components/Form/FormBase.js";import{FormBaseContextProvider as Ho,useFormBaseContext as Do}from"./components/Form/FoodsFormBase/FormBaseContext.js";import{FormBox as Ro}from"./components/Form/FormBox.js";import{FormPropertyBox as wo}from"./components/Form/FormPropertyBox.js";import{FormTopBar as Go}from"./components/Form/FoodsFormBase/FormTopBar/FormTopBar.js";import{FormUnit as Uo}from"./components/Form/FormUnit.js";import{GenericAccordion as Mo}from"./components/Accordion/GenericAccordion.js";import{GreyTextCell as Wo}from"./components/Grid/Cell/GreyCell.js";import{HeaderNav as Eo,NavBarLink as Vo,Navbar as Oo,SubMenu as zo,UserNav as Qo}from"./components/Navigation/Navbar.js";import{HelperBox as qo}from"./components/Box/HelperBox.js";import{HeroBlock as Jo}from"./components/CMS/HeroBlock/HeroBlock.js";import{HistogramComparisonChart as Ko}from"./components/Chart/HistogramComparisonChart/HistogramComparisonChart.js";import{HorizontalGaugeChart as Xo}from"./components/Chart/HorizontalGauge/HorizontalGaugeChart.js";import{IconThread as Yo}from"./components/Navigation/IconThread.js";import{IndicatorBlock as Zo}from"./components/CMS/IndicatorBlock/IndicatorBlock.js";import{InfoBox as $o}from"./components/Box/InfoBox.js";import{InfoHeaderWithIllustration as _o}from"./components/Layout/InfoHeaderWithIllustration.js";import{InitHeader as or}from"./components/Layout/BlockList/Headers/InitHeader.js";import{LeftComparisonPart as rr}from"./components/Layout/BlockList/Blocks/Common/LeftComparisonPart.js";import{LightIndicatorBlock as tr}from"./components/CMS/IndicatorBlock/LightIndicatorBlock.js";import{LineGroupBox as mr}from"./components/Box/LineGroupBox.js";import{LinearProgress as sr}from"./components/LinearProgress.js";import{LinkAction as nr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/LinkAction.js";import{ListHeader as er}from"./components/Layout/BlockList/Headers/ListHeader.js";import{MRTGrid as ir}from"./components/Grid/MRTGrid.js";import{MultiValueFilter as pr}from"./components/Filter/MultiValueFilter.js";import{NumberField as cr}from"./components/Field/NumberField.js";import{NumberWithUnit as ar}from"./components/Number/NumberWithUnit.js";import{OptionsPopover as fr}from"./components/Popover/OptionsPopover.js";import{PageItem as jr}from"./components/Pagination/PageItems/PageItem.js";import{PageUpAndDownItem as lr}from"./components/Pagination/PageItems/PageUpAndDownItem.js";import{FoodsPills as dr}from"./components/Input/Pills/Pills.js";import{PointsCell as Br}from"./components/Grid/Cell/PointsCell.js";import{PolymorphicChart as Cr}from"./components/Chart/PolymorphicChart/PolymorphicChart.js";import{PolymorphicChartRenderer as ur}from"./components/Chart/PolymorphicChart/PolymorphicChartRenderer.js";import{PrimaryCheckbox as hr}from"./components/Checkbox/PrimaryCheckbox.js";import{PrimaryDialog as gr}from"./components/Dialog/PrimaryDialog.js";import{Progress as Fr}from"./components/Progress/Progress.js";import{ProgressCard as Tr}from"./components/ProgressCard/ProgressCard.js";import{QuoteBox as kr}from"./components/Box/QuoteBox.js";import{RadioBlock as Sr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.js";import{RadioBoolean as xr}from"./components/Radio/RadioBoolean.js";import{RadioList as Pr}from"./components/Radio/RadioList.js";import{RichTextEditor as vr}from"./components/RichTextEditor/RichTextEditor.js";import{RoundInput as Ir}from"./components/Input/RoundInput.js";import{RoundNumberInput as yr}from"./components/Input/RoundNumberInput.js";import{ScatterPlot as Lr}from"./components/Chart/ScatterPlot/ScatterPlot.js";import{Score as br}from"./components/Number/Score.js";import{ScoreCard as Nr}from"./components/Cards/ScoreCard/ScoreCard.js";import{ScoreCardHeader as Ar}from"./components/Cards/ScoreCard/Header/ScoreCardHeader.js";import{ScoreContainer as Hr}from"./components/Badge/ScoreContainer.js";import{ScoreDistribution as Dr}from"./components/Chart/ScoreDistribution/ScoreDistribution.js";import{ScoreOverviewCard as Rr}from"./components/Cards/ScoreOverviewCard/ScoreOverviewCard.js";import{ScoreSelect as wr}from"./components/Select/ScoreSelect/ScoreSelect.js";import{ScoreValue as Gr}from"./components/Number/ScoreValue.js";import{SearchBox as Ur}from"./components/Input/SearchBox.js";import{SectionBox as Mr}from"./components/Box/SectionBox.js";import{SectionTabs as Wr}from"./components/Tabs/SectionTabs/SectionTabs.js";import{SeeMoreCard as Er}from"./components/Cards/SeeMoreCard/SeeMoreCard.js";import{SelectBlock as Vr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.js";import{SelectionCard as Or}from"./components/Cards/SelectionCard/SelectionCard.js";import{SelectionCardGroup as zr}from"./components/Cards/SelectionCard/SelectionCardGroup.js";import{Separator as Qr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/Separator.js";import{SolidGreyBox as qr}from"./components/Box/SolidGreyBox.js";import{SpecialTab as Jr}from"./components/Tabs/FoodsTabs/FoodsTabTemplate.js";import{SuggestionBlock as Kr}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.js";import{TextArrowList as Xr}from"./components/Text/TextArrowList.js";import{TextField as Yr}from"./components/Field/TextField.js";import{TextTitle as Zr}from"./components/Text/TextTitle.js";import{TextTitleGreyIcon as $r}from"./components/Text/TextTitleGreyIcon.js";import{Textarea as _r}from"./components/Textarea/Textarea.js";import{ToggleSwitch as ot}from"./components/ToggleSwitch/ToggleSwitch.js";import{TopLinkAction as rt}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.js";import{TrajectoryCards as tt}from"./components/Cards/TrajectoryCards/TrajectoryCards.js";import{TrajectoryChart as mt}from"./components/Chart/TrajectoryChart/TrajectoryChart.js";import{TypographyList as st}from"./components/CustomTypography/TypographyList.js";import{UnitConverterPopover as nt}from"./components/Form/UnitConverterPopover.js";import{ValueDisplay as et}from"./components/Layout/BlockList/Blocks/Common/ValueDisplay.js";import{ValueLabel as it}from"./components/Chart/HistogramComparisonChart/ValueLabel.js";import{ValueSwitcher as pt}from"./components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.js";import{WarningBox as ct}from"./components/Box/WarningBox.js";import{WaterfallChart as at}from"./components/Chart/WaterfallChart/WaterfallChart.js";import{WhiteBox as ft}from"./components/Box/WhiteBox.js";import{WhiteGrid as jt}from"./components/Box/WhiteGrid.js";import{WhitePopover as lt}from"./components/Popover/WhitePopover.js";import{WhitePopoverOnIcon as dt}from"./components/Popover/WhitePopoverOnIcon.js";import{WinePilotTheme as Bt,WinepilotThemeOptions as Ct}from"./themes/themes/WinePilotTheme.js";import{allColors as ut,allMainColors as ht,blueTheme as gt,coralTheme as Ft,dataVisualizationColors as Tt,extraColors as kt,greenTheme as St,greyTheme as xt,orangeTheme as Pt,redTheme as vt,shadows as It,yellowTheme as yt}from"./themes/common/colors.js";import{allTypographyVariants as Lt,deprecatedVariants as bt,typographyConfig as Nt}from"./themes/common/MUIComponents/typography.js";import{anyToCheckbox as At,checkboxToAny as Ht}from"./components/Checkbox/helperFunctions.js";import{barChart as Dt,breadcrumb as Rt,countTabs as wt,custom as Gt,deleteButton as Ut,doughnutCard as Mt,formField as Wt,ingredientCard as Et,mediaUpload as Vt,numberWithUnit as Ot,numbers as zt,scoreCard as Qt,scoreDetail as qt,scoreOverviewCard as Jt,scoreValue as Kt,status as Xt,strokes as Yt,tabs as Zt,tags as $t,toggleSwitch as _t,tooltip as om}from"./themes/common/custom.js";import{components as rm}from"./themes/common/components.js";import{computeSize as tm,iconMapping as mm}from"./components/Icons/iconConfig.js";import{illustationsMapping as sm}from"./components/Icons/illustrationsConfig.js";import{spacing as nm}from"./themes/common/spacing.js";import{useResponsiveBreakpoints as em}from"./themes/responsive/useResponsiveBreakpoints.js";import{useResponsivePadding as im}from"./themes/responsive/useResponsivePadding.js";export{i as AccordionProduct,p as AdditionalContentBox,c as AnchoredPopover,j as Article,l as ArticlesBox,d as Badge,B as Banner,C as BigPopoverLayout,u as BlockItemContainer,h as BlockItemInner,g as BlockListContainer,F as BottomSheetDialog,T as BoxStyled,S as BreadcrumbItem,x as Breadcrumbs,P as BreakdownTable,n as Button,v as ButtonTabs,I as CardImage,y as CategoryBox,L as CheckboxBlock,b as CollectiveTheme,N as CollectiveThemeOptions,A as ComingSoonBadge,H as ComparisonArrow,D as ComparisonBlock,R as ComparisonLabel,w as ConfirmDialog,G as ContextualContentBox,U as CoordinatePopover,M as CountTabs,W as CustomRender,E as CustomToggleButton,O as CustomToggleButtonNodeTitle,Q as CustomTypography,q as CustomizedAxisTick,J as DefaultUserAction,K as DottedBox,X as DoughnutCard,Y as DoughnutChart,Z as DrawerAction,$ as EcoScoreCell,_ as EditHeader,oo as EllipsisItem,ro as EmptyForm,to as EvolutionChart,mo as FixedMultiValueFilter,so as FoodPilotTheme,no as FoodpilotThemeOptions,eo as FoodsBadge,io as FoodsCheckbox,po as FoodsDeleteButton,co as FoodsFormBase,ao as FoodsIcon,fo as FoodsIconButton,jo as FoodsIllustrations,lo as FoodsNavbar,Bo as FoodsPagination,Co as FoodsPaginationItem,uo as FoodsRadioList,ho as FoodsSearch,go as FoodsSelect,Fo as FoodsSelectServerPagination,To as FoodsTabs,So as FoodsTags,xo as FoodsTextInput,Po as FoodsThemeOptionsProvider,vo as FoodsThemeProvider,Io as FoodsToggleButton,yo as FoodsTooltip,Lo as FoodsTreeview,bo as FoodsUserTags,No as FormAccordion,Ao as FormBase,Ho as FormBaseContextProvider,Ro as FormBox,wo as FormPropertyBox,Go as FormTopBar,Uo as FormUnit,Mo as GenericAccordion,Wo as GreyTextCell,Eo as HeaderNav,a as HeadlessPopover,qo as HelperBox,Jo as HeroBlock,Ko as HistogramComparisonChart,Xo as HorizontalGaugeChart,Yo as IconThread,Zo as IndicatorBlock,$o as InfoBox,_o as InfoHeaderWithIllustration,or as InitHeader,rr as LeftComparisonPart,tr as LightIndicatorBlock,mr as LineGroupBox,sr as LinearProgress,nr as LinkAction,er as ListHeader,ir as MRTGrid,pr as MultiValueFilter,Vo as NavBarLink,Oo as Navbar,cr as NumberField,ar as NumberWithUnit,fr as OptionsPopover,jr as PageItem,lr as PageUpAndDownItem,dr as Pills,Br as PointsCell,Cr as PolymorphicChart,ur as PolymorphicChartRenderer,hr as PrimaryCheckbox,gr as PrimaryDialog,Fr as Progress,Tr as ProgressCard,kr as QuoteBox,Sr as RadioBlock,xr as RadioBoolean,Pr as RadioList,vr as RichTextEditor,Ir as RoundInput,yr as RoundNumberInput,Lr as ScatterPlot,br as Score,Nr as ScoreCard,Ar as ScoreCardHeader,Hr as ScoreContainer,Dr as ScoreDistribution,Rr as ScoreOverviewCard,wr as ScoreSelect,Gr as ScoreValue,Ur as SearchBox,k as SecondaryTabs,Mr as SectionBox,Wr as SectionTabs,Er as SeeMoreCard,Vr as SelectBlock,Or as SelectionCard,zr as SelectionCardGroup,Qr as Separator,qr as SolidGreyBox,Jr as SpecialTab,ko as SpecialTabs,zo as SubMenu,Kr as SuggestionBlock,V as TertiaryToggleButton,z as TertiaryToggleButtonNodeTitle,Xr as TextArrowList,Yr as TextField,Zr as TextTitle,$r as TextTitleGreyIcon,_r as Textarea,f as ThemedPopover,ot as ToggleSwitch,rt as TopLinkAction,tt as TrajectoryCards,mt as TrajectoryChart,e as Typography,st as TypographyList,nt as UnitConverterPopover,Qo as UserNav,et as ValueDisplay,it as ValueLabel,pt as ValueSwitcher,ct as WarningBox,at as WaterfallChart,ft as WhiteBox,jt as WhiteGrid,lt as WhitePopover,dt as WhitePopoverOnIcon,Bt as WinePilotTheme,Ct as WinepilotThemeOptions,ut as allColors,ht as allMainColors,Lt as allTypographyVariants,At as anyToCheckbox,Dt as barChart,gt as blueTheme,Rt as breadcrumb,Ht as checkboxToAny,rm as components,tm as computeSize,Ft as coralTheme,wt as countTabs,Gt as custom,Tt as dataVisualizationColors,Ut as deleteButton,bt as deprecatedVariants,Mt as doughnutCard,kt as extraColors,Wt as formField,o as getThemeLogo,St as greenTheme,xt as greyTheme,mm as iconMapping,sm as illustationsMapping,Et as ingredientCard,r as isTheme,Vt as mediaUpload,Ot as numberWithUnit,zt as numbers,Pt as orangeTheme,vt as redTheme,Qt as scoreCard,qt as scoreDetail,Jt as scoreOverviewCard,Kt as scoreValue,It as shadows,nm as spacing,Xt as status,Yt as strokes,Zt as tabs,$t as tags,t as themeLogos,m as themeOptions,s as themes,_t as toggleSwitch,om as tooltip,Nt as typographyConfig,Do as useFormBaseContext,em as useResponsiveBreakpoints,im as useResponsivePadding,yt as yellowTheme};
@@ -230,6 +230,33 @@ export declare const tags: {
230
230
  readonly height: "26px";
231
231
  };
232
232
  };
233
+ /**
234
+ * Shared count-tab contract.
235
+ * Figma provenance: Packaging count filters `12885:70126` and `13407:62429`.
236
+ */
237
+ export declare const countTabs: {
238
+ readonly gap: "8px";
239
+ readonly minHeight: "36px";
240
+ readonly padding: "8px 12px";
241
+ readonly borderRadius: "8px";
242
+ readonly separatorPaddingInline: "4px";
243
+ readonly loadingWidth: 24;
244
+ readonly loadingSelectedOpacity: 0.3;
245
+ readonly default: {
246
+ readonly background: "linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)";
247
+ readonly hoverBackground: "linear-gradient(180deg, #FFFFFF 0%, #EFEDEC 154.5%)";
248
+ readonly borderColor: "#E7E6E4";
249
+ readonly boxShadow: "0px 2px 8px 0px #2A2B270A";
250
+ readonly color: "#393A36";
251
+ };
252
+ readonly selected: {
253
+ readonly background: "linear-gradient(180deg, #484945 0%, #2A2B27 100%)";
254
+ readonly hoverBackground: "#393A36";
255
+ readonly borderColor: "#393A36";
256
+ readonly boxShadow: "0px 4px 8px 0px #2A2B2714";
257
+ readonly color: "#FFFFFF";
258
+ };
259
+ };
233
260
  /**
234
261
  * Shared navigation-tab geometry.
235
262
  * Figma provenance: Product Information primary tabs `13314:83199` and
@@ -443,6 +470,7 @@ type CustomThemeKeys = {
443
470
  barChart: typeof barChart;
444
471
  mediaUpload: typeof mediaUpload;
445
472
  tags: typeof tags;
473
+ countTabs: typeof countTabs;
446
474
  tabs: typeof tabs;
447
475
  scoreDetail: typeof scoreDetail;
448
476
  toggleSwitch: typeof toggleSwitch;
@@ -1 +1 @@
1
- import e from"i18next";import{greyTheme as i,shadows as r,redTheme as t,allMainColors as o,allColors as a,extraColors as d,dataVisualizationColors as n,coralTheme as p,blueTheme as h,yellowTheme as x,orangeTheme as c,greenTheme as l}from"./colors.js";const s={containerDivider:{color:i[600],style:"solid",width:"1px"}},g={width:"300px"},u={green:{surface:"#F2FFF9"}},m={surface:"#025155",emptyGuidanceForeground:"#EDF9FA",loading:{opacity:.7,transition:"opacity 120ms ease-out"}},b={width:"300px",heights:{inactive:"215px",selected:"231px"},icon:{containerSize:"48px",glyphSize:{width:40,height:40}},carouselControl:{inlineEndOffset:"-5px"},details:{chartHeight:"481px"}},w={stroke:{...s.containerDivider,color:"#E5E3E0"}},y={emptyIndicator:{size:"44px",iconSize:{width:26,height:26}},inline:{width:"70px"}},k={emptyIndicator:{micro:{size:"20px",iconSize:{width:11,height:11}},small:{size:"24px",iconSize:{width:13,height:13}},inter:{size:"30px",iconSize:{width:20,height:20}},big:{size:"38px",iconSize:{width:28,height:28}}},unitOffset:{compact:"-1px",regular:"-2px"}},v={compact:{width:"100px",optionWidth:"130px"}},z={zeroValueWidth:"1px"},S={borderRadius:"8px",loadingIndicatorSize:28,errorMaxWidth:"260px",default:{size:120,stroke:s.containerDivider,emptyCopy:{typographyVariant:"body-regular",lineHeight:1.3}},compact:{size:110,contentInset:"6px",stroke:{...s.containerDivider,style:"dashed"},boxShadow:r.grey,emptyCopy:{width:"76px",typographyVariant:"small-regular"}},thumbnail:{size:70,contentInset:"4px",stroke:s.containerDivider,boxShadow:r.grey}},f={display:{height:"26px"}},B={primary:{height:"60px"},secondary:{height:"60px"}},$={summaryWidth:"250px",barWidth:"250px",lifecycleBreakdownWidth:"364px",subscoreBreakdownWidth:"346px",impactBreakdownWidth:"318px",impactZeroBreakdownWidth:"292px",impactBenefitBreakdownWidth:"551px"},C={handleBorderRadius:"50%",legacyTrackBackground:"rgba(0,0,0,.25)",sizes:{default:{width:"52px",height:"28px",thumbSize:"20px",thumbInset:"4px",thumbTravel:"24px",trackBorderRadius:"16px"},medium:{width:"44px",height:"24px",thumbSize:"16px",thumbInset:"4px",thumbTravel:"20px",trackBorderRadius:"14px"},small:{width:"36px",height:"20px",thumbSize:"12px",thumbInset:"4px",thumbTravel:"16px",trackBorderRadius:"10px"}},status:{uncheckedColor:i[1400],uncheckedIconColor:i[2e3],handleBackground:`linear-gradient(180deg, ${i[100]} 0%, ${i[300]} 100%)`,iconSize:{width:14,height:14},trackBorderRadius:"20px"}},D={size:"40px",iconSize:{width:20,height:20},borderRadius:"44px",default:{background:`linear-gradient(180deg, ${i[100]} 0%, ${i[300]} 154.5%)`,borderColor:t[500],color:t[500]},hovered:{background:t[400],borderColor:t[500],color:i[100]},pressed:{background:t[600],borderColor:t[600],color:i[100]}},W=`inset 0 0 0 ${s.containerDivider.width} ${s.containerDivider.color}`,R={gap:"4px",separatorIconSize:{width:16,height:16},pageLink:{height:"26px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",maxWidth:"226px",stroke:{default:W,hover:`inset 0 0 0 ${s.containerDivider.width} ${i[2800]}`},collapsed:{width:"24px",height:"16px",paddingInline:"4px",borderRadius:"4px"}},overflowMenu:{offset:"4px",padding:"16px",gap:"8px",borderRadius:"12px",boxShadow:`${W}, ${r.popover}`}},I=`${s.containerDivider.width} ${s.containerDivider.style} ${i[500]}`,F=`${s.containerDivider.width} ${s.containerDivider.style} ${s.containerDivider.color}`,E={contentAlignment:"center",default:{maxCharacters:100,width:"202px",maxWidth:"unset",padding:"12px 16px 12px 16px",borderRadius:"0.5rem",border:I,backgroundColor:i[100],boxShadow:`0px 4px 20px 0px ${i[500]}`,color:i[2800],margin:"8px",typographyVariant:"body-medium",arrow:{color:i[100],border:I}},simple:{width:"300px",maxWidth:"300px",contentMinHeight:"53px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",border:F,backgroundColor:i[100],boxShadow:r.popover,color:i[2500],margin:"8px",typographyVariant:"body-medium",arrow:{width:"16px",height:"8px",color:i[100],border:F}}},V={grey:i,red:t,green:l,orange:c,yellow:x,blue:h,coral:p,shadows:r,dataviz:{colors:n,extra:d,colorsWithExtra:a,onlyMainFromAll:o},doughnutCard:g,strokes:s,status:u,scoreCard:m,scoreOverviewCard:b,ingredientCard:w,scoreValue:y,numberWithUnit:k,formField:v,barChart:z,mediaUpload:S,tags:f,tabs:B,scoreDetail:$,toggleSwitch:C,deleteButton:D,breadcrumb:R,tooltip:E,searchBox:{borderRadius:"24px",border:e=>"1px solid "+e.custom.grey[500],background:"white",boxShadow:e=>"0px 2px 8px 0px "+e.custom.grey[500]},rowMenuElement:{marginLeft:"12px",paddingRight:"8px",fontSize:"12px",fontWeight:"600",lineHeight:"20px"}},M={valueFormatterFn:(i,r=void 0)=>{const t=Number(i);return Number.isNaN(t)?"":r?t.toLocaleString(e.language,{maximumFractionDigits:r}):t.toLocaleString(e.language)}};export{z as barChart,R as breadcrumb,V as custom,D as deleteButton,g as doughnutCard,v as formField,w as ingredientCard,S as mediaUpload,k as numberWithUnit,M as numbers,m as scoreCard,$ as scoreDetail,b as scoreOverviewCard,y as scoreValue,u as status,s as strokes,B as tabs,f as tags,C as toggleSwitch,E as tooltip};
1
+ import e from"i18next";import{greyTheme as i,shadows as r,redTheme as o,allMainColors as t,allColors as d,extraColors as a,dataVisualizationColors as n,coralTheme as p,blueTheme as h,yellowTheme as x,orangeTheme as c,greenTheme as l}from"./colors.js";const g={containerDivider:{color:i[600],style:"solid",width:"1px"}},s={width:"300px"},u={green:{surface:"#F2FFF9"}},m={surface:"#025155",emptyGuidanceForeground:"#EDF9FA",loading:{opacity:.7,transition:"opacity 120ms ease-out"}},b={width:"300px",heights:{inactive:"215px",selected:"231px"},icon:{containerSize:"48px",glyphSize:{width:40,height:40}},carouselControl:{inlineEndOffset:"-5px"},details:{chartHeight:"481px"}},w={stroke:{...g.containerDivider,color:"#E5E3E0"}},y={emptyIndicator:{size:"44px",iconSize:{width:26,height:26}},inline:{width:"70px"}},k={emptyIndicator:{micro:{size:"20px",iconSize:{width:11,height:11}},small:{size:"24px",iconSize:{width:13,height:13}},inter:{size:"30px",iconSize:{width:20,height:20}},big:{size:"38px",iconSize:{width:28,height:28}}},unitOffset:{compact:"-1px",regular:"-2px"}},v={compact:{width:"100px",optionWidth:"130px"}},z={zeroValueWidth:"1px"},S={borderRadius:"8px",loadingIndicatorSize:28,errorMaxWidth:"260px",default:{size:120,stroke:g.containerDivider,emptyCopy:{typographyVariant:"body-regular",lineHeight:1.3}},compact:{size:110,contentInset:"6px",stroke:{...g.containerDivider,style:"dashed"},boxShadow:r.grey,emptyCopy:{width:"76px",typographyVariant:"small-regular"}},thumbnail:{size:70,contentInset:"4px",stroke:g.containerDivider,boxShadow:r.grey}},f={display:{height:"26px"}},$={gap:"8px",minHeight:"36px",padding:"8px 12px",borderRadius:"8px",separatorPaddingInline:"4px",loadingWidth:24,loadingSelectedOpacity:.3,default:{background:`linear-gradient(180deg, ${i[100]} 0%, ${i[300]} 154.5%)`,hoverBackground:`linear-gradient(180deg, ${i[100]} 0%, ${i[400]} 154.5%)`,borderColor:i[500],boxShadow:r.grey,color:i[2800]},selected:{background:`linear-gradient(180deg, ${i[2600]} 0%, ${i[3e3]} 100%)`,hoverBackground:i[2800],borderColor:i[2800],boxShadow:r.hard,color:i[100]}},B={primary:{height:"60px"},secondary:{height:"60px"}},C={summaryWidth:"250px",barWidth:"250px",lifecycleBreakdownWidth:"364px",subscoreBreakdownWidth:"346px",impactBreakdownWidth:"318px",impactZeroBreakdownWidth:"292px",impactBenefitBreakdownWidth:"551px"},W={handleBorderRadius:"50%",legacyTrackBackground:"rgba(0,0,0,.25)",sizes:{default:{width:"52px",height:"28px",thumbSize:"20px",thumbInset:"4px",thumbTravel:"24px",trackBorderRadius:"16px"},medium:{width:"44px",height:"24px",thumbSize:"16px",thumbInset:"4px",thumbTravel:"20px",trackBorderRadius:"14px"},small:{width:"36px",height:"20px",thumbSize:"12px",thumbInset:"4px",thumbTravel:"16px",trackBorderRadius:"10px"}},status:{uncheckedColor:i[1400],uncheckedIconColor:i[2e3],handleBackground:`linear-gradient(180deg, ${i[100]} 0%, ${i[300]} 100%)`,iconSize:{width:14,height:14},trackBorderRadius:"20px"}},D={size:"40px",iconSize:{width:20,height:20},borderRadius:"44px",default:{background:`linear-gradient(180deg, ${i[100]} 0%, ${i[300]} 154.5%)`,borderColor:o[500],color:o[500]},hovered:{background:o[400],borderColor:o[500],color:i[100]},pressed:{background:o[600],borderColor:o[600],color:i[100]}},R=`inset 0 0 0 ${g.containerDivider.width} ${g.containerDivider.color}`,I={gap:"4px",separatorIconSize:{width:16,height:16},pageLink:{height:"26px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",maxWidth:"226px",stroke:{default:R,hover:`inset 0 0 0 ${g.containerDivider.width} ${i[2800]}`},collapsed:{width:"24px",height:"16px",paddingInline:"4px",borderRadius:"4px"}},overflowMenu:{offset:"4px",padding:"16px",gap:"8px",borderRadius:"12px",boxShadow:`${R}, ${r.popover}`}},F=`${g.containerDivider.width} ${g.containerDivider.style} ${i[500]}`,E=`${g.containerDivider.width} ${g.containerDivider.style} ${g.containerDivider.color}`,V={contentAlignment:"center",default:{maxCharacters:100,width:"202px",maxWidth:"unset",padding:"12px 16px 12px 16px",borderRadius:"0.5rem",border:F,backgroundColor:i[100],boxShadow:`0px 4px 20px 0px ${i[500]}`,color:i[2800],margin:"8px",typographyVariant:"body-medium",arrow:{color:i[100],border:F}},simple:{width:"300px",maxWidth:"300px",contentMinHeight:"53px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",border:E,backgroundColor:i[100],boxShadow:r.popover,color:i[2500],margin:"8px",typographyVariant:"body-medium",arrow:{width:"16px",height:"8px",color:i[100],border:E}}},H={grey:i,red:o,green:l,orange:c,yellow:x,blue:h,coral:p,shadows:r,dataviz:{colors:n,extra:a,colorsWithExtra:d,onlyMainFromAll:t},doughnutCard:s,strokes:g,status:u,scoreCard:m,scoreOverviewCard:b,ingredientCard:w,scoreValue:y,numberWithUnit:k,formField:v,barChart:z,mediaUpload:S,tags:f,countTabs:$,tabs:B,scoreDetail:C,toggleSwitch:W,deleteButton:D,breadcrumb:I,tooltip:V,searchBox:{borderRadius:"24px",border:e=>"1px solid "+e.custom.grey[500],background:"white",boxShadow:e=>"0px 2px 8px 0px "+e.custom.grey[500]},rowMenuElement:{marginLeft:"12px",paddingRight:"8px",fontSize:"12px",fontWeight:"600",lineHeight:"20px"}},M={valueFormatterFn:(i,r=void 0)=>{const o=Number(i);return Number.isNaN(o)?"":r?o.toLocaleString(e.language,{maximumFractionDigits:r}):o.toLocaleString(e.language)}};export{z as barChart,I as breadcrumb,$ as countTabs,H as custom,D as deleteButton,s as doughnutCard,v as formField,w as ingredientCard,S as mediaUpload,k as numberWithUnit,M as numbers,m as scoreCard,C as scoreDetail,b as scoreOverviewCard,y as scoreValue,u as status,g as strokes,B as tabs,f as tags,W as toggleSwitch,V as tooltip};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foodpilot/foods",
3
3
  "private": false,
4
- "version": "2.18.1",
4
+ "version": "2.18.3",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "module": "./dist/main.js",
@@ -223,7 +223,7 @@
223
223
  "react": "^18.0.0 || ^19.0.0",
224
224
  "react-dom": "^18.0.0 || ^19.0.0",
225
225
  "react-i18next": "^16.5.4",
226
- "recharts": "^3.0.0"
226
+ "recharts": "^3.5.0"
227
227
  },
228
228
  "peerDependenciesMeta": {
229
229
  "@mui/lab": {