@foodpilot/foods 2.12.1 → 2.12.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 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{tooltipClasses as r,styled as p}from"@mui/material";import
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{tooltipClasses as r,styled as p}from"@mui/material";import t from"@mui/material/Tooltip";const m=p(({className:r,...p})=>/* @__PURE__ */o(t,{...p,arrow:!0,classes:{popper:r}}))(({theme:o})=>({[`& .${r.arrow}`]:{color:o.custom.grey[100],"&:before":{border:`1px solid ${o.custom.grey[500]}`,boxSizing:"border-box"}},[`& .${r.tooltip}`]:{padding:"12px 16px 12px 16px",borderRadius:"8px",border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[100],boxShadow:`0px 4px 20px 0px ${o.custom.grey[500]}`,color:o.custom.grey[2800],fontFamily:o.typography.fontFamily,"& *":{fontFamily:o.typography.fontFamily}}}));export{m as NavbarTooltip};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useTheme as e,Stack as a,Typography as n,styled as l,TextareaAutosize as
|
|
2
|
-
return r(a,{gap:
|
|
3
|
-
/* @__PURE__ */o(n,{variant:"small-regular",color:
|
|
1
|
+
import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useTheme as e,Stack as a,Typography as n,styled as l,TextareaAutosize as t}from"@mui/material";import{redTheme as i,greyTheme as s}from"../../themes/common/colors.js";const d=l=>{const t=e(),{value:d,onChange:u,onBlur:h,onFocus:p,placeholder:m,variant:g="primary",disabled:b=!1,error:x=!1,errorMessage:v,maxLength:f,minRows:y,maxRows:C=14,content:w}=l,E=void 0!==d,$=E?d.length:0,k=void 0!==f&&$>f,F=x||k,R=void 0!==f||void 0!==v,j=E?{value:d,onChange:r=>u?.(r.currentTarget.value)}:{defaultValue:w};/* @__PURE__ */
|
|
2
|
+
return r(a,{gap:t.spacing(.5),width:"100%",children:[c(g,b,{...j,onBlur:h,onFocus:p,placeholder:m,disabled:b,minRows:y,maxRows:C,maxLength:f,$hasError:F}),R&&/* @__PURE__ */r(a,{flexDirection:"row",justifyContent:"space-between",gap:t.spacing(1),px:t.spacing(2.5),children:[
|
|
3
|
+
/* @__PURE__ */o(n,{variant:"small-regular",color:F?i[600]:"transparent",sx:{minHeight:"1em"},children:F&&v?v:" "}),void 0!==f&&/* @__PURE__ */r(n,{variant:"small-regular",color:k?i[600]:s[1500],children:[$," / ",f]})]})]})},c=(r,e,a)=>{if(e)/* @__PURE__ */return o(g,{...a});switch(r){case"secondary":/* @__PURE__ */
|
|
4
4
|
return o(p,{...a});case"tertiary":/* @__PURE__ */
|
|
5
5
|
return o(m,{...a});case"disabled":/* @__PURE__ */
|
|
6
6
|
return o(g,{...a});default:/* @__PURE__ */
|
|
7
|
-
return o(h,{...a})}},u=l(
|
|
7
|
+
return o(h,{...a})}},u=l(t,{shouldForwardProp:r=>"$hasError"!==r})(({theme:r,$hasError:o})=>({width:"100%",lineHeight:"22px",padding:"20px 24px 60px 24px",borderRadius:"12px",resize:"none",...r.typography.body,fontFamily:r.typography.fontFamily,color:s[2800],borderColor:o?i[600]:s[500],"&:focus-visible":{outline:"0",borderColor:o?i[600]:s[2800]},...o&&{backgroundColor:i[100],color:i[600]}})),h=l(u)(({$hasError:r})=>({backgroundColor:r?i[100]:s[100]})),p=l(u)(({$hasError:r})=>({backgroundColor:r?i[100]:s[300]})),m=l(u)(({$hasError:r})=>({borderColor:r?i[600]:s[2800],backgroundColor:r?i[100]:s[100]})),g=l(u)({color:s[2e3],backgroundColor:s[500]});export{d as Textarea};
|