@m4l/components 9.1.12 → 9.1.14
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/components/Icon/Icon.d.ts +1 -1
- package/components/Icon/Icon.js +2 -2
- package/components/ModalDialog/ModalDialog.d.ts +1 -18
- package/components/WindowBase/WindowBase.styles.js +16 -13
- package/components/mui_extended/Autocomplete/slots /AutocompleteEnum.d.ts +1 -1
- package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.d.ts +1 -4
- package/components/mui_extended/Autocomplete/types.d.ts +2 -1
- package/components/mui_extended/Dialog/Dialog.styles.js +3 -2
- package/components/mui_extended/MenuItem/MenuItem.d.ts +2 -2
- package/components/mui_extended/MenuItem/MenuItem.js +11 -6
- package/components/mui_extended/MenuItem/MenuItem.styles.js +6 -6
- package/components/mui_extended/MenuItem/slots/MenuItemEnum.d.ts +3 -3
- package/components/mui_extended/MenuItem/slots/MenuItemEnum.js +3 -3
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +6 -6
- package/package.json +1 -1
- package/storybook/components/ModalDialog/subcomponent/WithExtendedContainer.d.ts +2 -2
- package/storybook/components/extended/mui/Autocomplete/AutoComple.stories.d.ts +3 -0
|
@@ -3,7 +3,7 @@ import { IconProps } from './types';
|
|
|
3
3
|
* Provee de un medio por el cual se carga un icono svg en la plataforma web, aporta su versión provisional de carga en red.
|
|
4
4
|
* @author Bruce Escobar - automatic
|
|
5
5
|
* @createdAt 2024-10-22 19:08:59 - automatic
|
|
6
|
-
* @updatedAt 2024-12-
|
|
6
|
+
* @updatedAt 2024-12-05 14:14:39 - automatic
|
|
7
7
|
* @updatedUser SebastianM - automatic
|
|
8
8
|
*/
|
|
9
9
|
export declare const Icon: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
package/components/Icon/Icon.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useModuleSkeleton } from "@m4l/core";
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
5
5
|
import { I as ICON_PREFIX, a as ICON_KEY_COMPONENT } from "./constants.js";
|
|
6
|
-
import { a as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
6
|
+
import { a as getComponentClasses, g as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
8
8
|
import { T as TooltipStyled, R as RootStyled, I as IconStyled, a as IconSkeletonStyled } from "./slots/IconSlots.js";
|
|
9
9
|
import { I as IconSlots } from "./slots/IconEnum.js";
|
|
@@ -66,7 +66,7 @@ const Icon = (props) => {
|
|
|
66
66
|
children: /* @__PURE__ */ jsx(
|
|
67
67
|
IconStyled,
|
|
68
68
|
{
|
|
69
|
-
className: classKey.icon,
|
|
69
|
+
className: clsx(classKey.icon, getComponentSlotRoot("M4LIconClass")),
|
|
70
70
|
role: "icon",
|
|
71
71
|
ownerState: { ...ownerState },
|
|
72
72
|
...getPropDataTestId(ICON_PREFIX, IconSlots.icon, instaceDataTestId)
|
|
@@ -32,26 +32,9 @@
|
|
|
32
32
|
* - Selects `PaperComponent` for fullscreen and mobile views.
|
|
33
33
|
* - Selects `DraggablePaperComponent` for non-mobile, non-fullscreen views.
|
|
34
34
|
* - Dynamically updates the fullscreen mode when the `fullScreen` prop changes.
|
|
35
|
-
*
|
|
36
|
-
* ### Example Usage:
|
|
37
|
-
* ```tsx
|
|
38
|
-
* import { ModalDialog } from './ModalDialog';
|
|
39
|
-
* import { useModal } from './hooks/useModal';
|
|
40
|
-
*
|
|
41
|
-
* const App = () => {
|
|
42
|
-
* const { openModal } = useModal();
|
|
43
|
-
*
|
|
44
|
-
* return (
|
|
45
|
-
* <div>
|
|
46
|
-
* <button onClick={() => openModal({ fullScreen: false })}>Open Modal</button>
|
|
47
|
-
* <ModalDialog />
|
|
48
|
-
* </div>
|
|
49
|
-
* );
|
|
50
|
-
* };
|
|
51
|
-
* ```
|
|
52
35
|
* @author cesar - automatic
|
|
53
36
|
* @createdAt 2024-11-28 08:35:15 - automatic
|
|
54
|
-
* @updatedAt 2024-12-
|
|
37
|
+
* @updatedAt 2024-12-06 11:53:51 - automatic
|
|
55
38
|
* @updatedUser cesar - automatic
|
|
56
39
|
*/
|
|
57
40
|
export declare const ModalDialog: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,12 +3,14 @@ const windowBaseStyles = {
|
|
|
3
3
|
* Styles for the window base wrapper component.
|
|
4
4
|
* @author cesar - automatic
|
|
5
5
|
* @createdAt 2024-11-15 18:08:44 - automatic
|
|
6
|
-
* @updatedAt 2024-12-
|
|
6
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
7
7
|
* @updatedUser cesar - automatic
|
|
8
8
|
*/
|
|
9
9
|
wrapperWindowBase: ({ theme, ownerState }) => ({
|
|
10
10
|
height: "100%",
|
|
11
11
|
width: "100%",
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: "column",
|
|
12
14
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
13
15
|
...ownerState?.windowBaseVariant === "outlined" && {
|
|
14
16
|
border: theme.vars.size.borderStroke.container,
|
|
@@ -25,17 +27,18 @@ const windowBaseStyles = {
|
|
|
25
27
|
* Styles for the content of the window base component.
|
|
26
28
|
* @author cesar - automatic
|
|
27
29
|
* @createdAt 2024-11-15 18:08:44 - automatic
|
|
28
|
-
* @updatedAt 2024-12-
|
|
30
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
29
31
|
* @updatedUser cesar - automatic
|
|
30
32
|
*/
|
|
31
33
|
contentWindowBase: ({ theme }) => ({
|
|
32
|
-
padding: theme.vars.size.baseSpacings.sp3
|
|
34
|
+
padding: theme.vars.size.baseSpacings.sp3,
|
|
35
|
+
overflow: "auto"
|
|
33
36
|
}),
|
|
34
37
|
/**
|
|
35
38
|
* Styles for the header of the window base component.
|
|
36
39
|
* @author cesar - automatic
|
|
37
40
|
* @createdAt 2024-11-15 18:08:44 - automatic
|
|
38
|
-
* @updatedAt 2024-12-
|
|
41
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
39
42
|
* @updatedUser cesar - automatic
|
|
40
43
|
*/
|
|
41
44
|
headerWindowComponent: ({ theme, ownerState }) => ({
|
|
@@ -71,7 +74,7 @@ const windowBaseStyles = {
|
|
|
71
74
|
* Styles for the content of the header of the window base component.
|
|
72
75
|
* @author cesar - automatic
|
|
73
76
|
* @createdAt 2024-11-15 18:08:44 - automatic
|
|
74
|
-
* @updatedAt 2024-12-
|
|
77
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
75
78
|
* @updatedUser cesar - automatic
|
|
76
79
|
*/
|
|
77
80
|
headerContentWindowBase: ({ theme }) => ({
|
|
@@ -86,7 +89,7 @@ const windowBaseStyles = {
|
|
|
86
89
|
* Styles for the title of the header of the window base component.
|
|
87
90
|
* @author cesar - automatic
|
|
88
91
|
* @createdAt 2024-11-15 18:08:44 - automatic
|
|
89
|
-
* @updatedAt 2024-12-
|
|
92
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
90
93
|
* @updatedUser cesar - automatic
|
|
91
94
|
*/
|
|
92
95
|
headerTitleWindowBase: ({ theme }) => ({
|
|
@@ -98,7 +101,7 @@ const windowBaseStyles = {
|
|
|
98
101
|
* Styles for the subtitle container of the header of the window base component.
|
|
99
102
|
* @author cesar - automatic
|
|
100
103
|
* @createdAt 2024-11-15 18:08:44 - automatic
|
|
101
|
-
* @updatedAt 2024-12-
|
|
104
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
102
105
|
* @updatedUser cesar - automatic
|
|
103
106
|
*/
|
|
104
107
|
subtitleContainer: ({ theme }) => ({
|
|
@@ -113,7 +116,7 @@ const windowBaseStyles = {
|
|
|
113
116
|
* @returns An object containing the styles for the dot window base component.
|
|
114
117
|
* @author cesar - automatic
|
|
115
118
|
* @createdAt 2024-11-22 19:40:23 - automatic
|
|
116
|
-
* @updatedAt 2024-12-
|
|
119
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
117
120
|
* @updatedUser cesar - automatic
|
|
118
121
|
*/
|
|
119
122
|
pointWindowBase: ({ theme, ownerState }) => ({
|
|
@@ -140,7 +143,7 @@ const windowBaseStyles = {
|
|
|
140
143
|
* Styles for the subtitle of the header of the window base component.
|
|
141
144
|
* @author cesar - automatic
|
|
142
145
|
* @createdAt 2024-11-15 18:08:44 - automatic
|
|
143
|
-
* @updatedAt 2024-12-
|
|
146
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
144
147
|
* @updatedUser cesar - automatic
|
|
145
148
|
*/
|
|
146
149
|
headerSubTitleWindowBase: ({ theme }) => ({
|
|
@@ -152,7 +155,7 @@ const windowBaseStyles = {
|
|
|
152
155
|
* Styles for the icon of the header of the window base component.
|
|
153
156
|
* @author cesar - automatic
|
|
154
157
|
* @createdAt 2024-11-18 08:11:19 - automatic
|
|
155
|
-
* @updatedAt 2024-12-
|
|
158
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
156
159
|
* @updatedUser cesar - automatic
|
|
157
160
|
*/
|
|
158
161
|
headerIconWindowBase: ({ theme }) => ({
|
|
@@ -166,7 +169,7 @@ const windowBaseStyles = {
|
|
|
166
169
|
* Styles for the icons wrapper of the window base component.
|
|
167
170
|
* @author cesar - automatic
|
|
168
171
|
* @createdAt 2024-11-18 08:11:19 - automatic
|
|
169
|
-
* @updatedAt 2024-12-
|
|
172
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
170
173
|
* @updatedUser cesar - automatic
|
|
171
174
|
*/
|
|
172
175
|
iconsWrapperWindowBase: () => ({
|
|
@@ -177,7 +180,7 @@ const windowBaseStyles = {
|
|
|
177
180
|
* Styles for the dot icon of the window base component.
|
|
178
181
|
* @author cesar - automatic
|
|
179
182
|
* @createdAt 2024-11-22 19:40:23 - automatic
|
|
180
|
-
* @updatedAt 2024-12-
|
|
183
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
181
184
|
* @updatedUser cesar - automatic
|
|
182
185
|
*/
|
|
183
186
|
pointIcon: ({ theme, ownerState }) => ({
|
|
@@ -202,7 +205,7 @@ const windowBaseStyles = {
|
|
|
202
205
|
* Styles for the menu actions of the window base component.
|
|
203
206
|
* @author cesar - automatic
|
|
204
207
|
* @createdAt 2024-12-05 07:49:27 - automatic
|
|
205
|
-
* @updatedAt 2024-12-
|
|
208
|
+
* @updatedAt 2024-12-06 14:42:54 - automatic
|
|
206
209
|
* @updatedUser cesar - automatic
|
|
207
210
|
*/
|
|
208
211
|
menuActionsWindowBase: () => ({
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export declare const AutocompleteRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown> & {
|
|
2
|
-
ownerState: Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>;
|
|
3
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
1
|
export declare const IconButtonStyled: import('@emotion/styled').StyledComponent<Pick<import('../../IconButton/types').IconButtonProps, keyof import('../../IconButton/types').IconButtonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown> & {
|
|
5
2
|
ownerState: Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>;
|
|
6
3
|
}, {}, {}>;
|
|
@@ -33,6 +30,6 @@ export declare const ImageStyled: import('@emotion/styled').StyledComponent<Pick
|
|
|
33
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> & {
|
|
34
31
|
ownerState: Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>;
|
|
35
32
|
}, {}, {}>;
|
|
36
|
-
export declare const
|
|
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> & {
|
|
37
34
|
ownerState: Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>;
|
|
38
35
|
}, {}, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutocompleteChangeReason, AutocompleteCloseReason, AutocompleteFreeSoloValueMapping, AutocompleteInputChangeReason, AutocompleteValue, AutocompleteProps as MUIAutocompleteProps, Theme, PaletteColor } from '@mui/material';
|
|
1
|
+
import { AutocompleteChangeReason, AutocompleteCloseReason, AutocompleteFreeSoloValueMapping, AutocompleteInputChangeReason, AutocompleteValue, AutocompleteProps as MUIAutocompleteProps, Theme, PaletteColor, PopperProps } from '@mui/material';
|
|
2
2
|
import { ComponentPalletColor, Sizes } from '@m4l/styles';
|
|
3
3
|
import { ChangeEvent } from 'react';
|
|
4
4
|
import { TextFieldProps } from '../TextField/types';
|
|
@@ -14,6 +14,7 @@ export type AutocompleteType = 'text' | 'image';
|
|
|
14
14
|
* @createdAt 2024-11-28 17:06:36 - automatic
|
|
15
15
|
*/
|
|
16
16
|
export interface AutocompleteProps<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = true, FreeSolo extends boolean | undefined = false> extends Omit<MUIAutocompleteProps<T, Multiple, DisableClearable, FreeSolo>, 'variant' | 'color' | 'size' | 'onChange' | 'value' | 'classes' | 'defaultValue' | 'onBlur' | 'onFocus' | 'autoComplete'>, Omit<TextFieldProps, 'label' | 'variant' | 'defaultValue' | 'classes' | 'onBlur' | 'onFocus' | 'onKeyDown' | 'ref' | 'onChange'> {
|
|
17
|
+
popperProps?: Omit<PopperProps, 'color'>;
|
|
17
18
|
onFocus?: (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
18
19
|
autoComplete?: string;
|
|
19
20
|
/**
|
|
@@ -3,7 +3,7 @@ const dialogStyles = {
|
|
|
3
3
|
* Dialog Root style
|
|
4
4
|
* @author cesar - automatic
|
|
5
5
|
* @createdAt 2024-11-24 15:58:24 - automatic
|
|
6
|
-
* @updatedAt 2024-12-
|
|
6
|
+
* @updatedAt 2024-12-05 17:01:44 - automatic
|
|
7
7
|
* @updatedUser cesar - automatic
|
|
8
8
|
*/
|
|
9
9
|
dialogRoot: ({ theme }) => ({
|
|
@@ -17,7 +17,8 @@ const dialogStyles = {
|
|
|
17
17
|
margin: 0,
|
|
18
18
|
display: "flex",
|
|
19
19
|
alignItems: "center",
|
|
20
|
-
justifyContent: "center"
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
overflow: "unset"
|
|
21
22
|
}
|
|
22
23
|
})
|
|
23
24
|
};
|
|
@@ -7,7 +7,7 @@ import { MenuItemProps } from './types';
|
|
|
7
7
|
* @returns
|
|
8
8
|
* @author Bruce Escobar - automatic
|
|
9
9
|
* @createdAt 2024-10-22 19:53:39 - automatic
|
|
10
|
-
* @updatedAt 2024-12-
|
|
11
|
-
* @updatedUser
|
|
10
|
+
* @updatedAt 2024-12-05 16:30:55 - automatic
|
|
11
|
+
* @updatedUser SebastianM - automatic
|
|
12
12
|
*/
|
|
13
13
|
export declare const MenuItem: (props: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createElement } from "react";
|
|
3
|
-
import { useTheme } from "@mui/material";
|
|
4
3
|
import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
|
|
4
|
+
import { useTheme } from "@mui/material";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import { M as MenuItemSkeletonStyled, a as MenuItemRootStyled, b as MenuItemIconStyled } from "./slots/MenuItemSlots.js";
|
|
7
6
|
import { g as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
8
7
|
import { M as MENUITEM_KEY_COMPONENT } from "./constants.js";
|
|
8
|
+
import { M as MenuItemSkeletonStyled, a as MenuItemRootStyled, b as MenuItemIconStyled } from "./slots/MenuItemSlots.js";
|
|
9
9
|
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
10
10
|
import { T as Typography } from "../Typography/Typography.js";
|
|
11
11
|
const MenuItem = (props) => {
|
|
@@ -38,7 +38,13 @@ const MenuItem = (props) => {
|
|
|
38
38
|
componentPaletteColor: color
|
|
39
39
|
};
|
|
40
40
|
if (isSkeleton) {
|
|
41
|
-
return /* @__PURE__ */ jsx(
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
MenuItemSkeletonStyled,
|
|
43
|
+
{
|
|
44
|
+
"data-testid": "SkeletonMenuItem",
|
|
45
|
+
ownerState: { ...ownerState }
|
|
46
|
+
}
|
|
47
|
+
);
|
|
42
48
|
}
|
|
43
49
|
const renderIcon = (icon, instaceDataTestId, className) => {
|
|
44
50
|
if (!icon) {
|
|
@@ -70,9 +76,8 @@ const MenuItem = (props) => {
|
|
|
70
76
|
value,
|
|
71
77
|
ownerState: { ...ownerState },
|
|
72
78
|
disabled,
|
|
73
|
-
className: clsx("M4LMenuItemRoot",
|
|
74
|
-
"data-testid": "MenuItemRoot"
|
|
75
|
-
role: "menuitem"
|
|
79
|
+
className: clsx("M4LMenuItemRoot", classRoot),
|
|
80
|
+
"data-testid": "MenuItemRoot"
|
|
76
81
|
},
|
|
77
82
|
renderIcon(startIcon, "MenuItemStartIcon"),
|
|
78
83
|
/* @__PURE__ */ jsx(
|
|
@@ -3,10 +3,10 @@ const menuItemStyles = {
|
|
|
3
3
|
* Estilos para el contenedor de los items del menú
|
|
4
4
|
* @author Bruce Escobar - automatic
|
|
5
5
|
* @createdAt 2024-10-22 10:38:00 - automatic
|
|
6
|
-
* @updatedAt 2024-12-
|
|
6
|
+
* @updatedAt 2024-12-05 14:14:39 - automatic
|
|
7
7
|
* @updatedUser SebastianM - automatic
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
menuItemRoot: ({ theme, ownerState }) => ({
|
|
10
10
|
width: "100%",
|
|
11
11
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
12
12
|
padding: theme.vars.size.baseSpacings.sp1,
|
|
@@ -56,10 +56,10 @@ const menuItemStyles = {
|
|
|
56
56
|
* Estilos para el icono de los items del menú
|
|
57
57
|
* @author SebastianM - automatic
|
|
58
58
|
* @createdAt 2024-12-02 19:12:14 - automatic
|
|
59
|
-
* @updatedAt 2024-12-
|
|
59
|
+
* @updatedAt 2024-12-05 14:14:39 - automatic
|
|
60
60
|
* @updatedUser SebastianM - automatic
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
menuItemIcon: ({ ownerState }) => ({
|
|
63
63
|
"&.M4LMenuItemEndIcon": {
|
|
64
64
|
marginLeft: "auto"
|
|
65
65
|
},
|
|
@@ -73,10 +73,10 @@ const menuItemStyles = {
|
|
|
73
73
|
* Estilos para el contenedor de los items del menú en skeleton
|
|
74
74
|
* @author Bruce Escobar - automatic
|
|
75
75
|
* @createdAt 2024-10-22 10:38:00 - automatic
|
|
76
|
-
* @updatedAt 2024-12-
|
|
76
|
+
* @updatedAt 2024-12-05 14:14:39 - automatic
|
|
77
77
|
* @updatedUser SebastianM - automatic
|
|
78
78
|
*/
|
|
79
|
-
|
|
79
|
+
skeletonMenuItem: ({ theme, ownerState }) => ({
|
|
80
80
|
width: "100%",
|
|
81
81
|
padding: theme.vars.size.baseSpacings.sp2,
|
|
82
82
|
borderRadius: theme.vars.size.borderRadius.r0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var MenuItemSlots = /* @__PURE__ */ ((MenuItemSlots2) => {
|
|
2
|
-
MenuItemSlots2["
|
|
3
|
-
MenuItemSlots2["
|
|
4
|
-
MenuItemSlots2["
|
|
2
|
+
MenuItemSlots2["menuItemRoot"] = "menuItemRoot";
|
|
3
|
+
MenuItemSlots2["menuItemIcon"] = "menuItemIcon";
|
|
4
|
+
MenuItemSlots2["skeletonMenuItem"] = "skeletonMenuItem";
|
|
5
5
|
return MenuItemSlots2;
|
|
6
6
|
})(MenuItemSlots || {});
|
|
7
7
|
export {
|
|
@@ -7,16 +7,16 @@ import { S as Skeleton } from "../../Skeleton/Skeleton.js";
|
|
|
7
7
|
import { I as Icon } from "../../../Icon/Icon.js";
|
|
8
8
|
const MenuItemRootStyled = styled(MenuItem, {
|
|
9
9
|
name: MENUITEM_KEY_COMPONENT,
|
|
10
|
-
slot: MenuItemSlots.
|
|
11
|
-
})(menuItemStyles?.
|
|
10
|
+
slot: MenuItemSlots.menuItemRoot
|
|
11
|
+
})(menuItemStyles?.menuItemRoot);
|
|
12
12
|
const MenuItemIconStyled = styled(Icon, {
|
|
13
13
|
name: MENUITEM_KEY_COMPONENT,
|
|
14
|
-
slot: MenuItemSlots.
|
|
15
|
-
})(menuItemStyles?.
|
|
14
|
+
slot: MenuItemSlots.menuItemIcon
|
|
15
|
+
})(menuItemStyles?.menuItemIcon);
|
|
16
16
|
const MenuItemSkeletonStyled = styled(Skeleton, {
|
|
17
17
|
name: MENUITEM_KEY_COMPONENT,
|
|
18
|
-
slot: MenuItemSlots.
|
|
19
|
-
})(menuItemStyles?.
|
|
18
|
+
slot: MenuItemSlots.skeletonMenuItem
|
|
19
|
+
})(menuItemStyles?.skeletonMenuItem);
|
|
20
20
|
export {
|
|
21
21
|
MenuItemSkeletonStyled as M,
|
|
22
22
|
MenuItemRootStyled as a,
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@ import { StoryFn, StoryContext } from '@storybook/react';
|
|
|
31
31
|
* @returns JSX.Element - The decorated story with modal integration.
|
|
32
32
|
* @author cesar - automatic
|
|
33
33
|
* @createdAt 2024-11-26 12:39:40 - automatic
|
|
34
|
-
* @updatedAt 2024-12-
|
|
34
|
+
* @updatedAt 2024-12-06 11:53:51 - automatic
|
|
35
35
|
* @updatedUser cesar - automatic
|
|
36
36
|
*/
|
|
37
|
-
export declare const WithExtendedContainer: (
|
|
37
|
+
export declare const WithExtendedContainer: (_: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,3 +15,6 @@ export declare const TextSingle: Story;
|
|
|
15
15
|
export declare const TextMultiple: Story;
|
|
16
16
|
export declare const ImageSingle: Story;
|
|
17
17
|
export declare const ImageMultiple: Story;
|
|
18
|
+
export declare const Loading: Story;
|
|
19
|
+
export declare const Refresh: Story;
|
|
20
|
+
export declare const Skeleton: Story;
|