@foodpilot/foods 2.20.1 → 2.20.2
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,2 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useTheme as
|
|
2
|
-
return e("next"===c||"previous"===c?t:"start-ellipsis"===c||"end-ellipsis"===c?s:i,{...d,sx:{...g}})};export{m as FoodsPaginationItem};
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useTheme as r,alpha as o}from"@mui/material";import{PageUpAndDownItem as t}from"./PageItems/PageUpAndDownItem.js";import{EllipsisItem as s}from"./PageItems/EllipsisItem.js";import{PageItem as i}from"./PageItems/PageItem.js";const m=m=>{const a=r(),{type:c}=m,{sx:u,currentPage:g,...n}=m,d={zIndex:5,background:"white",padding:0,fontWeight:"700",":hover":{background:a.custom.grey[1400]},"&.Mui-selected":{backgroundColor:a.custom.grey[2800],color:"white"},"&.Mui-selected:hover":{background:a.custom.grey[2800]},"&.Mui-disabled":{opacity:1,color:o(a.custom.grey[2800],.36)},borderRadius:"25px",borderColor:a.custom.grey[600],...u};return"next"===c||"previous"===c?/* @__PURE__ */e(t,{...n,sx:{...d}}):"start-ellipsis"===c||"end-ellipsis"===c?/* @__PURE__ */e(s,{...n,sx:{...d}}):/* @__PURE__ */e(i,{...n,currentPage:g,sx:{...d}})};export{m as FoodsPaginationItem};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useTheme as r,Box as t,PaginationItem as i,Stack as
|
|
2
|
-
return e(
|
|
3
|
-
/* @__PURE__ */e(
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useTheme as r,Box as t,PaginationItem as i,Stack as s,Typography as d}from"@mui/material";import{FoodsTooltip as n}from"../../Tooltip/FoodsTooltip.js";import{FoodsTags as c}from"../../Tags/FoodsTags.js";const a=a=>{const l=r(),{selected:m,currentPage:u,...g}=a,{isComplete:p=!1}=u||{},b=!1===p?{}:{border:"none",background:l.custom.green[600],color:"white","&.Mui-selected":{background:l.custom.green[600]},":hover":{background:l.custom.green[700]},"&.Mui-selected:hover":{background:l.custom.green[700]}},h=u?.label,v=u?.isComplete,x=u?.isCompleteLabel;/* @__PURE__ */
|
|
2
|
+
return e(n,{width:"auto",title:void 0!==h&&/* @__PURE__ */o(s,{width:"100%",justifyContent:"center",alignItems:"center",gap:l.spacing(1),children:[
|
|
3
|
+
/* @__PURE__ */e(d,{variant:"body-medium",children:h}),!0===v&&void 0!==x&&/* @__PURE__ */e(c,{variant:"tags-green",startIcon:"check",label:x,disabled:!0})]}),children:/* @__PURE__ */e(t,{border:m?`2px solid ${l.custom.grey[2800]}`:void 0,borderRadius:m?"25px":void 0,paddingBlock:"2px",sx:{position:"relative",zIndex:5},children:/* @__PURE__ */e(i,{...g,selected:m,sx:{...a.sx,...b}})})})};export{a as PageItem};
|