@m4l/components 9.1.63 → 9.1.65

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 (64) hide show
  1. package/components/Color/Color.js +136 -38
  2. package/components/Color/Color.styles.d.ts +0 -4
  3. package/components/Color/Color.styles.js +107 -54
  4. package/components/Color/constants.d.ts +0 -1
  5. package/components/Color/constants.js +1 -3
  6. package/components/Color/slots/ColorEnum.d.ts +3 -2
  7. package/components/Color/slots/ColorEnum.js +2 -1
  8. package/components/Color/slots/ColorSlots.d.ts +14 -10
  9. package/components/Color/slots/ColorSlots.js +16 -10
  10. package/components/Color/types.d.ts +14 -25
  11. package/components/DataGrid/index.js +1 -1
  12. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +1 -1
  13. package/components/Icon/Icon.js +1 -1
  14. package/components/Image/Image.js +1 -1
  15. package/components/Image/subcomponents/IntersectComponent/index.js +1 -1
  16. package/components/LanguagePopover/LanguagePopover.js +1 -1
  17. package/components/PropertyValue/PropertyValue.js +1 -1
  18. package/components/ToastContainer/ToastContainer.js +1 -1
  19. package/components/WindowBase/WindowBase.js +1 -1
  20. package/components/WindowConfirm/WindowConfirm.js +1 -1
  21. package/components/areas/components/AreasViewer/index.js +1 -1
  22. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/index.js +1 -1
  23. package/components/commercial/TopBar/TopBar.js +1 -1
  24. package/components/commercial/TopBar/component/ConteinItem/index.js +1 -1
  25. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.js +1 -1
  26. package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -1
  27. package/components/formatters/PeriodFormatter/PeriodFormatter.js +1 -1
  28. package/components/formatters/PointsFormatter/PointsFormatter.js +1 -1
  29. package/components/hook-form/RHFColorPicker/RFHColorPicker.js +11 -89
  30. package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.js +1 -100
  31. package/components/hook-form/RHFColorPicker/constants.d.ts +0 -1
  32. package/components/hook-form/RHFColorPicker/constants.js +1 -3
  33. package/components/hook-form/RHFColorPicker/slots/RHFColorPickerEnum.d.ts +1 -3
  34. package/components/hook-form/RHFColorPicker/slots/RHFColorPickerEnum.js +0 -2
  35. package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.d.ts +1 -19
  36. package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.js +3 -15
  37. package/components/hook-form/RHFPeriod/RHFPeriod.js +1 -1
  38. package/components/hook-form/RHFTextField/RHFTextField.js +1 -1
  39. package/components/maps/components/Map/popups/MapPopupMyGps/MapPopupMyGps.js +1 -1
  40. package/components/mui_extended/Accordion/Accordion.js +1 -1
  41. package/components/mui_extended/Avatar/Avatar.js +1 -1
  42. package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index.js +1 -1
  43. package/components/mui_extended/Badge/Badge.js +1 -1
  44. package/components/mui_extended/CircularProgress/CircularProgress.js +1 -1
  45. package/components/mui_extended/Dialog/Dialog.js +1 -1
  46. package/components/mui_extended/IconButton/IconButton.js +57 -58
  47. package/components/mui_extended/IconButton/IconButton.styles.js +0 -12
  48. package/components/mui_extended/IconButton/slots/IconButtonEnum.d.ts +0 -1
  49. package/components/mui_extended/IconButton/slots/IconButtonEnum.js +0 -1
  50. package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +0 -3
  51. package/components/mui_extended/IconButton/slots/IconButtonSlots.js +2 -6
  52. package/components/mui_extended/ImageButton/ImageButton.js +1 -1
  53. package/components/mui_extended/Popover/Popover.js +1 -1
  54. package/components/mui_extended/TextField/TextField.js +1 -1
  55. package/components/mui_extended/ToggleButton/ToggleButton.js +1 -1
  56. package/components/mui_extended/ToggleIconButton/ToggleIconButton.js +1 -1
  57. package/components/mui_extended/Typography/Typography.js +1 -1
  58. package/index.d.ts +4 -0
  59. package/package.json +1 -1
  60. package/patchLibErrors/defaultPropsError.d.ts +2 -0
  61. package/patchLibErrors/defaultPropsError.js +1 -0
  62. package/patchLibErrors/index.d.ts +1 -0
  63. package/patchLibErrors/index.js +1 -0
  64. package/test/getNameDataTestId.js +2 -2
