@m4l/components 9.1.40 → 9.1.42

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 (228) hide show
  1. package/.storybook/constants.d.ts +11 -0
  2. package/.storybook/decorators/WithDictionaryContext/contants.d.ts +3 -0
  3. package/.storybook/decorators/WithDictionaryContext/index.d.ts +1 -0
  4. package/@types/types.d.ts +8 -0
  5. package/components/AccountPopover/AccountPopover.js +32 -39
  6. package/components/AccountPopover/{style.js → AccountPopover.styles.js} +17 -10
  7. package/components/AccountPopover/slots/AccountPopoverEnum.d.ts +3 -3
  8. package/components/AccountPopover/slots/AccountPopoverEnum.js +3 -3
  9. package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +8 -8
  10. package/components/AccountPopover/slots/AccountPopoverSlots.js +16 -16
  11. package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.js +3 -2
  12. package/components/AccountPopover/subcomponents/MyAvatar/MyAvatar.js +2 -3
  13. package/components/AccountPopover/subcomponents/MyAvatar/types.d.ts +4 -0
  14. package/components/AppBar/AppBar.js +1 -1
  15. package/components/AppBar/slots/AppBarSlots.d.ts +6 -6
  16. package/components/BaseModule/BaseModule.js +3 -1
  17. package/components/BaseModule/types.d.ts +2 -0
  18. package/components/Chip/slots/ChipSlots.d.ts +2 -2
  19. package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +1 -1
  20. package/components/CommonActions/components/ActionFormIntro/index.js +1 -1
  21. package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +1 -1
  22. package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
  23. package/components/ControlIncrement/slots/ControltrolIncrementSlots.d.ts +4 -4
  24. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.d.ts +4 -0
  25. package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.d.ts +4 -0
  26. package/components/DragResizeWindow/slots/DragResizeWindowSlots.d.ts +2 -2
  27. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +16 -16
  28. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +16 -16
  29. package/components/Icon/Icon.js +1 -1
  30. package/components/Icon/slots/IconSlots.d.ts +2 -2
  31. package/components/Icon/types.d.ts +1 -1
  32. package/components/Image/Image.d.ts +5 -0
  33. package/components/Image/Image.js +1 -1
  34. package/components/Image/hoc/WithTrackWindowScroll.d.ts +4 -0
  35. package/components/Image/image.styles.js +20 -7
  36. package/components/Image/slots/ImageEnum.d.ts +5 -5
  37. package/components/Image/slots/ImageEnum.js +5 -5
  38. package/components/Image/slots/ImageSlots.js +10 -10
  39. package/components/Image/subcomponents/IntersectComponent/index.js +1 -1
  40. package/components/Image/subcomponents/LazyLoadComponent/index.d.ts +5 -0
  41. package/components/Image/types.d.ts +1 -1
  42. package/components/Image/utils/get-scroll-ancestor.d.ts +4 -0
  43. package/components/Image/utils/isIntersectionObserverAvailable.d.ts +4 -0
  44. package/components/InputNumberSpinner/slots/InputNumberSpinnerSlots.d.ts +1 -1
  45. package/components/Label/slots/LabelSlots.d.ts +1 -1
  46. package/components/LanguagePopover/LanguagePopover.d.ts +5 -0
  47. package/components/MFIsolationApp/MFIsolationApp.js +7 -4
  48. package/components/MFIsolationApp/types.d.ts +10 -0
  49. package/components/MFLoader/MFLoader.js +3 -3
  50. package/components/MenuActions/MenuActions.d.ts +2 -2
  51. package/components/MenuActions/MenuActions.js +17 -14
  52. package/components/MenuActions/MenuActions.styles.d.ts +1 -0
  53. package/components/MenuActions/MenuActions.styles.js +8 -0
  54. package/components/MenuActions/dictionary.d.ts +14 -0
  55. package/components/MenuActions/slots/MenuActionsSlots.d.ts +2 -2
  56. package/components/MenuActions/types.d.ts +27 -1
  57. package/components/ModalDialog/ModalDialog.styles.js +3 -1
  58. package/components/ModalDialog/slots/ModalDialogSlots.d.ts +4 -4
  59. package/components/ModalDialog/types.d.ts +1 -1
  60. package/components/PaperForm/PaperForm.js +1 -1
  61. package/components/PaperForm/slots/PaperFormSlots.d.ts +3 -3
  62. package/components/SideBar/slots/SideBarSlots.d.ts +15 -15
  63. package/components/SideBar/subcomponents/ContentComponent/index.d.ts +1 -1
  64. package/components/SideBar/subcomponents/ContentGroups/index.d.ts +1 -1
  65. package/components/SideBar/subcomponents/ContentGroups/index.js +4 -5
  66. package/components/SideBar/subcomponents/ContentGroups/styles.js +5 -5
  67. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.d.ts +1 -1
  68. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +3 -5
  69. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +2 -2
  70. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/subcomponents/ArrowIcon/index.d.ts +1 -1
  71. package/components/SideBar/subcomponents/FooterSidebar/index.d.ts +1 -1
  72. package/components/SideBar/subcomponents/FooterSidebar/styles.js +1 -1
  73. package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
  74. package/components/SideBar/types.d.ts +1 -1
  75. package/components/ToastContainer/slots/toastContainerSlots.d.ts +5 -5
  76. package/components/WindowBase/WindowBase.d.ts +2 -2
  77. package/components/WindowBase/WindowBase.js +1 -1
  78. package/components/WindowBase/WindowBase.styles.js +24 -24
  79. package/components/WindowBase/slots/WindowBaseSlots.d.ts +7 -7
  80. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.d.ts +2 -2
  81. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +2 -2
  82. package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +4 -4
  83. package/components/WindowBase/types.d.ts +2 -2
  84. package/components/WindowConfirm/WindowConfirm.js +1 -1
  85. package/components/WindowConfirm/WindowConfirm.styles.js +5 -1
  86. package/components/WindowConfirm/slots/WindowConfirmSlots.d.ts +8 -8
  87. package/components/WindowConfirm/types.d.ts +1 -1
  88. package/components/animate/variants/background.d.ts +9 -9
  89. package/components/animate/variants/bounce.d.ts +9 -9
  90. package/components/animate/variants/fade.d.ts +20 -20
  91. package/components/animate/variants/flip.d.ts +6 -6
  92. package/components/animate/variants/rotate.d.ts +3 -3
  93. package/components/animate/variants/scale.d.ts +6 -6
  94. package/components/animate/variants/slide.d.ts +16 -16
  95. package/components/animate/variants/transition.d.ts +3 -3
  96. package/components/animate/variants/zoom.d.ts +15 -15
  97. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.d.ts +4 -0
  98. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.js +4 -0
  99. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/index.d.ts +2 -2
  100. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/index.js +2 -2
  101. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/index.d.ts +4 -0
  102. package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/index.d.ts +4 -0
  103. package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/index.js +1 -1
  104. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/PanelWindows/index.js +2 -2
  105. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.d.ts +4 -0
  106. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.js +1 -1
  107. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/index.d.ts +4 -0
  108. package/components/areas/contexts/AreasContext/store.js +1 -397
  109. package/components/areas/types.d.ts +27 -2
  110. package/components/extended/React-Resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
  111. package/components/extended/React-Resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
  112. package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -1
  113. package/components/formatters/BooleanFormatter/BooleanFormatter.styles.js +4 -1
  114. package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.js +1 -1
  115. package/components/formatters/BooleanFormatter/types.d.ts +1 -1
  116. package/components/gclick/MyDevice/slots/MyDeviceSlots.d.ts +2 -2
  117. package/components/gclick/MyDeviceStatus/slots/MyDeviceStatusSlots.d.ts +2 -2
  118. package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -1
  119. package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeText/index.js +3 -3
  120. package/components/hook-form/RHFCheckbox/styles.d.ts +1 -1
  121. package/components/hook-form/RHFColorPicker/RFHColorPicker.js +1 -1
  122. package/components/hook-form/RHFInputNumberSpinner/slots/RHFInputNumberSpinnerSlots.d.ts +1 -1
  123. package/components/hook-form/RHFTextField/RHFTextField.d.ts +2 -2
  124. package/components/hook-form/RHFTextField/RHFTextField.styles.js +4 -0
  125. package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
  126. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/index.d.ts +2 -2
  127. package/components/maps/components/Map/popups/MapPopupMyGps/MapPopupMyGps.js +1 -1
  128. package/components/maps/components/Map/popups/MapPopupMyGps/slots/ MapPopupMyGpsSlots.d.ts +3 -3
  129. package/components/maps/components/Map/slots/MapSlots.d.ts +3 -3
  130. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.d.ts +4 -0
  131. package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/index.d.ts +1 -1
  132. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/index.d.ts +4 -0
  133. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.js +1 -1
  134. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.d.ts +4 -0
  135. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.d.ts +2 -2
  136. package/components/mui_extended/Accordion/Accordion.d.ts +1 -1
  137. package/components/mui_extended/Accordion/Accordion.js +1 -1
  138. package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +2 -2
  139. package/components/mui_extended/Accordion/styles.js +6 -6
  140. package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.d.ts +3 -3
  141. package/components/mui_extended/Avatar/Avatar.js +19 -12
  142. package/components/mui_extended/Avatar/constants.d.ts +1 -0
  143. package/components/mui_extended/Avatar/constants.js +4 -0
  144. package/components/mui_extended/Avatar/slots/AvatarEnum.d.ts +3 -0
  145. package/components/mui_extended/Avatar/slots/AvatarEnum.js +7 -0
  146. package/components/mui_extended/Avatar/slots/AvatarSlots.d.ts +5 -0
  147. package/components/mui_extended/Avatar/slots/AvatarSlots.js +12 -0
  148. package/components/mui_extended/Avatar/styles.d.ts +2 -1
  149. package/components/mui_extended/Avatar/styles.js +25 -5
  150. package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index.d.ts +7 -3
  151. package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index.js +8 -8
  152. package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/types.d.ts +2 -2
  153. package/components/mui_extended/Avatar/tests/Avatar.test.d.ts +1 -0
  154. package/components/mui_extended/Avatar/types.d.ts +11 -3
  155. package/components/mui_extended/Badge/Badge.js +1 -1
  156. package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
  157. package/components/mui_extended/Button/Button.d.ts +1 -1
  158. package/components/mui_extended/Button/Button.js +6 -3
  159. package/components/mui_extended/Button/slots/ButtonSlots.d.ts +1 -1
  160. package/components/mui_extended/CheckBox/CheckBox.styles.js +2 -1
  161. package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +2 -2
  162. package/components/mui_extended/CheckBox/types.d.ts +1 -1
  163. package/components/mui_extended/Dialog/Dialog.js +1 -1
  164. package/components/mui_extended/Dialog/Dialog.styles.js +5 -3
  165. package/components/mui_extended/Dialog/slots/DialogSlots.d.ts +2 -2
  166. package/components/mui_extended/Dialog/types.d.ts +1 -1
  167. package/components/mui_extended/IconButton/IconButton.d.ts +2 -2
  168. package/components/mui_extended/IconButton/IconButton.js +1 -1
  169. package/components/mui_extended/IconButton/IconButton.styles.js +12 -4
  170. package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +3 -3
  171. package/components/mui_extended/IconButton/types.d.ts +1 -1
  172. package/components/mui_extended/ImageButton/ImageButton.d.ts +4 -0
  173. package/components/mui_extended/LoadingButton/LoadingButton.d.ts +1 -1
  174. package/components/mui_extended/LoadingButton/LoadingButton.js +17 -55
  175. package/components/mui_extended/LoadingButton/LoadingButton.styles.js +10 -155
  176. package/components/mui_extended/LoadingButton/constants.d.ts +5 -0
  177. package/components/mui_extended/LoadingButton/slots/LoadingButtonEnum.d.ts +1 -3
  178. package/components/mui_extended/LoadingButton/slots/LoadingButtonEnum.js +1 -3
  179. package/components/mui_extended/LoadingButton/slots/LoadingButtonSlots.d.ts +4 -20
  180. package/components/mui_extended/LoadingButton/slots/LoadingButtonSlots.js +6 -18
  181. package/components/mui_extended/LoadingButton/types.d.ts +3 -5
  182. package/components/mui_extended/MenuItem/MenuItem.d.ts +2 -2
  183. package/components/mui_extended/MenuItem/MenuItem.js +29 -30
  184. package/components/mui_extended/MenuItem/MenuItem.styles.js +20 -12
  185. package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +2 -2
  186. package/components/mui_extended/Pager/classes/index.d.ts +1 -1
  187. package/components/mui_extended/Popover/Popover.d.ts +6 -1
  188. package/components/mui_extended/Popover/Popover.js +7 -0
  189. package/components/mui_extended/Popover/Popover.styles.js +8 -0
  190. package/components/mui_extended/Popper/slots/PopperStlots.d.ts +1 -1
  191. package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
  192. package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
  193. package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
  194. package/components/mui_extended/Tab/Tab.d.ts +4 -0
  195. package/components/mui_extended/Tab/Tab.js +1 -1
  196. package/components/mui_extended/Tab/Tab.styles.d.ts +1 -0
  197. package/components/mui_extended/Tab/Tab.styles.js +10 -0
  198. package/components/mui_extended/Tabs/styles.d.ts +1 -1
  199. package/components/mui_extended/TextField/TextField.d.ts +2 -2
  200. package/components/mui_extended/TextField/TextField.styles.js +4 -4
  201. package/components/mui_extended/TextField/constants.js +1 -1
  202. package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +1 -1
  203. package/components/mui_extended/ToggleButton/ToggleButton.js +1 -1
  204. package/components/mui_extended/ToggleButton/ToggleButton.styles.js +1 -1
  205. package/components/mui_extended/ToggleButton/slots/ToggleButtonSlots.d.ts +1 -1
  206. package/components/mui_extended/ToggleIconButton/ToggleIconButton.js +1 -1
  207. package/components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
  208. package/components/mui_extended/Tooltip/Tooltip.styles.js +2 -1
  209. package/components/mui_extended/Tooltip/slots/TooltipSlots.d.ts +1 -1
  210. package/components/mui_extended/Tooltip/types.d.ts +1 -1
  211. package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
  212. package/components/mui_extended/Typography/typography.styles.js +2 -2
  213. package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +5 -5
  214. package/package.json +3 -3
  215. package/test/TestAppWrapper.d.ts +2 -0
  216. package/utils/getComponentSlotRoot.js +2 -2
  217. package/components/mui_extended/Avatar/classes/constants.d.ts +0 -1
  218. package/components/mui_extended/Avatar/classes/constants.js +0 -4
  219. package/components/mui_extended/Avatar/classes/index.d.ts +0 -10
  220. package/components/mui_extended/Avatar/classes/index.js +0 -25
  221. package/components/mui_extended/Avatar/classes/types.d.ts +0 -7
  222. package/components/mui_extended/Avatar/index.js +0 -1
  223. package/components/mui_extended/Avatar/tests/constants.d.ts +0 -1
  224. package/components/mui_extended/Avatar/tests/constants.js +0 -4
  225. package/components/mui_extended/Avatar/tests/index.test.d.ts +0 -5
  226. package/components/mui_extended/Avatar/tests/utils.d.ts +0 -2
  227. package/components/mui_extended/Avatar/tests/utils.js +0 -7
  228. /package/components/AccountPopover/{style.d.ts → AccountPopover.styles.d.ts} +0 -0
