????
Current Path : C:/inetpub/vhost/gdnn.gdtsolutions.vn/build/assets/ |
Current File : C:/inetpub/vhost/gdnn.gdtsolutions.vn/build/assets/ListItem-1dafb2d8.js |
import{r as o,D as y,P as t,a as Q}from"./index-fa055cb8.js";import{_ as P}from"./OdataUtils-36531977.js";import{c as x,a as X}from"./withStyles-fa9fb6d9.js";import{w as S}from"./capitalize-d666ae9b.js";import{l as V,u as Z,m as ee}from"./DialogCustomize-3c3737d6.js";var M=o.createContext({});M.displayName="ListContext";const I=M;var te={root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},B=o.forwardRef(function(e,i){var s=e.children,a=e.classes,v=e.className,u=e.component,g=u===void 0?"ul":u,m=e.dense,f=m===void 0?!1:m,n=e.disablePadding,N=n===void 0?!1:n,l=e.subheader,h=P(e,["children","classes","className","component","dense","disablePadding","subheader"]),C=o.useMemo(function(){return{dense:f}},[f]);return o.createElement(I.Provider,{value:C},o.createElement(g,y({className:x(a.root,v,f&&a.dense,!N&&a.padding,l&&a.subheader),ref:i},h),l,s))});B.propTypes={children:t.node,classes:t.object.isRequired,className:t.string,component:t.elementType,dense:t.bool,disablePadding:t.bool,subheader:t.node};const le=S(te,{name:"MuiList"})(B);var oe=function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}},ne=typeof window>"u"?o.useEffect:o.useLayoutEffect,j=o.forwardRef(function(e,i){var s=e.alignItems,a=s===void 0?"center":s,v=e.autoFocus,u=v===void 0?!1:v,g=e.button,m=g===void 0?!1:g,f=e.children,n=e.classes,N=e.className,l=e.component,h=e.ContainerComponent,C=h===void 0?"li":h,b=e.ContainerProps;b=b===void 0?{}:b;var D=b.className,G=P(b,["className"]),_=e.dense,O=_===void 0?!1:_,E=e.disabled,R=E===void 0?!1:E,T=e.disableGutters,U=T===void 0?!1:T,w=e.divider,q=w===void 0?!1:w,z=e.focusVisibleClassName,A=e.selected,W=A===void 0?!1:A,Y=P(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),H=o.useContext(I),$={dense:O||H.dense||!1,alignItems:a},L=o.useRef(null);ne(function(){u&&(L.current?L.current.focus():console.error("Material-UI: Unable to set focus to a ListItem whose component has not been rendered."))},[u]);var c=o.Children.toArray(f),k=c.length&&V(c[c.length-1],["ListItemSecondaryAction"]),J=o.useCallback(function(K){L.current=Q.findDOMNode(K)},[]),F=Z(J,i),r=y({className:x(n.root,N,$.dense&&n.dense,!U&&n.gutters,q&&n.divider,R&&n.disabled,m&&n.button,a!=="center"&&n.alignItemsFlexStart,k&&n.secondaryAction,W&&n.selected),disabled:R},Y),d=l||"li";return m&&(r.component=l||"div",r.focusVisibleClassName=x(n.focusVisible,z),d=ee),k?(d=!r.component&&!l?"div":d,C==="li"&&(d==="li"?d="div":r.component==="li"&&(r.component="div")),o.createElement(I.Provider,{value:$},o.createElement(C,y({className:x(n.container,D),ref:F},G),o.createElement(d,r,c),c.pop()))):o.createElement(I.Provider,{value:$},o.createElement(d,y({ref:F},r),c))});j.propTypes={alignItems:t.oneOf(["flex-start","center"]),autoFocus:t.bool,button:t.bool,children:X(t.node,function(p){for(var e=o.Children.toArray(p.children),i=-1,s=e.length-1;s>=0;s-=1){var a=e[s];if(V(a,["ListItemSecondaryAction"])){i=s;break}}return i!==-1&&i!==e.length-1?new Error("Material-UI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem."):null}),classes:t.object.isRequired,className:t.string,component:t.elementType,ContainerComponent:t.elementType,ContainerProps:t.object,dense:t.bool,disabled:t.bool,disableGutters:t.bool,divider:t.bool,focusVisibleClassName:t.string,selected:t.bool};const ce=S(oe,{name:"MuiListItem"})(j);export{I as L,le as a,ce as b};