@foodpilot/foods 2.11.43 → 2.11.44
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,5 +1,5 @@
|
|
|
1
1
|
import{jsx as r,Fragment as o,jsxs as e}from"react/jsx-runtime";import{Stack as i,useTheme as t,Box as n,Typography as a}from"@mui/material";import{useColorAndArrowIcon as d}from"./useColorAndArrow.js";const s=e=>{const{value:t,comparedTo:n,improvement:a,arrowDirection:s}=e,p=Number(n),g=Number(t),c=p>0?Math.abs(100-g/p*100):1/0,u=d({currentValue:g,previousValue:p,improvement:a,layout:{size:"M",direction:"horizontal"}});if(isNaN(c)||c===1/0||c===-1/0)/* @__PURE__ */
|
|
2
|
-
return r(o,{});const b=
|
|
2
|
+
return r(o,{});const b=g===p?"=":g>p?"+":"-";/* @__PURE__ */
|
|
3
3
|
return r(i,{width:"60px",children:/* @__PURE__ */r(l,{position:s,value:c,color:u.color,sign:b})})},l=o=>{const{value:d,position:s="right"}=o,l=t(),p=o.color.secondaryColor,g=o.color.primaryColor,c="right"===s;/* @__PURE__ */
|
|
4
4
|
return e(n,{sx:{display:"inline-flex",position:"relative",alignItems:"center",justifyContent:"center",backgroundColor:p,border:`2px solid ${g}`,borderRight:c?"none":void 0,borderRadius:l.spacing(.75),padding:l.spacing(.25,.75),paddingRight:l.spacing(1),height:"26px",zIndex:2},children:[/* @__PURE__ */r(n,c?{sx:{background:`linear-gradient(45deg, transparent 0%, transparent 55%, ${p} 55%, ${p} 100%)`,position:"absolute",border:`2px solid ${g}`,borderLeft:"none",borderBottom:"none",borderRadius:l.spacing(.75),borderTopRightRadius:l.spacing(.5),borderBottomRightRadius:l.spacing(.25),borderTopLeftRadius:l.spacing(.25),height:"18px",width:"18px",right:-7,top:2,transform:"rotate(45deg)",zIndex:-2}}:{sx:{background:`linear-gradient(135deg, transparent 0%, transparent 45%, ${p} 45%, ${p} 100%)`,position:"absolute",border:`2px solid ${g}`,borderTop:"none",borderLeft:"none",borderRadius:"1.5px",height:"12px",width:"12px",bottom:-7,left:"50%",transform:"translateX(-50%) rotate(45deg)",zIndex:-2}}),
|
|
5
5
|
/* @__PURE__ */e(i,{flexDirection:"row",gap:l.spacing(.5),sx:{lineHeight:1,position:"relative",zIndex:1},children:[
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foodpilot/foods",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.11.
|
|
4
|
+
"version": "2.11.44",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"module": "./dist/main.js",
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
"@mui/material": "^6.5.0",
|
|
251
251
|
"@mui/x-date-pickers": "^8.27.2",
|
|
252
252
|
"@size-limit/file": "^12.0.0",
|
|
253
|
-
"@size-limit/preset-big-lib": "^11.
|
|
253
|
+
"@size-limit/preset-big-lib": "^11.2.0",
|
|
254
254
|
"@storybook/react-vite": "^10.2.13",
|
|
255
255
|
"@types/chroma-js": "^3.1.2",
|
|
256
256
|
"@types/lodash": "^4.17.24",
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
260
260
|
"@typescript-eslint/parser": "^8.56.1",
|
|
261
261
|
"@vitejs/plugin-react": "^5.1.4",
|
|
262
|
-
"dependency-cruiser": "^17.3.
|
|
262
|
+
"dependency-cruiser": "^17.3.10",
|
|
263
263
|
"eslint": "^9.39.3",
|
|
264
264
|
"eslint-config-prettier": "^10.1.8",
|
|
265
265
|
"eslint-plugin-i18next": "^6.1.3",
|