@@ -1,57 +1,155 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useModuleSkeleton } from "@m4l/core";
3
- import { N as NOTCOLOR } from "./constants.js";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { clsx } from "clsx";
3
+ import { useState, useMemo } from "react";
4
+ import { useTheme } from "@mui/material";
5
+ import { useEnvironment, useModuleSkeleton } from "@m4l/core";
6
+ import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
7
+ import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
8
+ import { C as COLOR_KEY_COMPONENT } from "./constants.js";
9
+ import { C as ColorSlots } from "./slots/ColorEnum.js";
4
10
  import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
5
- import { R as RootStyled, C as ColorPickerStyled, I as IconStyled } from "./slots/ColorSlots.js";
11
+ import { C as ColorPickerStyled, I as IconButtonRootStyled, P as PopoverStyled, S as SketchPickerStyled } from "./slots/ColorSlots.js";
12
+ import { A as ActionsContainer } from "../CommonActions/components/ActionsContainer/ActionsContainer.js";
13
+ import { I as Icon } from "../Icon/Icon.js";
14
+ import { A as ActionCancel } from "../CommonActions/components/ActionCancel/ActionCancel.js";
15
+ import { A as ActionIntro } from "../CommonActions/components/ActionIntro/ActionIntro.js";
6
16
  const Color = (props) => {
7
17
  const {
8
- onClick,
18
+ className,
9
19
  size,
10
20
  disabled,
11
21
  value,
12
22
  role,
13
- color = "default",
14
- ["aria-errormessage"]: ariaErrorMessage
23
+ error = false,
24
+ onChange,
25
+ dataTestId,
26
+ ...other
15
27
  } = props;
28
+ const theme = useTheme();
29
+ const { host_static_assets, environment_assets } = useEnvironment();
30
+ const classes = getComponentClasses(COLOR_KEY_COMPONENT, ColorSlots);
31
+ const urlIcon = `${host_static_assets}/${environment_assets}/frontend/commons/assets/icons/out_of.svg`;
32
+ const [anchorEl, setAnchorEl] = useState(null);
33
+ const [tempColor, setTempColor] = useState(value ?? void 0);
34
+ const handleIntro = () => {
35
+ setAnchorEl(null);
36
+ if (tempColor !== value) {
37
+ onChange(tempColor ?? null);
38
+ setTempColor(tempColor);
39
+ }
40
+ };
41
+ const handleColorChange = (color) => {
42
+ setTempColor(color.hex);
43
+ };
16
44
  const { currentSize } = useComponentSize(size);
17
45
  const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
18
46
  const isSkeleton = useModuleSkeleton();
19
- const ownerState = {
47
+ const ownerState = useMemo(() => ({
20
48
  size: adjustedSize,
21
49
  disabled,
22
- color,
23
- value
24
- };
25
- return /* @__PURE__ */ jsx(
26
- RootStyled,
50
+ value,
51
+ error
52
+ }), [adjustedSize, disabled, value, error]);
53
+ const icon = useMemo(() => value ? /* @__PURE__ */ jsx(
54
+ ColorPickerStyled,
27
55
  {
28
- role,
29
- "aria-busy": isSkeleton,
30
- "aria-errormessage": ariaErrorMessage,
31
- disabled: isSkeleton || disabled,
32
- onClick,
56
+ role: "status",
57
+ "aria-live": "polite",
33
58
  ownerState: { ...ownerState },
34
- disableRipple: true,
35
- children: value ? /* @__PURE__ */ jsx(
36
- ColorPickerStyled,
37
- {
38
- role: "status",
39
- "aria-live": "polite",
40
- ownerState: { ...ownerState },
41
- disabled,
42
- size: adjustedSize
43
- }
44
- ) : /* @__PURE__ */ jsx(
45
- IconStyled,
46
- {
47
- ownerState: { ownerState },
48
- src: NOTCOLOR,
49
- disabled,
50
- size: adjustedSize
51
- }
52
- )
59
+ disabled,
60
+ size: adjustedSize
61
+ }
62
+ ) : /* @__PURE__ */ jsx(
63
+ Icon,
64
+ {
65
+ src: urlIcon,
66
+ disabled,
67
+ size: adjustedSize
53
68
  }
54
- );
69
+ ), [value, ownerState, disabled, adjustedSize, urlIcon]);
70
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
71
+ /* @__PURE__ */ jsx(
72
+ IconButtonRootStyled,
73
+ {
74
+ ...other,
75
+ className: clsx(className, classes.root),
76
+ onClick: (event) => setAnchorEl(event.currentTarget),
77
+ "aria-busy": isSkeleton,
78
+ disabled: isSkeleton || disabled,
79
+ ownerState: { ...ownerState },
80
+ size: adjustedSize,
81
+ icon
82
+ }
83
+ ),
84
+ /* @__PURE__ */ jsxs(
85
+ PopoverStyled,
86
+ {
87
+ className: clsx(classes.popover, className),
88
+ size,
89
+ ownerState: { ...ownerState },
90
+ open: Boolean(anchorEl),
91
+ arrowType: "no-arrow",
92
+ anchorEl,
93
+ onClose: () => setAnchorEl(null),
94
+ anchorOrigin: {
95
+ vertical: "bottom",
96
+ horizontal: "left"
97
+ },
98
+ transformOrigin: {
99
+ vertical: "top",
100
+ horizontal: "left"
101
+ },
102
+ sx: {
103
+ mt: error ? theme.vars.size.baseSpacings.sp7 : 0
104
+ },
105
+ children: [
106
+ /* @__PURE__ */ jsx(
107
+ SketchPickerStyled,
108
+ {
109
+ ownerState: { ownerState },
110
+ color: tempColor ?? void 0,
111
+ onChange: handleColorChange,
112
+ disableAlpha: true,
113
+ presetColors: [
114
+ "#D0021B",
115
+ "#F5A623",
116
+ "#F8E71C",
117
+ "#8B572A",
118
+ "#7ED321",
119
+ "#417505",
120
+ "#BD10E0",
121
+ "#9013FE",
122
+ "#4A90E2",
123
+ "#50E3C2",
124
+ "#B8E986",
125
+ "#000000",
126
+ "#4A4A4A",
127
+ "#9B9B9B",
128
+ "#FFFFFF"
129
+ ]
130
+ }
131
+ ),
132
+ /* @__PURE__ */ jsxs(ActionsContainer, { children: [
133
+ /* @__PURE__ */ jsx(
134
+ ActionCancel,
135
+ {
136
+ onClick: () => setAnchorEl(null),
137
+ size
138
+ }
139
+ ),
140
+ /* @__PURE__ */ jsx(
141
+ ActionIntro,
142
+ {
143
+ ...getPropDataTestId(COLOR_KEY_COMPONENT, ColorSlots.root, dataTestId),
144
+ onClick: handleIntro,
145
+ size
146
+ }
147
+ )
148
+ ] })
149
+ ]
150
+ }
151
+ )
152
+ ] });
55
153
  };
