@m4l/components 9.1.70 → 9.1.72

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 (46) hide show
  1. package/@types/types.d.ts +9 -1
  2. package/components/Image/Image.js +8 -5
  3. package/components/Image/constant.d.ts +4 -0
  4. package/components/Image/constant.js +4 -0
  5. package/components/Image/image.styles.js +1 -1
  6. package/components/Image/slots/ImageEnum.d.ts +1 -1
  7. package/components/Image/slots/ImageEnum.js +1 -1
  8. package/components/Image/slots/ImageSlots.js +2 -2
  9. package/components/Image/types.d.ts +1 -0
  10. package/components/Label/types.d.ts +2 -1
  11. package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +1 -1
  12. package/components/hook-form/RHFSelect/RHFSelect.d.ts +23 -0
  13. package/components/hook-form/RHFSelect/RHFSelect.js +77 -0
  14. package/components/hook-form/RHFSelect/RHFSelect.styles.d.ts +5 -0
  15. package/components/hook-form/RHFSelect/RHFSelect.styles.js +25 -0
  16. package/components/hook-form/RHFSelect/constants.d.ts +8 -0
  17. package/components/hook-form/RHFSelect/constants.js +8 -0
  18. package/components/hook-form/RHFSelect/index.d.ts +2 -0
  19. package/components/hook-form/RHFSelect/index.js +1 -0
  20. package/components/hook-form/RHFSelect/slots/RHFSelectEnum.d.ts +6 -0
  21. package/components/hook-form/RHFSelect/slots/RHFSelectEnum.js +10 -0
  22. package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +20 -0
  23. package/components/hook-form/RHFSelect/slots/RHFSlots.js +29 -0
  24. package/components/hook-form/RHFSelect/slots/index.d.ts +0 -0
  25. package/components/hook-form/RHFSelect/types.d.ts +60 -0
  26. package/components/mui_extended/MenuItem/MenuItem.styles.js +20 -34
  27. package/components/mui_extended/Select/Select.d.ts +1 -1
  28. package/components/mui_extended/Select/Select.js +106 -91
  29. package/components/mui_extended/Select/Select.styles.js +94 -230
  30. package/components/mui_extended/Select/constants.d.ts +23 -0
  31. package/components/mui_extended/Select/constants.js +11 -1
  32. package/components/mui_extended/Select/dictionary.d.ts +4 -2
  33. package/components/mui_extended/Select/dictionary.js +7 -0
  34. package/components/mui_extended/Select/slots/SelectEnum.d.ts +12 -7
  35. package/components/mui_extended/Select/slots/SelectEnum.js +14 -7
  36. package/components/mui_extended/Select/slots/SelectSlots.d.ts +15 -9
  37. package/components/mui_extended/Select/slots/SelectSlots.js +31 -20
  38. package/components/mui_extended/Select/slots/index.js +1 -0
  39. package/components/mui_extended/Select/test/Select.test.d.ts +1 -0
  40. package/components/mui_extended/Select/types.d.ts +41 -29
  41. package/components/mui_extended/TextField/TextField.js +1 -1
  42. package/index.js +1 -1
  43. package/package.json +1 -1
  44. package/components/hook-form/RHFSelect.d.ts +0 -10
  45. package/components/hook-form/RHFSelect.js +0 -29
  46. /package/components/{mui_extended/Select/Select.test.d.ts → hook-form/RHFSelect/test/RHFSelect.test.d.ts} +0 -0
@@ -2,12 +2,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEnvironment, useModuleSkeleton, useModuleDictionary, getPropertyByString } from "@m4l/core";
3
3
  import { useTheme } from "@mui/material";
4
4
  import clsx from "clsx";
