@dashadmin/dash-admin 1.3.53 → 1.3.55

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.
@@ -38,7 +38,7 @@ var __async = (__this, __arguments, generator) => {
38
38
  });
39
39
  };
40
40
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
41
- import { Avatar, useMediaQuery, useTheme } from "@mui/material";
41
+ import { Avatar, MenuList, useMediaQuery, useTheme } from "@mui/material";
42
42
  import { useEffect, useState, useRef } from "react";
43
43
  import { IconMenuItem } from "mui-nested-menu";
44
44
  import ReactDOM from "react-dom";
@@ -230,31 +230,33 @@ const AvatarComponent = ({ sidebarPosition = "left" }) => {
230
230
  },
231
231
  children: [
232
232
  /* @__PURE__ */ jsx("span", { className: "dash-user-name", style: { padding: "8px 16px", display: "block" }, children: getUserDisplayName() }),
233
- /* @__PURE__ */ jsx(
234
- IconMenuItem,
235
- {
236
- onClick: (e) => {
237
- e.preventDefault();
238
- setOpen(false);
239
- handleProfileRedirect();
240
- },
241
- leftIcon: /* @__PURE__ */ jsx("span", { className: "dash-user-icon", children: /* @__PURE__ */ jsx(AccountCircleIcon, {}) }),
242
- label: translate("ra.auth.user_menu", { _: "Perfil" }),
243
- className: "dash-icon-button-color dash-icon-button-bg"
244
- }
245
- ),
246
- /* @__PURE__ */ jsx(
247
- IconMenuItem,
248
- {
249
- onClick: (e) => {
250
- setOpen(false);
251
- handleLogout(e);
252
- },
253
- leftIcon: /* @__PURE__ */ jsx("span", { className: "dash-user-icon", children: /* @__PURE__ */ jsx(LogoutIcon, {}) }),
254
- label: translate("ra.auth.logout", { _: "Cerrar sesi\xF3n" }),
255
- className: "dash-icon-button-color dash-icon-button-bg"
256
- }
257
- )
233
+ /* @__PURE__ */ jsxs(MenuList, { children: [
234
+ /* @__PURE__ */ jsx(
235
+ IconMenuItem,
236
+ {
237
+ onClick: (e) => {
238
+ e.preventDefault();
239
+ setOpen(false);
240
+ handleProfileRedirect();
241
+ },
242
+ leftIcon: /* @__PURE__ */ jsx("span", { className: "dash-user-icon", children: /* @__PURE__ */ jsx(AccountCircleIcon, {}) }),
243
+ label: translate("ra.auth.user_menu", { _: "Perfil" }),
244
+ className: "dash-icon-button-color dash-icon-button-bg"
245
+ }
246
+ ),
247
+ /* @__PURE__ */ jsx(
248
+ IconMenuItem,
249
+ {
250
+ onClick: (e) => {
251
+ setOpen(false);
252
+ handleLogout(e);
253
+ },
254
+ leftIcon: /* @__PURE__ */ jsx("span", { className: "dash-user-icon", children: /* @__PURE__ */ jsx(LogoutIcon, {}) }),
255
+ label: translate("ra.auth.logout", { _: "Cerrar sesi\xF3n" }),
256
+ className: "dash-icon-button-color dash-icon-button-bg"
257
+ }
258
+ )
259
+ ] })
258
260
  ]
259
261
  }
260
262
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashadmin/dash-admin",
3
- "version": "1.3.53",
3
+ "version": "1.3.55",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- import { Avatar, CircularProgress, Menu, useMediaQuery, useTheme } from '@mui/material';
1
+ import { Avatar, CircularProgress, Menu, MenuList, useMediaQuery, useTheme } from '@mui/material';
2
2
  import { useEffect, useState, useRef, useCallback } from 'react';
3
3
  import { IconMenuItem } from 'mui-nested-menu';
4
4
  import ReactDOM from 'react-dom';
@@ -261,33 +261,35 @@ useEffect(() => {
261
261
  <span className='dash-user-name' style={{ padding: '8px 16px', display: 'block' }}>
262
262
  {getUserDisplayName()}
263
263
  </span>
264
- <IconMenuItem
265
- onClick={(e) => {
266
- e.preventDefault();
267
- setOpen(false);
268
- handleProfileRedirect();
269
- }}
270
- leftIcon={
271
- <span className='dash-user-icon'>
272
- <AccountCircleIcon />
273
- </span>
274
- }
275
- label={translate('ra.auth.user_menu', { _: 'Perfil' })}
276
- className='dash-icon-button-color dash-icon-button-bg'
277
- />
278
- <IconMenuItem
279
- onClick={(e) => {
280
- setOpen(false);
281
- handleLogout(e);
282
- }}
283
- leftIcon={
284
- <span className='dash-user-icon'>
285
- <LogoutIcon />
286
- </span>
287
- }
288
- label={translate('ra.auth.logout', { _: 'Cerrar sesión' })}
289
- className='dash-icon-button-color dash-icon-button-bg'
290
- />
264
+ <MenuList>
265
+ <IconMenuItem
266
+ onClick={(e) => {
267
+ e.preventDefault();
268
+ setOpen(false);
269
+ handleProfileRedirect();
270
+ }}
271
+ leftIcon={
272
+ <span className='dash-user-icon'>
273
+ <AccountCircleIcon />
274
+ </span>
275
+ }
276
+ label={translate('ra.auth.user_menu', { _: 'Perfil' })}
277
+ className='dash-icon-button-color dash-icon-button-bg'
278
+ />
279
+ <IconMenuItem
280
+ onClick={(e) => {
281
+ setOpen(false);
282
+ handleLogout(e);
283
+ }}
284
+ leftIcon={
285
+ <span className='dash-user-icon'>
286
+ <LogoutIcon />
287
+ </span>
288
+ }
289
+ label={translate('ra.auth.logout', { _: 'Cerrar sesión' })}
290
+ className='dash-icon-button-color dash-icon-button-bg'
291
+ />
292
+ </MenuList>
291
293
  </div>
292
294
  </div>,
293
295
  document.body