@foodpilot/foods 2.11.44 → 2.11.45
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,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as e,
|
|
2
|
-
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{useTheme as t,Button as i,Box as n,Avatar as l,Typography as a}from"@mui/material";import{useState as d}from"react";import{ButtonPopover as s}from"./ButtonPopover.js";import{NavbarTooltip as c}from"../../NavbarTooltip.js";import{NAVBAR_ACTION_BUTTON_PADDING_BLOCK as p,NAVBAR_ACTION_BUTTON_PADDING_INLINE as m,NAVBAR_ACTION_BUTTON_MIN_HEIGHT as h,NAVBAR_COLLAPSED_ACTION_BUTTON_PADDING as g,NAVBAR_COLLAPSED_ACTION_BUTTON_SIZE as u}from"../../constants.js";import{FoodsIcon as x}from"../../../../Icons/FoodsIcon.js";const v=v=>{const{isExtended:f,name:b,picture:w,popover:y,tooltipLabel:k}=v,j=t(),[C,I]=d(null),W=Boolean(C),B={closePopover:()=>I(null)},P=k??b,A=y?.renderPopover?y.renderPopover(B):y?.element,L=void 0!==y,O=/* @__PURE__ */e(i,{fullWidth:f,sx:{justifyContent:f?"space-between":"center",alignItems:"center",color:j.custom.grey[100],border:"1px solid transparent",borderRadius:"12px",...f?{minHeight:h,paddingInline:m,paddingBlock:p}:{width:u,minWidth:u,height:u,padding:g},textTransform:"none",...L&&{"&:hover":{borderColor:j.custom.grey[600],backgroundColor:j.custom.grey[2e3]},"&:active":{backgroundColor:j.custom.grey[2500]},cursor:"pointer"},...!L&&{cursor:"default"}},onClick:e=>{void 0!==y&&I(e.currentTarget)},children:[
|
|
2
|
+
/* @__PURE__ */e(n,{lang:window.navigator.language,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:j.spacing(2),hyphens:"auto",overflowWrap:"break-word",wordBreak:"break-word",maxWidth:"100%",flex:f?"1":"0"},children:[
|
|
3
|
+
/* @__PURE__ */r(l,{alt:"app-logo",src:w||"",sx:{width:"40px",height:"40px"},children:w??b.charAt(0)}),f&&/* @__PURE__ */r(a,{variant:"body-bold",sx:{color:j.custom.grey[100],display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},children:b})]}),f&&void 0!==y&&/* @__PURE__ */r(x,{size:2,icon:W?"arrowUpShort":"arrowDownShort"})]});/* @__PURE__ */
|
|
4
|
+
return e(o,{children:[
|
|
5
|
+
/* @__PURE__ */r(n,{sx:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:f?"flex-start":"center"},children:void 0!==y?/* @__PURE__ */r(c,{title:/* @__PURE__ */r(a,{variant:"body-bold",children:P}),placement:"right",disableHoverListener:f||W,children:O}):O}),
|
|
6
|
+
/* @__PURE__ */r(s,{anchor:C,setAnchor:I,paperOverrides:void 0,children:A})]})};export{v as Organization};
|