@carto/meridian-ds 0.1.1-alpha.2 → 0.1.1-alpha.4
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.
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.js +326 -323
- package/dist/types/components/atoms/Button.d.ts +5 -5
- package/dist/types/components/atoms/Button.d.ts.map +1 -1
- package/dist/types/components/atoms/PasswordField.d.ts +1 -2
- package/dist/types/components/atoms/PasswordField.d.ts.map +1 -1
- package/dist/types/components/atoms/SelectField.d.ts +6 -5
- package/dist/types/components/atoms/SelectField.d.ts.map +1 -1
- package/dist/types/components/atoms/Typography.d.ts +1 -6
- package/dist/types/components/atoms/Typography.d.ts.map +1 -1
- package/dist/types/components/molecules/Alert.d.ts +1 -7
- package/dist/types/components/molecules/Alert.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete.d.ts +6 -7
- package/dist/types/components/molecules/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/MultipleSelectField/MultipleSelectField.d.ts +5 -14
- package/dist/types/components/molecules/MultipleSelectField/MultipleSelectField.d.ts.map +1 -1
- package/dist/types/components/molecules/MultipleSelectField/useMultipleSelectField.d.ts +1 -1
- package/dist/types/theme/types.d.ts +6 -0
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts +1 -6
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts.map +1 -1
- package/dist/types/widgets/WrapperWidgetUI.d.ts +9 -3
- package/dist/types/widgets/WrapperWidgetUI.d.ts.map +1 -1
- package/dist/widgets/index.cjs +1 -1
- package/dist/widgets/index.js +36 -36
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("@mui/material"),j=require("react"),c=require("../TablePaginationActions-B7ycFqaM.cjs"),C=require("@mui/icons-material"),L=require("react-intl"),F=require("@mui/material/styles"),$=require("../Alert-DyuvFDkP.cjs");function _({children:t,...n},r){return e.jsx(o.Button,{...n,ref:r,children:e.jsx(c.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:t})})}const G=j.forwardRef(_),V=o.styled(o.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),q=o.styled(c.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),H=o.styled(o.Box)(({theme:t})=>({display:"flex",svg:{width:c.ICON_SIZE_SMALL,height:c.ICON_SIZE_SMALL,fontSize:c.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function U({label:t,type:n,icon:r,inheritSize:i}){return e.jsxs(V,{children:[t,n&&e.jsx(q,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:n==="required"?"(required)":"(optional)"}),r&&e.jsx(H,{children:r})]})}function W({InputProps:t,size:n="small",...r},i){const[a,s]=j.useState(!1),d=()=>s(!a);return e.jsx(o.TextField,{...r,ref:i,type:a?"text":"password",size:n,InputProps:{...t,endAdornment:e.jsx(o.InputAdornment,{position:"end",children:e.jsx(o.IconButton,{size:n,onClick:d,children:a?e.jsx(C.VisibilityOutlined,{}):e.jsx(C.VisibilityOffOutlined,{})})})}})}const N=j.forwardRef(W),P={};function Z(t="$lodash$"){P[t]||(P[t]=0);const n=++P[t];return t==="$lodash$"?`${n}`:`${t}${n}`}const z=o.styled(o.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),Y=o.styled(o.MenuItem)(()=>({display:"none"}));function J({children:t,placeholder:n,size:r="small",displayEmpty:i,menuProps:a,inputProps:s,labelId:d,label:x,labelSecondary:b,helperText:v,name:p,error:g,focused:f,disabled:M,fullWidth:y,required:h,"aria-label":l,...S},m){const T=r==="small",[u]=j.useState(()=>Z("select-label-")),I=x?d??u:void 0;return e.jsxs(o.FormControl,{size:r,error:g,focused:f,disabled:M,fullWidth:y,required:h,children:[e.jsxs(o.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[x&&e.jsx(o.InputLabel,{shrink:!0,id:I,children:x}),b&&e.jsx(o.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:b})]}),e.jsxs(z,{...S,labelId:I,name:p,ref:m,size:r,fullWidth:y,displayEmpty:i??!!n,inputProps:{...s,"aria-label":l},MenuProps:{...a,PopoverClasses:{paper:T?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[n&&e.jsx(Y,{disabled:!0,value:"",children:e.jsx(c.Typography,{variant:T?"body2":"body1",color:"text.hint",component:"span",children:n})}),t]}),v&&e.jsx(o.FormHelperText,{"aria-label":`${p}-helper`,children:v})]})}const O=j.forwardRef(J),K=o.styled(o.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:n,theme:r})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:r.spacing(.5),"& .MuiDivider-root":{height:r.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:r.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:r.spacing(4),margin:`${r.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:r.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:r.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:r.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:r.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:r.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...n==="primary"&&{backgroundColor:r.palette.background.paper},...n==="secondary"&&{backgroundColor:r.palette.background.default},...n==="transparent"&&{backgroundColor:"transparent"}}));function Q({children:t,variant:n="floating",backgroundColor:r,...i}){const s=n==="unbounded"?"transparent":"primary";return e.jsx(K,{...i,variant:n,backgroundColor:r??s,children:t})}const X=o.styled(o.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:n,width:r,height:i})=>({...n&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...r&&{".MuiList-root":{width:r,minWidth:r}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function tt(t){return e.jsx(X,{...t})}const et=o.styled(o.MenuItem,{shouldForwardProp:t=>!["subtitle","destructive","extended","fixed","iconColor"].includes(t)})(({theme:t,dense:n,subtitle:r,destructive:i,extended:a,fixed:s,iconColor:d="primary"})=>({...r&&{pointerEvents:"none",columnGap:0,...t.typography.caption,fontWeight:500,color:t.palette.text.secondary,".MuiListItemText-root .MuiTypography-root":{...t.typography.caption,fontWeight:500,color:t.palette.text.secondary},"&.MuiMenuItem-root":{minHeight:t.spacing(3),paddingTop:0,paddingBottom:0,marginTop:t.spacing(1),"&:not(:first-of-type)":{minHeight:t.spacing(5),paddingTop:t.spacing(1),borderTop:`1px solid ${t.palette.divider}`}}},...d==="primary"&&{".MuiListItemIcon-root svg path":{fill:t.palette.text.primary},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:t.palette.primary.main},'.MuiAutocomplete-listbox &[aria-selected="true"] svg path':{fill:t.palette.primary.main}},...i&&{color:t.palette.error.main,".MuiTypography-root":{color:t.palette.error.main},"svg, & .MuiSvgIcon-root":{color:t.palette.error.main},".MuiListItemIcon-root svg path":{fill:t.palette.error.main},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:t.palette.error.main},"&:hover":{backgroundColor:t.palette.error.relatedLight},"&.Mui-selected":{color:t.palette.error.main,".MuiTypography-root":{color:t.palette.error.main},"svg, & .MuiSvgIcon-root":{color:t.palette.error.main}},"&.Mui-disabled":{color:t.palette.text.disabled,".MuiTypography-root":{color:t.palette.text.disabled},svg:{color:t.palette.text.disabled}}},...a&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:t.spacing(6)}},...s&&{"&.MuiMenuItem-root":{position:"sticky",top:0,left:0,bottom:0,right:0,zIndex:2,minHeight:t.spacing(6),marginBottom:t.spacing(1),padding:t.spacing(.5,1.5),backgroundColor:t.palette.background.paper,borderBottom:`1px solid ${t.palette.divider}`},".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type":{minHeight:t.spacing(6),marginTop:0,"&:hover":{backgroundColor:t.palette.background.paper}}},...!s&&{".MuiList-root &:first-of-type":{marginTop:t.spacing(1)}},...n&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:t.spacing(3),padding:t.spacing(.25,1.5)}}}));function k(t){return e.jsx(et,{...t})}const nt=o.styled(o.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:n,width:r,height:i})=>({...n&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...r&&{width:r,minWidth:r},...i&&{maxHeight:i}}}));function ot(t){return e.jsx(nt,{...t})}function rt({selectedOptions:t,options:n,onChange:r}){const[i,a]=j.useState(t||[]),s=n.length===i.length,d=i.length>0;return j.useEffect(()=>{i!==t&&a(i)},[t]),{areAllSelected:s,areAnySelected:d,currentOptions:i,handleChange:p=>{const{target:{value:g}}=p,f=typeof g=="string"?g.split(","):g.filter(M=>M!==void 0);a(f),r(f)},selectAll:()=>{const p=n==null?void 0:n.filter(({disabled:g})=>!g).map(({value:g})=>g);p&&(p.every(f=>i.includes(f))?(a([]),r([])):(a(p),r(p)))},unselectAll:()=>{a([]),r([])}}}const it=o.styled(o.Link)(({disabled:t,theme:n})=>({display:"flex",alignItems:"center",gap:n.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:n.palette.text.disabled}}));function at({areAllSelected:t,areAnySelected:n,selectAll:r,selectAllDisabled:i}){const a=L.useIntl(),s=c.useImperativeIntl(a);return e.jsx(k,{fixed:!0,children:e.jsxs(it,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:r,tabIndex:0,children:[e.jsx(o.Checkbox,{checked:t,indeterminate:n&&!t,disabled:i}),s.formatMessage({id:"c4r.form.selectAll"})]})})}const lt=o.styled(o.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),st=o.styled(o.InputAdornment)(({theme:t})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint}})),dt=[],ct=()=>{};function ut({options:t=dt,selectedOptions:n,size:r="small",placeholder:i,showCounter:a,showFilters:s=!0,onChange:d=ct,selectAllDisabled:x,tooltipPlacement:b,variant:v,...p},g){const{areAllSelected:f,areAnySelected:M,currentOptions:y,handleChange:h,selectAll:l,unselectAll:S}=rt({options:t,selectedOptions:n,onChange:d}),m=r==="small",T=m||v==="standard"?0:2,u=L.useIntl(),I=c.useImperativeIntl(u),B=`${y.length} ${I.formatMessage({id:"c4r.form.selected"})}`,w=j.useMemo(()=>f?e.jsx(c.Typography,{component:"span",variant:m?"body2":"body1",color:"textPrimary",ml:T,children:I.formatMessage({id:"c4r.form.allSelected"})}):M?e.jsx(c.Typography,{component:"span",variant:m?"body2":"body1",color:"textPrimary",ml:T,children:a&&y.length>1?B:y.join(", ")}):e.jsx(c.Typography,{component:"span",variant:m?"body2":"body1",color:"text.hint",ml:T,children:i??I.formatMessage({id:"c4r.form.noneSelected"})}),[f,M,B,y,I,m,T,i,a]);return e.jsxs(O,{...p,ref:g,multiple:!0,displayEmpty:!0,placeholder:i,value:y,renderValue:()=>w,onChange:h,size:r,variant:v,endAdornment:s&&M&&e.jsx(st,{position:"end",children:e.jsx(o.IconButton,{onClick:S,size:"small",children:e.jsx(C.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[s&&e.jsx(at,{areAllSelected:f,areAnySelected:M,selectAll:l,selectAllDisabled:x}),t==null?void 0:t.map(A=>{const E=e.jsxs(lt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[e.jsx(o.Checkbox,{disabled:A.disabled,checked:y.includes(A.value)}),e.jsx(o.ListItemText,{primary:A.label})]},A.value);return A.tooltip?e.jsx(o.Tooltip,{title:A.tooltip,placement:b,children:E},A.value):E})]})}const pt=j.forwardRef(ut),gt=F.styled(o.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:n})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:n.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:n.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:n.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function xt({buttonText:t,hasFiles:n,size:r,error:i,disabled:a,handleReset:s,handleOpen:d,inProgress:x}){return e.jsx(o.InputAdornment,{position:"end",children:x?e.jsx(o.IconButton,{"aria-label":"loading",disabled:!0,size:r,children:e.jsx(o.CircularProgress,{size:18})}):n?e.jsx(o.IconButton,{onClick:s,size:r,"aria-label":"delete",disabled:a,children:e.jsx(C.Cancel,{})}):e.jsx(o.Button,{onClick:d,size:r,variant:"text",color:i?"default":"primary",disabled:a,children:t})})}function D({name:t,multiple:n,handleReset:r,handleOpen:i,dragOver:a,error:s,placeholder:d,focused:x,buttonText:b="Browse",inProgress:v,InputProps:p,size:g="small",hasFiles:f,cursor:M="pointer",...y}){return e.jsx(gt,{...y,size:g,error:s,placeholder:d,focused:x??a,cursor:M,InputProps:{...p,name:t,readOnly:!0,endAdornment:e.jsx(xt,{buttonText:b,hasFiles:f,size:g,error:s,disabled:!!a,handleReset:r,handleOpen:i,inProgress:v})}})}function ft({onChange:t,files:n,multiple:r,placeholder:i,uploadInputRef:a}){const s=L.useIntl(),d=c.useImperativeIntl(s),[x,b]=j.useState(""),[v,p]=j.useState(!1);j.useEffect(()=>{!n||n.length===0?b(""):n.length===1?b(n[0].name):b(d.formatMessage({id:"c4r.form.filesSelected"},{count:n.length}))},[n,d]);const g=()=>{var u;(u=a.current)==null||u.click()},f=u=>{u.preventDefault(),p(!0)},M=u=>{u.preventDefault(),p(!1)},y=u=>{u.preventDefault(),p(!1);const I=u.dataTransfer.items,B=h(I);t==null||t(B)},h=u=>{const I=[];for(const B of Array.from(u))if(B.kind==="file"){const w=B.getAsFile();I.push(w)}return I},l=u=>{const I=Array.from(u.target.files);t==null||t(I)},S=u=>{u.stopPropagation(),b("")},m=j.useMemo(()=>{const u=d.formatMessage({id:"c4r.form.dragPlaceholder"},{count:r?0:1}),I=d.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:r?0:1});let B="";return v?B=I:B=i??u,B},[v,r,i,d]);return{filesText:x,getPlaceholder:m,dragOver:v,inputEvents:{onDragOver:f,onDragLeave:M,onDrop:y,onClick:g},handleFiles:l,handleReset:S}}const yt=["application/JSON"];function ht({name:t,buttonText:n,accept:r,files:i,inProgress:a,onChange:s,multiple:d,placeholder:x,error:b,focused:v,nativeInputProps:p,...g}){const f=r??yt,M=j.useRef(null),{filesText:y,getPlaceholder:h,dragOver:l,inputEvents:S,handleFiles:m,handleReset:T}=ft({uploadInputRef:M,files:i,onChange:s,multiple:d,placeholder:x});return e.jsxs(e.Fragment,{children:[e.jsx(D,{...g,placeholder:h,value:y,error:b,focused:v??l,handleReset:T,dragOver:l,inProgress:a,hasFiles:!!y,InputProps:S,buttonText:n}),e.jsx("input",{...p,ref:M,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:d,onChange:m})]})}const mt=o.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:n})=>({width:"100%",borderRadius:n.spacing(.5),...t==="outlined"&&{backgroundColor:n.palette.background.paper,boxShadow:`inset 0 0 0 1px ${n.palette.divider}`}}));function Mt({variant:t="standard",items:n,...r}){return e.jsx(mt,{...r,variant:t,children:n.map((i,a)=>e.jsxs(o.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[e.jsx(o.AccordionSummary,{"aria-controls":`${a}-content`,id:`${a}-header`,children:i.summary}),e.jsx(o.AccordionDetails,{children:i.content})]},a))})}const bt=o.createFilterOptions(),vt="c4r.form.add";function It(t){return t&&typeof t=="object"?t.title??String(t):String(t)}function jt({creatable:t,newItemLabel:n=vt,newItemIcon:r,freeSolo:i,renderOption:a,forcePopupIcon:s,filterOptions:d,getOptionLabel:x=It,...b},v){const p=L.useIntl(),g=c.useImperativeIntl(p),f=(h,l)=>{const S=bt(h,l),{inputValue:m}=l,T=h.some(u=>m===x(u));return m.length>1&&m!==""&&!T&&S.push({inputValue:m,title:typeof n=="function"?n(m):`${g.formatMessage({id:n})} "${m}"`}),S},M=h=>typeof h=="string"?h:h.inputValue?h.inputValue:x(h),y=(h,l)=>e.jsx(j.Fragment,{children:l.divider?e.jsx(o.Divider,{}):e.jsxs(e.Fragment,{children:[l.inputValue&&e.jsx(o.Divider,{}),e.jsxs(k,{...h,fixed:l.fixed,extended:l.extended,dense:l.dense,destructive:l.destructive,disabled:l.disabled,subtitle:l.subtitle,iconColor:l.iconColor,children:[l.inputValue&&e.jsx(o.ListItemIcon,{children:r??e.jsx(C.AddCircleOutlineOutlined,{})}),l.startAdornment&&!l.inputValue&&e.jsx(o.ListItemIcon,{children:l.startAdornment}),e.jsxs(o.ListItemText,{children:[l.alternativeTitle??l.title,l.secondaryText&&e.jsx(c.Typography,{component:"p",variant:"caption",color:"text.secondary",children:l.secondaryText})]}),l.endAdornment]})]})},l.inputValue??l.title);return e.jsx(o.Autocomplete,{...b,ref:v,filterOptions:t?f:d,getOptionLabel:t?M:x,renderOption:t?y:a,freeSolo:t||i,forcePopupIcon:t||s})}const Tt=j.forwardRef(jt),R={large:5,medium:4,small:3,xsmall:2.25},Bt=o.styled(o.Avatar,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:n="medium"})=>({width:t.spacing(R[n]),height:t.spacing(R[n]),...t.typography.subtitle1,...n==="large"&&{...t.typography.h6},...n==="small"&&{...t.typography.caption,fontWeight:500},...n==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:c.ICON_SIZE_SMALL,height:c.ICON_SIZE_SMALL}}}));function St(t){return e.jsx(Bt,{...t})}const At=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:c.APPBAR_SIZE,marginRight:t.spacing(1.5)})),Ct=o.styled(o.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),Ft=o.styled(o.Divider)(({theme:t})=>({borderColor:o.alpha(t.palette.brand.appBarContrastText,.12)}));function Lt({onClickMenu:t}){return e.jsx(o.Box,{sx:{display:{md:"none",xs:"block"}},children:e.jsxs(At,{children:[e.jsx(Ct,{onClick:t,children:e.jsx(C.MenuOutlined,{})}),e.jsx(Ft,{orientation:"vertical",flexItem:!0})]})})}const wt=o.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function Pt({logo:t}){return e.jsx(wt,{children:t})}const kt=F.styled(c.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function Et({text:t}){const n=F.useTheme();return e.jsx(kt,{component:"span",variant:"subtitle1",color:n.palette.brand.appBarContrastText,children:t})}const Rt=F.styled(c.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function Ot({text:t}){const n=F.useTheme();return e.jsx(Rt,{component:"span",variant:"body2",weight:"strong",color:n.palette.brand.appBarContrastText,children:t})}const Dt=o.styled(o.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),$t=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),_t=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function Gt({children:t,brandLogo:n,brandText:r,secondaryText:i,showBurgerMenu:a=!1,onClickMenu:s,...d}){return e.jsx(Dt,{...d,children:e.jsxs(o.Toolbar,{children:[e.jsxs($t,{children:[a&&e.jsx(Lt,{onClickMenu:s}),n&&e.jsx(Pt,{logo:n}),r&&e.jsx(Et,{text:r}),i&&e.jsx(Ot,{text:i})]}),e.jsx(_t,{children:t})]})})}const Vt=[{outlinedBullet:!1,value:""}],qt=o.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),Ht=o.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),Ut=o.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),Wt=o.styled(c.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Nt({items:t=Vt,title:n}){return e.jsxs(e.Fragment,{children:[n&&e.jsx(c.Typography,{color:"inherit",variant:"caption",weight:"medium",children:n}),e.jsx(qt,{children:t.map((r,i)=>e.jsxs(Ht,{children:[e.jsx(Ut,{style:{backgroundColor:`${r.outlinedBullet?"transparent":r.color}`,borderColor:r.color}}),r.category&&e.jsx(Wt,{color:"inherit",variant:"caption",children:r.category}),e.jsx(c.Typography,{color:"inherit",variant:"caption",weight:"medium",children:r.value})]},i))})]})}exports.TablePaginationActions=c.TablePaginationActions;exports.Typography=c.Typography;exports.Alert=$.Alert;exports.AccordionGroup=Mt;exports.AppBar=Gt;exports.Autocomplete=Tt;exports.Avatar=St;exports.Button=G;exports.LabelWithIndicator=U;exports.Menu=tt;exports.MenuItem=k;exports.MenuList=ot;exports.MultipleSelectField=pt;exports.PasswordField=N;exports.SelectField=O;exports.ToggleButtonGroup=Q;exports.TooltipData=Nt;exports.UploadField=ht;exports.UploadFieldBase=D;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("@mui/material"),I=require("react"),c=require("../TablePaginationActions-B7ycFqaM.cjs"),C=require("@mui/icons-material"),P=require("react-intl"),L=require("@mui/material/styles"),U=require("../Alert-DyuvFDkP.cjs");function W({children:t,...n},r){return e.jsx(o.Button,{...n,ref:r,children:e.jsx(c.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:t})})}const V=I.forwardRef(W),N=o.styled(o.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Z=o.styled(c.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),z=o.styled(o.Box)(({theme:t})=>({display:"flex",svg:{width:c.ICON_SIZE_SMALL,height:c.ICON_SIZE_SMALL,fontSize:c.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function Y({label:t,type:n,icon:r,inheritSize:i}){return e.jsxs(N,{children:[t,n&&e.jsx(Z,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:n==="required"?"(required)":"(optional)"}),r&&e.jsx(z,{children:r})]})}function J({InputProps:t,size:n="small",...r},i){const[a,l]=I.useState(!1),s=()=>l(!a);return e.jsx(o.TextField,{...r,ref:i,type:a?"text":"password",size:n,InputProps:{...t,endAdornment:e.jsx(o.InputAdornment,{position:"end",children:e.jsx(o.IconButton,{size:n,onClick:s,children:a?e.jsx(C.VisibilityOutlined,{}):e.jsx(C.VisibilityOffOutlined,{})})})}})}const K=I.forwardRef(J),k={};function Q(t="$lodash$"){k[t]||(k[t]=0);const n=++k[t];return t==="$lodash$"?`${n}`:`${t}${n}`}const X=o.styled(o.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),tt=o.styled(o.MenuItem)(()=>({display:"none"}));function et({children:t,placeholder:n,size:r="small",displayEmpty:i,menuProps:a,inputProps:l,labelId:s,label:x,labelSecondary:b,helperText:v,name:u,error:p,focused:f,disabled:M,fullWidth:y,required:h,"aria-label":B,...j},g){const T=r==="small",[d]=I.useState(()=>Q("select-label-")),m=x?s??d:void 0;return e.jsxs(o.FormControl,{size:r,error:p,focused:f,disabled:M,fullWidth:y,required:h,children:[e.jsxs(o.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[x&&e.jsx(o.InputLabel,{shrink:!0,id:m,children:x}),b&&e.jsx(o.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:b})]}),e.jsxs(X,{...j,labelId:m,name:u,ref:g,size:r,fullWidth:y,displayEmpty:i??!!n,inputProps:{...l,"aria-label":B},MenuProps:{...a,PopoverClasses:{paper:T?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[n&&e.jsx(tt,{disabled:!0,value:"",children:e.jsx(c.Typography,{variant:T?"body2":"body1",color:"text.hint",component:"span",children:n})}),t]}),v&&e.jsx(o.FormHelperText,{"aria-label":`${u}-helper`,children:v})]})}const $=I.forwardRef(et),nt=o.styled(o.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:n,theme:r})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:r.spacing(.5),"& .MuiDivider-root":{height:r.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:r.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:r.spacing(4),margin:`${r.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:r.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:r.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:r.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:r.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:r.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...n==="primary"&&{backgroundColor:r.palette.background.paper},...n==="secondary"&&{backgroundColor:r.palette.background.default},...n==="transparent"&&{backgroundColor:"transparent"}}));function ot({children:t,variant:n="floating",backgroundColor:r,...i}){const l=n==="unbounded"?"transparent":"primary";return e.jsx(nt,{...i,variant:n,backgroundColor:r??l,children:t})}const rt=o.styled(o.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:n,width:r,height:i})=>({...n&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...r&&{".MuiList-root":{width:r,minWidth:r}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function it(t){return e.jsx(rt,{...t})}const at=o.styled(o.MenuItem,{shouldForwardProp:t=>!["subtitle","destructive","extended","fixed","iconColor"].includes(t)})(({theme:t,dense:n,subtitle:r,destructive:i,extended:a,fixed:l,iconColor:s="primary"})=>({...r&&{pointerEvents:"none",columnGap:0,...t.typography.caption,fontWeight:500,color:t.palette.text.secondary,".MuiListItemText-root .MuiTypography-root":{...t.typography.caption,fontWeight:500,color:t.palette.text.secondary},"&.MuiMenuItem-root":{minHeight:t.spacing(3),paddingTop:0,paddingBottom:0,marginTop:t.spacing(1),"&:not(:first-of-type)":{minHeight:t.spacing(5),paddingTop:t.spacing(1),borderTop:`1px solid ${t.palette.divider}`}}},...s==="primary"&&{".MuiListItemIcon-root svg path":{fill:t.palette.text.primary},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:t.palette.primary.main},'.MuiAutocomplete-listbox &[aria-selected="true"] svg path':{fill:t.palette.primary.main}},...i&&{color:t.palette.error.main,".MuiTypography-root":{color:t.palette.error.main},"svg, & .MuiSvgIcon-root":{color:t.palette.error.main},".MuiListItemIcon-root svg path":{fill:t.palette.error.main},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:t.palette.error.main},"&:hover":{backgroundColor:t.palette.error.relatedLight},"&.Mui-selected":{color:t.palette.error.main,".MuiTypography-root":{color:t.palette.error.main},"svg, & .MuiSvgIcon-root":{color:t.palette.error.main}},"&.Mui-disabled":{color:t.palette.text.disabled,".MuiTypography-root":{color:t.palette.text.disabled},svg:{color:t.palette.text.disabled}}},...a&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:t.spacing(6)}},...l&&{"&.MuiMenuItem-root":{position:"sticky",top:0,left:0,bottom:0,right:0,zIndex:2,minHeight:t.spacing(6),marginBottom:t.spacing(1),padding:t.spacing(.5,1.5),backgroundColor:t.palette.background.paper,borderBottom:`1px solid ${t.palette.divider}`},".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type":{minHeight:t.spacing(6),marginTop:0,"&:hover":{backgroundColor:t.palette.background.paper}}},...!l&&{".MuiList-root &:first-of-type":{marginTop:t.spacing(1)}},...n&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:t.spacing(3),padding:t.spacing(.25,1.5)}}}));function E(t){return e.jsx(at,{...t})}const lt=o.styled(o.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:n,width:r,height:i})=>({...n&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...r&&{width:r,minWidth:r},...i&&{maxHeight:i}}}));function st(t){return e.jsx(lt,{...t})}function dt({selectedOptions:t,options:n,onChange:r}){const[i,a]=I.useState(t??[]),l=n.length===i.length,s=i.length>0;return I.useEffect(()=>{i!==t&&a(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:u=>{const{target:{value:p}}=u,f=typeof p=="string"?p.split(","):p.filter(M=>M!==void 0);a(f),r(f)},selectAll:()=>{const u=n==null?void 0:n.filter(({disabled:p})=>!p).map(({value:p})=>p);u&&(u.every(f=>i.includes(f))?(a([]),r([])):(a(u),r(u)))},unselectAll:()=>{a([]),r([])}}}const ct=o.styled(o.Link)(({disabled:t,theme:n})=>({display:"flex",alignItems:"center",gap:n.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:n.palette.text.disabled}}));function ut({areAllSelected:t,areAnySelected:n,selectAll:r,selectAllDisabled:i}){const a=P.useIntl(),l=c.useImperativeIntl(a);return e.jsx(E,{fixed:!0,children:e.jsxs(ct,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:r,tabIndex:0,children:[e.jsx(o.Checkbox,{checked:t,indeterminate:n&&!t,disabled:i}),l.formatMessage({id:"c4r.form.selectAll"})]})})}const pt=o.styled(o.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),gt=o.styled(o.InputAdornment)(({theme:t})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint}})),xt=[],ft=()=>{};function yt({options:t=xt,selectedOptions:n,size:r="small",placeholder:i,showCounter:a,showFilters:l=!0,onChange:s=ft,selectAllDisabled:x,tooltipPlacement:b,variant:v,...u},p){const{areAllSelected:f,areAnySelected:M,currentOptions:y,handleChange:h,selectAll:B,unselectAll:j}=dt({options:t,selectedOptions:n,onChange:s}),g=r==="small",T=g||v==="standard"?0:2,d=P.useIntl(),m=c.useImperativeIntl(d),S=`${y.length} ${m.formatMessage({id:"c4r.form.selected"})}`,F=I.useMemo(()=>f?e.jsx(c.Typography,{component:"span",variant:g?"body2":"body1",color:"textPrimary",ml:T,children:m.formatMessage({id:"c4r.form.allSelected"})}):M?e.jsx(c.Typography,{component:"span",variant:g?"body2":"body1",color:"textPrimary",ml:T,children:a&&y.length>1?S:y.join(", ")}):e.jsx(c.Typography,{component:"span",variant:g?"body2":"body1",color:"text.hint",ml:T,children:i??m.formatMessage({id:"c4r.form.noneSelected"})}),[f,M,S,y,m,g,T,i,a]);return e.jsxs($,{...u,ref:p,multiple:!0,displayEmpty:!0,placeholder:i,value:y,renderValue:()=>F,onChange:h,size:r,variant:v,endAdornment:l&&M&&e.jsx(gt,{position:"end",children:e.jsx(o.IconButton,{onClick:j,size:"small",children:e.jsx(C.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&e.jsx(ut,{areAllSelected:f,areAnySelected:M,selectAll:B,selectAllDisabled:x}),t==null?void 0:t.map(A=>{const w=e.jsxs(pt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[e.jsx(o.Checkbox,{disabled:A.disabled,checked:y.includes(A.value)}),e.jsx(o.ListItemText,{primary:A.label})]},A.value);return A.tooltip?e.jsx(o.Tooltip,{title:A.tooltip,placement:b,children:w},A.value):w})]})}const ht=I.forwardRef(yt),mt=L.styled(o.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:n})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:n.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:n.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:n.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Mt({buttonText:t,hasFiles:n,size:r,error:i,disabled:a,handleReset:l,handleOpen:s,inProgress:x}){return e.jsx(o.InputAdornment,{position:"end",children:x?e.jsx(o.IconButton,{"aria-label":"loading",disabled:!0,size:r,children:e.jsx(o.CircularProgress,{size:18})}):n?e.jsx(o.IconButton,{onClick:l,size:r,"aria-label":"delete",disabled:a,children:e.jsx(C.Cancel,{})}):e.jsx(o.Button,{onClick:s,size:r,variant:"text",color:i?"default":"primary",disabled:a,children:t})})}function _({name:t,multiple:n,handleReset:r,handleOpen:i,dragOver:a,error:l,placeholder:s,focused:x,buttonText:b="Browse",inProgress:v,InputProps:u,size:p="small",hasFiles:f,cursor:M="pointer",...y}){return e.jsx(mt,{...y,size:p,error:l,placeholder:s,focused:x??a,cursor:M,InputProps:{...u,name:t,readOnly:!0,endAdornment:e.jsx(Mt,{buttonText:b,hasFiles:f,size:p,error:l,disabled:!!a,handleReset:r,handleOpen:i,inProgress:v})}})}function bt({onChange:t,files:n,multiple:r,placeholder:i,uploadInputRef:a}){const l=P.useIntl(),s=c.useImperativeIntl(l),[x,b]=I.useState(""),[v,u]=I.useState(!1);I.useEffect(()=>{!n||n.length===0?b(""):n.length===1?b(n[0].name):b(s.formatMessage({id:"c4r.form.filesSelected"},{count:n.length}))},[n,s]);const p=()=>{var d;(d=a.current)==null||d.click()},f=d=>{d.preventDefault(),u(!0)},M=d=>{d.preventDefault(),u(!1)},y=d=>{d.preventDefault(),u(!1);const m=d.dataTransfer.items,S=h(m);t==null||t(S)},h=d=>{const m=[];for(const S of Array.from(d))if(S.kind==="file"){const F=S.getAsFile();m.push(F)}return m},B=d=>{const m=Array.from(d.target.files);t==null||t(m)},j=d=>{d.stopPropagation(),b("")},g=I.useMemo(()=>{const d=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:r?0:1}),m=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:r?0:1});let S="";return v?S=m:S=i??d,S},[v,r,i,s]);return{filesText:x,getPlaceholder:g,dragOver:v,inputEvents:{onDragOver:f,onDragLeave:M,onDrop:y,onClick:p},handleFiles:B,handleReset:j}}const vt=["application/JSON"];function It({name:t,buttonText:n,accept:r,files:i,inProgress:a,onChange:l,multiple:s,placeholder:x,error:b,focused:v,nativeInputProps:u,...p}){const f=r??vt,M=I.useRef(null),{filesText:y,getPlaceholder:h,dragOver:B,inputEvents:j,handleFiles:g,handleReset:T}=bt({uploadInputRef:M,files:i,onChange:l,multiple:s,placeholder:x});return e.jsxs(e.Fragment,{children:[e.jsx(_,{...p,placeholder:h,value:y,error:b,focused:v??B,handleReset:T,dragOver:B,inProgress:a,hasFiles:!!y,InputProps:j,buttonText:n}),e.jsx("input",{...u,ref:M,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:s,onChange:g})]})}const jt=o.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:n})=>({width:"100%",borderRadius:n.spacing(.5),...t==="outlined"&&{backgroundColor:n.palette.background.paper,boxShadow:`inset 0 0 0 1px ${n.palette.divider}`}}));function Tt({variant:t="standard",items:n,...r}){return e.jsx(jt,{...r,variant:t,children:n.map((i,a)=>e.jsxs(o.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[e.jsx(o.AccordionSummary,{"aria-controls":`${a}-content`,id:`${a}-header`,children:i.summary}),e.jsx(o.AccordionDetails,{children:i.content})]},a))})}const Bt=o.createFilterOptions(),St="c4r.form.add";function At(t){return t&&typeof t=="object"?t.title??String(t):String(t)}function Ct({creatable:t,newItemLabel:n=St,newItemIcon:r,freeSolo:i,renderOption:a,forcePopupIcon:l,filterOptions:s,getOptionLabel:x=At,...b},v){const u=P.useIntl(),p=c.useImperativeIntl(u),f=(h,B)=>{const j=Bt(h,B),{inputValue:g}=B,T=h.some(d=>g===x(d));return g.length>1&&g!==""&&!T&&j.push({inputValue:g,title:typeof n=="function"?n(g):`${p.formatMessage({id:n})} "${g}"`}),j},M=h=>typeof h=="string"?h:h.inputValue?h.inputValue:x(h),y=(h,B)=>{const{inputValue:j,title:g,alternativeTitle:T,secondaryText:d,divider:m,fixed:S,extended:F,dense:A,destructive:w,disabled:R,subtitle:G,iconColor:q,startAdornment:O,endAdornment:H}=B;return e.jsx(I.Fragment,{children:m?e.jsx(o.Divider,{}):e.jsxs(e.Fragment,{children:[j&&e.jsx(o.Divider,{}),e.jsxs(E,{...h,fixed:S,extended:F,dense:A,destructive:w,disabled:R,subtitle:G,iconColor:q,children:[j&&e.jsx(o.ListItemIcon,{children:r??e.jsx(C.AddCircleOutlineOutlined,{})}),O&&!j&&e.jsx(o.ListItemIcon,{children:O}),e.jsxs(o.ListItemText,{children:[T??g,d&&e.jsx(c.Typography,{component:"p",variant:"caption",color:"text.secondary",children:d})]}),H]})]})},j??g)};return e.jsx(o.Autocomplete,{...b,ref:v,filterOptions:t?f:s,getOptionLabel:t?M:x,renderOption:t?y:a,freeSolo:t||i,forcePopupIcon:t||l})}const Ft=I.forwardRef(Ct),D={large:5,medium:4,small:3,xsmall:2.25},Lt=o.styled(o.Avatar,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:n="medium"})=>({width:t.spacing(D[n]),height:t.spacing(D[n]),...t.typography.subtitle1,...n==="large"&&{...t.typography.h6},...n==="small"&&{...t.typography.caption,fontWeight:500},...n==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:c.ICON_SIZE_SMALL,height:c.ICON_SIZE_SMALL}}}));function wt(t){return e.jsx(Lt,{...t})}const Pt=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:c.APPBAR_SIZE,marginRight:t.spacing(1.5)})),kt=o.styled(o.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),Et=o.styled(o.Divider)(({theme:t})=>({borderColor:o.alpha(t.palette.brand.appBarContrastText,.12)}));function Rt({onClickMenu:t}){return e.jsx(o.Box,{sx:{display:{md:"none",xs:"block"}},children:e.jsxs(Pt,{children:[e.jsx(kt,{onClick:t,children:e.jsx(C.MenuOutlined,{})}),e.jsx(Et,{orientation:"vertical",flexItem:!0})]})})}const Ot=o.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function Dt({logo:t}){return e.jsx(Ot,{children:t})}const $t=L.styled(c.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function _t({text:t}){const n=L.useTheme();return e.jsx($t,{component:"span",variant:"subtitle1",color:n.palette.brand.appBarContrastText,children:t})}const Gt=L.styled(c.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function qt({text:t}){const n=L.useTheme();return e.jsx(Gt,{component:"span",variant:"body2",weight:"strong",color:n.palette.brand.appBarContrastText,children:t})}const Ht=o.styled(o.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Ut=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),Wt=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function Vt({children:t,brandLogo:n,brandText:r,secondaryText:i,showBurgerMenu:a=!1,onClickMenu:l,...s}){return e.jsx(Ht,{...s,children:e.jsxs(o.Toolbar,{children:[e.jsxs(Ut,{children:[a&&e.jsx(Rt,{onClickMenu:l}),n&&e.jsx(Dt,{logo:n}),r&&e.jsx(_t,{text:r}),i&&e.jsx(qt,{text:i})]}),e.jsx(Wt,{children:t})]})})}const Nt=[{outlinedBullet:!1,value:""}],Zt=o.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),zt=o.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),Yt=o.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),Jt=o.styled(c.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Kt({items:t=Nt,title:n}){return e.jsxs(e.Fragment,{children:[n&&e.jsx(c.Typography,{color:"inherit",variant:"caption",weight:"medium",children:n}),e.jsx(Zt,{children:t.map((r,i)=>e.jsxs(zt,{children:[e.jsx(Yt,{style:{backgroundColor:`${r.outlinedBullet?"transparent":r.color}`,borderColor:r.color}}),r.category&&e.jsx(Jt,{color:"inherit",variant:"caption",children:r.category}),e.jsx(c.Typography,{color:"inherit",variant:"caption",weight:"medium",children:r.value})]},i))})]})}exports.TablePaginationActions=c.TablePaginationActions;exports.Typography=c.Typography;exports.Alert=U.Alert;exports.AccordionGroup=Tt;exports.AppBar=Vt;exports.Autocomplete=Ft;exports.Avatar=wt;exports.Button=V;exports.LabelWithIndicator=Y;exports.Menu=it;exports.MenuItem=E;exports.MenuList=st;exports.MultipleSelectField=ht;exports.PasswordField=K;exports.SelectField=$;exports.ToggleButtonGroup=ot;exports.TooltipData=Kt;exports.UploadField=It;exports.UploadFieldBase=_;
|