@m4l/components 9.1.54 → 9.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/components/Chip/Chip.js +6 -2
  2. package/components/Chip/ChipStyles.js +7 -7
  3. package/components/Chip/constants.d.ts +4 -0
  4. package/components/Chip/constants.js +5 -1
  5. package/components/Chip/slots/ChipEnum.d.ts +7 -7
  6. package/components/Chip/slots/ChipEnum.js +8 -7
  7. package/components/Chip/slots/ChipSlots.js +3 -3
  8. package/components/Chip/types.d.ts +41 -11
  9. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +9 -21
  10. package/components/mui_extended/Autocomplete/Autocomplete.js +13 -9
  11. package/components/mui_extended/Autocomplete/AutocompleteStyles.js +18 -58
  12. package/components/mui_extended/Autocomplete/dictionary.d.ts +0 -2
  13. package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +1 -1
  14. package/components/mui_extended/Autocomplete/renderOptions/index.js +3 -2
  15. package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.js +3 -2
  16. package/components/mui_extended/MenuItem/MenuItem.js +7 -6
  17. package/components/mui_extended/MenuItem/MenuItem.styles.js +55 -64
  18. package/components/mui_extended/MenuItem/constants.d.ts +4 -0
  19. package/components/mui_extended/MenuItem/constants.js +5 -1
  20. package/components/mui_extended/MenuItem/slots/MenuItemEnum.d.ts +1 -1
  21. package/components/mui_extended/MenuItem/slots/MenuItemEnum.js +1 -1
  22. package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +3 -3
  23. package/components/mui_extended/MenuItem/types.d.ts +32 -11
  24. package/components/mui_extended/TextField/TextField.js +2 -1
  25. package/components/mui_extended/TextField/TextField.styles.js +26 -10
  26. package/components/mui_extended/TextField/constants.d.ts +3 -3
  27. package/components/mui_extended/TextField/constants.js +2 -2
  28. package/components/mui_extended/TextField/slots/TextFieldEnum.d.ts +1 -1
  29. package/components/mui_extended/TextField/slots/TextFieldEnum.js +6 -6
  30. package/components/mui_extended/Typography/Typography.js +4 -3
  31. package/components/mui_extended/Typography/constants.d.ts +4 -0
  32. package/components/mui_extended/Typography/constants.js +5 -1
  33. package/components/mui_extended/Typography/slots/typographySlots.js +1 -1
  34. package/package.json +1 -1
  35. package/utils/getHeightSizeStyles.js +1 -1
@@ -1,7 +1,9 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useModuleSkeleton, useEnvironment, getPropertyByString } from "@m4l/core";
3
3
  import { useTheme } from "@mui/material";
4
+ import clsx from "clsx";
4
5
  import { forwardRef } from "react";
6
+ import { C as CHIP_CLASSES } from "./constants.js";
5
7
  import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
6
8
  import { S as SkeletonChipStyled, C as ChipRootStyled, T as TextChipStyled, I as IconButtonStyled, a as IconStyled } from "./slots/ChipSlots.js";
