@m4l/components 9.3.28 → 9.3.29-JT19112025.beta.1

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 (148) hide show
  1. package/components/Color/Color.js +32 -131
  2. package/components/Color/Color.styles.js +6 -124
  3. package/components/Color/slots/ColorEnum.d.ts +1 -3
  4. package/components/Color/slots/ColorEnum.js +1 -3
  5. package/components/Color/slots/ColorSlots.d.ts +3 -18
  6. package/components/Color/slots/ColorSlots.js +6 -19
  7. package/components/Color/types.d.ts +6 -7
  8. package/components/DataGrid/DataGrid.js +1 -1
  9. package/components/DataGrid/Datagrid.styles.js +111 -39
  10. package/components/DataGrid/dictionary.d.ts +1 -0
  11. package/components/DataGrid/dictionary.js +2 -1
  12. package/components/DataGrid/formatters/ColumnColorFormatter/formatter.d.ts +6 -0
  13. package/components/DataGrid/formatters/ColumnColorFormatter/formatter.js +19 -0
  14. package/components/DataGrid/formatters/ColumnColorFormatter/index.d.ts +3 -0
  15. package/components/DataGrid/formatters/ColumnColorFormatter/index.js +1 -0
  16. package/components/DataGrid/formatters/ColumnColorFormatter/tests/ColumnColorFormatter.test.d.ts +1 -0
  17. package/components/DataGrid/formatters/ColumnColorFormatter/tests/useColumnColor.test.d.ts +1 -0
  18. package/components/DataGrid/formatters/ColumnColorFormatter/types.d.ts +12 -0
  19. package/components/DataGrid/formatters/ColumnColorFormatter/types.js +1 -0
  20. package/components/DataGrid/formatters/ColumnColorFormatter/useColumnColor.d.ts +14 -0
  21. package/components/DataGrid/formatters/ColumnColorFormatter/useColumnColor.js +22 -0
  22. package/components/DataGrid/formatters/ColumnTagsFormatter/tests/ColumnTagsFormatter.test.d.ts +1 -0
  23. package/components/DataGrid/formatters/ColumnTagsFormatter/tests/useColumnTags.test.d.ts +1 -0
  24. package/components/DataGrid/formatters/index.d.ts +1 -0
  25. package/components/DataGrid/icons.d.ts +1 -0
  26. package/components/DataGrid/icons.js +2 -1
  27. package/components/DataGrid/slots/DataGridEnum.d.ts +4 -1
  28. package/components/DataGrid/slots/DataGridEnum.js +3 -0
  29. package/components/DataGrid/slots/DataGridSlot.d.ts +3 -0
  30. package/components/DataGrid/slots/DataGridSlot.js +48 -33
  31. package/components/DataGrid/subcomponents/Cards/hooks/useCardContent.js +28 -1
  32. package/components/DataGrid/subcomponents/Cards/index.js +1 -1
  33. package/components/DataGrid/subcomponents/Cards/subcomponents/CardDetails/index.js +34 -8
  34. package/components/DataGrid/subcomponents/Cards/subcomponents/CardHeader/index.js +1 -1
  35. package/components/DataGrid/subcomponents/Cards/subcomponents/CardRow/index.d.ts +1 -1
  36. package/components/DataGrid/subcomponents/Cards/subcomponents/CardRow/index.js +1 -1
  37. package/components/DataGrid/subcomponents/CheckboxCellAdapter/index.js +1 -1
  38. package/components/DataGrid/subcomponents/ControlNavigate/ControlNavigate.js +1 -1
  39. package/components/DataGrid/subcomponents/HeaderActions/index.js +2 -2
  40. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/RowsCount/index.js +1 -1
  41. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +1 -1
  42. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfigCards/index.js +1 -1
  43. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/ViewMode/index.js +1 -1
  44. package/components/DataGrid/subcomponents/Table/index.js +1 -1
  45. package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter.js +1 -0
  46. package/components/DataGrid/subcomponents/Table/subcomponents/CustomIcons.js +39 -14
  47. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +1 -1
  48. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +1 -1
  49. package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
  50. package/components/DataGrid/tests/helpers/generators.d.ts +26 -0
  51. package/components/DataGrid/tests/helpers/types.d.ts +2 -0
  52. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +1 -1
  53. package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.js +1 -1
  54. package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +1 -1
  55. package/components/Icon/Icon.js +1 -1
  56. package/components/Image/Image.js +1 -1
  57. package/components/Image/subcomponents/IntersectComponent/index.js +1 -1
  58. package/components/ImageText/ImageText.js +1 -1
  59. package/components/LanguagePopover/LanguagePopover.js +1 -1
  60. package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.js +1 -1
  61. package/components/LoadingError/LoadingError.js +1 -1
  62. package/components/NumberInput/NumberInput.js +1 -1
  63. package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +1 -1
  64. package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +1 -1
  65. package/components/PDFViewer/PDFViewer.js +1 -1
  66. package/components/PrintingSystem/PrintingSystem.js +1 -1
  67. package/components/PropertyValue/PropertyValue.js +1 -1
  68. package/components/ToastContainer/ToastContainer.js +1 -1
  69. package/components/WindowBase/WindowBase.js +1 -1
  70. package/components/WindowConfirm/WindowConfirm.js +1 -1
  71. package/components/areas/components/AreasAdmin/AreasAdmin.js +1 -1
  72. package/components/areas/components/AreasViewer/AreasViewer.js +1 -1
  73. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +1 -1
  74. package/components/commercial/TopBar/TopBar.js +1 -1
  75. package/components/commercial/TopBar/component/ConteinItem/index.js +1 -1
  76. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.js +1 -1
  77. package/components/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.js +1 -1
  78. package/components/extended/React-resizable-panels/SplitLayout.js +1 -1
  79. package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -1
  80. package/components/formatters/ColorFormatter/ColorFormatter.d.ts +18 -0
  81. package/components/formatters/ColorFormatter/ColorFormatter.js +35 -0
  82. package/components/formatters/ColorFormatter/ColorFormatter.styles.d.ts +2 -0
  83. package/components/formatters/ColorFormatter/ColorFormatter.styles.js +15 -0
  84. package/components/formatters/ColorFormatter/constants.d.ts +1 -0
  85. package/components/formatters/ColorFormatter/constants.js +4 -0
  86. package/components/formatters/ColorFormatter/index.d.ts +3 -0
  87. package/components/formatters/ColorFormatter/index.js +1 -0
  88. package/components/formatters/ColorFormatter/slots/ColorFormatterEnum.d.ts +3 -0
  89. package/components/formatters/ColorFormatter/slots/ColorFormatterEnum.js +7 -0
  90. package/components/formatters/ColorFormatter/slots/ColorFormatterSlots.d.ts +4 -0
  91. package/components/formatters/ColorFormatter/slots/ColorFormatterSlots.js +11 -0
  92. package/components/formatters/ColorFormatter/types.d.ts +24 -0
  93. package/components/formatters/ColorFormatter/types.js +1 -0
  94. package/components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.js +1 -1
  95. package/components/formatters/DateFormatter/DateFormatter.js +1 -1
  96. package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js +1 -1
  97. package/components/formatters/PeriodFormatter/PeriodFormatter.js +1 -1
  98. package/components/formatters/PointsFormatter/PointsFormatter.js +1 -1
  99. package/components/formatters/PriceFormatter/PriceFormatter.js +1 -1
  100. package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.js +1 -1
  101. package/components/formatters/index.d.ts +1 -0
  102. package/components/hook-form/RHFColorPicker/RFHColorPicker.js +28 -36
  103. package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.js +156 -0
  104. package/components/hook-form/RHFColorPicker/hooks/useColorPicker/index.d.ts +2 -0
  105. package/components/hook-form/RHFColorPicker/hooks/useColorPicker/types.d.ts +9 -0
  106. package/components/hook-form/RHFColorPicker/hooks/useColorPicker/useColorPicker.d.ts +41 -0
  107. package/components/hook-form/RHFColorPicker/hooks/useColorPicker/useColorPicker.js +50 -0
  108. package/components/hook-form/RHFColorPicker/slots/RHFColorPickerEnum.d.ts +4 -1
  109. package/components/hook-form/RHFColorPicker/slots/RHFColorPickerEnum.js +3 -0
  110. package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.d.ts +21 -0
  111. package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.js +19 -1
  112. package/components/hook-form/RHFColorPicker/slots/index.js +1 -0
  113. package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/ColorPickerField.d.ts +33 -0
  114. package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/ColorPickerField.js +147 -0
  115. package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/index.d.ts +2 -0
  116. package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/index.js +1 -0
  117. package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/types.d.ts +20 -0
  118. package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/types.js +1 -0
  119. package/components/hook-form/RHFDateTime/RHFDateTime.js +1 -1
  120. package/components/hook-form/RHFNumberInput/RHFNumberInput.js +1 -1
  121. package/components/hook-form/RHFPeriod/RHFPeriod.js +1 -1
  122. package/components/hook-form/RHFSelect/RHFSelect.js +1 -1
  123. package/components/hook-form/RHFTextField/RHFTextField.js +1 -1
  124. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/UploadImage.js +1 -1
  125. package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.js +1 -1
  126. package/components/mui_extended/Accordion/Accordion.js +1 -1
  127. package/components/mui_extended/Avatar/Avatar.js +1 -1
  128. package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index.js +1 -1
  129. package/components/mui_extended/Badge/Badge.js +1 -1
  130. package/components/mui_extended/CircularProgress/CircularProgress.js +1 -1
  131. package/components/mui_extended/DateTimePicker/DateTimePicker.js +1 -1
  132. package/components/mui_extended/Dialog/Dialog.js +1 -1
  133. package/components/mui_extended/ImageButton/ImageButton.js +1 -1
  134. package/components/mui_extended/MenuDivider/MenuDivider.js +1 -1
  135. package/components/mui_extended/NavLink/NavLink.js +1 -1
  136. package/components/mui_extended/Popover/Popover.js +1 -1
  137. package/components/mui_extended/Select/Select.js +1 -1
  138. package/components/mui_extended/Stack/Stack.js +1 -1
  139. package/components/mui_extended/TextField/TextField.js +1 -1
  140. package/components/mui_extended/ToggleButton/ToggleButton.js +1 -1
  141. package/components/mui_extended/ToggleIconButton/ToggleIconButton.js +1 -1
  142. package/components/mui_extended/Typography/Typography.js +1 -1
  143. package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +1 -1
  144. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +1 -1
  145. package/index.js +58 -52
  146. package/package.json +2 -2
  147. package/test/getNameDataTestId.js +2 -2
  148. package/components/DataGrid/formatters/ColumnIconFormatter/constants.d.ts +0 -4