5
- import { useState, useMemo } from "react";
6
- import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
7
- import { I as Icon } from "../../Icon/Icon.js";
8
- import { S as SkeletonSelectStyled, a as SelectRootStyled, L as LabelPlaceholerStyled, R as RenderOptionContainerStyled, b as LabelOptionStyled, M as MenuItemSelectStyled, I as IconButtonStyled } from "./slots/SelectSlots.js";
5
+ import { forwardRef, useState, useMemo } from "react";
6
+ import { A as ArrowDownStyled, S as SkeletonSelectStyled, a as SelectRootStyled, M as MenuItemListStyled, b as MenuItemNoOptionStyled, c as AdormentStyled, L as LabelPlaceholerStyled, R as RenderValueContainerStyled, d as RenderValueTypography } from "./slots/SelectSlots.js";
7
+ import { S as SELECT_CLASSES, a as SELECT_KEY_COMPONENT, I as ICON_ARROW_DOWN } from "./constants.js";
8
+ import { S as SELECT_DICTIONARY } from "./dictionary.js";
9
+ import { g as getPropDataTestId } from "../../../test/getNameDataTestId.js";
9
10
  import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
10
- const Select = (props) => {
11
+ import { S as SelectSlots } from "./slots/SelectEnum.js";
12
+ const Select = forwardRef((props, ref) => {
11
13
  const {
12
14
  value,
13
15
  options = [],
@@ -15,141 +17,154 @@ const Select = (props) => {
15
17
  size = "medium",
16
18
  disabled = false,
17
19
  error = false,
18
- color = "default",
19
20
  variant = "outlined",
20
- placeholder = "Selecciona una opcion",
21
- className
21
+ placeholder,
22
+ className,
23
+ dataTestId,
24
+ id,
25
+ ...otherProps
22
26
  } = props;
23
27
  const { currentSize } = useComponentSize(size);
24
28
  const { host_static_assets, environment_assets } = useEnvironment();
25
29
  const isSkeleton = useModuleSkeleton();
26
30
  const { getLabel } = useModuleDictionary();
27
- const theme = useTheme();
28
31
  const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
29
- const [selectedValue, setSelectedValue] = useState(value || "");
32
+ const [selectedValue, setSelectedValue] = useState(value ?? "");
33
+ const [open, setOpen] = useState(false);
34
+ const theme = useTheme();
30
35
  const paletteColor = getPropertyByString(
31
36
  theme.vars.palette,
32
- disabled ? "default" : error ? "error" : color,
37
+ disabled ? "default" : error ? "error" : "primary",
33
38
  theme.vars.palette.default
34
39
  );
35
- const ownerState = {
40
+ const ownerState = useMemo(() => ({
36
41
  size: adjustedSize,
37
42
  disabled,
38
43
  error,
39
44
  variant,
40
- paletteColor,
41
- color
42
- };
43
- const optionsMap = useMemo(
44
- () => new Map(options.map((opt) => [opt.id.toString(), opt])),
45
- [options]
46
- );
47
- const handleChange = (event) => {
45
+ paletteColor
46
+ }), [adjustedSize, disabled, error, variant, paletteColor]);
47
+ const handleLocalChange = (event) => {
48
48
  const newValue = event.target.value;
49
49
  setSelectedValue(newValue);
50
- const selectedOption = optionsMap.get(newValue);
51
- if (selectedOption) {
52
- onChange?.(selectedOption);
50
+ setOpen(false);
51
+ const selectedOption = options.find((option) => String(option.id) === String(newValue));
52
+ if (selectedOption && onChange) {
53
+ onChange(selectedOption);
53
54
  }
54
55
  };
55
- const isOptionEqualToValueLocal = (optionId, currentValue) => optionId === currentValue;
56
- const ArrowDropDownIcon = `${host_static_assets}/${environment_assets}/frontend/components/period/assets/icons/chevron_down.svg`;
57
- const arrowIcon = () => /* @__PURE__ */ jsx(
58
- IconButtonStyled,
59
- {
60
- ownerState: { ...ownerState },
61
- src: ArrowDropDownIcon,
62
- disabled,
63
- size: adjustedSize
56
+ const arrowDropDownIcon = `${host_static_assets}/${environment_assets}/${ICON_ARROW_DOWN}`;
57
+ const ArrowIcon = useMemo(() => {
58
+ return () => /* @__PURE__ */ jsx(
59
+ ArrowDownStyled,
60
+ {
61
+ ownerState: { ...ownerState },
62
+ icon: arrowDropDownIcon,
63
+ disabled,
64
+ size: adjustedSize,
65
+ onClick: () => {
66
+ !disabled && setOpen(!open);
67
+ },
68
+ rotationAngle: open ? 180 : 0
69
+ }
70
+ );
71
+ }, [ownerState, arrowDropDownIcon, disabled, adjustedSize, open]);
72
+ const RenderIcon = (icon) => {
73
+ if (!icon) {
74
+ return null;
64
75
  }
65
- );
76
+ if (typeof icon !== "string") {
77
+ return icon;
78
+ } else {
79
+ return /* @__PURE__ */ jsx(
80
+ AdormentStyled,
81
+ {
82
+ ownerState: {},
83
+ src: icon,
84
+ size: adjustedSize,
85
+ className: SELECT_CLASSES.renderValueStartAdorment,
86
+ disabled
87
+ }
88
+ );
89
+ }
90
+ };
91
+ const renderValue = () => {
92
+ if (!Boolean(selectedValue)) {
93
+ return /* @__PURE__ */ jsx(LabelPlaceholerStyled, { variant: "body", color: "text.disabled", ownerState: {}, children: placeholder });
94
+ }
95
+ const selectedOption = options.find((option) => String(option.id) === String(selectedValue));
96
+ return selectedOption ? /* @__PURE__ */ jsxs(RenderValueContainerStyled, { ownerState: { ...ownerState }, className: SELECT_CLASSES.renderValueContainer, children: [
97
+ selectedOption.startAdornment && RenderIcon(selectedOption.startAdornment),
98
+ /* @__PURE__ */ jsx(RenderValueTypography, { variant: "body", color: "text.primary", ownerState: {}, size: adjustedSize, className: SELECT_CLASSES.renderValueTypography, children: selectedOption.label })
99
+ ] }) : "";
100
+ };
66
101
  if (isSkeleton) {
67
- return /* @__PURE__ */ jsx(SkeletonSelectStyled, { ownerState: { ...ownerState } });
102
+ return /* @__PURE__ */ jsx(SkeletonSelectStyled, { ownerState: { ...ownerState }, className: SELECT_CLASSES.skeletonSelect });
68
103
  }
69
- const classSelect = getComponentSlotRoot("M4LSelectClass");
70
104
  return /* @__PURE__ */ jsx(
71
105
  SelectRootStyled,
72
106
  {
73
- className: clsx(classSelect, className),
107
+ ...otherProps,
108
+ ...getPropDataTestId(SELECT_KEY_COMPONENT, SelectSlots.root, dataTestId),
109
+ id,
110
+ ref,
111
+ className: clsx(SELECT_CLASSES.root, SELECT_CLASSES[variant], className),
74
112
  ownerState: { ...ownerState },
113
+ IconComponent: ArrowIcon,
75
114
  value: selectedValue,
76
- onChange: handleChange,
77
- IconComponent: arrowIcon,
115
+ onChange: handleLocalChange,
78
116
  fullWidth: true,
79
117
  disabled,
80
118
  error,
81
- renderValue: (selected) => {
82
- if (!selected || selected === "" || !optionsMap.has(selected)) {
83
- return /* @__PURE__ */ jsx(LabelPlaceholerStyled, { size, ownerState: {}, children: placeholder });
84
- }
85
- const selectedOption = optionsMap.get(selected);
86
- return /* @__PURE__ */ jsxs(RenderOptionContainerStyled, { size, ownerState: { ...ownerState }, children: [
87
- selectedOption?.startAdornment && /* @__PURE__ */ jsx(Icon, { size, src: selectedOption.startAdornment }),
88
- /* @__PURE__ */ jsx(LabelOptionStyled, { size, ownerState: { ...ownerState }, children: selectedOption?.label || placeholder })
89
- ] });
119
+ renderValue,
120
+ size: adjustedSize,
121
+ open,
122
+ displayEmpty: true,
123
+ onClick: () => {
124
+ !disabled && setOpen(!open);
90
125
  },
91
126
  MenuProps: {
92
- disableAutoFocusItem: true,
93
- MenuListProps: {
94
- onMouseMove: (event) => {
95
- event.stopPropagation();
96
- }
97
- },
98
- /**
99
- * Handles the key down event for the menu.
100
- * @param {React.KeyboardEvent} event - The key down event.
101
- * @author SebastianM - automatic
102
- * @createdAt 2024-12-23 10:47:53 - automatic
103
- * @updatedAt 2025-01-03 11:42:15 - automatic
104
- * @updatedUser Andrés Quintero - automatic
105
- */
106
- onKeyDown: (event) => {
107
- const char = event.key.toLowerCase();
108
- const matchingOption = options.find(
109
- (option) => option.label.toLowerCase().startsWith(char)
110
- );
111
- if (matchingOption) {
112
- const element = document.querySelector(
113
- `[data-value='${matchingOption.id}']`
114
- );
115
- element?.scrollIntoView({ block: "nearest" });
116
- setSelectedValue(matchingOption.id.toString());
117
- const selectedOption = optionsMap.get(matchingOption.id.toString());
118
- if (selectedOption) {
119
- onChange?.(selectedOption);
127
+ sx: {
128
+ "& .MuiPaper-root": {
129
+ paddingTop: theme.vars.size.baseSpacings.sp3,
130
+ paddingBottom: theme.vars.size.baseSpacings.sp3,
131
+ paddingLeft: 0,
132
+ paddingRight: 0,
133
+ "& .MuiList-root": {
134
+ padding: 0,
135
+ display: "flex",
136
+ flexDirection: "column",
137
+ gap: theme.vars.size.baseSpacings.sp1
120
138
  }
121
139
  }
122
140
  }
123
141
  },
124
142
  children: options.length > 0 ? options.map((option) => /* @__PURE__ */ jsx(
125
- MenuItemSelectStyled,
143
+ MenuItemListStyled,
126
144
  {
145
+ className: SELECT_CLASSES.menuItemList,
127
146
  ownerState: { ...ownerState },
128
- size,
129
- value: option.id.toString(),
147
+ size: adjustedSize,
148
+ value: String(option.id),
130
149
  disabled,
131
150
  label: option.label,
132
- selected: isOptionEqualToValueLocal(
133
- option.id,
134
- selectedValue
135
- ),
136
- startIcon: option.startAdornment,
137
- endIcon: option.endAdornment,
138
- "data-value": option.id
151
+ selected: selectedValue === option.id,
152
+ startIcon: RenderIcon(option.startAdornment)
139
153
  },
140
- option.id
154
+ String(option.id)
141
155
  )) : /* @__PURE__ */ jsx(
142
- MenuItemSelectStyled,
156
+ MenuItemNoOptionStyled,
143
157
  {
144
158
  ownerState: { ...ownerState },
145
- selected: false,
146
- size,
147
- label: getLabel("select.no_options")
159
+ className: SELECT_CLASSES.menuItemNoOptions,
160
+ size: adjustedSize,
161
+ label: getLabel(SELECT_DICTIONARY.noOptions),
162
+ disabled: true
148
163
  }
149
164
  )
150
165
  }
151
166
  );
152
- };
167
+ });
153
168
  export {
154
169
  Select as S
155
170
  };
@@ -1,3 +1,5 @@
1
+ import { g as getHeightSizeStyles } from "../../../utils/getHeightSizeStyles.js";
2
+ import { S as SELECT_CLASSES } from "./constants.js";
1
3
  const selectStyles = {
2
4
  /**
3
5
  * Estilos para el componente Select
@@ -6,185 +8,83 @@ const selectStyles = {
6
8
  * @updatedAt 2025-01-03 11:42:15 - automatic
7
9
  * @updatedUser Andrés Quintero - automatic
8
10
  */
9
- selectRoot: ({ theme, ownerState }) => ({
10
- width: "100%",
11
- paddingLeft: theme.vars.size.baseSpacings.sp1,
12
- ...ownerState.error === true && {
13
- "&.M4LSelectClass-root": {
14
- borderColor: ownerState.paletteColor?.main
15
- },
16
- "&:hover fieldset": {
17
- backgroundColor: theme.vars.palette.error.hoverOpacity,
18
- borderColor: ownerState.paletteColor?.main
19
- },
20
- ...ownerState.variant === "text" && {
21
- "&.M4LSelectClass-root": {
22
- borderColor: ownerState.paletteColor?.main
23
- }
11
+ root: ({ theme, ownerState }) => ({
12
+ [`&.${SELECT_CLASSES.root}`]: {
13
+ width: "100%",
14
+ borderRadius: theme.vars.size.borderRadius.r1,
15
+ border: theme.vars.size.borderStroke.actionInput,
16
+ borderColor: ownerState.error ? ownerState.paletteColor?.enabled : theme.vars.palette.border.default,
17
+ padding: 0,
18
+ "& .MuiOutlinedInput-notchedOutline": {
19
+ all: "unset",
20
+ display: "none"
24
21
  },
25
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
26
- border: `${theme.vars.size.borderStroke.actionInput} ${ownerState.paletteColor?.main}`
22
+ "& .MuiSelect-nativeInput": {
23
+ all: "unset",
24
+ display: "none"
27
25
  },
28
- "& .MuiIconButton-root": {
29
- "& .M4LIconClass-root": {
30
- backgroundColor: ownerState.paletteColor?.main
31
- }
32
- }
33
- },
34
- "& > .MuiPaper-root": {
35
- padding: theme.vars.size.baseSpacings.sp2
36
- },
37
- "&:hover fieldset": {
38
- backgroundColor: theme.vars.palette.primary.hoverOpacity,
39
- borderColor: theme.vars.palette.border.default + "!important",
40
- ...ownerState.error === true && {
41
- backgroundColor: theme.vars.palette.error.hoverOpacity,
42
- borderColor: theme.vars.palette.error.main + "!important"
43
- }
44
- },
45
- "&.M4LSelectClass-root": {
46
- display: "flex",
47
- alignItems: "center",
48
- justifyContent: "flex-start",
49
- padding: theme.vars.size.baseSpacings.sp1,
50
- borderRadius: theme.vars.size.borderRadius.r1,
51
- "&:active": {
52
- "& .MuiOutlinedInput-notchedOutline": {
53
- borderTop: "transparent",
54
- borderLeft: "transparent",
55
- borderRight: "transparent"
56
- },
57
- "&.Mui-focused": {
58
- "& .MuiIconButton-root": {
59
- "& .M4LIconClass-root": {
60
- backgroundColor: theme.vars.palette.primary.main,
61
- ...ownerState.error === true && {
62
- backgroundColor: ownerState.paletteColor?.main
63
- }
64
- }
26
+ "& .M4LImage-root": {
27
+ ...getHeightSizeStyles(
28
+ theme.generalSettings.isMobile,
29
+ ownerState.size || "medium",
30
+ "base",
31
+ (val) => {
32
+ return {
33
+ height: val,
34
+ width: val
35
+ };
65
36
  }
66
- }
37
+ )
67
38
  },
68
- "&.Mui-focused": {
69
- "&.Mui-focused": {
70
- "& .MuiIconButton-root": {
71
- "& .M4LIconClass-root": {
72
- backgroundColor: theme.vars.palette.primary.main,
73
- ...ownerState.error === true && {
74
- backgroundColor: ownerState.paletteColor?.main
75
- },
76
- transform: "rotate(180deg)",
77
- transition: "transform 0.3s ease"
78
- }
39
+ "& .MuiButtonBase-root": {
40
+ // Tamaño del componente
41
+ ...getHeightSizeStyles(
42
+ theme.generalSettings.isMobile,
43
+ ownerState.size || "medium",
44
+ "action",
45
+ (height) => {
46
+ return {
47
+ width: height
48
+ };
79
49
  }
80
- }
50
+ )
81
51
  },
82
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
83
- border: `${theme.vars.size.borderStroke.actionInput} ${theme.vars.palette.primary.main}`,
84
- ...ownerState.error === true && {
85
- borderColor: ownerState.paletteColor?.main + "!important"
86
- }
87
- }
88
- },
89
- ...ownerState.variant === "text" && {
90
- "&.M4LSelectClass-root": {
91
- border: "none",
92
- borderRadius: theme.vars.size.borderRadius.r1,
93
- borderBottom: `${theme.vars.size.borderStroke.actionInput} ${theme.vars.palette.border.default}`,
94
- padding: theme.vars.size.baseSpacings.sp1,
95
- ...ownerState.error === true && {
96
- borderColor: ownerState.paletteColor?.main,
97
- "& .MuiIconButton-root": {
98
- "& .M4LIconClass-root": {
99
- backgroundColor: ownerState.paletteColor?.main
100
- }
101
- }
102
- },
103
- "&:active": {
104
- "& .MuiOutlinedInput-notchedOutline": {
105
- borderTop: "transparent",
106
- borderLeft: "transparent",
107
- borderRight: "transparent"
108
- },
109
- "&.Mui-focused": {
110
- "& .MuiIconButton-root": {
111
- "& .M4LIconClass-root": {
112
- backgroundColor: ownerState.paletteColor?.main
113
- }
114
- }
115
- }
116
- },
117
- "&.Mui-focused": {
118
- borderColor: theme.vars.palette.primary.main,
119
- ...ownerState.error === true && {
120
- borderColor: ownerState.paletteColor?.main + "!important"
121
- },
122
- "&.Mui-focused": {
123
- "& .MuiIconButton-root": {
124
- "& .M4LIconClass-root": {
125
- backgroundColor: theme.vars.palette.primary.main,
126
- ...ownerState.error === true && {
127
- backgroundColor: ownerState.paletteColor?.main
128
- },
129
- transform: "rotate(180deg)",
130
- transition: "transform 0.3s ease"
131
- }
132
- }
133
- }
134
- },
135
- "&:focus-active": {
136
- borderTop: "transparent",
137
- borderLeft: "transparent",
138
- borderRight: "transparent"
139
- },
140
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
141
- border: "none"
52
+ "& .MuiSelect-select": {
53
+ padding: `${theme.vars.size.baseSpacings.sp1}!important`,
54
+ minHeight: "unset"
55
+ },
56
+ // Estilos para la variante text
57
+ [`&.${SELECT_CLASSES.text}`]: {
58
+ borderTop: 0,
59
+ borderRight: 0,
60
+ borderBottom: theme.vars.size.borderStroke.actionInput,
61
+ borderLeft: 0,
62
+ borderColor: ownerState.error ? ownerState.paletteColor?.enabled : theme.vars.palette.border.default
63
+ },
64
+ "&:hover": {
65
+ backgroundColor: ownerState.disabled ? "unset" : ownerState.paletteColor?.hoverOpacity
66
+ },
67
+ "&:focus-within": {
68
+ borderColor: ownerState.paletteColor?.focus
69
+ },
70
+ ...ownerState.error && {
71
+ borderColor: ownerState.paletteColor?.enabled,
72
+ "&:hover": {
73
+ borderColor: ownerState.paletteColor?.hover,
74
+ backgroundColor: ownerState.paletteColor?.hoverOpacity
142
75
  }
143
76
  },
144
- "& .MuiOutlinedInput-notchedOutline": {
145
- minHeight: 0,
146
- borderLeft: "transparent",
147
- borderTop: "transparent",
148
- borderRight: "transparent",
149
- border: theme.vars.palette.primary.main,
150
- ...ownerState.error === true && {
151
- borderColor: ownerState.paletteColor?.main
77
+ // Tamaño del componente
78
+ ...getHeightSizeStyles(
79
+ theme.generalSettings.isMobile,
80
+ ownerState.size || "medium",
81
+ "action",
82
+ (height) => {
83
+ return {
84
+ minHeight: height
85
+ };
152
86
  }
153
- }
154
- },
155
- // Estilos específicos para el tamaño small
156
- ...ownerState.size === "small" && {
157
- ...theme.generalSettings.isMobile ? {
158
- height: theme.vars.size.mobile.small.action,
159
- minHeight: theme.vars.size.mobile.small.action
160
- } : {
161
- height: theme.vars.size.desktop.small.action,
162
- minHeight: theme.vars.size.desktop.small.action
163
- }
164
- },
165
- // Estilos específicos para el tamaño medium
166
- ...ownerState.size === "medium" && {
167
- ...theme.generalSettings.isMobile ? {
168
- height: theme.vars.size.mobile.medium.action,
169
- minHeight: theme.vars.size.mobile.medium.action
170
- } : {
171
- height: theme.vars.size.desktop.medium.action,
172
- minHeight: theme.vars.size.desktop.medium.action
173
- }
174
- },
175
- "& .MuiSelect-select": {
176
- display: "flex",
177
- alignItems: "center",
178
- justifyContent: "flex-start",
179
- padding: theme.vars.size.baseSpacings.sp0,
180
- "&::placeholder": {
181
- color: theme.vars.palette.text.disabled
182
- }
183
- },
184
- ...ownerState.disabled === true && {
185
- borderColor: theme.vars.palette.border.disabled,
186
- color: theme.vars.palette.text.disabled,
187
- pointerEvents: "none"
87
+ )
188
88
  }
189
89
  }),
190
90
  /**
@@ -194,13 +94,7 @@ const selectStyles = {
194
94
  * @updatedAt 2025-01-03 11:42:15 - automatic
195
95
  * @updatedUser Andrés Quintero - automatic
196
96
  */
197
- iconButton: ({ theme }) => ({
198
- position: "absolute",
199
- right: theme.vars.size.baseSpacings.sp0,
200
- top: "50%",
201
- transform: "translateY(-50%)",
202
- pointerEvents: "none"
203
- }),
97
+ adorment: {},
204
98
  /**
205
99
  * Styles for the render option container
206
100
  * @returns {object} The styles for the render option container
@@ -209,28 +103,14 @@ const selectStyles = {
209
103
  * @updatedAt 2025-01-03 11:42:15 - automatic
210
104
  * @updatedUser Andrés Quintero - automatic
211
105
  */
212
- renderOptionContainer: ({ theme, ownerState }) => ({
106
+ renderValueContainer: ({ theme }) => ({
213
107
  display: "flex",
214
108
  alignItems: "center",
215
- color: theme.vars.palette.text.primary,
216
- "& .M4LIconClass-root": {
217
- backgroundColor: theme.vars.palette.text.primary
218
- },
219
- ...ownerState.error && {
220
- "& .M4LIconClass-root": {
221
- backgroundColor: theme.vars.palette.text.primary
222
- }
223
- },
224
- "&:focus": {
225
- "& .M4LIconClass-root": {
226
- backgroundColor: theme.vars.palette.text.primary
227
- }
228
- },
229
- ...ownerState.disabled && {
230
- "& .M4LIconClass-root": {
231
- backgroundColor: theme.vars.palette.text.disabled
232
- }
233
- }
109
+ gap: theme.vars.size.baseSpacings.sp1
110
+ }),
111
+ arrowDown: {},
112
+ renderValueTypography: () => ({
113
+ lineHeight: "inherit!important"
234
114
  }),
235
115
  /**
236
116
  * Styles for the label option
@@ -252,35 +132,28 @@ const selectStyles = {
252
132
  * @updatedUser Andrés Quintero - automatic
253
133
  */
254
134
  labelPlaceholer: ({ theme }) => ({
255
- color: theme.vars.palette.text.disabled,
256
- zIndex: 100
135
+ paddingLeft: theme.vars.size.baseSpacings.sp1
257
136
  }),
258
137
  /**
259
- * Styles for the menu options
138
+ * Styles for the menu item select
260
139
  * @param {object} theme - The theme object
261
- * @returns {object} The styles for the menu options
140
+ * @returns {object} The styles for the menu item select
262
141
  * @author SebastianM - automatic
263
- * @createdAt 2024-12-18 15:11:13 - automatic
142
+ * @createdAt 2024-12-26 14:16:33 - automatic
264
143
  * @updatedAt 2025-01-03 11:42:15 - automatic
265
144
  * @updatedUser Andrés Quintero - automatic
266
145
  */
267
- menuOptions: ({ theme }) => ({
268
- padding: theme.vars.size.baseSpacings.sp2,
269
- boxShadow: theme.vars.shadows[1]
270
- }),
146
+ menuItemList: {},
271
147
  /**
272
- * Styles for the menu item select
148
+ * Estilos del menuItem que no tiene opciones
273
149
  * @param {object} theme - The theme object
274
150
  * @returns {object} The styles for the menu item select
275
151
  * @author SebastianM - automatic
276
152
  * @createdAt 2024-12-26 14:16:33 - automatic
277
- * @updatedAt 2025-01-03 11:42:15 - automatic
153
+ * @updatedAt 2024-12-31 11:23:53 - automatic
278
154
  * @updatedUser Andrés Quintero - automatic
279
155
  */
280
- menuItemSelect: ({ theme }) => ({
281
- paddingLeft: theme.vars.size.baseSpacings.sp2,
282
- paddingRight: theme.vars.size.baseSpacings.sp2
283
- }),
156
+ menuItemNoOptions: {},
284
157
  /**
285
158
  * Styles for the skeleton select component
286
159
  * @author SebastianM - automatic
@@ -295,25 +168,16 @@ const selectStyles = {
295
168
  alignItems: "center",
296
169
  background: theme.vars.palette.skeleton.transition,
297
170
  // Estilos específicos para el tamaño small
298
- ...ownerState.size === "small" && {
299
- ...theme.generalSettings.isMobile ? {
300
- height: theme.vars.size.mobile.small.action,
301
- minHeight: theme.vars.size.mobile.small.action
302
- } : {
303
- height: theme.vars.size.desktop.small.action,
304
- minHeight: theme.vars.size.desktop.small.action
171
+ ...getHeightSizeStyles(
172
+ theme.generalSettings.isMobile,
173
+ ownerState.size || "medium",
174
+ "action",
175
+ (height) => {
176
+ return {
177
+ minHeight: `${height}!important`
178
+ };
305
179
  }
306
- },
307
- // Estilos específicos para el tamaño medium
308
- ...ownerState.size === "medium" && {
309
- ...theme.generalSettings.isMobile ? {
310
- height: theme.vars.size.mobile.medium.action,
311
- minHeight: theme.vars.size.mobile.medium.action
312
- } : {
313
- height: theme.vars.size.desktop.medium.action,
314
- minHeight: theme.vars.size.desktop.medium.action
315
- }
316
- }
180
+ )
317
181
  })
318
182
  };
319
183
  export {