UNPKG

p3x-redis-ui-material

Version:

💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity

1 lines • 4.18 kB
import{i as e}from"./chunk-DseTPa7n.js";import{B as t,Q as n,T as r,V as i,b as a,j as o,p as s,r as c,w as l,x as u,y as d,z as f}from"./Box-CXFf6N2h.js";import{o as p}from"./i18n.store-fGbhAfs-.js";import{_ as m}from"./KeyboardArrowDown-Bd9MEjfK.js";import{a as h,i as g,o as _}from"./TextField-DJCDsXWr.js";import{n as v,o as y}from"./useRovingTabIndex-CsU9_6jv.js";import{n as b}from"./Divider-B-lgo4nA.js";import{n as x}from"./List-C08Y9n9o.js";var S=f(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),C=f(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),w=e(p(),1);function T(e){return t(`MuiMenuItem`,e)}var E=f(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]),D=n(),O=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},k=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:s}=e,c=o({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},T,s);return{...s,...c}},A=l(c,{shouldForwardProp:e=>r(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:O})(u(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${E.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${E.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${E.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${E.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${E.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${b.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${b.inset}`]:{marginLeft:52},[`& .${C.root}`]:{marginTop:0,marginBottom:0},[`& .${C.inset}`]:{paddingLeft:36},[`& .${S.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${S.root} svg`]:{fontSize:`1.25rem`}}}]}))),j=w.forwardRef(function(e,t){let n=a({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:o=`li`,dense:c=!1,divider:l=!1,disableGutters:u=!1,focusVisibleClassName:d,role:f=`menuitem`,tabIndex:p,className:b,...S}=n,C=h(),T=w.useContext(x),E=w.useMemo(()=>({dense:c||T.dense||!1,disableGutters:u}),[T.dense,c,u]),O=g(),j=m(),M=O.suppressInitialFocusVisible,N=O.itemsFocusableWhenDisabled,P=w.useRef(null);y(()=>{r&&P.current&&_(P.current,C)},[r]);let F={...n,dense:E.dense,divider:l,disableGutters:u},I=k(n),L=v({id:j,ref:t,disabled:n.disabled,focusableWhenDisabled:N,selected:n.selected}),R=s(P,L.ref),z;return p===void 0?O.variant===`selectedMenu`?z=L.tabIndex:(!n.disabled||N)&&(z=-1):z=p,(0,D.jsx)(x.Provider,{value:E,children:(0,D.jsx)(A,{ref:R,role:f,tabIndex:z,component:o,internalNativeButton:!1,focusableWhenDisabled:N,suppressFocusVisible:M,focusVisibleClassName:i(I.focusVisible,d),className:i(I.root,b),...S,ownerState:F,classes:I})})}),M=d((0,D.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`}),`Search`);export{j as n,M as t};