@foodpilot/foods 2.17.2 → 2.17.4

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 +1 @@
1
- import*as e from"react";const t=t=>/* @__PURE__ */e.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},/* @__PURE__ */e.createElement("rect",{x:1,y:1,width:18,height:18,rx:3,fill:"white"}),/* @__PURE__ */e.createElement("rect",{x:1,y:1,width:18,height:18,rx:3,stroke:"#D1CFCE",strokeWidth:2}));export{t as default};
1
+ import*as e from"react";const t=t=>/* @__PURE__ */e.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},/* @__PURE__ */e.createElement("rect",{x:1,y:1,width:18,height:18,rx:3,fill:"white"}),/* @__PURE__ */e.createElement("rect",{x:1,y:1,width:18,height:18,rx:3,stroke:"currentColor",strokeWidth:2}));export{t as default};
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import{FormGroup as o,FormControlLabel as r,styled as s,Checkbox as t}from"@mui/material";import m from"../../assets/unchecked.svg.js";import c from"../../assets/checked.svg.js";import{greyTheme as n}from"../../themes/common/colors.js";const a=s(t)(()=>({":hover":{background:n[400]}})),p=s=>{const{values:t,onChange:n,FormGroupProps:p,FormControlLabelProps:i,CheckboxProps:l}=s,h=Object.entries(t);/* @__PURE__ */
2
- return e(o,{...p,children:h.map(([o,s],p)=>/* @__PURE__ */e(r,{sx:{gap:"1rem"},checked:s.state,...i,label:s.name,control:/* @__PURE__ */e(a,{checkedIcon:/* @__PURE__ */e(c,{}),icon:/* @__PURE__ */e(m,{}),disableRipple:!0,...l,onChange:(e,r)=>{const m={...t};m[o]={...m[o],name:s.name,state:r},n(m)}})},`${o}-${p}`))})};export{p as BaseCheckbox};
1
+ import{jsx as e}from"react/jsx-runtime";import{FormGroup as o,FormControlLabel as r}from"@mui/material";import s from"../../assets/unchecked.svg.js";import t from"../../assets/checked.svg.js";import{StyledCheckbox as c}from"./StyledCheckbox.js";const n=n=>{const{values:a,onChange:m,FormGroupProps:p,FormControlLabelProps:i,CheckboxProps:l}=n,h=Object.entries(a);/* @__PURE__ */
2
+ return e(o,{...p,children:h.map(([o,n],p)=>/* @__PURE__ */e(r,{sx:e=>({gap:e.spacing(2)}),checked:n.state,...i,label:n.name,control:/* @__PURE__ */e(c,{checkedIcon:/* @__PURE__ */e(t,{}),icon:/* @__PURE__ */e(s,{}),disableRipple:!0,...l,onChange:(e,r)=>{const s={...a};s[o]={...s[o],name:n.name,state:r},m(s)}})},`${o}-${p}`))})};export{n as BaseCheckbox};
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import{FormGroup as o,FormControlLabel as r,styled as s,Checkbox as t}from"@mui/material";import m from"../../assets/unchecked.svg.js";import c from"../../assets/checked.svg.js";import{greyTheme as n}from"../../themes/common/colors.js";const a=s(t)(()=>({":hover":{background:n[400]}})),i=s=>{const{values:t,...n}=s,{onChange:i,...p}=n,h=Object.entries(t);/* @__PURE__ */
2
- return e(o,{children:h.map(([o,s],t)=>/* @__PURE__ */e(r,{control:/* @__PURE__ */e(a,{...p,checkedIcon:/* @__PURE__ */e(c,{}),icon:/* @__PURE__ */e(m,{}),disableRipple:!0,onChange:(e,r)=>{const t={};t[o]={name:s.name,state:r},i(t)}}),sx:{gap:"1rem"},label:s.name,checked:s.state},`${o}-${t}`))})};export{i as PrimaryCheckbox};
1
+ import{jsx as e}from"react/jsx-runtime";import{FormGroup as t,FormControlLabel as s}from"@mui/material";import o from"../../assets/checked.svg.js";import c from"../../assets/unchecked.svg.js";import{StyledCheckbox as n}from"./StyledCheckbox.js";const r=r=>{const{values:a,...m}=r,{onChange:i,...p}=m,l=Object.entries(a);/* @__PURE__ */
2
+ return e(t,{children:l.map(([t,r],a)=>/* @__PURE__ */e(s,{control:/* @__PURE__ */e(n,{...p,checkedIcon:/* @__PURE__ */e(o,{}),icon:/* @__PURE__ */e(c,{}),disableRipple:!0,onChange:(e,s)=>{const o={};o[t]={name:r.name,state:s},i(o)}}),sx:e=>({gap:e.spacing(2)}),label:r.name,checked:r.state},`${t}-${a}`))})};export{r as PrimaryCheckbox};
@@ -0,0 +1,4 @@
1
+ import { StyledComponent } from '@emotion/styled';
2
+ import { CheckboxProps, Theme } from '@mui/material';
3
+ import { MUIStyledCommonProps } from '@mui/system';
4
+ export declare const StyledCheckbox: StyledComponent< CheckboxProps & MUIStyledCommonProps<Theme>, {}, {}>;
@@ -0,0 +1 @@
1
+ import{styled as o,Checkbox as r}from"@mui/material";const e=o(r)(({theme:o})=>({color:o.custom.grey[1600],":hover":{background:o.custom.grey[400]}}));export{e as StyledCheckbox};
@@ -33,10 +33,16 @@ export declare const status: {
33
33
  * Shared score card colors.
34
34
  * Figma provenance: Product empty score card `12819:67604`, empty guidance
35
35
  * `13621:101305`, and filled score card `13154:221913`.
36
+ * Loading provenance: established Product score-card behavior preserved during
37
+ * the Product V2 migration and approved on 2026-08-20.
36
38
  */
37
39
  export declare const scoreCard: {
38
40
  readonly surface: "#025155";
39
41
  readonly emptyGuidanceForeground: "#EDF9FA";
42
+ readonly loading: {
43
+ readonly opacity: 0.7;
44
+ readonly transition: "opacity 120ms ease-out";
45
+ };
40
46
  };
41
47
  /**
42
48
  * Shared Score value geometry.
@@ -1 +1 @@
1
- import e from"i18next";import{greyTheme as i,shadows as o,redTheme as r,allMainColors as t,allColors as d,extraColors as a,dataVisualizationColors as n,coralTheme as p,blueTheme as x,yellowTheme as c,orangeTheme as h,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"},b={emptyIndicator:{size:"44px",iconSize:{width:26,height:26}},inline:{width:"70px"}},w={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"}},y={compact:{size:110}},f={size:"40px",iconSize:{width:20,height:20},borderRadius:"44px",default:{background:`linear-gradient(180deg, ${i[100]} 0%, ${i[300]} 154.5%)`,borderColor:r[500],color:r[500]},hovered:{background:r[400],borderColor:r[500],color:i[100]},pressed:{background:r[600],borderColor:r[600],color:i[100]}},z=`inset 0 0 0 ${g.containerDivider.width} ${g.containerDivider.color}`,$={gap:"4px",separatorIconSize:{width:16,height:16},pageLink:{height:"26px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",maxWidth:"226px",stroke:{default:z,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:`${z}, ${o.popover}`}},S=`${g.containerDivider.width} ${g.containerDivider.style} ${i[500]}`,F=`${g.containerDivider.width} ${g.containerDivider.style} ${g.containerDivider.color}`,k={contentAlignment:"center",default:{maxCharacters:100,width:"202px",maxWidth:"unset",padding:"12px 16px 12px 16px",borderRadius:"0.5rem",border:S,backgroundColor:i[100],boxShadow:`0px 4px 20px 0px ${i[500]}`,color:i[2800],margin:"8px",typographyVariant:"body-medium",arrow:{color:i[100],border:S}},simple:{width:"300px",maxWidth:"300px",contentMinHeight:"53px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",border:F,backgroundColor:i[100],boxShadow:o.popover,color:i[2500],margin:"8px",typographyVariant:"body-medium",arrow:{width:"16px",height:"8px",color:i[100],border:F}}},D={grey:i,red:r,green:l,orange:h,yellow:c,blue:x,coral:p,shadows:o,dataviz:{colors:n,extra:a,colorsWithExtra:d,onlyMainFromAll:t},doughnutCard:s,strokes:g,status:u,scoreCard:m,scoreValue:b,numberWithUnit:w,formField:v,mediaUpload:y,deleteButton:f,breadcrumb:$,tooltip:k,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"}},C={valueFormatterFn:(i,o=void 0)=>{const r=Number(i);return Number.isNaN(r)?"":o?r.toLocaleString(e.language,{maximumFractionDigits:o}):r.toLocaleString(e.language)}};export{$ as breadcrumb,D as custom,f as deleteButton,s as doughnutCard,v as formField,y as mediaUpload,w as numberWithUnit,C as numbers,m as scoreCard,b as scoreValue,u as status,g as strokes,k as tooltip};
1
+ import i from"i18next";import{greyTheme as o,shadows as e,redTheme as r,allMainColors as t,allColors as d,extraColors as a,dataVisualizationColors as n,coralTheme as p,blueTheme as x,yellowTheme as c,orangeTheme as h,greenTheme as l}from"./colors.js";const g={containerDivider:{color:o[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={emptyIndicator:{size:"44px",iconSize:{width:26,height:26}},inline:{width:"70px"}},w={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"}},y={compact:{width:"100px",optionWidth:"130px"}},v={compact:{size:110}},f={size:"40px",iconSize:{width:20,height:20},borderRadius:"44px",default:{background:`linear-gradient(180deg, ${o[100]} 0%, ${o[300]} 154.5%)`,borderColor:r[500],color:r[500]},hovered:{background:r[400],borderColor:r[500],color:o[100]},pressed:{background:r[600],borderColor:r[600],color:o[100]}},z=`inset 0 0 0 ${g.containerDivider.width} ${g.containerDivider.color}`,$={gap:"4px",separatorIconSize:{width:16,height:16},pageLink:{height:"26px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",maxWidth:"226px",stroke:{default:z,hover:`inset 0 0 0 ${g.containerDivider.width} ${o[2800]}`},collapsed:{width:"24px",height:"16px",paddingInline:"4px",borderRadius:"4px"}},overflowMenu:{offset:"4px",padding:"16px",gap:"8px",borderRadius:"12px",boxShadow:`${z}, ${e.popover}`}},S=`${g.containerDivider.width} ${g.containerDivider.style} ${o[500]}`,F=`${g.containerDivider.width} ${g.containerDivider.style} ${g.containerDivider.color}`,k={contentAlignment:"center",default:{maxCharacters:100,width:"202px",maxWidth:"unset",padding:"12px 16px 12px 16px",borderRadius:"0.5rem",border:S,backgroundColor:o[100],boxShadow:`0px 4px 20px 0px ${o[500]}`,color:o[2800],margin:"8px",typographyVariant:"body-medium",arrow:{color:o[100],border:S}},simple:{width:"300px",maxWidth:"300px",contentMinHeight:"53px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",border:F,backgroundColor:o[100],boxShadow:e.popover,color:o[2500],margin:"8px",typographyVariant:"body-medium",arrow:{width:"16px",height:"8px",color:o[100],border:F}}},D={grey:o,red:r,green:l,orange:h,yellow:c,blue:x,coral:p,shadows:e,dataviz:{colors:n,extra:a,colorsWithExtra:d,onlyMainFromAll:t},doughnutCard:s,strokes:g,status:u,scoreCard:m,scoreValue:b,numberWithUnit:w,formField:y,mediaUpload:v,deleteButton:f,breadcrumb:$,tooltip:k,searchBox:{borderRadius:"24px",border:i=>"1px solid "+i.custom.grey[500],background:"white",boxShadow:i=>"0px 2px 8px 0px "+i.custom.grey[500]},rowMenuElement:{marginLeft:"12px",paddingRight:"8px",fontSize:"12px",fontWeight:"600",lineHeight:"20px"}},C={valueFormatterFn:(o,e=void 0)=>{const r=Number(o);return Number.isNaN(r)?"":e?r.toLocaleString(i.language,{maximumFractionDigits:e}):r.toLocaleString(i.language)}};export{$ as breadcrumb,D as custom,f as deleteButton,s as doughnutCard,y as formField,v as mediaUpload,w as numberWithUnit,C as numbers,m as scoreCard,b as scoreValue,u as status,g as strokes,k as tooltip};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foodpilot/foods",
3
3
  "private": false,
4
- "version": "2.17.2",
4
+ "version": "2.17.4",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "module": "./dist/main.js",