@m4l/components 9.1.29 → 9.1.31

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.
Files changed (54) hide show
  1. package/@types/types.d.ts +297 -289
  2. package/components/AccountPopover/AccountPopover.d.ts +4 -3
  3. package/components/AccountPopover/AccountPopover.js +49 -26
  4. package/components/AccountPopover/constants.d.ts +5 -0
  5. package/components/AccountPopover/constants.js +10 -0
  6. package/components/AccountPopover/slots/AccountPopoverEnum.d.ts +18 -0
  7. package/components/AccountPopover/slots/AccountPopoverEnum.js +22 -0
  8. package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +16 -0
  9. package/components/AccountPopover/slots/AccountPopoverSlots.js +93 -0
  10. package/components/AccountPopover/style.d.ts +2 -1
  11. package/components/AccountPopover/style.js +241 -5
  12. package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.d.ts +11 -0
  13. package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.js +70 -0
  14. package/components/AccountPopover/subcomponents/MenuPopover/types.d.ts +11 -0
  15. package/components/AccountPopover/subcomponents/MyAvatar/{index.d.ts → MyAvatar.d.ts} +4 -0
  16. package/components/AccountPopover/subcomponents/MyAvatar/MyAvatar.js +19 -0
  17. package/components/AccountPopover/subcomponents/MyAvatar/types.d.ts +2 -2
  18. package/components/AccountPopover/tests/AccountPopover.test.d.ts +0 -0
  19. package/components/AccountPopover/tests/constants.js +4 -0
  20. package/components/AccountPopover/tests/utils.d.ts +1 -2
  21. package/components/AccountPopover/tests/utils.js +7 -0
  22. package/components/AccountPopover/types.d.ts +16 -12
  23. package/components/Chip/Chip.d.ts +1 -1
  24. package/components/Chip/types.d.ts +4 -4
  25. package/components/ModalDialog/ModalDialog.d.ts +5 -0
  26. package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.d.ts +1 -1
  27. package/components/mui_extended/Autocomplete/types.d.ts +2 -1
  28. package/components/mui_extended/LoadingButton/types.d.ts +1 -1
  29. package/components/mui_extended/Popover/Popover.d.ts +4 -6
  30. package/components/mui_extended/Popper/Popper.d.ts +9 -0
  31. package/components/mui_extended/Popper/PopperStyles.d.ts +2 -0
  32. package/components/mui_extended/Popper/constants.d.ts +8 -0
  33. package/components/mui_extended/Popper/index.d.ts +2 -0
  34. package/components/mui_extended/Popper/slots/PopperEnum.d.ts +3 -0
  35. package/components/mui_extended/Popper/slots/PopperStlots.d.ts +4 -0
  36. package/components/mui_extended/Popper/slots/index.d.ts +3 -0
  37. package/components/mui_extended/Popper/types.d.ts +38 -0
  38. package/hooks/useStateRef/index.d.ts +4 -0
  39. package/hooks/useStateRef/index.js +1 -1
  40. package/package.json +2 -2
  41. package/components/AccountPopover/classes/constants.d.ts +0 -1
  42. package/components/AccountPopover/classes/constants.js +0 -4
  43. package/components/AccountPopover/classes/index.d.ts +0 -31
  44. package/components/AccountPopover/classes/index.js +0 -59
  45. package/components/AccountPopover/classes/types.d.ts +0 -32
  46. package/components/AccountPopover/subcomponents/MyAvatar/index.js +0 -21
  47. package/components/AccountPopover/subcomponents/PopOver/index.d.ts +0 -7
  48. package/components/AccountPopover/subcomponents/PopOver/index.js +0 -207
  49. package/components/AccountPopover/subcomponents/PopOver/tests/constants.d.ts +0 -1
  50. package/components/AccountPopover/subcomponents/PopOver/tests/utils.d.ts +0 -2
  51. package/components/AccountPopover/subcomponents/PopOver/types.d.ts +0 -24
  52. package/components/CommonActions/tests/constants.d.ts +0 -1
  53. package/components/CommonActions/tests/utils.d.ts +0 -2
  54. /package/components/mui_extended/{CircularProgress/CircularProgress.test.d.ts → Popper/Popper.test.d.ts} +0 -0
