@foodpilot/foods 2.22.0 → 2.22.1
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.
|
@@ -9,5 +9,5 @@ return e(r,{sx:{backgroundColor:p.selected?u.palette.primary[800]:u.custom.grey[
|
|
|
9
9
|
/* @__PURE__ */i(a,{component:"h3",noWrap:!0,title:p.title,variant:"big-semibold",sx:{color:m},children:p.title}),
|
|
10
10
|
/* @__PURE__ */e(r,{direction:"row",alignItems:"center",sx:{gap:u.spacing(.5),minWidth:0},children:[
|
|
11
11
|
/* @__PURE__ */i(a,{noWrap:!0,title:p.variationLabel,variant:"body-regular",sx:{color:h,minWidth:0},children:p.variationLabel}),p.variationAction&&/* @__PURE__ */i(l,{size:"xs",icon:"arrowDownShort",buttonProps:{"aria-controls":p.variationAction.open?p.variationAction.controls:void 0,"aria-expanded":p.variationAction.open,"aria-haspopup":"menu","aria-label":p.variationAction.ariaLabel,disabled:p.disabled,onClick:p.variationAction.onOpen,sx:{color:h,pointerEvents:"auto",position:"relative",zIndex:3}}})]})]})]}),
|
|
12
|
-
/* @__PURE__ */e(r,{direction:"row",alignItems:"baseline",sx:{gap:u.spacing(1),minWidth:0},children:[p.isLoading?/* @__PURE__ */i(s,{color:"inherit",size:u.spacing(3)}):null===p.value?/* @__PURE__ */i(n,{role:"img","aria-label":p.emptyLabel,sx:{alignItems:"center",backgroundColor:u.custom.grey[400],borderRadius:u.spacing(.5),color:u.custom.grey[1400],display:"flex",flexShrink:0,height:u.custom.scoreValue.emptyIndicator.size,justifyContent:"center",width:u.custom.scoreValue.emptyIndicator.size},children:/* @__PURE__ */i(c,{icon:"empty",size:u.custom.scoreValue.emptyIndicator.iconSize})}):/* @__PURE__ */i(a,{variant:"number-big",sx:{color:m},children:p.value}),
|
|
12
|
+
/* @__PURE__ */e(r,{direction:"row",alignItems:"baseline",sx:{gap:u.spacing(1),minWidth:0},children:[p.isLoading?/* @__PURE__ */i(s,{color:"inherit",size:u.spacing(3),sx:{color:m}}):null===p.value?/* @__PURE__ */i(n,{role:"img","aria-label":p.emptyLabel,sx:{alignItems:"center",backgroundColor:u.custom.grey[400],borderRadius:u.spacing(.5),color:u.custom.grey[1400],display:"flex",flexShrink:0,height:u.custom.scoreValue.emptyIndicator.size,justifyContent:"center",width:u.custom.scoreValue.emptyIndicator.size},children:/* @__PURE__ */i(c,{icon:"empty",size:u.custom.scoreValue.emptyIndicator.iconSize})}):/* @__PURE__ */i(a,{variant:"number-big",sx:{color:m},children:p.value}),
|
|
13
13
|
/* @__PURE__ */i(a,{variant:"big-regular",noWrap:!0,sx:{color:b},children:p.unit}),p.valueAdornment]})]}),!1===p.selected&&/* @__PURE__ */i(n,{"aria-hidden":!0,sx:{borderColor:v.color,borderRadius:"inherit",borderStyle:v.style,borderWidth:v.width,boxSizing:"border-box",inset:0,pointerEvents:"none",position:"absolute",zIndex:4}})]})};export{p as ScoreOverviewCard};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{DragIndicator as a,Close as i}from"@mui/icons-material";import{Box as o,Stack as l,Typography as r,IconButton as d,Divider as c}from"@mui/material";import{FlexibleButton as p}from"../../innerComponents/FlexibleButton.js";import{useTranslation as x}from"react-i18next";const s=t=>/* @__PURE__ */e(o,{component:"div",sx:{background:"white",width:t.width??"376px",borderRadius:"12px",border:"1px solid #E7E6E4",boxShadow:"0px 4px 20px 0px rgba(81, 78, 78, 0.12)"},children:[
|
|
2
|
-
/* @__PURE__ */e(l,{direction:"row",useFlexGap:!0,alignItems:"center",justifyContent:"space-between",sx:{padding:"18px 16px"},children:[t.headerIcon??/* @__PURE__ */n(a,{}),
|
|
3
|
-
/* @__PURE__ */n(r,{variant:"h4",sx:{
|
|
2
|
+
/* @__PURE__ */e(l,{direction:"row",useFlexGap:!0,gap:1,alignItems:"center",justifyContent:"space-between",sx:{padding:"18px 16px"},children:[t.headerIcon??/* @__PURE__ */n(a,{}),
|
|
3
|
+
/* @__PURE__ */n(r,{variant:"h4",sx:{flex:1,textAlign:"center"},children:t.headerText}),
|
|
4
4
|
/* @__PURE__ */n(d,{sx:{padding:"0"},onClick:t.onClose,children:/* @__PURE__ */n(i,{})})]}),
|
|
5
5
|
/* @__PURE__ */n(c,{}),
|
|
6
6
|
/* @__PURE__ */n(o,{sx:{padding:"24px",height:"420px",overflow:"auto"},children:t.children}),t.bottomActions&&/* @__PURE__ */n(m,{onCancel:t.onCancel,onValidate:t.onValidate,validateLabel:t.validateLabel,cancelLabel:t.cancelLabel})]}),m=a=>{const{t:i}=x();/* @__PURE__ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{alpha as o}from"@mui/material";import{isTagVariant as r,getTagStyle as e}from"./MUIComponents/tagsStyles.js";const t={MuiDialog:{styleOverrides:{paper:{borderRadius:"1rem"}}},MuiAutocomplete:{styleOverrides:{root:()=>({})}},MuiAvatar:{defaultProps:{children:[]},styleOverrides:{root:({theme:o,ownerState:{alt:r=""}})=>{const e=r.split(" ").map(o=>o.charAt(0).toUpperCase()).join("");return{background:o.palette.primary[100],color:o.palette.primary[700],fontWeight:600,".MuiAvatar-img":{zIndex:1},":empty::before":{content:`"${e}"`}}}},variants:[{props:{variant:"small"},style:{width:"24px",height:"24px",fontSize:"10px"}},{props:{variant:"medium"},style:{width:"36px",height:"36px",fontSize:"13px"}},{props:{variant:"big"},style:{width:"40px",height:"40px",fontSize:"16px"}}]},MuiAvatarGroup:{defaultProps:{variant:"small",spacing:6,sx:{justifyContent:"flex-end"},slotProps:{additionalAvatar:{sx:{color:o=>o.custom.grey[2800],background:o=>o.custom.grey[400]}}}},styleOverrides:{root:({ownerState:{max:o=0}})=>({...[...Array(o)].reduce((r,e,t)=>({...r,[`& > .MuiAvatar-root:nth-of-type(${t+1})`]:{zIndex:o-t}}),{})})}},MuiButtonGroup:{defaultProps:{disableRipple:!0}},MuiButton:{defaultProps:{disableRipple:!0},styleOverrides:{root:({theme:t,ownerState:
|
|
1
|
+
import{alpha as o}from"@mui/material";import{isTagVariant as r,getTagStyle as e}from"./MUIComponents/tagsStyles.js";const t={MuiDialog:{styleOverrides:{paper:{borderRadius:"1rem"}}},MuiAutocomplete:{styleOverrides:{root:()=>({})}},MuiAvatar:{defaultProps:{children:[]},styleOverrides:{root:({theme:o,ownerState:{alt:r=""}})=>{const e=r.split(" ").map(o=>o.charAt(0).toUpperCase()).join("");return{background:o.palette.primary[100],color:o.palette.primary[700],fontWeight:600,".MuiAvatar-img":{zIndex:1},":empty::before":{content:`"${e}"`}}}},variants:[{props:{variant:"small"},style:{width:"24px",height:"24px",fontSize:"10px"}},{props:{variant:"medium"},style:{width:"36px",height:"36px",fontSize:"13px"}},{props:{variant:"big"},style:{width:"40px",height:"40px",fontSize:"16px"}}]},MuiAvatarGroup:{defaultProps:{variant:"small",spacing:6,sx:{justifyContent:"flex-end"},slotProps:{additionalAvatar:{sx:{color:o=>o.custom.grey[2800],background:o=>o.custom.grey[400]}}}},styleOverrides:{root:({ownerState:{max:o=0}})=>({...[...Array(o)].reduce((r,e,t)=>({...r,[`& > .MuiAvatar-root:nth-of-type(${t+1})`]:{zIndex:o-t}}),{})})}},MuiButtonGroup:{defaultProps:{disableRipple:!0}},MuiButton:{defaultProps:{disableRipple:!0,loadingPosition:"start"},styleOverrides:{root:({theme:t,ownerState:n})=>{const a=n.variant,d=n.variant?.startsWith("dataviz");if(d){const o=parseInt((a??"").split("-")[1]),r=t.custom.dataviz.colorsWithExtra[o];if(void 0!==r)return{textTransform:"none",fontSize:"0.9rem",lineHeight:"1rem",borderRadius:t.spacing(1),height:"40px",fontWeight:700,transition:"none",color:t.custom.grey[100],boxShadow:"0px 4px 8px 0px #2A2B2714",background:r.main,":hover":{background:r.variant[700]},":disabled":!0===n.loading?{color:"center"===n.loadingPosition?"transparent":t.custom.grey[100],background:r.main}:{background:r.variant[100]},":active":{background:r.variant[700]}}}const i={..."primary"===a&&{transition:"none",background:`linear-gradient(${t.palette.primary[400]}, ${t.palette.primary[600]})`,color:t.custom.grey[100],boxShadow:"0px 4px 8px 0px #2A2B2714"},..."secondary"===a&&{border:`1px solid ${t.custom.grey[500]}`,background:`linear-gradient(${t.custom.grey[100]}}, ${t.custom.grey[300]})`},..."ternary"===a&&{border:`1px solid ${t.custom.grey[500]}`,background:t.custom.grey.gradientLight},..."text"===a&&{transition:"none",paddingInline:"0",color:t.palette.primary[700],fontWeight:"700"},..."selected-menu"===a&&{color:"white",background:`linear-gradient(${t.palette.primary[400]}, ${t.palette.primary[600]})`,borderRadius:"8px",padding:0},..."selected-submenu"===a&&{color:"white",backgroundColor:t.custom.grey[2300],background:t.custom.grey[2300],borderRadius:"8px",padding:0},..."default-menu"===a&&{color:t.custom.grey[100],background:"inherit",borderRadius:"8px",padding:0},..."black-text"===a&&{color:t.custom.grey[2800],background:"none",fontWeight:"600"},..."black-filled"===a&&{borderRadius:"8px",background:`linear-gradient(180deg, ${t.custom.grey[2600]} 0%, ${t.custom.grey[3e3]} 100%)`,boxShadow:"0px 4px 8px 0px rgba(42, 43, 39, 0.08)",color:t.custom.grey[100]},..."white-filled"===a&&{borderRadius:"8px",border:"1px solid "+t.custom.grey[500],background:`linear-gradient(180deg, ${t.custom.grey[100]} 0%, ${t.custom.grey[200]} 100%)`,boxShadow:" 0px 2px 8px 0px rgba(42, 43, 39, 0.04)"},..."white-filled-no-shadow"===a&&{borderRadius:"44px",border:`1px solid ${t.custom.grey[500]}`,background:`linear-gradient(180deg, ${t.custom.grey[100]} 0%, ${t.custom.grey[200]} 100%)`},..."select"===a&&{backgroundColor:t.custom.grey[100],borderRadius:t.spacing(1),border:`1px solid ${t.custom.grey[500]}`},..."validate"===a&&{color:"#FFFFFF",transition:"none",background:`linear-gradient(180deg, ${t.custom.green[500]} 0%, ${t.custom.green[700]} 100%)`},..."delete"===a&&{color:"#FFFFFF",transition:"none",background:`${t.custom.red[600]}`},..."error"===a&&{transition:"none",paddingInline:"0",color:t.custom.red[600],fontWeight:"600"},..."delete-outline"===a&&{color:t.custom.red[600],transition:"none",background:"transparent",border:`1px solid ${t.custom.red[600]}`}};return{textTransform:"none",fontSize:"0.9rem",lineHeight:"1rem",borderRadius:t.spacing(1),height:"40px",fontWeight:700,...i,...!0===n.loading&&("text"===a||"error"===a)&&{"& .MuiButton-loadingIndicator":{left:0}},":hover":{..."primary"===a&&{background:t.palette.primary[600]},..."secondary"===a&&{background:t.custom.grey[400]},..."ternary"===a&&{border:`1px solid ${t.custom.grey[500]}`,background:t.custom.grey[400]},..."text"===a&&{background:"none",textDecoration:"underline"},..."select"===a&&{backgroundColor:t.custom.grey[300]},..."default-menu"===a&&{backgroundColor:t.custom.grey[2500],borderRadius:"8px"},..."selected-menu"===a&&{borderRadius:"8px"},..."selected-submenu"===a&&{borderRadius:"8px"},..."validate"===a&&{background:t.custom.green[600]},..."delete"===a&&{background:t.custom.red[700]},..."error"===a&&{color:t.custom.red[900]},..."delete-outline"===a&&{background:t.custom.red[100],borderColor:t.custom.red[700],color:t.custom.red[700]}},":disabled":!0===n.loading?{color:"inherit",...i,..."center"===n.loadingPosition&&{color:"transparent"}}:{..."primary"===a&&{color:t.custom.grey[100],background:o(t.palette.primary[600]??"",.36)},..."secondary"===a&&{color:o(t.custom.grey[2800],.36),border:`1px solid ${o(t.custom.grey[500],.36)}`,background:t.custom.grey[100]},..."ternary"===a&&{border:`1px solid ${t.custom.grey[100]}`,background:t.custom.grey[500]},..."select"===a&&{backgroundColor:t.custom.grey[500]},..."default-menu"===a&&{color:t.custom.grey[2300],borderRadius:"8px"},..."selected-menu"===a&&{color:t.custom.grey[2300],borderRadius:"8px"},..."selected-submenu"===a&&{color:t.custom.grey[2300],borderRadius:"8px"},..."validate"===a&&{background:o(t.custom.green[500],.36),color:"#FFFFFF"},..."delete"===a&&{background:t.custom.red[100],color:o(t.custom.red[600],.36)},..."error"===a&&{color:o(t.custom.red[700],.36)},..."delete-outline"===a&&{color:o(t.custom.red[600],.36),borderColor:o(t.custom.red[600],.36),background:"transparent"}},":active":{..."primary"===a&&{background:t.palette.primary[800]},..."secondary"===a&&{background:t.custom.grey[400]},..."secondary"===a&&{background:t.custom.grey[600]},..."default-menu"===a&&{backgroundColor:t.custom.grey[2e3],borderRadius:"8px"},..."selected-menu"===a&&{backgroundColor:t.custom.grey[2700],borderRadius:"8px"},..."selected-submenu"===a&&{borderRadius:"8px"},..."validate"===a&&{background:t.custom.green[800]},..."delete"===a&&{background:t.custom.red[800]},..."delete-outline"===a&&{background:t.custom.red[100],borderColor:t.custom.red[800]}},...r(a)&&e(a,t,n),..."icon-xs-nobackground"===a&&{padding:t.spacing(.5),minWidth:"auto",width:"24px",height:"24px",color:t.custom.grey[2800],backgroundColor:"inherit",borderRadius:"32px",":hover":{backgroundColor:t.custom.grey[600]},":active":{backgroundColor:t.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:t.custom.grey[1400]}},..."icon-s-nobackground"===a&&{padding:t.spacing(1),minWidth:"auto",width:"36px",height:"36px",color:t.custom.grey[2800],backgroundColor:"inherit",borderRadius:"32px",":hover":{backgroundColor:t.custom.grey[600]},":active":{backgroundColor:t.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:t.custom.grey[1400]}},..."icon-m-nobackground"===a&&{padding:t.spacing(1),minWidth:"auto",width:"44px",height:"44px",color:t.custom.grey[2800],backgroundColor:"inherit",borderRadius:"32px",":hover":{backgroundColor:t.custom.grey[600]},":active":{backgroundColor:t.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:t.custom.grey[1400]}},..."icon-xs-withbackground"===a&&{padding:t.spacing(.5),minWidth:"auto",width:"24px",height:"24px",color:t.custom.grey[2800],background:"linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)",border:`1px solid ${t.custom.grey[500]}`,borderRadius:"32px",":hover":{background:"none",backgroundColor:t.custom.grey[400]},":active":{background:"none",backgroundColor:t.custom.grey[600],border:"none"},":disabled":{background:"none",backgroundColor:t.custom.grey[100],color:t.custom.grey[1400]}},..."icon-s-withbackground"===a&&{padding:t.spacing(1),minWidth:"auto",width:"36px",height:"36px",color:t.custom.grey[2800],background:"linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)",border:`1px solid ${t.custom.grey[500]}`,borderRadius:"32px",":hover":{background:"none",backgroundColor:t.custom.grey[400]},":active":{background:"none",backgroundColor:t.custom.grey[600],border:"none"},":disabled":{background:"none",backgroundColor:t.custom.grey[100],color:t.custom.grey[1400]}},..."icon-m-withbackground"===a&&{padding:t.spacing(1),minWidth:"auto",width:"44px",height:"44px",color:t.custom.grey[2800],background:"linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)",border:`1px solid ${t.custom.grey[500]}`,borderRadius:"32px",":hover":{background:"none",backgroundColor:t.custom.grey[400]},":active":{background:"none",backgroundColor:t.custom.grey[600],border:"none"},":disabled":{background:"none",backgroundColor:t.custom.grey[100],color:t.custom.grey[1400]}}}}}},MuiButtonBase:{styleOverrides:{root:{borderRadius:"15px"}}},MuiCircularProgress:{styleOverrides:{root:({theme:o,ownerState:r})=>({..."inherit"!==r.color&&{color:o.custom.grey[800]}})}},MuiIconButton:{styleOverrides:{root:({theme:o})=>({height:"44px",width:"44px",color:o.custom.grey[2800],backgroundColor:"inherit",":hover":{backgroundColor:o.custom.grey[600]},":focus":{backgroundColor:o.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:o.custom.grey[1400]}})}},MuiChip:{styleOverrides:{root:({theme:o,ownerState:r})=>({paddingTop:o.spacing(.5),paddingRight:o.spacing(.5),paddingBottom:o.spacing(.5),paddingLeft:o.spacing(1),..."brand"===r.variant&&{backgroundColor:o.palette.primary[50]},..."neutral"===r.variant&&{backgroundColor:o.custom.grey[300]}})}}};export{t as components};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foodpilot/foods",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.22.
|
|
4
|
+
"version": "2.22.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"module": "./dist/main.js",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"@emotion/styled": "^11.14.0",
|
|
214
214
|
"@mui/icons-material": "^6.0.0",
|
|
215
215
|
"@mui/lab": "^6.0.0-beta.0",
|
|
216
|
-
"@mui/material": "^6.
|
|
216
|
+
"@mui/material": "^6.4.0",
|
|
217
217
|
"@mui/x-data-grid": "^7.0.0",
|
|
218
218
|
"@mui/x-date-pickers": "^7.0.0",
|
|
219
219
|
"@mui/x-tree-view": "^7.0.0",
|