@@ -1,156 +1,57 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { clsx } from "clsx";
3
- import { useState, useMemo } from "react";
4
- import { useTheme } from "@mui/material";
3
+ import { useMemo } from "react";
5
4
  import { useEnvironment, useModuleSkeleton } from "@m4l/core";
6
- import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
7
5
  import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
8
6
  import { C as COLOR_KEY_COMPONENT } from "./constants.js";
9
7
  import { C as ColorSlots } from "./slots/ColorEnum.js";
10
8
  import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.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";
9
+ import { C as ColorStyled, R as RootStyled } from "./slots/ColorSlots.js";
13
10
  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";
16
11
  const Color = (props) => {
17
12
  const {
18
- className,
19
13
  size,
20
- disabled,
14
+ className,
21
15
  value,
22
- role,
23
16
  error = false,
24
- onChange,
25
- dataTestId,
26
- ...other
17
+ dataTestId = "m4l_color_test"
27
18
  } = props;
28
- const theme = useTheme();
29
19
  const { host_static_assets, environment_assets } = useEnvironment();
30
20
  const classes = getComponentClasses(COLOR_KEY_COMPONENT, ColorSlots);
31
21
  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
- };
44
22
  const { currentSize } = useComponentSize(size);
45
23
  const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
46
24
  const isSkeleton = useModuleSkeleton();