56
154
  export {
57
155
  Color as C
@@ -1,9 +1,5 @@
1
1
  import { ColorStyles } from './types';
2
2
  /**
3
3
  * Definición de los estilos para los diferentes componentes relacionados con el selector de color.
4
- *
5
- * El objeto `colorStyles` contiene tres funciones principales para estilizar diferentes partes del componente:
6
- * `root`, `icon`, y `colorPicker`. Cada función utiliza un estilo dinámico basado en el estado y el tema del componente.
7
- * @createdAt 2025-01-08 10:36:39 - automatic
8
4
  */
9
5
  export declare const colorStyles: ColorStyles;
@@ -1,6 +1,5 @@
1
1
  const colorStyles = {
2
2
  /**
3
- * Estilos para el contenedor raíz del componente de color.
4
3
  * Establece los estilos para el contenedor raíz del selector de color.
5
4
  * @author Andrés Quintero - automatic
6
5
  * @createdAt 2025-01-08 10:36:39 - automatic
@@ -20,53 +19,19 @@ const colorStyles = {
20
19
  padding: 0,
21
20
  // Radio de borde
22
21
  borderRadius: theme.size.borderRadius.r1,
22
+ border: ownerState.error ? `1px solid ${theme.vars.palette.error.main}` : void 0,
23
23
  /**
24
- * **Pseudoclases**:
25
- * - Estilos para los estados hover, focus-visible y active.
26
- * @createdAt 2025-01-08 10:36:39 - automatic
24
+ *Pseudoclases**:
27
25
  */
28
26
  "&:hover": {
29
- display: "flex",
30
- background: theme.vars.palette[ownerState.color || "default"].hoverOpacity
27
+ background: ownerState.error ? theme.vars.palette.error.hoverOpacity : theme.vars.palette.default.hoverOpacity
31
28
  },
32
29
  "&:active": {
33
- background: theme.vars.palette[ownerState.color || "default"].active
30
+ background: ownerState.error ? theme.vars.palette.error.activeOpacity : theme.vars.palette.default.activeOpacity
34
31
  },
35
32
  "&:focus-visible": {
36
- "&::before": {
37
- content: '""',
38
- position: "absolute",
39
- inset: "-2px",
40
- boxSizing: "border-box",
41
- border: theme.vars.size.borderStroke.container,
42
- borderColor: theme.vars.palette.border.main,
43
- borderRadius: theme.vars.size.borderRadius["r1-5"]
44
- }
45
- },
46
- // //Estilos para Error
47
- ...ownerState.color !== "default" && {
48
- // Borde
49
- border: `1px solid ${theme.vars.palette[ownerState.color || "primary"].main}`,
50
- /**
51
- * **Pseudoclases**:
52
- * - Estilos para los estados hover, focus-visible y active.
53
- * @createdAt 2025-01-08 10:36:39 - automatic
54
- */
55
- "&:active": {
56
- border: `1px solid ${theme.vars.palette[ownerState.color || "primary"].active}`,
57
- background: theme.vars.palette[ownerState.color || "primary"].hoverOpacity
58
- },
59
- "&:focus-visible": {
60
- "&::before": {
61
- content: '""',
62
- position: "absolute",
63
- inset: "-4px",
64
- boxSizing: "border-box",
65
- border: theme.vars.size.borderStroke.container,
66
- borderColor: theme.vars.palette.border.main,
67
- borderRadius: theme.vars.size.borderRadius["r1-5"]
68
- }
69
- }
33
+ outline: `1px solid ${theme.vars.palette.primary.focusVisible}`,
34
+ outlineOffset: 2
70
35
  },
71
36
  // Sizes medium
72
37
  ...ownerState.size === "medium" && {
@@ -89,21 +54,8 @@ const colorStyles = {
89
54
  }
90
55
  }
91
56
  }),