@@ -1,5 +1,9 @@
1
1
  import { ImageButtonProps } from './types';
2
2
  /**
3
3
  * TODO: Documentar
4
+ * @author Andrés Quintero - automatic
5
+ * @createdAt 2024-12-27 08:27:31 - automatic
6
+ * @updatedAt 2024-12-27 08:28:36 - automatic
7
+ * @updatedUser Andrés Quintero - automatic
4
8
  */
5
9
  export declare function ImageButton({ src, width, tooltip, sx, className, dataTestId, alt, ...other }: ImageButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -2,4 +2,4 @@ import { LoadingButtonProps } from './types';
2
2
  /**
3
3
  * Componente LoadingButton que extiende las props de Button
4
4
  */
5
- export declare const LoadingButton: import('react').ForwardRefExoticComponent<Omit<LoadingButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
5
+ export declare const LoadingButton: (props: LoadingButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,17 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
- import { forwardRef } from "react";
4
- import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
5
- import { useTheme } from "@mui/material";
6
- import { S as SkeletonLoadingButtonStyled, L as LoadingButtonRootStyled, T as TextLoadingButtonStyled, C as CircularProgressStyled, a as LoadingButtonIconStyled } from "./slots/LoadingButtonSlots.js";
3
+ import { useModuleSkeleton } from "@m4l/core";
4
+ import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
5
+ import { S as SkeletonLoadingButtonStyled, R as RootStyled, C as CircularProgressStyled } from "./slots/LoadingButtonSlots.js";
6
+ import { L as LOADING_BUTTON_KEY_COMPONENT } from "./constants.js";
7
7
  import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
8
- const LoadingButton = forwardRef((props, ref) => {
8
+ const LoadingButton = (props) => {
9
9
  const {
10
10
  className,
11
11
  endIcon,
12
12
  label,
13
13
  startIcon,
14
- color = "default",
14
+ color = "primary",
15
15
  disabled = false,
16
16
  size = "small",
17
17
  variant = "contained",
@@ -21,73 +21,35 @@ const LoadingButton = forwardRef((props, ref) => {
21
21
  } = props;
22
22
  const { currentSize } = useComponentSize(size);
23
23
  const isSkeleton = useModuleSkeleton();
24
- const theme = useTheme();
25
24
  const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
26
- const paletteColor = getPropertyByString(
27
- theme.vars.palette,
28
- disabled ? "default" : color || "default",
29
- theme.vars.palette.default
30
- );
31
25
  const ownerState = {
32
26
  size,
33
27
  variant,
34
28
  disabled,
35
- paletteColor,
36
29
  color,
37
30
  loading
38
31
  };
39
32
  if (isSkeleton) {
40
33
  return /* @__PURE__ */ jsx(SkeletonLoadingButtonStyled, { "data-testid": "SkeletonButton", width: skeletonWidth, ownerState: { ...ownerState } });
41
34
  }
42
- const getAdjustedColor = (btnColor, btnVariant) => {
43
- return btnVariant === "contained" ? `${btnColor}.contrastText` : `${btnColor}.main`;
44
- };
45
- const adjustedColor = getAdjustedColor(color, variant);
46
- const renderIcon = (icon, instaceDataTestId) => {
47
- if (!icon) {
48
- return null;
49
- }
50
- if (typeof icon !== "string") {
51
- return icon;
52
- } else {
53
- return /* @__PURE__ */ jsx(
54
- LoadingButtonIconStyled,
55
- {
56
- color: adjustedColor,
57
- ownerState: { ...ownerState },
58
- src: icon,
59
- alt: "icon",
60
- size: adjustedSize,
61
- disabled: loading || disabled,
62
- instaceDataTestId,
63
- className: clsx(className)
64
- }
65
- );
66
- }
67
- };
68
- return /* @__PURE__ */ jsxs(
69
- LoadingButtonRootStyled,
35
+ const classRoot = getComponentSlotRoot(LOADING_BUTTON_KEY_COMPONENT);
36
+ return /* @__PURE__ */ jsx(
37
+ RootStyled,
70
38
  {
71
- "aria-disabled": disabled,
72
- role: "button",
73
- startIcon: renderIcon(startIcon, "LoadingButtonStartIcon"),
74
- endIcon: renderIcon(endIcon, "LoadingButtonEndIcon"),
75
- className: clsx(className),
39
+ color,
76
40
  variant,
77
41
  size,
42
+ label,
78
43
  disabled: loading || disabled,
79
- disableRipple: true,
80
44
  ownerState: { ...ownerState },
81
- ref,
45
+ className: clsx(className, classRoot),
46
+ startIcon,
47
+ endIcon,
82
48
  ...others,
83
- children: [
84
- /* @__PURE__ */ jsx(TextLoadingButtonStyled, { ownerState: { ...ownerState }, color: adjustedColor, children: label }),
85
- loading === true && /* @__PURE__ */ jsx(CircularProgressStyled, { ownerState: { ...ownerState }, size: adjustedSize })
86
- ]
49
+ children: loading === true && /* @__PURE__ */ jsx(CircularProgressStyled, { color: "primary", ownerState: { ...ownerState }, size: adjustedSize })
87
50
  }
88
51
  );
89
- });
90
- LoadingButton.displayName = "LoadingButton";
52
+ };
91
53
  export {
92
54
  LoadingButton as L
93
55
  };
@@ -1,161 +1,16 @@
1
1
  const loadingButtonStyles = {
2
2
  /**
3
- * Estilos para el elemento raíz del componente LoadingButton.
4
- * Incluye el diseño, los espaciados y los estados para los diferentes variantes de botón: 'text', 'outlined', y 'contained'.
5
- * Maneja los estados de enfoque, hover, activo y deshabilitado, incluyendo colores específicos y comportamientos de fondo.
3
+ * Estilos para el componente Button de M4L.
4
+ * Componente boton con variantes y paletas de colores.
6
5
  */
7
- loadingButtonRoot: ({ theme, ownerState }) => ({
8
- display: "flex",
9
- alignItems: "center",
10
- gap: theme.vars.size.baseSpacings.sp1,
11
- padding: `0px ${theme.vars.size.baseSpacings.sp2}`,
12
- boxShadow: "none",
13
- borderRadius: theme.vars.size.borderRadius.r1,
14
- // Estilos para la variante 'text'
15
- ...ownerState.variant === "text" && {
16
- color: ownerState.paletteColor?.semanticText,
17
- '& [class*="M4LIcon-icon"]': {
18
- backgroundColor: ownerState.paletteColor?.semanticText
6
+ root: ({ ownerState }) => ({
7
+ ...ownerState.loading && {
8
+ "&>.MuiTypography-root": {
9
+ visibility: "hidden"
19
10
  },
20
- "&:disabled": {
21
- color: theme.vars.palette.text.disabled
22
- },
23
- backgroundColor: "transparent",
24
- ...ownerState.color === "default" && {
25
- color: theme.vars.palette.text.primary,
26
- '& [class*="M4LIcon-icon"]': {
27
- backgroundColor: theme.vars.palette.text.primary
28
- }
29
- },
30
- ...ownerState.color === "primary" && {
31
- color: ownerState.paletteColor?.enabled,
32
- '& [class*="M4LIcon-icon"]': {
33
- backgroundColor: ownerState.paletteColor?.enabled
34
- }
35
- },
36
- "&:hover": {
37
- backgroundColor: ownerState.paletteColor?.hoverOpacity
38
- },
39
- "&:active": {
40
- backgroundColor: ownerState.paletteColor?.activeOpacity
41
- },
42
- "&:focus-visible": {
43
- boxShadow: "none",
44
- outline: theme.vars.size.borderStroke.container,
45
- outlineColor: ownerState.paletteColor?.focusVisible,
46
- outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
47
- backgroundColor: ownerState.paletteColor?.activeOpacity
48
- }
49
- },
50
- // Estilos para la variante 'outlined'
51
- ...ownerState.variant === "outlined" && {
52
- borderColor: ownerState.paletteColor?.enabled,
53
- color: ownerState.paletteColor?.semanticText,
54
- '& [class*="M4LIcon-icon"]': {
55
- backgroundColor: ownerState.paletteColor?.semanticText
56
- },
57
- backgroundColor: "transparent",
58
- ...ownerState.color === "default" && {
59
- color: theme.vars.palette.text.primary,
60
- borderColor: ownerState.paletteColor?.enabled,
61
- '& [class*="M4LIcon-icon"]': {
62
- backgroundColor: theme.vars.palette.text.primary
63
- }
64
- },
65
- ...ownerState.color === "primary" && {
66
- color: ownerState.paletteColor?.enabled,
67
- '& [class*="M4LIcon-icon"]': {
68
- backgroundColor: ownerState.paletteColor?.enabled
69
- }
70
- },
71
- "&:hover": {
72
- borderColor: ownerState.paletteColor?.hover,
73
- backgroundColor: ownerState.paletteColor?.hoverOpacity
74
- },
75
- "&:active": {
76
- backgroundColor: ownerState.paletteColor?.activeOpacity,
77
- borderColor: ownerState.paletteColor?.active
78
- },
79
- "&:focus-visible": {
80
- boxShadow: "none",
81
- outline: theme.vars.size.borderStroke.container,
82
- outlineColor: ownerState.paletteColor?.focusVisible,
83
- outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
84
- backgroundColor: ownerState.paletteColor?.activeOpacity,
85
- borderColor: ownerState.paletteColor?.active
11
+ "&>.MuiButton-icon": {
12
+ visibility: "hidden"
86
13
  }
87
- },
88
- // Estilos para la variante 'contained'
89
- ...ownerState.variant === "contained" && {
90
- backgroundColor: ownerState.paletteColor?.enabled,
91
- color: ownerState.paletteColor?.contrastText,
92
- ...ownerState.color === "default" && {
93
- color: theme.vars.palette.text.primary
94
- },
95
- "&:hover": {
96
- backgroundColor: ownerState.paletteColor?.hover
97
- },
98
- "&:active": {
99
- backgroundColor: ownerState.paletteColor?.active
100
- },
101
- "&:focus-visible": {
102
- boxShadow: "none",
103
- outline: theme.vars.size.borderStroke.container,
104
- outlineColor: theme.vars.palette.border.main,
105
- outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
106
- backgroundColor: ownerState.paletteColor?.active
107
- }
108
- },
109
- // Estilo para el texto dentro del botón
110
- "& span": {
111
- margin: "0px"
112
- },
113
- // Styles for small button size
114
- ...ownerState.size === "small" && {
115
- ...theme.generalSettings.isMobile ? {
116
- height: theme.vars.size.mobile.small.action,
117
- minHeight: theme.vars.size.mobile.small.action
118
- } : {
119
- height: theme.vars.size.desktop.small.action,
120
- minHeight: theme.vars.size.desktop.small.action
121
- }
122
- },
123
- // Styles for medium button size
124
- ...ownerState.size === "medium" && {
125
- ...theme.generalSettings.isMobile ? {
126
- height: theme.vars.size.mobile.medium.action,
127
- minHeight: theme.vars.size.mobile.medium.action
128
- } : {
129
- height: theme.vars.size.desktop.medium.action,
130
- minHeight: theme.vars.size.desktop.medium.action
131
- }
132
- }
133
- }),
134
- /**
135
- * Estilos para el ícono dentro del botón.
136
- * Ajusta la visibilidad para los estados de carga y deshabilitado.
137
- */
138
- loadingButtonIcon: ({ theme, ownerState }) => ({
139
- ...ownerState.loading === true && {
140
- visibility: "hidden"
141
- },
142
- ...ownerState.disabled === true && {
143
- '& [class*="M4LIcon-icon"]': {
144
- backgroundColor: theme.vars.palette.text.disabled
145
- }
146
- }
147
- }),
148
- /**
149
- * Estilos para el texto del botón.
150
- * Incluye ajustes para los estados de carga y deshabilitado.
151
- */
152
- textLoadingButton: ({ theme, ownerState }) => ({
153
- ...theme.typography.bodyDens,
154
- ...ownerState.loading === true && {
155
- visibility: "hidden"
156
- },
157
- ...ownerState.disabled === true && {
158
- color: theme.vars.palette.text.disabled
159
14
  }
160
15
  }),
161
16
  /**
@@ -190,9 +45,9 @@ const loadingButtonStyles = {
190
45
  * Estilos para el componente CircularProgress.
191
46
  * Posiciona el cargador dentro del botón y aplica un color consistente.
192
47
  */
193
- circularProgress: ({ theme }) => ({
48
+ circularProgress: ({ theme, ownerState }) => ({
194
49
  position: "absolute",
195
- color: theme.vars.palette.text.disabled
50
+ color: ownerState.color === "default" ? theme.vars.palette.text.disabled : theme.vars.palette[ownerState.color || "default"].main
196
51
  })
197
52
  };
198
53
  export {
@@ -6,3 +6,8 @@
6
6
  * @default 'M4LLoadingButton'
7
7
  */
8
8
  export declare const LOADING_BUTTON_KEY_COMPONENT = "M4LLoadingButton";
9
+ /**
10
+ * Nombre de clase creado para aportar especificidad a los estilos del componente. Es usado para sobreescribir los estilos de MUI sin
11
+ * tener la necesidad de agregar valores en !important.
12
+ */
13
+ export declare const LOADING_BUTTON_CLASS_NAME_SPECIFY = "M4lclassCssSpecificityLoadingButton";
@@ -1,7 +1,5 @@
1
1
  export declare enum LoadingButtonSlots {
2
- loadingButtonRoot = "loadingButtonRoot",
2
+ root = "root",
3
3
  skeletonLoadingButton = "skeletonLoadingButton",
4
- loadingButtonIcon = "loadingButtonIcon",
5
- textLoadingButton = "textLoadingButton",
6
4
  circularProgress = "circularProgress"
7
5
  }
@@ -1,8 +1,6 @@
1
1
  var LoadingButtonSlots = /* @__PURE__ */ ((LoadingButtonSlots2) => {
2
- LoadingButtonSlots2["loadingButtonRoot"] = "loadingButtonRoot";
2
+ LoadingButtonSlots2["root"] = "root";
3
3
  LoadingButtonSlots2["skeletonLoadingButton"] = "skeletonLoadingButton";
4
- LoadingButtonSlots2["loadingButtonIcon"] = "loadingButtonIcon";
5
- LoadingButtonSlots2["textLoadingButton"] = "textLoadingButton";
6
4
  LoadingButtonSlots2["circularProgress"] = "circularProgress";
7
5
  return LoadingButtonSlots2;
8
6
  })(LoadingButtonSlots || {});
@@ -2,37 +2,21 @@
2
2
  * `LoadingButtonRootStyled`
3
3
  * Componente raíz del botón que usa el componente `Button` de material UI.
4
4
  */
5
- declare const LoadingButtonRootStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').ButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
6
- ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
7
- }, "children" | "size" | "action" | "color" | "style" | "disabled" | "variant" | "className" | "classes" | "sx" | "tabIndex" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableFocusRipple" | "disableElevation" | "endIcon" | "fullWidth" | "startIcon">, "children" | "value" | "ref" | "title" | "size" | "name" | "id" | "type" | "action" | "hidden" | "color" | "content" | "style" | "disabled" | "variant" | "className" | "classes" | "onChange" | "sx" | "translate" | "form" | "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" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableFocusRipple" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "disableElevation" | "endIcon" | "fullWidth" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown> & {
5
+ declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../Button').ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "children" | "value" | "title" | "component" | "size" | "name" | "id" | "type" | "action" | "hidden" | "color" | "content" | "style" | "disabled" | "variant" | "translate" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "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" | "onChange" | "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" | "form" | "label" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "href" | "startIcon" | "endIcon" | "skeletonWidth" | "fullWidth" | "disableElevation" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown> & {
8
6
  ownerState: Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown>;
9
7
  }, {}, {}>;
10
8
  /**
11
9
  * `SkeletonLoadingButtonStyled`
12
10
  * Esqueleto de carga del botón que usa el componente `Skeleton` de M4L.
13
11
  */
14
- declare const SkeletonLoadingButtonStyled: 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').LoadingButtonOwnerState> & Record<string, unknown> & {
15
- ownerState: Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown>;
16
- }, {}, {}>;
17
- /**
18
- * `LoadingButtonIconStyled`
19
- * Ícono estilizado del botón (inicio o fin) que usa el componente `Icon` de M4L.
20
- */
21
- declare const LoadingButtonIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../..').IconProps, keyof import('../../..').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown> & {
22
- ownerState: Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown>;
23
- }, {}, {}>;
24
- /**
25
- * `TextLoadingButtonStyled`
26
- * Texto estilizado del botón del componente `Typography` de M4L.
27
- */
28
- declare const TextLoadingButtonStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Typography/types').TypographyProps, keyof import('../../Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown> & {
12
+ declare const SkeletonLoadingButtonStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Skeleton/types').SkeletonProps, keyof import('../../Skeleton/types').SkeletonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown> & {
29
13
  ownerState: Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown>;
30
14
  }, {}, {}>;
31
15
  /**
32
16
  * `CircularProgressStyled`
33
17
  * Indicador de progreso circular estilizado del componente `CircularProgress` de M4L.
34
18
  */
35
- declare const CircularProgressStyled: import('@emotion/styled').StyledComponent<Pick<import('../../CircularProgress/types').CircularProgressProps, keyof import('../../CircularProgress/types').CircularProgressProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown> & {
19
+ declare const CircularProgressStyled: import('@emotion/styled').StyledComponent<Pick<import('../../CircularProgress/types').CircularProgressProps, keyof import('../../CircularProgress/types').CircularProgressProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown> & {
36
20
  ownerState: Partial<import('../types').LoadingButtonOwnerState> & Record<string, unknown>;
37
21
  }, {}, {}>;
38
- export { LoadingButtonRootStyled, SkeletonLoadingButtonStyled, LoadingButtonIconStyled, TextLoadingButtonStyled, CircularProgressStyled, };
22
+ export { RootStyled, SkeletonLoadingButtonStyled, CircularProgressStyled, };
@@ -1,36 +1,24 @@
1
1
  import { styled } from "@mui/material/styles";
2
- import { Button } from "@mui/material";
3
2
  import { S as Skeleton } from "../../Skeleton/Skeleton.js";
4
- import { I as Icon } from "../../../Icon/Icon.js";
5
- import { T as Typography } from "../../Typography/Typography.js";
6
3
  import { C as CircularProgress } from "../../CircularProgress/CircularProgress.js";
7
4
  import { l as loadingButtonStyles } from "../LoadingButton.styles.js";
8
5
  import { L as LOADING_BUTTON_KEY_COMPONENT } from "../constants.js";
9
6
  import { L as LoadingButtonSlots } from "./LoadingButtonEnum.js";
10
- const LoadingButtonRootStyled = styled(Button, {
7
+ import { B as Button } from "../../Button/Button.js";
8
+ const RootStyled = styled(Button, {
11
9
  name: LOADING_BUTTON_KEY_COMPONENT,
12
- slot: LoadingButtonSlots.loadingButtonRoot
13
- })(loadingButtonStyles?.loadingButtonRoot);
10
+ slot: LoadingButtonSlots.root
11
+ })(loadingButtonStyles?.root);
14
12
  const SkeletonLoadingButtonStyled = styled(Skeleton, {
15
13
  name: LOADING_BUTTON_KEY_COMPONENT,
16
14
  slot: LoadingButtonSlots.skeletonLoadingButton
17
15
  })(loadingButtonStyles?.skeletonLoadingButton);
18
- const LoadingButtonIconStyled = styled(Icon, {
19
- name: LOADING_BUTTON_KEY_COMPONENT,
20
- slot: LoadingButtonSlots.loadingButtonIcon
21
- })(loadingButtonStyles?.loadingButtonIcon);
22
- const TextLoadingButtonStyled = styled(Typography, {
23
- name: LOADING_BUTTON_KEY_COMPONENT,
24
- slot: LoadingButtonSlots.textLoadingButton
25
- })(loadingButtonStyles?.textLoadingButton);
26
16
  const CircularProgressStyled = styled(CircularProgress, {
27
17
  name: LOADING_BUTTON_KEY_COMPONENT,
28
18
  slot: LoadingButtonSlots.circularProgress
29
19
  })(loadingButtonStyles?.circularProgress);
30
20
  export {
31
21
  CircularProgressStyled as C,
32
- LoadingButtonRootStyled as L,
33
- SkeletonLoadingButtonStyled as S,
34
- TextLoadingButtonStyled as T,
35
- LoadingButtonIconStyled as a
22
+ RootStyled as R,
23
+ SkeletonLoadingButtonStyled as S
36
24
  };
@@ -1,15 +1,13 @@
1
1
  import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
- import { PaletteColor, Theme } from '@mui/material';
2
+ import { Theme } from '@mui/material';
3
3
  import { LOADING_BUTTON_KEY_COMPONENT } from './constants';
4
4
  import { LoadingButtonSlots } from './slots/LoadingButtonEnum';
5
5
  import { ButtonProps } from '../Button/types';
6
- export interface LoadingButtonProps extends Omit<ButtonProps, 'label'> {
7
- label?: string;
6
+ export interface LoadingButtonProps extends ButtonProps {
8
7
  loading?: boolean;
9
8
  }
10
9
  export interface LoadingButtonOwnerState extends Pick<LoadingButtonProps, 'size' | 'variant' | 'color' | 'disabled' | 'loading'> {
11
10
  disabled?: boolean;
12
- paletteColor: PaletteColor;
13
11
  }
14
12
  export type LoadingButtonSlotsType = keyof typeof LoadingButtonSlots;
15
- export type LoadingButtonStyles = Partial<OverridesStyleRules<LoadingButtonSlotsType, typeof LOADING_BUTTON_KEY_COMPONENT, Theme> | undefined> | undefined;
13
+ export type LoadingButtonStyles = OverridesStyleRules<LoadingButtonSlotsType, typeof LOADING_BUTTON_KEY_COMPONENT, Theme>;
@@ -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-13 12:45:48 - automatic
11
- * @updatedUser SebastianM - automatic
10
+ * @updatedAt 2024-12-27 08:28:36 - automatic
11
+ * @updatedUser Andrés Quintero - automatic
12
12
  */
13
13
  export declare const MenuItem: (props: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { createElement } from "react";
3
2
  import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
4
3
  import { useTheme } from "@mui/material";
5
4
  import clsx from "clsx";
6
- import { a as getComponentClasses, g as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
5
+ import { g as getComponentClasses, a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
7
6
  import { M as MENUITEM_KEY_COMPONENT } from "./constants.js";
8
7
  import { M as MenuItemSkeletonStyled, a as MenuItemRootStyled, b as MenuItemIconCheckedStyled, c as MenuItemContainerStyled, d as MenuItemTypographyStyled, e as MenuItemIconStyled } from "./slots/MenuItemSlots.js";
9
8
  import { M as MenuItemSlots } from "./slots/MenuItemEnum.js";
@@ -12,7 +11,6 @@ const MenuItem = (props) => {
12
11
  const {
13
12
  startIcon,
14
13
  endIcon,
15
- key,
16
14
  label,
17
15
  value,
18
16
  skeletonWidth = "100%",
@@ -74,41 +72,42 @@ const MenuItem = (props) => {
74
72
  };
75
73
  const checkedIcon = "https://s3.us-east-1.amazonaws.com/static.made4labs/environments/d1/frontend/components/menu_item/checked.svg";
76
74
  const hasCheckedIcon = checked && checkedIcon;
77
- return /* @__PURE__ */ createElement(
75
+ return /* @__PURE__ */ jsxs(
78
76
  MenuItemRootStyled,
79
77
  {
80
78
  ...other,
81
- key,
82
79
  value,
83
80
  ownerState: { ...ownerState },
84
81
  disabled,
85
82
  disableRipple: true,
86
83
  className: clsx("M4LMenuItemRoot", classes.root, className),
87
- "data-testid": "MenuItemRoot"
88
- },
89
- hasCheckedIcon && /* @__PURE__ */ jsx(
90
- MenuItemIconCheckedStyled,
91
- {
92
- src: checkedIcon,
93
- ownerState: { ...ownerState },
94
- className: classes.menuItemIconChecked
95
- }
96
- ),
97
- /* @__PURE__ */ jsxs(MenuItemContainerStyled, { ownerState: { ...ownerState }, className: classes.menuItemContainer, children: [
98
- renderIcon(startIcon, "MenuItemStartIcon", getComponentSlotRoot("MenuItemStartIcon")),
99
- /* @__PURE__ */ jsx(
100
- MenuItemTypographyStyled,
101
- {
102
- ownerState: { ...ownerState },
103
- variant: "body",
104
- size: adjustedSize,
105
- "data-testid": "MenuItemLabel",
106
- className: classes.menuItemTypography,
107
- children: label
108
- }
109
- ),
110
- renderIcon(endIcon, "MenuItemEndIcon", getComponentSlotRoot("MenuItemEndIcon"))
111
- ] })
84
+ "data-testid": "MenuItemRoot",
85
+ children: [
86
+ hasCheckedIcon && /* @__PURE__ */ jsx(
87
+ MenuItemIconCheckedStyled,
88
+ {
89
+ src: checkedIcon,
90
+ ownerState: { ...ownerState },
91
+ className: classes.menuItemIconChecked
92
+ }
93
+ ),
94
+ /* @__PURE__ */ jsxs(MenuItemContainerStyled, { ownerState: { ...ownerState }, className: classes.menuItemContainer, children: [
95
+ renderIcon(startIcon, "MenuItemStartIcon", getComponentSlotRoot("MenuItemStartIcon")),
96
+ /* @__PURE__ */ jsx(
97
+ MenuItemTypographyStyled,
98
+ {
99
+ ownerState: { ...ownerState },
100
+ variant: "body",
101
+ size: adjustedSize,
102
+ "data-testid": "MenuItemLabel",
103
+ className: classes.menuItemTypography,
104
+ children: label
105
+ }
106
+ ),
107
+ renderIcon(endIcon, "MenuItemEndIcon", getComponentSlotRoot("MenuItemEndIcon"))
108
+ ] })
109
+ ]
110
+ }
112
111
  );
113
112
  };
114
113
  export {