47
- const { color: _, ...otherWithoutColor } = other;
48
- const ownerState = useMemo(() => ({
49
- size: adjustedSize,
50
- disabled,
51
- value,
52
- error
53
- }), [adjustedSize, disabled, value, error]);
54
- const icon = useMemo(() => value ? /* @__PURE__ */ jsx(
55
- ColorPickerStyled,
56
- {
57
- role: "status",
58
- "aria-live": "polite",
59
- ownerState: { ...ownerState },
60
- disabled,
61
- size: adjustedSize
62
- }
63
- ) : /* @__PURE__ */ jsx(
64
- Icon,
65
- {
66
- src: urlIcon,
67
- disabled,
68
- size: adjustedSize
69
- }
70
- ), [value, ownerState, disabled, adjustedSize, urlIcon]);
71
- return /* @__PURE__ */ jsxs(Fragment, { children: [
72
- /* @__PURE__ */ jsx(
73
- IconButtonRootStyled,
74
- {
75
- ...otherWithoutColor,
76
- className: clsx(className, classes.root),
77
- onClick: (event) => setAnchorEl(event.currentTarget),
78
- "aria-busy": isSkeleton,
79
- disabled: isSkeleton || disabled,
80
- ownerState: { ...ownerState },
81
- size: adjustedSize,
82
- icon
83
- }
84
- ),
85
- /* @__PURE__ */ jsxs(
86
- PopoverStyled,
25
+ const ownerState = useMemo(
26
+ () => ({
27
+ size: adjustedSize,
28
+ value,
29
+ error
30
+ }),
31
+ [adjustedSize, value, error]
32
+ );
33
+ const content = useMemo(
34
+ () => value ? /* @__PURE__ */ jsx(
35
+ ColorStyled,
87
36
  {
88
- className: clsx(classes.popover, className),
89
- size,
37
+ role: "status",
38
+ "aria-live": "polite",
90
39
  ownerState: { ...ownerState },
91
- open: Boolean(anchorEl),
92
- arrowType: "no-arrow",
93
- anchorEl,
94
- onClose: () => setAnchorEl(null),
95
- anchorOrigin: {
96
- vertical: "bottom",
97
- horizontal: "left"
98
- },
99
- transformOrigin: {
100
- vertical: "top",
101
- horizontal: "left"
102
- },
103
- sx: {
104
- mt: error ? theme.vars.size.baseSpacings.sp7 : 0
105
- },
106
- children: [
107
- /* @__PURE__ */ jsx(
108
- SketchPickerStyled,
109
- {
110
- ownerState: { ownerState },
111
- color: tempColor ?? void 0,
112
- onChange: handleColorChange,
113
- disableAlpha: true,
114
- presetColors: [
115
- "#D0021B",
116
- "#F5A623",
117
- "#F8E71C",
118
- "#8B572A",
119
- "#7ED321",
120
- "#417505",
121
- "#BD10E0",
122
- "#9013FE",
123
- "#4A90E2",
124
- "#50E3C2",
125
- "#B8E986",
126
- "#000000",
127
- "#4A4A4A",
128
- "#9B9B9B",
129
- "#FFFFFF"
130
- ]
131
- }
132
- ),
133
- /* @__PURE__ */ jsxs(ActionsContainer, { children: [
134
- /* @__PURE__ */ jsx(
135
- ActionCancel,
136
- {
137
- onClick: () => setAnchorEl(null),
138
- size
139
- }
140
- ),
141
- /* @__PURE__ */ jsx(
142
- ActionIntro,
143
- {
144
- ...getPropDataTestId(COLOR_KEY_COMPONENT, ColorSlots.root, dataTestId),
145
- onClick: handleIntro,
146
- size
147
- }
148
- )
149
- ] })
150
- ]
40
+ size: adjustedSize
151
41
  }
152
- )
153
- ] });
42
+ ) : /* @__PURE__ */ jsx(Icon, { src: urlIcon, size: adjustedSize }),
43
+ [value, ownerState, adjustedSize, urlIcon]
44
+ );
45
+ return /* @__PURE__ */ jsx(
46
+ RootStyled,
47
+ {
48
+ className: clsx(className, classes.root),
49
+ "aria-busy": isSkeleton,
50
+ "data-testid": dataTestId,
51
+ ownerState,
52
+ children: content
53
+ }
54
+ );
154
55
  };