92
- /**
93
- * Estilos para el icono dentro del componente de color.
94
- * Actualmente no se aplican estilos al icono. Este espacio está reservado para futuros estilos si es necesario.
95
- * @createdAt 2025-01-08 10:36:39 - automatic
96
- */
97
- icon: {},
98
57
  /**
99
58
  * Estilos para el selector de color.
100
- * Establece los estilos para el selector de color, incluyendo su tamaño, posición y color de fondo.
101
- * El tamaño del selector puede cambiar dependiendo de la propiedad `size` en el estado del componente.
102
- * Además, el color de fondo se ajusta con base en el valor seleccionado.
103
- * @author Andrés Quintero - automatic
104
- * @createdAt 2025-01-08 10:36:39 - automatic
105
- * @updatedAt 2025-01-08 10:36:40 - automatic
106
- * @updatedUser Andrés Quintero - automatic
107
59
  */
108
60
  colorPicker: ({ theme, ownerState }) => ({
109
61
  //Estilos generales
@@ -134,6 +86,107 @@ const colorStyles = {
134
86
  }
135
87
  },
136
88
  variants: []
89
+ }),
90
+ /**
91
+ * Popover
92
+ */
93
+ popover: ({ theme, ownerState }) => ({
94
+ "& .MuiPaper-root": {
95
+ padding: 0,
96
+ border: theme.vars.size.borderStroke.container,
97
+ borderColor: ownerState.error ? theme.vars.palette.border.error : theme.vars.palette.border.default,
98
+ borderRadius: theme.vars.size.borderRadius.r1,
99
+ "& .MuiButtonBase-root": {
100
+ // Ajuste específico de estilo para el contenido de los botones
101
+ justifyContent: "center"
102
+ }
103
+ }
104
+ }),
105
+ /**
106
+ * estilos en picker
107
+ */
108
+ sketchPicker: ({ theme }) => ({
109
+ display: "flex",
110
+ flexDirection: "column",
111
+ gap: theme.vars.size.baseSpacings.sp3,
112
+ boxShadow: "none !important",
113
+ background: `${theme.vars.palette.background.default} !important`,
114
+ "& > div": {
115
+ // Caja de selección de color
116
+ "&:nth-of-type(1)": {
117
+ borderRadius: theme.vars.size.borderRadius.r1
118
+ },
119
+ // Caja de selección horizontal de color
120
+ "&:nth-of-type(2)": {
121
+ display: "flex !important",
122
+ justifyContent: "center !important",
123
+ alignItems: "center !important",
124
+ gap: theme.vars.size.baseSpacings.sp3,
125
+ "& > div:nth-of-type(1)": {
126
+ padding: "0px !important",
127
+ "& > div:nth-of-type(1)": {
128
+ height: `${theme.vars.size.baseSpacings.sp3}!important`,
129
+ borderRadius: `${theme.vars.size.borderRadius["r0-5"]} !important`,
130
+ "& > div > div > div > div": {
131
+ height: "10px !important"
132
+ }
133
+ }
134
+ },
135
+ "& > div:nth-of-type(2)": {
136
+ margin: "0px !important",
137
+ borderRadius: `${theme.vars.size.borderRadius.r1} !important`,
138
+ height: `${theme.vars.size.desktop.medium.base} !important`,
139
+ width: `${theme.vars.size.desktop.medium.base} !important`,
140
+ "& div": {
141
+ borderRadius: `${theme.vars.size.borderRadius.r1} !important`,
142
+ boxShadow: "none !important"
143
+ }
144
+ }
145
+ },
146
+ // Inputs para el cambio de color mediante a texto( hexadecimal o rgb )
147
+ "&:nth-of-type(3)": {
148
+ padding: "0px !important",
149
+ "& > div": {
150
+ // Estilos compartidos para las cajas de color
151
+ "&:nth-of-type(1), &:nth-of-type(2), &:nth-of-type(3), &:nth-of-type(4), &:nth-of-type(5)": {
152
+ padding: "0px !important",
153
+ "& div": {
154
+ display: "flex !important",
155
+ flexDirection: "column-reverse !important",
156
+ "& label": {
157
+ textAlign: "left !important",
158
+ color: `${theme.vars.palette.text.secondary} !important`,
159
+ textTransform: "uppercase !important",
160
+ padding: "0px !important"
161
+ },
162
+ "& input": {
163
+ outline: `1px solid ${theme.vars.palette.border.default}`,
164
+ borderRadius: theme.vars.size.borderRadius.r1,
165
+ background: theme.vars.palette.background.default,
166
+ color: theme.vars.palette.text.primary,
167
+ boxShadow: "none !important",
168
+ "&:hover": {
169
+ background: theme.vars.palette.primary.hoverOpacity
170
+ },
171
+ "&:focus-visible": {
172
+ outlineColor: theme.vars.palette.primary.focusVisible
173
+ },
174
+ "&:active": {
175
+ outlineColor: theme.vars.palette.primary.active
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ },
182
+ //Colores en grid varios del componente de react-color
183
+ "&:nth-of-type(4)": {
184
+ paddingTop: "0px !important"
185
+ }
186
+ },
187
+ "& .flexbox-fix": {
188
+ border: "0px !important"
189
+ }
137
190
  })
138
191
  };
139
192
  export {
@@ -1,3 +1,2 @@
1
1
  export declare const COLOR_KEY_COMPONENT = "M4LColor";
2
- export declare const NOTCOLOR = "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/commons/assets/icons/out_of.svg";
3
2
  export declare const COLOR_PREFIX = "Color";
@@ -1,6 +1,4 @@
1
1
  const COLOR_KEY_COMPONENT = "M4LColor";
2
- const NOTCOLOR = "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/commons/assets/icons/out_of.svg";
3
2
  export {
4
- COLOR_KEY_COMPONENT as C,
5
- NOTCOLOR as N
3
+ COLOR_KEY_COMPONENT as C
6
4
  };
@@ -1,5 +1,6 @@
1
1
  export declare enum ColorSlots {
2
2
  root = "root",
3
- icon = "icon",
4
- colorPicker = "colorPicker"
3
+ colorPicker = "colorPicker",
4
+ popover = "popover",
5
+ sketchPicker = "sketchPicker"
5
6
  }
@@ -1,7 +1,8 @@
1
1
  var ColorSlots = /* @__PURE__ */ ((ColorSlots2) => {
2
2
  ColorSlots2["root"] = "root";
3
- ColorSlots2["icon"] = "icon";
4
3
  ColorSlots2["colorPicker"] = "colorPicker";
4
+ ColorSlots2["popover"] = "popover";
5
+ ColorSlots2["sketchPicker"] = "sketchPicker";
5
6
  return ColorSlots2;
6
7
  })(ColorSlots || {});
7
8
  export {
@@ -1,23 +1,27 @@
1
+ import { SketchPicker } from 'react-color';
1
2
  /**
2
3
  * Componente estilizado de IconButton como el contenedor raíz del componente de color.
3
- * Este componente es utilizado como el contenedor principal del IconButton de materialUI.
4
4
  */
5
- export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').IconButtonOwnProps & 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" | "sx" | "classes" | "className" | "tabIndex" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge">, "children" | "value" | "ref" | "title" | "size" | "name" | "id" | "type" | "action" | "hidden" | "color" | "content" | "style" | "disabled" | "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" | "key" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').ColorOwnerState> & Record<string, unknown> & {
5
+ export declare const IconButtonRootStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "children" | "value" | "title" | "component" | "size" | "name" | "id" | "type" | "selected" | "action" | "hidden" | "content" | "style" | "icon" | "tooltip" | "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" | "placement" | "form" | "src" | "rotationAngle" | "tooltipContent" | "instaceDataTestId" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "componentPaletteColor" | "badgeContent" | "dictionaryTooltipId" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
8
6
  ownerState: Partial<import('../types').ColorOwnerState> & Record<string, unknown>;
9
7
  }, {}, {}>;
10
8
  /**
11
- * Componente estilizado para representar el selector de color.
12
- * Este componente se utiliza para mostrar el área del picker de color.
9
+ * Componente envoltorio `div` que representa el color que recibe por la prop `value`.
13
10
  */
14
- export declare const ColorPickerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').ColorOwnerState> & Record<string, unknown> & {
11
+ export declare const ColorPickerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
15
12
  ownerState: Partial<import('../types').ColorOwnerState> & Record<string, unknown>;
16
13
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
17
14
  /**
18
- * Componente estilizado para representar el icono dentro del componente de color.
19
- * Este es el área del componente donde se coloca el icono de selección de color.
15
+ * Componente `Popover` de M4L.
20
16
  */
21
- export declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').ColorOwnerState> & Record<string, unknown> & {
17
+ export declare const PopoverStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Popover/types').PopoverProps, keyof import('../../mui_extended/Popover/types').PopoverProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
22
18
  ownerState: Partial<import('../types').ColorOwnerState> & Record<string, unknown>;
23
19
  }, {}, {}>;
20
+ /**
21
+ * Componente `SketchPicker` que viene de la libreria de react color.
22
+ */
23
+ export declare const SketchPickerStyled: import('@emotion/styled').StyledComponent<Pick<import('react-color').SketchPickerProps, keyof import('react-color').SketchPickerProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
24
+ ownerState: Partial<import('../types').ColorOwnerState> & Record<string, unknown>;
25
+ }, {}, {
26
+ ref?: import('react').Ref<SketchPicker> | undefined;
27
+ }>;
@@ -1,10 +1,11 @@
1
+ import { SketchPicker } from "react-color";
1
2
  import { styled } from "@mui/material/styles";
2
- import { C as ColorSlots } from "./ColorEnum.js";
3
- import { IconButton } from "@mui/material";
4
- import { c as colorStyles } from "../Color.styles.js";
5
3
  import { C as COLOR_KEY_COMPONENT } from "../constants.js";
6
- import { I as Icon } from "../../Icon/Icon.js";
7
- const RootStyled = styled(IconButton, {
4
+ import { c as colorStyles } from "../Color.styles.js";
5
+ import { C as ColorSlots } from "./ColorEnum.js";
6
+ import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
7
+ import { P as Popover } from "../../mui_extended/Popover/Popover.js";
8
+ const IconButtonRootStyled = styled(IconButton, {
8
9
  name: COLOR_KEY_COMPONENT,
9
10
  slot: ColorSlots.root
10
11
  })(colorStyles?.root);
@@ -12,12 +13,17 @@ const ColorPickerStyled = styled("div", {
12
13
  name: COLOR_KEY_COMPONENT,
13
14
  slot: ColorSlots.colorPicker
14
15
  })(colorStyles?.colorPicker);
15
- const IconStyled = styled(Icon, {
16
+ const PopoverStyled = styled(Popover, {
17
+ name: COLOR_KEY_COMPONENT,
18
+ slot: ColorSlots.popover
19
+ })(colorStyles?.popover);
20
+ const SketchPickerStyled = styled(SketchPicker, {
16
21
  name: COLOR_KEY_COMPONENT,
17
- slot: ColorSlots.icon
18
- })(colorStyles?.icon);
22
+ slot: ColorSlots.sketchPicker
23
+ })(colorStyles?.sketchPicker);
19
24
  export {
20
25
  ColorPickerStyled as C,
21
- IconStyled as I,
22
- RootStyled as R
26
+ IconButtonRootStyled as I,
27
+ PopoverStyled as P,
28
+ SketchPickerStyled as S
23
29
  };
@@ -1,18 +1,15 @@
1
1
  import { Theme } from '@mui/material/styles';
2
2
  import { IconButtonProps as MUIIconButtonProps } from '@mui/material';
3
- import { OverridesStyleRules } from '@mui/material/styles/overrides';
4
- import { ComponentPalletColor, Sizes } from '@m4l/styles';
5
- import { IconProps } from '../Icon/types';
3
+ import { Sizes } from '@m4l/styles';
4
+ import { M4LOverridesStyleRules } from 'src/@types/augmentations';
6
5
  import { COLOR_KEY_COMPONENT } from './constants';
7
6
  import { ColorSlots } from './slots';
8
7
  /**
9
8
  * Propiedades del componente `Color`
10
9
  *
11
- * Esta interfaz define las propiedades que el componente `Color` acepta. Se basa en las propiedades de `IconProps`
12
- * y `MUIIconButtonProps`, pero omite algunas propiedades para ajustarse a los requisitos específicos del componente `Color`.
10
+ * Esta interfaz define las propiedades que el componente `Color` acepta. Se basa en las propiedades de `MUIIconButtonProps`.
13
11
  */
14
- export interface ColorProps extends Omit<IconProps, 'size' | 'color' | 'src'>, // Se omiten las propiedades 'size', 'color' y 'src' de IconProps
15
- Omit<MUIIconButtonProps, 'size' | 'color' | 'disabled' | 'value'> {
12
+ export interface ColorProps extends Omit<MUIIconButtonProps, 'size' | 'value' | 'onChange'> {
16
13
  /**
17
14
  * Define el color que tendrá el componente.
18
15
  * Puede ser un color en formato de string o `null`/`undefined` para mostrar un ícono predeterminado.
@@ -24,15 +21,17 @@ Omit<MUIIconButtonProps, 'size' | 'color' | 'disabled' | 'value'> {
24
21
  */
25
22
  size?: Extract<Sizes, 'small' | 'medium'>;
26
23
  /**
27
- * Representa si el componente está deshabilitado.
28
- * Si es `true`, el componente no será interactivo.
24
+ * Indica si el componente está en estado de error
29
25
  */
30
- disabled?: boolean;
26
+ error?: boolean;
31
27
  /**
32
- * Opciones de color personalizadas del componente.
33
- * Define el color de la paleta a utilizar para el componente.
28
+ * Evento que se dispara cuando el color del componente cambia.
34
29
  */
35
- color?: ComponentPalletColor;
30
+ onChange: (color: string | null) => void;
31
+ /**
32
+ * testId
33
+ */
34
+ dataTestId?: string;
36
35
  }
37
36
  /**
38
37
  * Tipo para las ranuras del componente `Color`.
@@ -45,20 +44,10 @@ export type ColorSlotsType = keyof typeof ColorSlots;
45
44
  * Este tipo se utiliza para describir el estado completo del componente `Color`, incluyendo
46
45
  * las propiedades pasadas al componente y el estado calculado como el color de la paleta y el estado de esqueleto.
47
46
  */
48
- export interface ColorOwnerState extends Pick<ColorProps, 'size' | 'color' | 'value'> {
49
- /**
50
- * Define si el componente está deshabilitado.
51
- */
52
- disabled?: boolean;
53
- /**
54
- * El color de la paleta basado en el tema de MUI.
55
- * Se usa para aplicar el color al componente.
56
- */
57
- color?: ComponentPalletColor;
58
- }
47
+ export type ColorOwnerState = Pick<ColorProps, 'size' | 'value' | 'error' | 'disabled'>;
59
48
  /**
60
49
  * Tipos de estilos para el componente `Color`.
61
50
  * Esta interfaz extiende las reglas de estilo personalizadas para las ranuras del componente (`ColorSlots`)
62
51
  * y permite su sobrescritura.
63
52
  */
64
- export type ColorStyles = Partial<OverridesStyleRules<ColorSlots, typeof COLOR_KEY_COMPONENT, Theme> | undefined> | undefined;
53
+ export type ColorStyles = M4LOverridesStyleRules<ColorSlots, typeof COLOR_KEY_COMPONENT, Theme>;
@@ -7,7 +7,7 @@ import { a as DataGridProvider } from "./contexts/DataGridContext/index.js";
7
7
  import { T as TEST_PROP_COLUMNS } from "./types.js";
8
8
  import { a as dataGridUtilityClasses } from "./classes/index.js";
9
9
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.js";
10
- import { g as getNameDataTestId } from "../../test/getNameDataTestId.js";
10
+ import { a as getNameDataTestId } from "../../test/getNameDataTestId.js";
11
11
  import { D as DATAGRID_PREFIX_NAME } from "./constants.js";
12
12
  function DataGrid(props) {
13
13
  const {
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { u as useDynamicFilterBase } from "./useDynamicFilterBase.js";
3
- import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
3
+ import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
4
4
  import { R as RootStyled, I as InnerContainerStyled } from "../../slots/dynamicFilterSlots.js";
5
5
  import { D as DynamicFilterSlots } from "../../slots/SlotsEnum.js";
6
6
  import { I as InputFilter } from "../InputFilter/InputFilter.js";
@@ -1,7 +1,7 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useModuleSkeleton } from "@m4l/core";
3
3
  import clsx from "clsx";
4
- import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
4
+ import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
5
5
  import { I as ICON_PREFIX, a as ICON_KEY_COMPONENT } from "./constants.js";
6
6
  import { g as getComponentClasses, a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
7
7
  import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";