@@ -5,5 +5,9 @@ import { MyAvatarProps } from './types';
5
5
  * Si no se proporciona una URL de imagen, se generan iniciales a partir del primer nombre y el apellido del usuario.
6
6
  * @param {MyAvatarProps} props - Las propiedades del componente MyAvatar.
7
7
  * @returns {JSX.Element} El componente MyAvatar.
8
+ * @author Andrés Quintero - automatic
9
+ * @createdAt 2024-12-11 15:39:20 - automatic
10
+ * @updatedAt 2024-12-11 15:39:20 - automatic
11
+ * @updatedUser Andrés Quintero - automatic
8
12
  */
9
13
  export default function MyAvatar(props: MyAvatarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { a as AvatarStyled } from "../../slots/AccountPopoverSlots.js";
3
+ function MyAvatar(props) {
4
+ const { avatarUrl, firstName, lastName, size } = props;
5
+ return /* @__PURE__ */ jsx(
6
+ AvatarStyled,
7
+ {
8
+ alt: "User avatar",
9
+ color: "default",
10
+ sizes: size,
11
+ ...avatarUrl ? {
12
+ src: avatarUrl
13
+ } : { children: `${firstName[0]}${lastName[0]}`.toUpperCase() }
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ MyAvatar as M
19
+ };
@@ -1,9 +1,9 @@
1
1
  import { Maybe } from '@m4l/core';
2
- import { AvatarProps } from '@mui/material';
2
+ import { AccountPopoverProps } from '../../types';
3
3
  /**
4
4
  * Propiedades del componente MyAvatar.
5
5
  */
6
- export interface MyAvatarProps extends AvatarProps {
6
+ export interface MyAvatarProps extends Pick<AccountPopoverProps, 'size'> {
7
7
  /**
8
8
  * La URL del avatar.
9
9
  */
@@ -0,0 +1,4 @@
1
+ const ACCOUNTPOPOVER_PREFIX = "M4LAccountPopover";
2
+ export {
3
+ ACCOUNTPOPOVER_PREFIX as A
4
+ };
@@ -1,2 +1 @@
1
- import { AccountPopoverClassesKey } from '../classes/types';
2
- export declare const getNameDataTestId: (KEY: AccountPopoverClassesKey) => string;
1
+ export declare const getNameDataTestId: (KEY: string) => string;
@@ -0,0 +1,7 @@
1
+ import { A as ACCOUNTPOPOVER_PREFIX } from "./constants.js";
2
+ const getNameDataTestId = (KEY) => {
3
+ return `${ACCOUNTPOPOVER_PREFIX}-${KEY}`;
4
+ };
5
+ export {
6
+ getNameDataTestId as g
7
+ };
@@ -1,10 +1,16 @@
1
1
  import { UserAuth } from '@m4l/core';
2
+ import { AccountPopoverSlots } from './slots/AccountPopoverEnum';
3
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
4
+ import { ACCOUNT_KEY_POPOVER } from './constants';
5
+ import { Theme } from '@mui/material/styles';
6
+ import { ComponentPalletColor, Sizes } from '@m4l/styles';
2
7
  export interface RightMenuData {
3
8
  /**
4
9
  * Esta propiedad hace referencia al título del módulo.
5
10
  * Tiene utilidades como:
6
11
  * - Definir el nombre en el encabezado del modulo cuando se agrega en la interfaz de la aplicación web.
7
12
  * ...
13
+ * @createdAt 2024-12-06 17:26:21 - automatic
8
14
  */
9
15
  title: string;
10
16
  /**
@@ -12,39 +18,37 @@ export interface RightMenuData {
12
18
  * Tiene utiidades como:
13
19
  * - Define a la aplicación web cual de todos los módulos disponibles debe agregar en la interfaz de la aplicación web.
14
20
  * - Permite almacenar información del usuario basado en la interacción del módulo tomando en cuenta el identificador.
15
- * ...
21
+ * @createdAt 2024-12-06 17:26:21 - automatic
16
22
  */
17
23
  module_id?: string;
18
24
  /**
19
25
  * Esta propiedad define la ubicación del icono representativo del módulo.
20
26
  * Tiene utiidades como:
21
27
  * - Mostrar el icono representativo en el encabezado del módulo.
22
- * ...
28
+ * @createdAt 2024-12-06 17:26:21 - automatic
23
29
  */
24
30
  icon_url?: string;
25
31
  debug_port?: number;
26
32
  }
27
- /** Lista posibles valores usados para definr el estado actual en la solicitud de red para el endpoint GET Menus param 1 */
28
33
  export type AsyncTypes = 'unLoad' | 'loading' | 'loaded';
29
34
  /**
30
35
  * Colección de datos que representa el valor del menú de administrativo propio del usuario.
31
36
  * Para obtener el detalle de la información del tipo de dato RightMenuData, se debe validar en la documentación de la librería @m4l/core.
37
+ * @createdAt 2024-12-06 17:26:21 - automatic
32
38
  */
33
39
  export interface MenuDataProvider {
34
40
  value: RightMenuData;
35
41
  }
36
- /** Objeto de propiedades que puede recibir el componente AccountPopover. */
37
42
  export interface AccountPopoverProps {
38
- /** Procedimiento definido desde la instancia, va a ser activado por alguno de elementos del listado dinámico por medio del evento click. */
39
43
  itemHandleClick: (item: RightMenuData) => void;
40
- /** Procedimiento encargado finalizar la sesión del cliente autenticado. */
41
44
  handleLogOut: VoidFunction;
42
- /** Dato que representa la versión actual de la aplicación web. */
45
+ settingsHandleOpen: () => void;
43
46
  version: string;
44
- /** Es una colección de datos relacionados al cliente autenticado, puede contener datos como: nombre, apellido, módulos activos entre otros. */
45
47
  userData: UserAuth | null | undefined;
46
- /** Es un texto que permite cambiar los estilos gráficos del componente. */
47
- className?: string;
48
- /** Procedimiento definido desde la instancia, el cual tiene como propósito permitir visualizar el configurador de apariencia en la aplicación web. */
49
- settingsHandleOpen: () => void;
48
+ variant?: 'standard';
49
+ color?: Extract<ComponentPalletColor, 'default'>;
50
+ size?: Extract<Sizes, 'small' | 'medium'>;
51
+ dataTestid?: string;
50
52
  }
53
+ export type AccountPopoverSlotsType = keyof typeof AccountPopoverSlots;
54
+ export type AccountPopoverStyles = OverridesStyleRules<AccountPopoverSlotsType, typeof ACCOUNT_KEY_POPOVER, Theme>;
@@ -3,7 +3,7 @@ import { ChipProps } from './types';
3
3
  * A chip is a component that displays information in a compact way.
4
4
  * @author SebastianM - automatic
5
5
  * @createdAt 2024-12-06 12:48:15 - automatic
6
- * @updatedAt 2024-12-06 13:56:58 - automatic
6
+ * @updatedAt 2024-12-10 15:24:11 - automatic
7
7
  * @updatedUser SebastianM - automatic
8
8
  */
9
9
  export declare const Chip: import('react').ForwardRefExoticComponent<ChipProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,9 +1,9 @@
1
+ import { ComponentPalletColor, Sizes } from '@m4l/styles';
1
2
  import { PaletteColor, Theme } from '@mui/material';
2
3
  import { OverridesStyleRules } from '@mui/material/styles/overrides';
3
- import { ComponentPalletColor, Sizes } from '@m4l/styles';
4
- import { ReactNode } from 'react';
5
- import { ChipSlots } from './slots';
4
+ import { EventHandler, ReactNode } from 'react';
6
5
  import { CHIP_KEY_COMPONENT } from './constants';
6
+ import { ChipSlots } from './slots';
7
7
  type ChipVariants = 'contained' | 'outlined';
8
8
  /**
9
9
  * Props for the `Chip` component, extending the original properties of Material UI.
@@ -28,7 +28,7 @@ export interface ChipProps {
28
28
  hasIconClose?: boolean;
29
29
  opacity?: boolean;
30
30
  onClick?: () => void;
31
- onDeleted?: () => void;
31
+ onDeleted?: EventHandler<any>;
32
32
  }
33
33
  /**
34
34
  * Owner state of the `Chip` used to define internal style and behavior properties.
@@ -34,7 +34,12 @@
34
34
  * - Dynamically updates the fullscreen mode when the `fullScreen` prop changes.
35
35
  * @author cesar - automatic
36
36
  * @createdAt 2024-11-28 08:35:15 - automatic
37
+ * <<<<<<< HEAD
37
38
  * @updatedAt 2024-12-10 08:14:13 - automatic
38
39
  * @updatedUser Bruce Escobar - automatic
40
+ * =======
41
+ * @updatedAt 2024-12-06 11:53:51 - automatic
42
+ * @updatedUser cesar - automatic
43
+ * >>>>>>> M4LCOM-253-rebase
39
44
  */
40
45
  export declare const ModalDialog: () => import("react/jsx-runtime").JSX.Element;
@@ -30,6 +30,6 @@ export declare const ImageStyled: import('@emotion/styled').StyledComponent<Pick
30
30
  export declare const SkeletonAutocompleteStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Skeleton/types').SkeletonProps, keyof import('../../Skeleton/types').SkeletonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown> & {
31
31
  ownerState: Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>;
32
32
  }, {}, {}>;
33
- export declare const PopperComponentStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').PopperProps & import('react').RefAttributes<HTMLDivElement>, "children" | "ref" | "title" | "component" | "id" | "container" | "components" | "hidden" | "color" | "content" | "style" | "open" | "transition" | "className" | "onChange" | "sx" | "translate" | "slots" | "slotProps" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "placement" | "componentsProps" | "disablePortal" | "keepMounted" | "anchorEl" | "modifiers" | "popperOptions" | "popperRef"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown> & {
33
+ export declare const PopperComponentStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../Popper').PopperProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "children" | "title" | "component" | "id" | "container" | "components" | "hidden" | "color" | "content" | "style" | "open" | "variant" | "transition" | "className" | "onChange" | "sx" | "translate" | "slots" | "slotProps" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "dataTestid" | "placement" | "arrow" | "componentsProps" | "disablePortal" | "keepMounted" | "anchorEl" | "modifiers" | "popperOptions" | "popperRef" | keyof import('react').RefAttributes<HTMLDivElement> | "initialPlacement"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown> & {
34
34
  ownerState: Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>;
35
35
  }, {}, {}>;
@@ -51,7 +51,8 @@ export interface AutocompleteProps<T, Multiple extends boolean | undefined = fal
51
51
  /**
52
52
  * Represents the owner state of the Autocomplete component for styling purposes.
53
53
  */
54
- export interface AutocompleteOwnerState extends Pick<AutocompleteProps<any>, 'size' | 'disabled' | 'variant' | 'color'> {
54
+ export interface AutocompleteOwnerState extends Pick<AutocompleteProps<any>, 'size' | 'disabled' | 'variant'> {
55
+ autocompleteColor: AutocompleteProps<any>['color'];
55
56
  disabled?: boolean;
56
57
  multiple: boolean;
57
58
  imageScale?: boolean;
@@ -2,7 +2,7 @@ import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
2
  import { PaletteColor, Theme } from '@mui/material';
3
3
  import { LOADING_BUTTON_KEY_COMPONENT } from './constants';
4
4
  import { LoadingButtonSlots } from './slots/LoadingButtonEnum';
5
- import { ButtonProps } from '../Button';
5
+ import { ButtonProps } from '../Button/types';
6
6
  export interface LoadingButtonProps extends Omit<ButtonProps, 'label'> {
7
7
  label?: string;
8
8
  loading?: boolean;
@@ -1,11 +1,9 @@
1
1
  import { PopoverProps } from './types';
2
- /**
3
- * Provee de un componente que genera un contenedor desacoplado del flujo del documento de tipo ventana emergente,
4
- * usado hacer énfasis en información, comunmente contiene texto, elementos interactivos y acciones de usuario.
5
- * @param props
6
- * @returns
7
- */
8
2
  /**
9
3
  * TODO: Documentar
4
+ * @author SebastianM - automatic
5
+ * @createdAt 2024-12-06 14:04:23 - automatic
6
+ * @updatedAt 2024-12-06 14:04:23 - automatic
7
+ * @updatedUser SebastianM - automatic
10
8
  */
11
9
  export declare const Popover: (props: PopoverProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { PopperProps } from './types';
2
+ /**
3
+ * The Popper component is used to display a pop-up box with additional information or options.
4
+ * @author SebastianM - automatic
5
+ * @createdAt 2024-12-19 11:22:55 - automatic
6
+ * @updatedAt 2024-12-23 10:04:43 - automatic
7
+ * @updatedUser SebastianM - automatic
8
+ */
9
+ export declare const Popper: import('react').ForwardRefExoticComponent<Omit<PopperProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ import { PopperStyles } from './types';
2
+ export declare const popperStyles: PopperStyles;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Clave de identificación del componente Popper dentro del sistema.
3
+ *
4
+ * Esta constante se utiliza como identificador único para asociar y personalizar estilos y configuraciones
5
+ * relacionadas con el componente `Popper` dentro del sistema de temas y estilos.
6
+ * @default 'M4LPopper'
7
+ */
8
+ export declare const POPPER_KEY_COMPONENT = "M4LPopper";
@@ -0,0 +1,2 @@
1
+ export * from './Popper';
2
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ export declare const PopperSlots: {
2
+ popperRoot: string;
3
+ };
@@ -0,0 +1,4 @@
1
+ declare const PopperRootStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').PopperProps & import('react').RefAttributes<HTMLDivElement>, "children" | "ref" | "title" | "component" | "id" | "container" | "components" | "hidden" | "color" | "content" | "style" | "open" | "transition" | "className" | "onChange" | "sx" | "translate" | "slots" | "slotProps" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "placement" | "componentsProps" | "disablePortal" | "keepMounted" | "anchorEl" | "modifiers" | "popperOptions" | "popperRef"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').PopperOwnerState> & Record<string, unknown> & {
2
+ ownerState: Partial<import('..').PopperOwnerState> & Record<string, unknown>;
3
+ }, {}, {}>;
4
+ export { PopperRootStyled };
@@ -0,0 +1,3 @@
1
+ export * from './PopperStlots';
2
+ export * from './PopperEnum';
3
+ export { PopperSlots } from './PopperEnum';
@@ -0,0 +1,38 @@
1
+ import { ComponentPalletColor } from '@m4l/styles';
2
+ import { PopperProps as MUIPopperProps, PaletteColor, Theme } from '@mui/material';
3
+ import { PopperChildrenProps } from '@mui/material/Popper/BasePopper.types';
4
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
5
+ import { ReactNode } from 'react';
6
+ import { POPPER_KEY_COMPONENT } from './constants';
7
+ import { PopperSlots } from './slots';
8
+ /**
9
+ * Props for the `Popper` component.
10
+ * @author SebastianM - automatic
11
+ * @createdAt 2024-12-10 12:16:10 - automatic
12
+ * @updatedAt 2024-12-11 10:35:15 - automatic
13
+ * @updatedUser SebastianM - automatic
14
+ */
15
+ export interface PopperProps extends Omit<MUIPopperProps, 'color'> {
16
+ color?: Extract<ComponentPalletColor, 'default'> | undefined;
17
+ variant?: 'standard';
18
+ initialPlacement?: MUIPopperProps['placement'];
19
+ dataTestid?: string;
20
+ children?: ReactNode | ((props: PopperChildrenProps) => ReactNode);
21
+ arrow?: boolean;
22
+ }
23
+ /**
24
+ * Owner state of the `Popper` used to define internal style and behavior properties.
25
+ */
26
+ export interface PopperOwnerState extends Pick<PopperProps, 'placement'> {
27
+ popperColor: PopperProps['color'];
28
+ arrow: boolean;
29
+ paletteColor: PaletteColor;
30
+ }
31
+ /**
32
+ * Defines the types of Slots available for the `Popper`.
33
+ */
34
+ export type PopperSlotsType = keyof typeof PopperSlots;
35
+ /**
36
+ * Styles applicable to the `Popper` using themes and custom slots.
37
+ */
38
+ export type PopperStyles = OverridesStyleRules<PopperSlotsType, typeof POPPER_KEY_COMPONENT, Theme>;
@@ -4,5 +4,9 @@
4
4
  * donde se usa refState
5
5
  * @param initialValue
6
6
  * @returns
7
+ * @author Andrés Quintero - automatic
8
+ * @createdAt 2024-12-11 15:36:25 - automatic
9
+ * @updatedAt 2024-12-11 15:36:26 - automatic
10
+ * @updatedUser Andrés Quintero - automatic
7
11
  */
8
12
  export declare function useStateRef<T>(initialValue: T | null): [T | null, (node: T | null) => void];
@@ -3,7 +3,7 @@ function useStateRef(initialValue) {
3
3
  const [refState, setRefState] = useState(initialValue);
4
4
  const nodeRef = useRef(null);
5
5
  const ref = (nodeElement) => {
6
- if (nodeElement && nodeRef.current !== nodeElement) {
6
+ if (nodeRef.current !== nodeElement) {
7
7
  nodeRef.current = nodeElement;
8
8
  setRefState(nodeElement);
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.1.29",
3
+ "version": "9.1.31",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
@@ -54,7 +54,7 @@
54
54
  "peerDependencies": {
55
55
  "@m4l/core": "^2.0.12",
56
56
  "@m4l/graphics": "^7.0.2",
57
- "@m4l/styles": "^7.1.5",
57
+ "@m4l/styles": "^7.0.1",
58
58
  "@mui/lab": "5.0.0-alpha.173",
59
59
  "@mui/material": "5.16.7",
60
60
  "@mui/x-date-pickers": "6.20.2"
@@ -1 +0,0 @@
1
- export declare const componentName = "M4LAccountPopover";
@@ -1,4 +0,0 @@
1
- const componentName = "M4LAccountPopover";
2
- export {
3
- componentName as c
4
- };
@@ -1,31 +0,0 @@
1
- import { AccountPopoverClassesType } from './types';
2
- export declare const accountPopoverClasses: AccountPopoverClassesType;
3
- /**
4
- * Obtiene el nombre de la clase de utilidad para una ranura específica.
5
- * @param slot La ranura para la que se desea obtener la clase de utilidad.
6
- * @returns El nombre de la clase de utilidad para la ranura especificada.
7
- */
8
- export declare function getAccountPopoverClassesUtilityClass(slot: string): string;
9
- /**
10
- * Hook personalizado para utilizar las clases de utilidad del componente AccountPopover.
11
- * @returns Las clases de utilidad del componente AccountPopover.
12
- */
13
- export declare const useAccountPopoverUtilityClasses: () => {
14
- root: string;
15
- popover: string;
16
- menuItem: string;
17
- containerProgress: string;
18
- containerMenuItems: string;
19
- containerUserName: string;
20
- containerUserEmail: string;
21
- containerUserInfo: string;
22
- containerlogOut: string;
23
- containerSetting: string;
24
- labelUserName: string;
25
- labelUserEmail: string;
26
- labelVersion: string;
27
- myAvatar: string;
28
- containerAvatarPopover: string;
29
- containerAppVersion: string;
30
- logOut: string;
31
- };
@@ -1,59 +0,0 @@
1
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
2
- import { unstable_composeClasses } from "@mui/base";
3
- import { c as componentName } from "./constants.js";
4
- generateUtilityClasses(
5
- componentName,
6
- [
7
- /* elements */
8
- "root",
9
- "containerUserName",
10
- "containerUserEmail",
11
- "containerlogOut",
12
- "containerUserInfo",
13
- "containerSetting",
14
- "labelUserName",
15
- "labelUserEmail",
16
- "labelVersion",
17
- "containerAvatarPopover",
18
- "myAvatar",
19
- "popover",
20
- "containerAppVersion",
21
- "containerMenuItems",
22
- "containerProgress",
23
- "logOut",
24
- "menuItem"
25
- /* states or variants of elements */
26
- ]
27
- );
28
- function getAccountPopoverClassesUtilityClass(slot) {
29
- return generateUtilityClass(componentName, slot);
30
- }
31
- const useAccountPopoverUtilityClasses = () => {
32
- const slots = {
33
- root: ["root"],
34
- containerUserName: ["containerUserName"],
35
- containerUserEmail: ["containerUserEmail"],
36
- containerUserInfo: ["containerUserInfo"],
37
- containerlogOut: ["containerlogOut"],
38
- containerSetting: ["containerSetting"],
39
- labelUserName: ["labelUserName"],
40
- labelUserEmail: ["labelUserEmail"],
41
- labelVersion: ["labelVersion"],
42
- myAvatar: ["myAvatar"],
43
- containerAvatarPopover: ["containerAvatarPopover"],
44
- popover: ["popover"],
45
- containerAppVersion: ["containerAppVersion"],
46
- containerMenuItems: ["containerMenuItems"],
47
- containerProgress: ["containerProgress"],
48
- logOut: ["logOut"],
49
- menuItem: ["menuItem"]
50
- };
51
- const composedClasses = unstable_composeClasses(slots, getAccountPopoverClassesUtilityClass, {});
52
- return {
53
- ...composedClasses
54
- };
55
- };
56
- export {
57
- getAccountPopoverClassesUtilityClass as g,
58
- useAccountPopoverUtilityClasses as u
59
- };
@@ -1,32 +0,0 @@
1
- import { useAccountPopoverUtilityClasses } from '.';
2
- /**
3
- * Tipos de datos para las clases del componente AccountPopover.
4
- */
5
- export interface AccountPopoverClassesType {
6
- root: string;
7
- containerUserName: string;
8
- containerUserEmail: string;
9
- containerlogOut: string;
10
- containerUserInfo: string;
11
- containerSetting: string;
12
- labelUserName: string;
13
- labelUserEmail: string;
14
- labelVersion: string;
15
- containerAvatarPopover: string;
16
- myAvatar: string;
17
- popover: string;
18
- containerAppVersion: string;
19
- containerMenuItems: string;
20
- containerProgress: string;
21
- logOut: string;
22
- menuItem: string;
23
- }
24
- /**
25
- * Tipo de dato para las claves de las clases del componente AccountPopover.
26
- * Utilizado para construir overrides en el objeto del tema.
27
- */
28
- export type AccountPopoverClassesKey = keyof AccountPopoverClassesType;
29
- /**
30
- * Tipo para las clases del componente AccountPopover.
31
- */
32
- export type AccountPopoverClasses = ReturnType<typeof useAccountPopoverUtilityClasses>;
@@ -1,21 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useEnvironment } from "@m4l/core";
3
- import { A as Avatar } from "../../../mui_extended/Avatar/Avatar.js";
4
- function MyAvatar(props) {
5
- const { avatarUrl, firstName = "", lastName = "arreee", ...other } = props;
6
- const { host_static_assets, environment_assets } = useEnvironment();
7
- return /* @__PURE__ */ jsx(
8
- Avatar,
9
- {
10
- alt: "full_name",
11
- color: "default",
12
- ...avatarUrl ? {
13
- src: `${host_static_assets}/${environment_assets}/frontend/domain/${avatarUrl}`
14
- } : { children: `${firstName[0]}${lastName[0]}` },
15
- ...other
16
- }
17
- );
18
- }
19
- export {
20
- MyAvatar as M
21
- };
@@ -1,7 +0,0 @@
1
- import { PopOverProps } from './types';
2
- /**
3
- * MenuPopOver: Es el subcomponente de AccountPopover encargado de crear el menú popover y su contenido.
4
- * Se debe refactorizar el componente PopOver para recibir la propr de size.
5
- * @param props
6
- */
7
- export declare const MenuPopOver: (props: PopOverProps) => import("react/jsx-runtime").JSX.Element;