7
9
  const Chip = forwardRef((props, ref) => {
@@ -17,6 +19,7 @@ const Chip = forwardRef((props, ref) => {
17
19
  hasIconClose = true,
18
20
  onClick,
19
21
  onDeleted,
22
+ className,
20
23
  ...others
21
24
  } = props;
22
25
  const { currentSize } = useComponentSize(size);
@@ -30,7 +33,7 @@ const Chip = forwardRef((props, ref) => {
30
33
  theme.vars.palette.default
31
34
  );
32
35
  const ownerState = {
33
- size,
36
+ chipSize: adjustedSize,
34
37
  variant,
35
38
  paletteColor,
36
39
  color,
@@ -75,9 +78,10 @@ const Chip = forwardRef((props, ref) => {
75
78
  {
76
79
  role: "button-chip",
77
80
  tabIndex: 0,
78
- size,
81
+ size: adjustedSize,
79
82
  onClick,
80
83
  ownerState: { ...ownerState },
84
+ className: clsx(className, CHIP_CLASSES.root),
81
85
  ref,
82
86
  ...others,
83
87
  children: [
@@ -6,7 +6,7 @@ const chipStyles = {
6
6
  * @updatedAt 2024-12-06 13:56:58 - automatic
7
7
  * @updatedUser SebastianM - automatic
8
8
  */
9
- chipRoot: ({ theme, ownerState }) => ({
9
+ root: ({ theme, ownerState }) => ({
10
10
  display: "flex",
11
11
  alignItems: "center",
12
12
  padding: theme.vars.size.baseSpacings.sp1,
@@ -424,7 +424,7 @@ const chipStyles = {
424
424
  }
425
425
  },
426
426
  // Estilos específicos para el tamaño small
427
- ...ownerState.size === "small" && {
427
+ ...ownerState.chipSize === "small" && {
428
428
  ...theme.generalSettings.isMobile ? {
429
429
  height: theme.vars.size.mobile.small.base,
430
430
  minHeight: theme.vars.size.mobile.small.base
@@ -434,7 +434,7 @@ const chipStyles = {
434
434
  }
435
435
  },
436
436
  // Estilos específicos para el tamaño medium
437
- ...ownerState.size === "medium" && {
437
+ ...ownerState.chipSize === "medium" && {
438
438
  ...theme.generalSettings.isMobile ? {
439
439
  height: theme.vars.size.mobile.medium.base,
440
440
  minHeight: theme.vars.size.mobile.medium.base
@@ -472,7 +472,7 @@ const chipStyles = {
472
472
  */
473
473
  iconButton: ({ theme, ownerState }) => ({
474
474
  // Estilos específicos para el tamaño small
475
- ...ownerState.size === "small" && {
475
+ ...ownerState.chipSize === "small" && {
476
476
  ...theme.generalSettings.isMobile ? {
477
477
  height: theme.vars.size.mobile.small.base,
478
478
  width: theme.vars.size.mobile.small.base,
@@ -484,7 +484,7 @@ const chipStyles = {
484
484
  }
485
485
  },
486
486
  // Estilos específicos para el tamaño medium
487
- ...ownerState.size === "medium" && {
487
+ ...ownerState.chipSize === "medium" && {
488
488
  ...theme.generalSettings.isMobile ? {
489
489
  height: theme.vars.size.mobile.medium.base,
490
490
  width: theme.vars.size.mobile.medium.base,
@@ -507,7 +507,7 @@ const chipStyles = {
507
507
  width: "100%",
508
508
  background: theme.vars.palette.skeleton.transition,
509
509
  // Estilos específicos para el tamaño small
510
- ...ownerState.size === "small" && {
510
+ ...ownerState.chipSize === "small" && {
511
511
  ...theme.generalSettings.isMobile ? {
512
512
  height: theme.vars.size.mobile.small.base,
513
513
  minHeight: theme.vars.size.mobile.small.base
@@ -517,7 +517,7 @@ const chipStyles = {
517
517
  }
518
518
  },
519
519
  // Estilos específicos para el tamaño medium
520
- ...ownerState.size === "medium" && {
520
+ ...ownerState.chipSize === "medium" && {
521
521
  ...theme.generalSettings.isMobile ? {
522
522
  height: theme.vars.size.mobile.medium.base,
523
523
  minHeight: theme.vars.size.mobile.medium.base
@@ -6,3 +6,7 @@
6
6
  * @default 'M4LChip'
7
7
  */
8
8
  export declare const CHIP_KEY_COMPONENT = "M4LChip";
9
+ /**
10
+ * Inventario de clases CSS para el componente Chip
11
+ */
12
+ export declare const CHIP_CLASSES: Record<string, string>;
@@ -1,4 +1,8 @@
1
+ import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
2
+ import { C as ChipSlots } from "./slots/ChipEnum.js";
1
3
  const CHIP_KEY_COMPONENT = "M4LChip";
4
+ const CHIP_CLASSES = getComponentClasses(CHIP_KEY_COMPONENT, ChipSlots);
2
5
  export {
3
- CHIP_KEY_COMPONENT as C
6
+ CHIP_CLASSES as C,
7
+ CHIP_KEY_COMPONENT as a
4
8
  };
@@ -1,7 +1,7 @@
1
- export declare const ChipSlots: {
2
- chipRoot: string;
3
- skeletonChip: string;
4
- chipIcon: string;
5
- textChip: string;
6
- iconButton: string;
7
- };
1
+ export declare enum ChipSlots {
2
+ root = "root",
3
+ skeletonChip = "skeleton",
4
+ chipIcon = "icon",
5
+ textChip = "text",
6
+ iconButton = "iconButton"
7
+ }
@@ -1,10 +1,11 @@
1
- const ChipSlots = {
2
- chipRoot: "Root",
3
- skeletonChip: "Skeleton",
4
- chipIcon: "Icon",
5
- textChip: "Text",
6
- iconButton: "IconButton"
7
- };
1
+ var ChipSlots = /* @__PURE__ */ ((ChipSlots2) => {
2
+ ChipSlots2["root"] = "root";
3
+ ChipSlots2["skeletonChip"] = "skeleton";
4
+ ChipSlots2["chipIcon"] = "icon";
5
+ ChipSlots2["textChip"] = "text";
6
+ ChipSlots2["iconButton"] = "iconButton";
7
+ return ChipSlots2;
8
+ })(ChipSlots || {});
8
9
  export {
9
10
  ChipSlots as C
10
11
  };
@@ -1,6 +1,6 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { c as chipStyles } from "../ChipStyles.js";
3
- import { C as CHIP_KEY_COMPONENT } from "../constants.js";
3
+ import { a as CHIP_KEY_COMPONENT } from "../constants.js";
4
4
  import { C as ChipSlots } from "./ChipEnum.js";
5
5
  import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
6
6
  import { T as Typography } from "../../mui_extended/Typography/Typography.js";
@@ -8,8 +8,8 @@ import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
8
8
  import { I as Icon } from "../../Icon/Icon.js";
9
9
  const ChipRootStyled = styled("div", {
10
10
  name: CHIP_KEY_COMPONENT,
11
- slot: ChipSlots.chipRoot
12
- })(chipStyles?.chipRoot);
11
+ slot: ChipSlots.root
12
+ })(chipStyles?.root);
13
13
  const SkeletonChipStyled = styled(Skeleton, {
14
14
  name: CHIP_KEY_COMPONENT,
15
15
  slot: ChipSlots.skeletonChip
@@ -6,36 +6,66 @@ import { CHIP_KEY_COMPONENT } from './constants';
6
6
  import { ChipSlots } from './slots';
7
7
  type ChipVariants = 'contained' | 'outlined';
8
8
  /**
9
- * Props for the `Chip` component, extending the original properties of Material UI.
10
- * [startIcon] - Optional prop for the icon on the left in the `Chip`.
11
- * [endIcon] - Optional prop for the icon on the right in the `Chip`.
12
- * label - Text describing the `Chip`.
13
- * [componentPaletteColor] - Customization of the component's palette color.
14
- * [size] - Size of the `Chip` (default 'medium').
15
- * [error] - Indicates if the `Chip` is in an error state.
16
- * [variant] - Defines the variant of the `Chip` (default 'contained').
17
- * [color] - Defines the color of the `Chip`.
9
+ * Propiedades del componente `Chip`.
18
10
  * @createdAt 2024-12-06 11:17:21 - automatic
19
11
  */
20
12
  export interface ChipProps {
13
+ /**
14
+ * Optional prop for the icon on the left in the `Chip`. Can accept a URL as a string to render an image icon, or a React component to render it directly.
15
+ */
21
16
  startIcon?: ReactNode;
17
+ /**
18
+ * Optional prop for the icon on the right in the `Chip`. Can accept a URL as a string to render an image icon, or a React component to render it directly.
19
+ */
22
20
  endIcon?: ReactNode;
21
+ /**
22
+ * Size of the `Chip` (default 'medium').
23
+ */
23
24
  size?: Extract<Sizes, 'small' | 'medium'>;
25
+ /**
26
+ * Text describing the `Chip`.
27
+ */
24
28
  label?: string;
29
+ /**
30
+ * Defines the variant of the `Chip` (default 'contained').
31
+ */
25
32
  variant?: ChipVariants;
33
+ /**
34
+ * Defines the color of the `Chip`.
35
+ */
26
36
  color?: Exclude<ComponentPalletColor, 'primary'>;
37
+ /**
38
+ * Define el with of skeleton mode
39
+ */
27
40
  skeletonWidth?: string | number;
41
+ /**
42
+ * OPtion prop to render the close icon
43
+ */
28
44
  hasIconClose?: boolean;
45
+ /**
46
+ * Opacity of the `Chip`.
47
+ */
29
48
  opacity?: boolean;
49
+ /**
50
+ * Function to be executed when the `Chip` is clicked.
51
+ */
30
52
  onClick?: () => void;
53
+ /**
54
+ * Function to be executed when the `Chip` is deleted.
55
+ */
31
56
  onDeleted?: EventHandler<any>;
57
+ /**
58
+ * Class name for the `Chip`.
59
+ */
60
+ className?: string;
32
61
  }
33
62
  /**
34
63
  * Owner state of the `Chip` used to define internal style and behavior properties.
35
64
  */
36
- export interface ChipOwnerState extends Pick<ChipProps, 'size' | 'variant' | 'color'> {
65
+ export interface ChipOwnerState extends Pick<ChipProps, 'variant' | 'color'> {
37
66
  opacity?: boolean;
38
67
  paletteColor: PaletteColor;
68
+ chipSize: ChipProps['size'];
39
69
  }
40
70
  /**
41
71
  * Defines the types of Slots available for the `Chip`.
@@ -44,5 +74,5 @@ export type ChipSlotsType = keyof typeof ChipSlots;
44
74
  /**
45
75
  * Styles applicable to the `Chip` using themes and custom slots.
46
76
  */
47
- export type ChipStyles = Partial<OverridesStyleRules<ChipSlotsType, typeof CHIP_KEY_COMPONENT, Theme> | undefined> | undefined;
77
+ export type ChipStyles = OverridesStyleRules<ChipSlotsType, typeof CHIP_KEY_COMPONENT, Theme>;
48
78
  export {};
@@ -1,3 +1,4 @@
1
+ import { g as getHeightSizeStyles } from "../../../../../../utils/getHeightSizeStyles.js";
1
2
  import { a as ITEM_IN_TREE_ACTIVE, I as ITEM_ACTIVE } from "../../../../constants.js";
2
3
  const containerMenuItemsMainStyles = {
3
4
  /**
@@ -12,34 +13,21 @@ const containerMenuItemsMainStyles = {
12
13
  display: "flex",
13
14
  flexDirection: "column",
14
15
  gap: theme.vars.size.baseSpacings["sp0-5"],
15
- "& .M4LMenuItem-menuItemContainer": {
16
- // Estilos específicos para el tamaño small
17
- ...ownerState.sidebarSize === "small" && {
18
- ...theme.generalSettings.isMobile ? {
19
- minHeight: theme.vars.size.mobile.small.action
20
- } : {
21
- minHeight: theme.vars.size.desktop.small.action
22
- }
23
- },
24
- // Estilos específicos para el tamaño medium
25
- ...ownerState.sidebarSize === "medium" && {
26
- ...theme.generalSettings.isMobile ? {
27
- minHeight: theme.vars.size.mobile.medium.action
28
- } : {
29
- minHeight: theme.vars.size.desktop.medium.action
30
- }
31
- }
32
- },
33
- [`&.M4LListMenuItem-root > .M4LMenuItemRoot[class*="${ITEM_IN_TREE_ACTIVE}"]`]: {
16
+ ...getHeightSizeStyles(
17
+ theme.generalSettings.isMobile,
18
+ ownerState.size || "medium",
19
+ "container"
20
+ ),
21
+ [`&.M4LListMenuItem-root > .M4LMenuItem-root[class*="${ITEM_IN_TREE_ACTIVE}"]`]: {
34
22
  borderColor: theme.vars.palette.divider,
35
23
  "& span": {
36
24
  color: theme.vars.palette.text.primary
37
25
  }
38
26
  },
39
- [`&.M4LListMenuItem-root > .M4LMenuItemRoot[class*="${ITEM_IN_TREE_ACTIVE}"] .M4LIconClass-root`]: {
27
+ [`&.M4LListMenuItem-root > .M4LMenuItem-root[class*="${ITEM_IN_TREE_ACTIVE}"] .M4LIconClass-root`]: {
40
28
  background: theme.vars.palette.text.primary
41
29
  },
42
- [`&.M4LListMenuItem-root > .M4LMenuItemRoot[class*="${ITEM_ACTIVE}"]`]: {
30
+ [`&.M4LListMenuItem-root > .M4LMenuItem-root[class*="${ITEM_ACTIVE}"]`]: {
43
31
  borderColor: theme.vars.palette.primary.main,
44
32
  "& span": {
45
33
  color: theme.vars.palette.primary.main
@@ -3,6 +3,7 @@ import { useModuleDictionary, useModuleSkeleton, useEnvironment, getPropertyBySt
3
3
  import { useTheme } from "@mui/material";
4
4
  import { forwardRef, useState, useMemo, useEffect, useCallback } from "react";
5
5
  import { w as withRenderOption } from "./renderOptions/index.js";
6
+ import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
6
7
  import { A as AutocompleteStyled, P as PopperComponentStyled, R as RenderInputStyled, C as ChipStyled, I as ImageStyled, a as CircularProgressStyled, b as IconButtonStyled } from "./slots /AutocompleteSlots.js";
7
8
  import { T as Typography } from "../Typography/Typography.js";
8
9
  const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
@@ -40,6 +41,8 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
40
41
  const theme = useTheme();
41
42
  const { host_static_assets, environment_assets } = useEnvironment();
42
43
  const [open, setOpen] = useState(false);
44
+ const { currentSize } = useComponentSize(size);
45
+ const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
43
46
  useMemo(
44
47
  () => getOptionUrlImage !== void 0,
45
48
  [getOptionUrlImage]
@@ -133,7 +136,7 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
133
136
  theme.vars.palette.default
134
137
  );
135
138
  const ownerState = {
136
- size,
139
+ size: adjustedSize,
137
140
  variant,
138
141
  disabled,
139
142
  paletteColor,
@@ -173,7 +176,7 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
173
176
  disableClearable: true,
174
177
  multiple,
175
178
  onKeyDown: checkKeyDown,
176
- size,
179
+ size: adjustedSize,
177
180
  ref,
178
181
  autoSelect: false,
179
182
  options,
@@ -185,6 +188,7 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
185
188
  PopperComponentStyled,
186
189
  {
187
190
  ...otherPopperProps,
191
+ size: adjustedSize,
188
192
  placement: "bottom-start",
189
193
  ownerState: { ...ownerState }
190
194
  }
@@ -200,9 +204,9 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
200
204
  onChange: handleChange,
201
205
  filterOptions: onChangeFilterParmsLocal ? (x) => x : void 0,
202
206
  loading,
203
- loadingText: /* @__PURE__ */ jsx(Typography, { variant: "body", children: getLabel("autocomplete.loading_options") }),
207
+ loadingText: /* @__PURE__ */ jsx(Typography, { variant: "body", size: adjustedSize, children: getLabel("autocomplete.loading_options") }),
204
208
  disabled,
205
- noOptionsText: getLabel("autocomplete.no_options"),
209
+ noOptionsText: /* @__PURE__ */ jsx(Typography, { variant: "body", size: adjustedSize, children: getLabel("autocomplete.no_options") }),
206
210
  renderOption: (renderProps, option) => {
207
211
  const isSelected = multiple ? Array.isArray(selectedValue) && selectedValue.some((val) => isOptionEqualToValueLocal(option, val)) : isOptionEqualToValueLocal(option, selectedValue);
208
212
  return withRenderOption(color)(renderProps, {
@@ -224,7 +228,7 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
224
228
  ...params,
225
229
  color,
226
230
  error,
227
- size,
231
+ size: adjustedSize,
228
232
  variant,
229
233
  InputLabelProps: {
230
234
  ...params.InputLabelProps,
@@ -240,7 +244,7 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
240
244
  startAdornment: multiple ? Array.isArray(selectedValue) ? selectedValue.map((option, index) => /* @__PURE__ */ jsx(
241
245
  ChipStyled,
242
246
  {
243
- size,
247
+ size: adjustedSize,
244
248
  label: getOptionLabelLocal(option),
245
249
  opacity: true,
246
250
  onDeleted: () => handleDelete(option),
@@ -260,7 +264,7 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
260
264
  {
261
265
  ownerState: { ...ownerState },
262
266
  color,
263
- size
267
+ size: adjustedSize
264
268
  }
265
269
  ) : /* @__PURE__ */ jsx("div", { children: refresh ? /* @__PURE__ */ jsx(
266
270
  IconButtonStyled,
@@ -269,7 +273,7 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
269
273
  src: `${host_static_assets}/${environment_assets}/frontend/components/RHFAutocompletarAsync/assets/icons/round_refresh.svg`,
270
274
  onClick: handleRefresh,
271
275
  disabled,
272
- size
276
+ size: adjustedSize
273
277
  }
274
278
  ) : /* @__PURE__ */ jsx(
275
279
  IconButtonStyled,
@@ -278,7 +282,7 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
278
282
  src: `${host_static_assets}/${environment_assets}/frontend/components/RHFAutocompletarAsync/assets/icons/chevronDown.svg`,
279
283
  onClick: (event) => onOpenLocal(event),
280
284
  disabled,
281
- size
285
+ size: adjustedSize
282
286
  }
283
287
  ) })
284
288
  },
@@ -6,16 +6,11 @@ const autocompleteSyles = {
6
6
  * @updatedAt 2024-12-10 15:24:11 - automatic
7
7
  * @updatedUser SebastianM - automatic
8
8
  */
9
- iconButton: ({ theme, ownerState }) => ({
9
+ iconButton: () => ({
10
10
  position: "absolute",
11
11
  top: "50%",
12
- right: theme.vars.size.baseSpacings["sp0-5"],
13
- transform: "translateY(-50%)",
14
- ...ownerState.disabled && {
15
- "& .M4LIconClass-root": {
16
- backgroundColor: theme.vars.palette.text.disabled
17
- }
18
- }
12
+ right: 0,
13
+ transform: "translateY(-50%)"
19
14
  }),
20
15
  /**
21
16
  * Styles for the autocomplete component.
@@ -26,58 +21,19 @@ const autocompleteSyles = {
26
21
  * @updatedAt 2024-12-10 15:24:11 - automatic
27
22
  * @updatedUser SebastianM - automatic
28
23
  */
29
- autocomplete: ({ theme, ownerState }) => ({
30
- "& .MuiFormControl-root": {
31
- height: "auto",
32
- paddingLeft: theme.vars.size.baseSpacings.sp1,
33
- paddingRight: theme.vars.size.baseSpacings.sp1,
34
- "& .MuiInputBase-root": {
35
- paddingLeft: theme.vars.size.baseSpacings.sp1,
36
- paddingRight: theme.vars.size.baseSpacings.sp0,
37
- gap: theme.vars.size.baseSpacings.sp1,
38
- ":focus-within": {
39
- '&:focus-within .MuiIconButton-root:not([role="button-chip"] .MuiIconButton-root)': {
40
- "& .M4LIconClass-root": {
41
- transform: "rotate(180deg)",
42
- transition: "transform 0.3s ease"
43
- }
44
- }
45
- }
46
- }
47
- },
48
- ...ownerState.disabled && {
49
- "& .MuiInputBase-root": {
50
- borderColor: theme.vars.palette.text.disabled
51
- }
52
- }
53
- }),
24
+ autocomplete: {},
54
25
  /**
55
26
  * Styles for the typography component.
56
27
  */
57
- typography: ({ theme, ownerState }) => ({
58
- // Estilos específicos para el tamaño small
59
- ...ownerState.size === "small" && {
60
- ...theme.generalSettings.isMobile ? {
61
- height: theme.vars.size.mobile.small.action,
62
- minHeight: theme.vars.size.mobile.small.action
63
- } : {
64
- height: theme.vars.size.desktop.small.action,
65
- minHeight: theme.vars.size.desktop.small.action
66
- }
67
- },
68
- // Estilos específicos para el tamaño medium
69
- ...ownerState.size === "medium" && {
70
- ...theme.generalSettings.isMobile ? {
71
- height: theme.vars.size.mobile.medium.action,
72
- minHeight: theme.vars.size.mobile.medium.action
73
- } : {
74
- height: theme.vars.size.desktop.medium.action,
75
- minHeight: theme.vars.size.desktop.medium.action
76
- }
77
- }
28
+ typography: {},
29
+ menuList: {},
30
+ /**
31
+ * Styles for the menu item component.
32
+ */
33
+ menuItem: ({ theme }) => ({
34
+ padding: `${theme.vars.size.baseSpacings.sp1}!important`,
35
+ borderRadius: `${theme.vars.size.borderRadius.r0}!important`
78
36
  }),
79
- menuList: () => ({}),
80
- menuItem: () => ({}),
81
37
  /**
82
38
  * Styles for the image component.
83
39
  * @author SebastianM - automatic
@@ -108,9 +64,13 @@ const autocompleteSyles = {
108
64
  * @updatedAt 2024-12-10 15:24:11 - automatic
109
65
  * @updatedUser SebastianM - automatic
110
66
  */
111
- textField: () => ({
67
+ textField: ({ theme }) => ({
112
68
  position: "relative",
113
- height: "auto"
69
+ height: "auto",
70
+ "& .MuiInputBase-root": {
71
+ padding: theme.vars.size.baseSpacings.sp1,
72
+ gap: theme.vars.size.baseSpacings.sp1
73
+ }
114
74
  }),
115
75
  /**
116
76
  * Styles for the popper component.
@@ -1,3 +1 @@
1
- import { Dictionary } from '@m4l/core';
2
1
  export declare function getAutocompleteComponentsDictionary(): string[];
3
- export declare const defaultAutocompleteDictionary: Dictionary;
@@ -15,5 +15,5 @@ export declare function withRenderOption<T>(color?: 'primary' | 'default' | 'err
15
15
  disabled?: boolean;
16
16
  startAdornment?: ReactNode;
17
17
  endAdornment?: ReactNode;
18
- size?: Extract<Sizes, "small" | "medium">;
18
+ size: Extract<Sizes, "small" | "medium">;
19
19
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,11 @@
1
1
  import { createElement } from "react";
2
- import { M as MenuItem } from "../../MenuItem/MenuItem.js";
2
+ import { M as MenuItemStyled } from "../slots /AutocompleteSlots.js";
3
3
  function withRenderOption(color) {
4
4
  return function RenderOption(optionProps, option) {
5
5
  return /* @__PURE__ */ createElement(
6
- MenuItem,
6
+ MenuItemStyled,
7
7
  {
8
+ ownerState: {},
8
9
  ...optionProps,
9
10
  selected: option.selected,
10
11
  color,
@@ -6,12 +6,12 @@ import { a as autocompleteSyles } from "../AutocompleteStyles.js";
6
6
  import { A as AUTOCOMPLETE_KEY_COMPONENT } from "../constants.js";
7
7
  import { A as AutocompleteSlots } from "./AutocompleteEnum.js";
8
8
  import { I as IconButton } from "../../IconButton/IconButton.js";
9
+ import { M as MenuItem } from "../../MenuItem/MenuItem.js";
9
10
  import { C as CircularProgress } from "../../CircularProgress/CircularProgress.js";
10
11
  import { T as TextField } from "../../TextField/TextField.js";
11
12
  import { T as Typography } from "../../Typography/Typography.js";
12
13
  import { S as Skeleton } from "../../Skeleton/Skeleton.js";
13
14
  import { P as Popper } from "../../Popper/Popper.js";
14
- import { M as MenuItem } from "../../MenuItem/MenuItem.js";
15
15
  const IconButtonStyled = styled(IconButton, {
16
16
  name: AUTOCOMPLETE_KEY_COMPONENT,
17
17
  slot: AutocompleteSlots.iconButton
@@ -24,7 +24,7 @@ const ChipStyled = styled(Chip, {
24
24
  name: AUTOCOMPLETE_KEY_COMPONENT,
25
25
  slot: AutocompleteSlots.chip
26
26
  })(autocompleteSyles?.chip);
27
- styled(MenuItem, {
27
+ const MenuItemStyled = styled(MenuItem, {
28
28
  name: AUTOCOMPLETE_KEY_COMPONENT,
29
29
  slot: AutocompleteSlots.menuItem
30
30
  })(autocompleteSyles?.menuItem);
@@ -64,6 +64,7 @@ export {
64
64
  AutocompleteStyled as A,
65
65
  ChipStyled as C,
66
66
  ImageStyled as I,
67
+ MenuItemStyled as M,
67
68
  PopperComponentStyled as P,
68
69
  RenderInputStyled as R,
69
70
  CircularProgressStyled as a,
@@ -3,7 +3,7 @@ import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
3
3
  import { useTheme } from "@mui/material";
4
4
  import clsx from "clsx";
5
5
  import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
6
- import { M as MENUITEM_KEY_COMPONENT } from "./constants.js";
6
+ import { M as MENUITEM_CLASSES } from "./constants.js";
7
7
  import { M as MenuItemSkeletonStyled, a as MenuItemRootStyled, b as MenuItemIconCheckedStyled, c as MenuItemContainerStyled, d as MenuItemTypographyStyled, e as MenuItemIconStyled } from "./slots/MenuItemSlots.js";
8
8
  import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
9
9
  const MenuItem = (props) => {
@@ -18,6 +18,7 @@ const MenuItem = (props) => {
18
18
  disabled = false,
19
19
  size = "medium",
20
20
  checked = false,
21
+ className,
21
22
  ...other
22
23
  } = props;
23
24
  const { currentSize } = useComponentSize(size);
@@ -42,11 +43,12 @@ const MenuItem = (props) => {
42
43
  {
43
44
  "data-testid": "SkeletonMenuItem",
44
45
  width: skeletonWidth,
45
- ownerState: { ...ownerState }
46
+ ownerState: { ...ownerState },
47
+ className: MENUITEM_CLASSES.skeleton
46
48
  }
47
49
  );
48
50
  }
49
- const renderIcon = (icon, instaceDataTestId, className) => {
51
+ const renderIcon = (icon, instaceDataTestId, classNameIcon) => {
50
52
  if (!icon) {
51
53
  return null;
52
54
  }
@@ -62,14 +64,13 @@ const MenuItem = (props) => {
62
64
  size: adjustedSize,
63
65
  disabled,
64
66
  instaceDataTestId,
65
- className
67
+ className: classNameIcon
66
68
  }
67
69
  );
68
70
  }
69
71
  };
70
72
  const checkedIcon = "https://s3.us-east-1.amazonaws.com/static.made4labs/environments/d1/frontend/components/menu_item/checked.svg";
71
73
  const hasCheckedIcon = checked && checkedIcon;
72
- const classRoot = getComponentSlotRoot(MENUITEM_KEY_COMPONENT);
73
74
  return /* @__PURE__ */ jsxs(
74
75
  MenuItemRootStyled,
75
76
  {
@@ -79,7 +80,7 @@ const MenuItem = (props) => {
79
80
  disabled,
80
81
  disableRipple: true,
81
82
  size: adjustedSize,
82
- className: clsx("M4LMenuItemRoot", classRoot),
83
+ className: clsx(className, MENUITEM_CLASSES.root),
83
84
  "data-testid": "MenuItemRoot",
84
85
  children: [
85
86
  hasCheckedIcon && /* @__PURE__ */ jsx(
@@ -1,3 +1,4 @@
1
+ import { g as getHeightSizeStyles } from "../../../utils/getHeightSizeStyles.js";
1
2
  const menuItemStyles = {
2
3
  /**
3
4
  * Estilos para el contenedor de los items del menú
@@ -14,80 +15,85 @@ const menuItemStyles = {
14
15
  * @createdAt 2024-12-27 08:28:33 - automatic
15
16
  * @author Andrés Quintero - automatic
16
17
  */
17
- menuItemRoot: ({ theme, ownerState }) => ({
18
+ root: ({ theme, ownerState }) => ({
18
19
  width: "100%",
19
20
  gap: theme.vars.size.baseSpacings.sp3,
20
21
  padding: theme.vars.size.baseSpacings.sp1,
21
22
  borderRadius: theme.vars.size.borderRadius.r0,
22
23
  ...ownerState.selected && {
23
- ...ownerState.color === "primary" && {
24
- borderLeft: theme.vars.size.borderStroke.container,
25
- borderColor: ownerState.paletteColor?.main
26
- },
27
- "& .M4lclassCssSpecificity.M4lclassCssSpecificity": {
24
+ borderLeft: theme.vars.size.borderStroke.container,
25
+ borderColor: ownerState.paletteColor?.main,
26
+ "& .M4LTypography-root": {
28
27
  color: ownerState.paletteColor?.enabled
29
28
  },
30
- "& .M4LIconClass-root": {
29
+ "& .M4LIcon-icon": {
31
30
  backgroundColor: ownerState.paletteColor?.enabled
32
31
  },
33
32
  "&:hover": {
34
33
  backgroundColor: ownerState.paletteColor?.hoverOpacity,
35
- "&:active": {
36
- backgroundColor: ownerState.paletteColor?.activeOpacity,
37
- "& .M4lclassCssSpecificity": {
38
- color: ownerState.paletteColor?.active
39
- },
40
- "& .M4LIconClass-root": {
41
- color: ownerState.paletteColor?.active
42
- }
34
+ "& .M4LIcon-icon": {
35
+ backgroundColor: ownerState.paletteColor?.hover
36
+ },
37
+ "& .M4LTypography-root": {
38
+ color: ownerState.paletteColor?.hover
39
+ }
40
+ },
41
+ "&:active": {
42
+ backgroundColor: ownerState.paletteColor?.activeOpacity,
43
+ "& .M4LIcon-icon": {
44
+ backgroundColor: ownerState.paletteColor?.active
45
+ },
46
+ "& .M4LTypography-root": {
47
+ color: ownerState.paletteColor?.active
48
+ }
49
+ },
50
+ "&:focus-visible": {
51
+ backgroundColor: ownerState.paletteColor?.activeOpacity,
52
+ outline: theme.vars.size.borderStroke.container,
53
+ outlineColor: theme.vars.palette.border.main,
54
+ outlineOffset: theme.vars.size.baseSpacings["sp0-5"],
55
+ "& .M4LIcon-icon": {
56
+ color: ownerState.paletteColor?.active
43
57
  }
44
58
  }
45
59
  },
46
60
  ...ownerState.color === "default" && {
47
- "& .M4lclassCssSpecificity": {
61
+ "& .M4LTypography-root": {
48
62
  color: theme.vars.palette.text.primary
49
63
  },
50
- "& .M4LIconClass-root": {
64
+ "& .M4LIcon-icon": {
51
65
  backgroundColor: theme.vars.palette.text.primary
52
66
  },
53
67
  "&:hover": {
54
- backgroundColor: ownerState.paletteColor?.hoverOpacity,
55
- "&:active": {
56
- backgroundColor: ownerState.paletteColor?.activeOpacity,
57
- "&.M4lclassCssSpecificity": {
58
- color: theme.vars.palette.text.primary
59
- },
60
- "& .M4LIconClass-root": {
61
- backgroundColor: theme.vars.palette.text.primary
62
- }
68
+ backgroundColor: ownerState.paletteColor?.hoverOpacity
69
+ },
70
+ "&:active": {
71
+ backgroundColor: ownerState.paletteColor?.activeOpacity,
72
+ "& .M4LIcon-icon": {
73
+ backgroundColor: theme.vars.palette.text.primary
63
74
  }
64
75
  }
65
76
  },
66
77
  ...ownerState.disabled && {
67
78
  pointerEvents: "none",
68
- "& .M4lclassCssSpecificity.M4lclassCssSpecificity": {
79
+ "& .M4LTypography-root": {
69
80
  color: theme.vars.palette.text.disabled
70
81
  },
71
- "& .M4LIconClass-root": {
82
+ "& .M4LIcon-icon": {
72
83
  backgroundColor: theme.vars.palette.text.disabled
73
84
  }
74
85
  },
75
- // Estilos específicos para el tamaño small
76
- ...ownerState.size === "small" && {
77
- ...theme.generalSettings.isMobile ? {
78
- minHeight: theme.vars.size.mobile.small.action
79
- } : {
80
- minHeight: theme.vars.size.desktop.small.action
86
+ ...getHeightSizeStyles(
87
+ theme.generalSettings.isMobile,
88
+ ownerState.size || "medium",
89
+ "action",
90
+ (height) => {
91
+ return {
92
+ height: "auto!important",
93
+ minHeight: `${height}!important`
94
+ };
81
95
  }
82
- },
83
- // Estilos específicos para el tamaño medium
84
- ...ownerState.size === "medium" && {
85
- ...theme.generalSettings.isMobile ? {
86
- minHeight: theme.vars.size.mobile.medium.action
87
- } : {
88
- minHeight: theme.vars.size.desktop.medium.action
89
- }
90
- }
96
+ )
91
97
  }),
92
98
  /**
93
99
  * Estilos para el icono de los items del menú
@@ -110,7 +116,7 @@ const menuItemStyles = {
110
116
  */
111
117
  menuItemIconChecked: ({ ownerState }) => ({
112
118
  ...ownerState.selected && {
113
- "& .M4LIconClass-root": {
119
+ "& .M4LIcon-icon": {
114
120
  backgroundColor: ownerState.paletteColor?.main
115
121
  }
116
122
  }
@@ -146,26 +152,11 @@ const menuItemStyles = {
146
152
  display: "flex",
147
153
  alignItems: "center",
148
154
  background: theme.vars.palette.skeleton.transition,
149
- // Estilos específicos para el tamaño small
150
- ...ownerState.size === "small" && {
151
- ...theme.generalSettings.isMobile ? {
152
- height: theme.vars.size.mobile.small.action,
153
- minHeight: theme.vars.size.mobile.small.action
154
- } : {
155
- height: theme.vars.size.desktop.small.action,
156
- minHeight: theme.vars.size.desktop.small.action
157
- }
158
- },
159
- // Estilos específicos para el tamaño medium
160
- ...ownerState.size === "medium" && {
161
- ...theme.generalSettings.isMobile ? {
162
- height: theme.vars.size.mobile.medium.action,
163
- minHeight: theme.vars.size.mobile.medium.action
164
- } : {
165
- height: theme.vars.size.desktop.medium.action,
166
- minHeight: theme.vars.size.desktop.medium.action
167
- }
168
- }
155
+ ...getHeightSizeStyles(
156
+ theme.generalSettings.isMobile,
157
+ ownerState.size || "medium",
158
+ "action"
159
+ )
169
160
  })
170
161
  };
171
162
  export {
@@ -6,3 +6,7 @@
6
6
  * @default 'M4LMenuItem'
7
7
  */
8
8
  export declare const MENUITEM_KEY_COMPONENT = "M4LMenuItem";
9
+ /**
10
+ * Inventario de clases CSS para el componente MenuItem
11
+ */
12
+ export declare const MENUITEM_CLASSES: Record<string, string>;
@@ -1,4 +1,8 @@
1
+ import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
2
+ import { M as MenuItemSlots } from "./slots/MenuItemEnum.js";
1
3
  const MENUITEM_KEY_COMPONENT = "M4LMenuItem";
4
+ const MENUITEM_CLASSES = getComponentClasses(MENUITEM_KEY_COMPONENT, MenuItemSlots);
2
5
  export {
3
- MENUITEM_KEY_COMPONENT as M
6
+ MENUITEM_CLASSES as M,
7
+ MENUITEM_KEY_COMPONENT as a
4
8
  };
@@ -1,5 +1,5 @@
1
1
  export declare enum MenuItemSlots {
2
- menuItemRoot = "menuItemRoot",
2
+ root = "menuItemRoot",
3
3
  menuItemIcon = "menuItemIcon",
4
4
  menuItemIconChecked = "menuItemIconChecked",
5
5
  menuItemContainer = "menuItemContainer",
@@ -1,5 +1,5 @@
1
1
  var MenuItemSlots = /* @__PURE__ */ ((MenuItemSlots2) => {
2
- MenuItemSlots2["menuItemRoot"] = "menuItemRoot";
2
+ MenuItemSlots2["root"] = "menuItemRoot";
3
3
  MenuItemSlots2["menuItemIcon"] = "menuItemIcon";
4
4
  MenuItemSlots2["menuItemIconChecked"] = "menuItemIconChecked";
5
5
  MenuItemSlots2["menuItemContainer"] = "menuItemContainer";
@@ -1,6 +1,6 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { MenuItem } from "@mui/material";
3
- import { M as MENUITEM_KEY_COMPONENT } from "../constants.js";
3
+ import { a as MENUITEM_KEY_COMPONENT } from "../constants.js";
4
4
  import { m as menuItemStyles } from "../MenuItem.styles.js";
5
5
  import { M as MenuItemSlots } from "./MenuItemEnum.js";
6
6
  import { T as Typography } from "../../Typography/Typography.js";
@@ -8,8 +8,8 @@ import { S as Skeleton } from "../../Skeleton/Skeleton.js";
8
8
  import { I as Icon } from "../../../Icon/Icon.js";
9
9
  const MenuItemRootStyled = styled(MenuItem, {
10
10
  name: MENUITEM_KEY_COMPONENT,
11
- slot: MenuItemSlots.menuItemRoot
12
- })(menuItemStyles?.menuItemRoot);
11
+ slot: MenuItemSlots.root
12
+ })(menuItemStyles?.root);
13
13
  const MenuItemContainerStyled = styled("div", {
14
14
  name: MENUITEM_KEY_COMPONENT,
15
15
  slot: MenuItemSlots.menuItemContainer
@@ -5,27 +5,48 @@ import { MenuItemSlots } from './slots';
5
5
  import { MENUITEM_KEY_COMPONENT } from './constants';
6
6
  import { ReactNode } from 'react';
7
7
  /**
8
- * Props para el componente `MenuItem`, extendiendo las propiedades originales de Material UI.
9
- * Omit<MUIMenuItemProps, 'size' | 'color'>
10
- * [startIcon] - Prop opcional para el ícono a la izquierda en el `MenuItem`.
11
- * [endIcon] - Prop opcional para el ícono a la derecha en el `MenuItem`.
12
- * label - Texto que describe el `MenuItem`.
13
- * [selected] - Indica si el item está seleccionado.
14
- * [componentPaletteColor] - Personalización del color de la paleta del componente.
15
- * [color] - Define el color del `MenuItem` (solo 'primary' permitido).
16
- * [disabled] - Indica si el `MenuItem` está deshabilitado.
17
- * [size] - Tamaño del `MenuItem` (por defecto 'medium').
8
+ * Propiedades del componente `MenuItem`.
18
9
  */
19
10
  export interface MenuItemProps extends Omit<MUIMenuItemProps, 'size' | 'color'> {
11
+ /**
12
+ * Prop opcional para el ícono a la izquierda en el `MenuItem`
13
+ */
20
14
  startIcon?: ReactNode;
15
+ /**
16
+ * Prop opcional para el ícono a la derecha en el `MenuItem`
17
+ */
21
18
  endIcon?: ReactNode;
19
+ /**
20
+ * Texto que describe el `MenuItem`
21
+ */
22
22
  label: string;
23
+ /**
24
+ * Indica si el item está seleccionado
25
+ */
23
26
  selected?: boolean;
27
+ /**
28
+ * Define el color del `MenuItem`
29
+ */
24
30
  color?: Extract<ComponentPalletColor, 'primary' | 'default' | 'error'>;
31
+ /**
32
+ * Personalización del color de la paleta del componente
33
+ */
25
34
  componentPaletteColor?: ComponentPalletColor;
35
+ /**
36
+ * Indica si el `MenuItem` está deshabilitado
37
+ */
26
38
  disabled?: boolean;
39
+ /**
40
+ * Define el tamaño del `MenuItem`
41
+ */
27
42
  size?: Extract<Sizes, 'small' | 'medium'>;
43
+ /**
44
+ * Define el with of skeleton mode
45
+ */
28
46
  skeletonWidth?: string | number;
47
+ /**
48
+ * Define si el ícono de check está activo
49
+ */
29
50
  checked?: boolean;
30
51
  }
31
52
  /**
@@ -43,4 +64,4 @@ export type MenuItemSlotsType = keyof typeof MenuItemSlots;
43
64
  /**
44
65
  * Estilos aplicables al `MenuItem` utilizando temas y slots personalizados.
45
66
  */
46
- export type MenuItemStyles = Partial<OverridesStyleRules<MenuItemSlotsType, typeof MENUITEM_KEY_COMPONENT, Theme> | undefined> | undefined;
67
+ export type MenuItemStyles = OverridesStyleRules<MenuItemSlotsType, typeof MENUITEM_KEY_COMPONENT, Theme>;
@@ -47,11 +47,12 @@ const TextField = (props) => {
47
47
  TextFieldRootStyled,
48
48
  {
49
49
  ownerState: { ...ownerState },
50
- className: clsx(TEXT_FIELD_CLASSES.root, TEXT_FIELD_CLASSES[variant], className),
50
+ className: clsx(TEXT_FIELD_CLASSES.root, TEXT_FIELD_CLASSES.variant, className),
51
51
  ...getPropDataTestId(TEXT_FIELD_KEY_COMPONENT, TextFieldSlots.root, dataTestId),
52
52
  autoComplete,
53
53
  value,
54
54
  inputMode: "numeric",
55
+ disabled,
55
56
  inputProps: {
56
57
  ...inputProps,
57
58
  disabled,
@@ -18,8 +18,8 @@ const textFieldStyles = {
18
18
  // Estilos globales del TextField 🌎
19
19
  "& .MuiInputBase-root": {
20
20
  // Paddings
21
- paddingRight: theme.vars.size.baseSpacings.sp1,
22
21
  paddingLeft: theme.vars.size.baseSpacings.sp1,
22
+ paddingRight: 0,
23
23
  paddingTop: 0,
24
24
  paddingBottom: 0,
25
25
  // Estilo de los bordes
@@ -29,25 +29,30 @@ const textFieldStyles = {
29
29
  borderRadius: theme.vars.size.borderRadius.r1,
30
30
  // Altura
31
31
  height: "100%",
32
- // Estilos de cuando esta deshabilitado
33
- ...ownerState.disabled && {
34
- borderColor: `${theme.vars.palette.border.disabled}!important`
35
- // pointerEvents: ownerState.disabled ? 'none' : 'auto',
36
- },
32
+ // transición
33
+ transition: "all 0.2s ease",
34
+ // Espaciado entre elementos
37
35
  ...getHeightSizeStyles(
38
36
  theme.generalSettings.isMobile,
39
37
  ownerState.size || "medium",
40
- "action"
38
+ "action",
39
+ (height) => {
40
+ return {
41
+ height: "auto",
42
+ minHeight: height
43
+ };
44
+ }
41
45
  ),
42
46
  // ↴ Overrides ❌
43
47
  // Estilos del input
44
48
  "& > .MuiInputBase-input": {
45
49
  // ↴ Overrides ❌
46
- paddingTop: 0,
47
- paddingBottom: 0,
48
50
  paddingLeft: theme.vars.size.baseSpacings.sp1,
49
51
  paddingRight: theme.vars.size.baseSpacings.sp1,
52
+ paddingTop: 0,
53
+ paddingBottom: 0,
50
54
  fontFamily: theme.typography.fontFamily,
55
+ color: ownerState.disabled ? theme.vars.palette.text.disabled : theme.vars.palette.text.primary,
51
56
  ...getTypographyStyles(
52
57
  theme.generalSettings.isMobile,
53
58
  ownerState.size || "medium",
@@ -55,8 +60,16 @@ const textFieldStyles = {
55
60
  ),
56
61
  "&::placeholder": {
57
62
  color: theme.palette.text.disabled
63
+ },
64
+ "&:-webkit-autofill": {
65
+ backgroundColor: "transparent!important"
58
66
  }
59
67
  },
68
+ // Estilos de cuando esta deshabilitado
69
+ ...ownerState.disabled && {
70
+ borderColor: `${theme.vars.palette.border.disabled}!important`,
71
+ pointerEvents: ownerState.disabled ? "none" : "auto"
72
+ },
60
73
  // Estilos del los adorments
61
74
  "& .MuiInputAdornment-root": {
62
75
  height: "auto",
@@ -71,7 +84,10 @@ const textFieldStyles = {
71
84
  display: "none"
72
85
  },
73
86
  "& .MuiInputAdornment-root .M4LIcon-icon": {
74
- backgroundColor: ownerState.error ? ownerState.paletteColor?.enabled : theme.vars.palette.text.primary
87
+ backgroundColor: ownerState.error ? ownerState.paletteColor?.enabled : theme.vars.palette.text.primary,
88
+ ...ownerState.disabled && {
89
+ backgroundColor: theme.vars.palette.text.disabled
90
+ }
75
91
  },
76
92
  "&:hover": {
77
93
  backgroundColor: ownerState.paletteColor?.hoverOpacity,
@@ -1,8 +1,8 @@
1
- import { TexFieldVariants, TextFieldSlots } from './slots';
1
+ import { TexFieldComplementaryClasses, TextFieldSlots } from './slots';
2
2
  export declare const TEXT_FIELD_KEY_COMPONENT = "M4LTextField";
3
3
  export declare const COMBINATED_TEXTFIELD_ENUMS: {
4
- outlined: TexFieldVariants.outlined;
5
- text: TexFieldVariants.text;
4
+ outlined: TexFieldComplementaryClasses.outlined;
5
+ text: TexFieldComplementaryClasses.text;
6
6
  root: TextFieldSlots.root;
7
7
  skeleton: TextFieldSlots.skeleton;
8
8
  };
@@ -1,9 +1,9 @@
1
1
  import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
2
- import { T as TextFieldSlots, a as TexFieldVariants } from "./slots/TextFieldEnum.js";
2
+ import { T as TextFieldSlots, a as TexFieldComplementaryClasses } from "./slots/TextFieldEnum.js";
3
3
  const TEXT_FIELD_KEY_COMPONENT = "M4LTextField";
4
4
  const COMBINATED_TEXTFIELD_ENUMS = {
5
5
  ...TextFieldSlots,
6
- ...TexFieldVariants
6
+ ...TexFieldComplementaryClasses
7
7
  };
8
8
  const TEXT_FIELD_CLASSES = getComponentClasses(TEXT_FIELD_KEY_COMPONENT, COMBINATED_TEXTFIELD_ENUMS);
9
9
  export {
@@ -2,7 +2,7 @@ export declare enum TextFieldSlots {
2
2
  root = "root",
3
3
  skeleton = "skeleton"
4
4
  }
5
- export declare enum TexFieldVariants {
5
+ export declare enum TexFieldComplementaryClasses {
6
6
  outlined = "outlined",
7
7
  text = "text"
8
8
  }
@@ -3,12 +3,12 @@ var TextFieldSlots = /* @__PURE__ */ ((TextFieldSlots2) => {
3
3
  TextFieldSlots2["skeleton"] = "skeleton";
4
4
  return TextFieldSlots2;
5
5
  })(TextFieldSlots || {});
6
- var TexFieldVariants = /* @__PURE__ */ ((TexFieldVariants2) => {
7
- TexFieldVariants2["outlined"] = "outlined";
8
- TexFieldVariants2["text"] = "text";
9
- return TexFieldVariants2;
10
- })(TexFieldVariants || {});
6
+ var TexFieldComplementaryClasses = /* @__PURE__ */ ((TexFieldComplementaryClasses2) => {
7
+ TexFieldComplementaryClasses2["outlined"] = "outlined";
8
+ TexFieldComplementaryClasses2["text"] = "text";
9
+ return TexFieldComplementaryClasses2;
10
+ })(TexFieldComplementaryClasses || {});
11
11
  export {
12
12
  TextFieldSlots as T,
13
- TexFieldVariants as a
13
+ TexFieldComplementaryClasses as a
14
14
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
3
  import { useModuleSkeleton } from "@m4l/core";
4
- import { T as TYPOGRAPHY_CLASS_NAME_SPECIFY, a as TYPOGRAPHY_KEY_COMPONENT } from "./constants.js";
4
+ import { T as TYPOGRAPHY_CLASS_NAME_SPECIFY, a as TYPOGRAPHY_CLASSES, b as TYPOGRAPHY_KEY_COMPONENT } from "./constants.js";
5
5
  import { T as TypographySlots } from "./slots/typographyEnum.js";
6
6
  import { S as StyledMUITypography, a as StyledSkeleton } from "./slots/typographySlots.js";
7
7
  import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
@@ -30,7 +30,7 @@ function Typography(props) {
30
30
  return /* @__PURE__ */ jsx(
31
31
  StyledMUITypography,
32
32
  {
33
- className: clsx(className, TYPOGRAPHY_CLASS_NAME_SPECIFY),
33
+ className: clsx(className, TYPOGRAPHY_CLASS_NAME_SPECIFY, TYPOGRAPHY_CLASSES.root),
34
34
  variant,
35
35
  ownerState: { ...ownerState },
36
36
  ...getPropDataTestId(TYPOGRAPHY_KEY_COMPONENT, TypographySlots.root, dataTestid),
@@ -40,7 +40,8 @@ function Typography(props) {
40
40
  {
41
41
  width: index === skeletonRows - 1 ? skeletonWidth : "100%",
42
42
  variant: "text",
43
- ownerState: { ...ownerState }
43
+ ownerState: { ...ownerState },
44
+ className: TYPOGRAPHY_CLASSES.skeleton
44
45
  },
45
46
  index
46
47
  ))
@@ -7,3 +7,7 @@ export declare const TYPOGRAPHY_KEY_COMPONENT = "M4LTypography";
7
7
  * tener la necesidad de agregar valores en !important.
8
8
  */
9
9
  export declare const TYPOGRAPHY_CLASS_NAME_SPECIFY = "M4lclassCssSpecificity";
10
+ /**
11
+ * Inventario de clases CSS para el componente Typography.
12
+ */
13
+ export declare const TYPOGRAPHY_CLASSES: Record<string, string>;
@@ -1,6 +1,10 @@
1
+ import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
2
+ import { T as TypographySlots } from "./slots/typographyEnum.js";
1
3
  const TYPOGRAPHY_KEY_COMPONENT = "M4LTypography";
2
4
  const TYPOGRAPHY_CLASS_NAME_SPECIFY = "M4lclassCssSpecificity";
5
+ const TYPOGRAPHY_CLASSES = getComponentClasses(TYPOGRAPHY_KEY_COMPONENT, TypographySlots);
3
6
  export {
4
7
  TYPOGRAPHY_CLASS_NAME_SPECIFY as T,
5
- TYPOGRAPHY_KEY_COMPONENT as a
8
+ TYPOGRAPHY_CLASSES as a,
9
+ TYPOGRAPHY_KEY_COMPONENT as b
6
10
  };
@@ -1,6 +1,6 @@
1
1
  import { Typography } from "@mui/material";
2
2
  import { styled } from "@mui/material/styles";
3
- import { a as TYPOGRAPHY_KEY_COMPONENT } from "../constants.js";
3
+ import { b as TYPOGRAPHY_KEY_COMPONENT } from "../constants.js";
4
4
  import { T as TypographySlots } from "./typographyEnum.js";
5
5
  import { t as typographyStyles } from "../typography.styles.js";
6
6
  import { S as Skeleton } from "../../Skeleton/Skeleton.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.1.54",
3
+ "version": "9.1.55",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
@@ -2,7 +2,7 @@ import { POINTER_QR_MOBILE_SIZES, POINTER_QR_DESKTOP_SIZES } from "@m4l/styles";
2
2
  const getHeightSizeStyles = (isMobile, size, variantSize, css) => {
3
3
  const pointerQrSource = isMobile ? POINTER_QR_MOBILE_SIZES : POINTER_QR_DESKTOP_SIZES;
4
4
  const heightSize = pointerQrSource[size][variantSize];
5
- const resolvedCss = css;
5
+ const resolvedCss = typeof css === "function" ? css(heightSize) : css;
6
6
  return {
7
7
  height: heightSize,
8
8
  ...resolvedCss