155
56
  export {
156
57
  Color as C
@@ -4,31 +4,15 @@ const colorStyles = {
4
4
  */
5
5
  root: ({ theme, ownerState }) => ({
6
6
  // Estructura y layout básico
7
- display: "flex",
7
+ display: "inline-flex",
8
+ alignItems: "center",
8
9
  justifyContent: "center",
9
- width: "fit-content",
10
- height: "fit-content",
11
- cursor: ownerState?.disabled ? "not-allowed" : "pointer",
12
- color: theme.vars.palette.text.primary,
13
- pointerEvents: ownerState?.disabled ? "none" : "auto",
14
10
  //Espaciado
15
11
  padding: 0,
16
12
  // Radio de borde
17
- borderRadius: theme.size.borderRadius.r1,
13
+ borderRadius: theme.size.borderRadius["r1-5"],
14
+ backgroundColor: theme.vars.palette.default.enabled,
18
15
  border: ownerState?.error ? `1px solid ${theme.vars.palette.error.enabled}` : void 0,
19
- /**
20
- *Pseudoclases**:
21
- */
22
- "&:hover": {
23
- background: ownerState?.error ? theme.vars.palette.error.hoverOpacity : theme.vars.palette.default.hoverOpacity
24
- },
25
- "&:active": {
26
- background: ownerState?.error ? theme.vars.palette.error.activeOpacity : theme.vars.palette.default.activeOpacity
27
- },
28
- "&:focus-visible": {
29
- outline: `1px solid ${theme.vars.palette.primary.focusVisible}`,
30
- outlineOffset: 2
31
- },
32
16
  // Sizes medium
33
17
  ...ownerState?.size === "medium" && {
34
18
  ...theme.generalSettings.isMobile ? {
@@ -53,14 +37,13 @@ const colorStyles = {
53
37
  /**
54
38
  * Estilos para el selector de color.
55
39
  */
56
- colorPicker: ({ theme, ownerState }) => ({
40
+ color: ({ theme, ownerState }) => ({
57
41
  //Estilos generales
58
- right: 0,
59
42
  display: "flex",
60
43
  flexDirection: "column",
61
44
  justifyContent: "center",
62
45
  backgroundColor: ownerState?.value,
63
- borderRadius: theme.size.borderRadius["r0-5"],
46
+ borderRadius: theme.size.borderRadius.r1,
64
47
  // Sizes medium
65
48
  ...ownerState?.size === "medium" && {
66
49
  ...theme.generalSettings.isMobile ? {
@@ -82,107 +65,6 @@ const colorStyles = {
82
65
  }
83
66
  },
84
67
  variants: []
85
- }),
86
- /**
87
- * Popover
88
- */
89
- popover: ({ theme, ownerState }) => ({
90
- "& .MuiPaper-root": {
91
- padding: 0,
92
- border: theme.vars.size.borderStroke.container,
93
- borderColor: ownerState?.error ? theme.vars.palette.border.error : theme.vars.palette.border.default,
94
- borderRadius: theme.vars.size.borderRadius.r1,
95
- "& .MuiButtonBase-root": {
96
- // Ajuste específico de estilo para el contenido de los botones
97
- justifyContent: "center"
98
- }
99
- }
100
- }),
101
- /**
102
- * estilos en picker
103
- */
104
- sketchPicker: ({ theme }) => ({
105
- display: "flex",
106
- flexDirection: "column",
107
- gap: theme.vars.size.baseSpacings.sp3,
108
- boxShadow: "none !important",
109
- background: `${theme.vars.palette.background.default} !important`,
110
- "& > div": {
111
- // Caja de selección de color
112
- "&:nth-of-type(1)": {
113
- borderRadius: theme.vars.size.borderRadius.r1
114
- },
115
- // Caja de selección horizontal de color
116
- "&:nth-of-type(2)": {
117
- display: "flex !important",
118
- justifyContent: "center !important",
119
- alignItems: "center !important",
120
- gap: theme.vars.size.baseSpacings.sp3,
121
- "& > div:nth-of-type(1)": {
122
- padding: "0px !important",
123
- "& > div:nth-of-type(1)": {
124
- height: `${theme.vars.size.baseSpacings.sp3}!important`,
125
- borderRadius: `${theme.vars.size.borderRadius["r0-5"]} !important`,
126
- "& > div > div > div > div": {
127
- height: "10px !important"
128
- }
129
- }
130
- },
131
- "& > div:nth-of-type(2)": {
132
- margin: "0px !important",
133
- borderRadius: `${theme.vars.size.borderRadius.r1} !important`,
134
- height: `${theme.vars.size.desktop.medium.base} !important`,
135
- width: `${theme.vars.size.desktop.medium.base} !important`,
136
- "& div": {
137
- borderRadius: `${theme.vars.size.borderRadius.r1} !important`,
138
- boxShadow: "none !important"
139
- }
140
- }
141
- },
142
- // Inputs para el cambio de color mediante a texto( hexadecimal o rgb )
143
- "&:nth-of-type(3)": {
144
- padding: "0px !important",
145
- "& > div": {
146
- // Estilos compartidos para las cajas de color
147
- "&:nth-of-type(1), &:nth-of-type(2), &:nth-of-type(3), &:nth-of-type(4), &:nth-of-type(5)": {
148
- padding: "0px !important",
149
- "& div": {
150
- display: "flex !important",
151
- flexDirection: "column-reverse !important",
152
- "& label": {
153
- textAlign: "left !important",
154
- color: `${theme.vars.palette.text.secondary} !important`,
155
- textTransform: "uppercase !important",
156
- padding: "0px !important"
157
- },
158
- "& input": {
159
- outline: `1px solid ${theme.vars.palette.border.default}`,
160
- borderRadius: theme.vars.size.borderRadius.r1,
161
- background: theme.vars.palette.background.default,
162
- color: theme.vars.palette.text.primary,
163
- boxShadow: "none !important",
164
- "&:hover": {
165
- background: theme.vars.palette.primary.hoverOpacity
166
- },
167
- "&:focus-visible": {
168
- outlineColor: theme.vars.palette.primary.focusVisible
169
- },
170
- "&:active": {
171
- outlineColor: theme.vars.palette.primary.active
172
- }
173
- }
174
- }
175
- }
176
- }
177
- },
178
- //Colores en grid varios del componente de react-color
179
- "&:nth-of-type(4)": {
180
- paddingTop: "0px !important"
181
- }
182
- },
183
- "& .flexbox-fix": {
184
- border: "0px !important"
185
- }
186
68
  })
187
69
  };
188
70
  export {
@@ -1,6 +1,4 @@
1
1
  export declare enum ColorSlots {
2
2
  root = "root",
3
- colorPicker = "colorPicker",
4
- popover = "popover",
5
- sketchPicker = "sketchPicker"
3
+ color = "color"
6
4
  }
@@ -1,8 +1,6 @@
1
1
  var ColorSlots = /* @__PURE__ */ ((ColorSlots2) => {
2
2
  ColorSlots2["root"] = "root";
3
- ColorSlots2["colorPicker"] = "colorPicker";
4
- ColorSlots2["popover"] = "popover";
5
- ColorSlots2["sketchPicker"] = "sketchPicker";
3
+ ColorSlots2["color"] = "color";
6
4
  return ColorSlots2;
7
5
  })(ColorSlots || {});
8
6
  export {
@@ -1,27 +1,12 @@
1
- import { SketchPicker } from 'react-color';
2
1
  /**
3
2
  * Componente estilizado de IconButton como el contenedor raíz del componente de color.
4
3
  */
5
- export declare const IconButtonRootStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "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" | "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" | "instaceDataTestId" | "placement" | "rotationAngle" | "ariaLabel" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
4
+ export declare const RootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
6
5
  ownerState?: (Partial<import('../types').ColorOwnerState> & Record<string, unknown>) | undefined;
7
- }, {}, {}>;
6
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
8
7
  /**
9
8
  * Componente envoltorio `div` que representa el color que recibe por la prop `value`.
10
9
  */
11
- export declare const ColorPickerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
10
+ export declare const ColorStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
12
11
  ownerState?: (Partial<import('../types').ColorOwnerState> & Record<string, unknown>) | undefined;
13
12
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
14
- /**
15
- * Componente `Popover` de M4L.
16
- */
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> & {
18
- ownerState?: (Partial<import('../types').ColorOwnerState> & Record<string, unknown>) | undefined;
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>) | undefined;
25
- }, {}, {
26
- ref?: import('react').Ref<SketchPicker> | undefined;
27
- }>;
@@ -1,29 +1,16 @@
1
- import { SketchPicker } from "react-color";
2
1
  import { styled } from "@mui/material/styles";
3
2
  import { C as COLOR_KEY_COMPONENT } from "../constants.js";
4
3
  import { c as colorStyles } from "../Color.styles.js";
5
4
  import { C as ColorSlots } from "./ColorEnum.js";
6
- import { P as Popover } from "../../mui_extended/Popover/Popover.js";
7
- import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
8
- const IconButtonRootStyled = styled(IconButton, {
5
+ const RootStyled = styled("div", {
9
6
  name: COLOR_KEY_COMPONENT,
10
7
  slot: ColorSlots.root
11
8
  })(colorStyles?.root);
12
- const ColorPickerStyled = styled("div", {
9
+ const ColorStyled = styled("div", {
13
10
  name: COLOR_KEY_COMPONENT,
14
- slot: ColorSlots.colorPicker
15
- })(colorStyles?.colorPicker);
16
- const PopoverStyled = styled(Popover, {
17
- name: COLOR_KEY_COMPONENT,
18
- slot: ColorSlots.popover
19
- })(colorStyles?.popover);
20
- const SketchPickerStyled = styled(SketchPicker, {
21
- name: COLOR_KEY_COMPONENT,
22
- slot: ColorSlots.sketchPicker
23
- })(colorStyles?.sketchPicker);
11
+ slot: ColorSlots.color
12
+ })(colorStyles?.color);
24
13
  export {
25
- ColorPickerStyled as C,
26
- IconButtonRootStyled as I,
27
- PopoverStyled as P,
28
- SketchPickerStyled as S
14
+ ColorStyled as C,
15
+ RootStyled as R
29
16
  };
@@ -1,5 +1,4 @@
1
1
  import { Theme } from '@mui/material/styles';
2
- import { IconButtonProps as MUIIconButtonProps } from '@mui/material';
3
2
  import { Sizes } from '@m4l/styles';
4
3
  import { M4LOverridesStyleRules } from '../../@types/augmentations';
5
4
  import { COLOR_KEY_COMPONENT } from './constants';
@@ -9,7 +8,7 @@ import { ColorSlots } from './slots';
9
8
  *
10
9
  * Esta interfaz define las propiedades que el componente `Color` acepta. Se basa en las propiedades de `MUIIconButtonProps`.
11
10
  */
12
- export interface ColorProps extends Omit<MUIIconButtonProps, 'size' | 'value' | 'onChange'> {
11
+ export interface ColorProps {
13
12
  /**
14
13
  * Define el color que tendrá el componente.
15
14
  * Puede ser un color en formato de string o `null`/`undefined` para mostrar un ícono predeterminado.
@@ -24,14 +23,14 @@ export interface ColorProps extends Omit<MUIIconButtonProps, 'size' | 'value' |
24
23
  * Indica si el componente está en estado de error
25
24
  */
26
25
  error?: boolean;
27
- /**
28
- * Evento que se dispara cuando el color del componente cambia.
29
- */
30
- onChange: (color: string | null) => void;
31
26
  /**
32
27
  * testId
33
28
  */
34
29
  dataTestId?: string;
30
+ /**
31
+ * Clases personalizadas
32
+ */
33
+ className?: string;
35
34
  }
36
35
  /**
37
36
  * Tipo para las ranuras del componente `Color`.
@@ -44,7 +43,7 @@ export type ColorSlotsType = keyof typeof ColorSlots;
44
43
  * Este tipo se utiliza para describir el estado completo del componente `Color`, incluyendo
45
44
  * las propiedades pasadas al componente y el estado calculado como el color de la paleta y el estado de esqueleto.
46
45
  */
47
- export type ColorOwnerState = Pick<ColorProps, 'size' | 'value' | 'error' | 'disabled'>;
46
+ export type ColorOwnerState = Pick<ColorProps, 'size' | 'value' | 'error'>;
48
47
  /**
49
48
  * Tipos de estilos para el componente `Color`.
50
49
  * Esta interfaz extiende las reglas de estilo personalizadas para las ranuras del componente (`ColorSlots`)
@@ -4,7 +4,7 @@ import { F as FilterProvider } from "./contexts/FilterContext/index.js";
4
4
  import { D as DataGridProvider } from "./contexts/DataGridContext/index.js";
5
5
  import { T as TEST_PROP_COLUMNS } from "./types.js";
6
6
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.js";
7
- import { a as getNameDataTestId } from "../../test/getNameDataTestId.js";
7
+ import { g as getNameDataTestId } from "../../test/getNameDataTestId.js";
8
8
  import { T as TEST_SKELETON, D as DATAGRID_PREFIX_NAME } from "./constants.js";
9
9
  import { D as DataGridRootStyled, C as CustomHeaderStyled } from "./slots/DataGridSlot.js";
10
10
  import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";