@m4l/components 9.1.59 → 9.1.61

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 (93) hide show
  1. package/components/AccountPopover/AccountPopover.d.ts +1 -1
  2. package/components/AccountPopover/AccountPopover.styles.js +16 -16
  3. package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.d.ts +1 -1
  4. package/components/AccountPopover/types.d.ts +2 -2
  5. package/components/AppBar/AppBar.d.ts +1 -1
  6. package/components/AppBar/styles.js +8 -8
  7. package/components/AppBar/types.d.ts +1 -1
  8. package/components/BaseModule/BaseModule.d.ts +1 -1
  9. package/components/Chip/Chip.d.ts +2 -2
  10. package/components/Chip/ChipStyles.js +10 -10
  11. package/components/Chip/types.d.ts +13 -0
  12. package/components/Color/Color.d.ts +4 -0
  13. package/components/Color/Color.styles.d.ts +1 -0
  14. package/components/Color/Color.styles.js +11 -0
  15. package/components/CommonActions/components/ActionFormIntro/index.d.ts +1 -1
  16. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.d.ts +4 -0
  17. package/components/DynamicFilter/types.d.ts +18 -0
  18. package/components/HelperError/HelperError.d.ts +2 -2
  19. package/components/HelperError/HelperError.styles.js +4 -4
  20. package/components/Icon/types.d.ts +1 -1
  21. package/components/Label/Label.d.ts +4 -4
  22. package/components/Label/Label.styles.js +10 -10
  23. package/components/MFIsolationApp/MFIsolationApp.d.ts +1 -1
  24. package/components/MenuActions/MenuActions.d.ts +1 -1
  25. package/components/MenuActions/types.d.ts +4 -4
  26. package/components/PrintingSystem/types.d.ts +23 -0
  27. package/components/PropertyValue/PropertyValue.styles.js +6 -6
  28. package/components/SideBar/SideBar.d.ts +1 -1
  29. package/components/SideBar/subcomponents/ContentComponent/index.d.ts +1 -1
  30. package/components/SideBar/subcomponents/ContentGroups/index.d.ts +2 -0
  31. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +2 -2
  32. package/components/SideBar/subcomponents/SideBarDesktop/index.d.ts +1 -1
  33. package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -0
  34. package/components/SideBar/tests/SideBar.integration.test.d.ts +1 -0
  35. package/components/WindowConfirm/WindowConfirm.styles.js +16 -16
  36. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index.d.ts +4 -4
  37. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +2 -2
  38. package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +8 -0
  39. package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +4 -0
  40. package/components/hook-form/RHFAutocomplete/types.d.ts +2 -0
  41. package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.d.ts +4 -0
  42. package/components/hook-form/RHFCheckbox/RHFCheckbox.js +1 -1
  43. package/components/hook-form/RHFColorPicker/RFHColorPicker.d.ts +2 -2
  44. package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.d.ts +1 -0
  45. package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.js +12 -0
  46. package/components/hook-form/RHFPeriod/RHFPeriod.d.ts +2 -2
  47. package/components/hook-form/RHFPeriod/RHFPeriod.styles.js +10 -10
  48. package/components/hook-form/RHFPeriod/subcomponents/Period/Period.d.ts +2 -2
  49. package/components/hook-form/RHFTextField/RHFTextField.d.ts +1 -1
  50. package/components/hook-form/RHFTextField/RHFTextField.styles.js +1 -1
  51. package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.d.ts +1 -0
  52. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.js +1 -1
  53. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/index.d.ts +4 -0
  54. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index.d.ts +4 -0
  55. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.d.ts +1 -1
  56. package/components/mui_extended/Autocomplete/Autocomplete.styles.js +19 -14
  57. package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +2 -2
  58. package/components/mui_extended/Button/Button.d.ts +1 -1
  59. package/components/mui_extended/Button/ButtonStyles.js +3 -3
  60. package/components/mui_extended/CheckBox/CheckBox.d.ts +1 -1
  61. package/components/mui_extended/CheckBox/CheckBox.js +42 -34
  62. package/components/mui_extended/CheckBox/CheckBox.styles.js +60 -68
  63. package/components/mui_extended/CheckBox/slots/CheckBoxEnum.d.ts +4 -2
  64. package/components/mui_extended/CheckBox/slots/CheckBoxEnum.js +3 -1
  65. package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +7 -1
  66. package/components/mui_extended/CheckBox/slots/CheckBoxSlots.js +20 -9
  67. package/components/mui_extended/CheckBox/test/CheckBox.test.d.ts +1 -0
  68. package/components/mui_extended/CheckBox/types.d.ts +11 -18
  69. package/components/mui_extended/CircularProgress/CircularProgress.d.ts +4 -0
  70. package/components/mui_extended/Dialog/Dialog.d.ts +2 -2
  71. package/components/mui_extended/IconButton/IconButton.styles.js +4 -4
  72. package/components/mui_extended/LoadingButton/LoadingButton.d.ts +1 -1
  73. package/components/mui_extended/LoadingButton/LoadingButton.styles.js +3 -3
  74. package/components/mui_extended/MenuItem/MenuItem.d.ts +1 -1
  75. package/components/mui_extended/MenuItem/MenuItem.styles.js +15 -7
  76. package/components/mui_extended/Popover/Popover.d.ts +1 -1
  77. package/components/mui_extended/Select/Select.d.ts +1 -1
  78. package/components/mui_extended/Select/Select.js +1 -1
  79. package/components/mui_extended/Select/Select.styles.js +8 -8
  80. package/components/mui_extended/Select/types.d.ts +1 -1
  81. package/components/mui_extended/TextField/TextField.d.ts +1 -1
  82. package/components/mui_extended/TextField/TextField.styles.js +2 -2
  83. package/components/mui_extended/Typography/Typography.d.ts +2 -2
  84. package/components/mui_extended/Typography/Typography.js +6 -4
  85. package/components/mui_extended/Typography/types.d.ts +8 -5
  86. package/components/mui_extended/Typography/typography.styles.js +7 -7
  87. package/hooks/useFormFocus/index.d.ts +5 -1
  88. package/package.json +1 -1
  89. package/test/HostThemeProviderMock.d.ts +1 -1
  90. package/test/TestAppWrapper.d.ts +1 -1
  91. package/test/TestFormAutoValidation.d.ts +4 -0
  92. package/utils/getHeightSizeStyles.d.ts +4 -0
  93. package/utils/getTypographyStyles.d.ts +4 -0
@@ -1,14 +1,14 @@
1
1
  const rhfPeriodStyles = {
2
2
  /**
3
3
  * root class
4
- * @updatedUser cesar - automatic
5
- * @updatedAt 2025-01-03 14:54:18 - automatic
4
+ * @updatedUser Andrés Quintero - automatic
5
+ * @updatedAt 2025-01-08 10:36:41 - automatic
6
6
  * @createdAt 2024-12-27 16:45:26 - automatic
7
7
  * @author cesar - automatic
8
8
  * @author cesar - automatic
9
9
  * @createdAt 2024-11-21 08:55:01 - automatic
10
- * @updatedAt 2025-01-03 14:54:18 - automatic
11
- * @updatedUser cesar - automatic
10
+ * @updatedAt 2025-01-08 10:36:41 - automatic
11
+ * @updatedUser Andrés Quintero - automatic
12
12
  */
13
13
  root: ({ theme }) => ({
14
14
  width: "270px",
@@ -22,8 +22,8 @@ const rhfPeriodStyles = {
22
22
  * periodRoot class
23
23
  * @author cesar - automatic
24
24
  * @createdAt 2024-12-30 07:34:10 - automatic
25
- * @updatedAt 2025-01-03 14:54:18 - automatic
26
- * @updatedUser cesar - automatic
25
+ * @updatedAt 2025-01-08 10:36:41 - automatic
26
+ * @updatedUser Andrés Quintero - automatic
27
27
  */
28
28
  periodRoot: ({ theme }) => ({
29
29
  width: "100%",
@@ -36,8 +36,8 @@ const rhfPeriodStyles = {
36
36
  * textField class
37
37
  * @author cesar - automatic
38
38
  * @createdAt 2024-12-30 07:34:10 - automatic
39
- * @updatedAt 2025-01-03 14:54:18 - automatic
40
- * @updatedUser cesar - automatic
39
+ * @updatedAt 2025-01-08 10:36:41 - automatic
40
+ * @updatedUser Andrés Quintero - automatic
41
41
  */
42
42
  textField: ({ theme }) => ({
43
43
  borderRadius: "50px",
@@ -49,8 +49,8 @@ const rhfPeriodStyles = {
49
49
  * select class
50
50
  * @author cesar - automatic
51
51
  * @createdAt 2024-12-30 16:21:22 - automatic
52
- * @updatedAt 2025-01-03 14:54:18 - automatic
53
- * @updatedUser cesar - automatic
52
+ * @updatedAt 2025-01-08 10:36:41 - automatic
53
+ * @updatedUser Andrés Quintero - automatic
54
54
  */
55
55
  select: () => ({
56
56
  width: "100px"
@@ -3,7 +3,7 @@ import { PeriodProps } from './types';
3
3
  * Componente que renderiza un campo de formulario para ingresar un período.
4
4
  * @author cesar - automatic
5
5
  * @createdAt 2024-12-30 16:32:50 - automatic
6
- * @updatedAt 2025-01-03 08:17:13 - automatic
7
- * @updatedUser cesar - automatic
6
+ * @updatedAt 2025-01-08 10:36:41 - automatic
7
+ * @updatedUser Andrés Quintero - automatic
8
8
  */
9
9
  export declare const Period: ({ value: valuePeriod, onChange, size, disabled, error }: PeriodProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { RHFTextFieldProps } from './types';
3
3
  * Provee de un campo de texto vinculado al formulario de hook-forms, aporta su versión provisional de carga en red.
4
4
  * @author Bruce Escobar - automatic
5
5
  * @createdAt 2024-10-22 19:27:22 - automatic
6
- * @updatedAt 2024-12-30 14:36:10 - automatic
6
+ * @updatedAt 2025-01-08 10:36:41 - automatic
7
7
  * @updatedUser Andrés Quintero - automatic
8
8
  */
9
9
  export declare const RHFTextField: import('react').ForwardRefExoticComponent<Omit<RHFTextFieldProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -3,7 +3,7 @@ const rhfTextFieldStyles = {
3
3
  * Elemento Root
4
4
  * @author Andrés Quintero - automatic
5
5
  * @createdAt 2024-12-27 08:27:31 - automatic
6
- * @updatedAt 2024-12-30 14:36:10 - automatic
6
+ * @updatedAt 2025-01-08 10:36:41 - automatic
7
7
  * @updatedUser Andrés Quintero - automatic
8
8
  */
9
9
  root: ({ theme }) => ({
@@ -4,6 +4,7 @@ import { RHFTextFieldPasswordProps } from './types';
4
4
  * de carga en red y el funcionamiento para ocultar y visualizar la contraseña.
5
5
  * @param props
6
6
  * @returns
7
+ * @createdAt 2025-01-08 10:36:40 - automatic
7
8
  */
8
9
  /**
9
10
  * Props del componente RHFTextFieldPassword
@@ -109,7 +109,7 @@ function MapSourcesTool() {
109
109
  {
110
110
  disabled: currentMapSourceId !== mapSourceOption.id,
111
111
  checked: mapSourceOption.roadSeletedOptions?.bicyclingLayer || false,
112
- label: "Bycicle",
112
+ inlineText: "Bycicle",
113
113
  onChange: (_e, checked) => {
114
114
  setMapSourceRoadMapOptions({ bicyclingLayer: checked });
115
115
  }
@@ -1,5 +1,9 @@
1
1
  /**
2
2
  * subComponente que visualizar la medida que actualmente se haciendo sobre el mapa
3
3
  * @returns
4
+ * @author Andrés Quintero - automatic
5
+ * @createdAt 2025-01-08 10:36:40 - automatic
6
+ * @updatedAt 2025-01-08 10:36:41 - automatic
7
+ * @updatedUser Andrés Quintero - automatic
4
8
  */
5
9
  export declare function MeasureData(): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,8 @@
1
1
  /**
2
2
  * TODO: Documentar
3
+ * @author Andrés Quintero - automatic
4
+ * @createdAt 2025-01-08 10:36:40 - automatic
5
+ * @updatedAt 2025-01-08 10:36:41 - automatic
6
+ * @updatedUser Andrés Quintero - automatic
3
7
  */
4
8
  export declare function GeneralData(): import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { MyActionsProps } from './types';
3
3
  * TODO: Documentar
4
4
  * @author SebastianM - automatic
5
5
  * @createdAt 2024-11-06 09:00:05 - automatic
6
- * @updatedAt 2024-12-31 11:23:53 - automatic
6
+ * @updatedAt 2025-01-03 11:42:14 - automatic
7
7
  * @updatedUser Andrés Quintero - automatic
8
8
  */
9
9
  export declare function MyActions(props: MyActionsProps): import("react/jsx-runtime").JSX.Element;
@@ -4,8 +4,8 @@ const autocompleteSyles = {
4
4
  * Styles for the icon button component.
5
5
  * @author SebastianM - automatic
6
6
  * @createdAt 2024-12-05 14:14:39 - automatic
7
- * @updatedAt 2024-12-10 15:24:11 - automatic
8
- * @updatedUser SebastianM - automatic
7
+ * @updatedAt 2025-01-08 10:36:41 - automatic
8
+ * @updatedUser Andrés Quintero - automatic
9
9
  */
10
10
  iconButton: () => ({
11
11
  position: "absolute",
@@ -25,11 +25,16 @@ const autocompleteSyles = {
25
25
  autocomplete: {},
26
26
  /**
27
27
  * Styles for the typography component.
28
+ * @createdAt 2025-01-08 10:36:40 - automatic
28
29
  */
29
30
  typography: {},
30
31
  menuList: {},
31
32
  /**
32
33
  * Styles for the menu item component.
34
+ * @author Andrés Quintero - automatic
35
+ * @createdAt 2025-01-08 10:36:40 - automatic
36
+ * @updatedAt 2025-01-08 10:36:41 - automatic
37
+ * @updatedUser Andrés Quintero - automatic
33
38
  */
34
39
  menuItem: ({ theme }) => ({
35
40
  padding: `${theme.vars.size.baseSpacings.sp1}!important`,
@@ -39,8 +44,8 @@ const autocompleteSyles = {
39
44
  * Styles for the image component.
40
45
  * @author SebastianM - automatic
41
46
  * @createdAt 2024-12-02 07:14:21 - automatic
42
- * @updatedAt 2024-12-10 15:24:11 - automatic
43
- * @updatedUser SebastianM - automatic
47
+ * @updatedAt 2025-01-08 10:36:41 - automatic
48
+ * @updatedUser Andrés Quintero - automatic
44
49
  */
45
50
  image: ({ theme }) => ({
46
51
  width: `${theme.vars.size.baseSpacings.sp4} !important`,
@@ -50,8 +55,8 @@ const autocompleteSyles = {
50
55
  * Styles for the chip component.
51
56
  * @author SebastianM - automatic
52
57
  * @createdAt 2024-11-26 12:36:08 - automatic
53
- * @updatedAt 2024-12-10 15:24:11 - automatic
54
- * @updatedUser SebastianM - automatic
58
+ * @updatedAt 2025-01-08 10:36:41 - automatic
59
+ * @updatedUser Andrés Quintero - automatic
55
60
  */
56
61
  chip: ({ theme }) => ({
57
62
  "& .M4LIconClass-root": {
@@ -62,8 +67,8 @@ const autocompleteSyles = {
62
67
  * Styles for the text field component.
63
68
  * @author SebastianM - automatic
64
69
  * @createdAt 2024-11-26 12:36:08 - automatic
65
- * @updatedAt 2024-12-10 15:24:11 - automatic
66
- * @updatedUser SebastianM - automatic
70
+ * @updatedAt 2025-01-08 10:36:41 - automatic
71
+ * @updatedUser Andrés Quintero - automatic
67
72
  */
68
73
  textField: ({ theme }) => ({
69
74
  // position: 'relative',
@@ -77,8 +82,8 @@ const autocompleteSyles = {
77
82
  * Styles for the popper component.
78
83
  * @author SebastianM - automatic
79
84
  * @createdAt 2024-11-26 12:36:08 - automatic
80
- * @updatedAt 2024-12-10 15:24:11 - automatic
81
- * @updatedUser SebastianM - automatic
85
+ * @updatedAt 2025-01-08 10:36:41 - automatic
86
+ * @updatedUser Andrés Quintero - automatic
82
87
  */
83
88
  popper: ({ theme }) => ({
84
89
  ...theme.typography.body1,
@@ -90,8 +95,8 @@ const autocompleteSyles = {
90
95
  * Styles for the popover component.
91
96
  * @author SebastianM - automatic
92
97
  * @createdAt 2024-11-26 12:36:08 - automatic
93
- * @updatedAt 2024-12-10 15:24:11 - automatic
94
- * @updatedUser SebastianM - automatic
98
+ * @updatedAt 2025-01-08 10:36:41 - automatic
99
+ * @updatedUser Andrés Quintero - automatic
95
100
  */
96
101
  circularProgress: ({ theme }) => ({
97
102
  position: "absolute",
@@ -103,8 +108,8 @@ const autocompleteSyles = {
103
108
  * Styles for the skeleton autocomplete component.
104
109
  * @author SebastianM - automatic
105
110
  * @createdAt 2024-11-21 15:23:15 - automatic
106
- * @updatedAt 2024-12-10 15:24:11 - automatic
107
- * @updatedUser SebastianM - automatic
111
+ * @updatedAt 2025-01-08 10:36:41 - automatic
112
+ * @updatedUser Andrés Quintero - automatic
108
113
  */
109
114
  skeletonAutocomplete: ({ theme, ownerState }) => {
110
115
  return {
@@ -6,8 +6,8 @@ import { Sizes } from '@m4l/styles';
6
6
  * @param color - The color for the MenuItem.
7
7
  * @author SebastianM - automatic
8
8
  * @createdAt 2024-11-28 18:58:00 - automatic
9
- * @updatedAt 2024-11-29 10:03:38 - automatic
10
- * @updatedUser SebastianM - automatic
9
+ * @updatedAt 2025-01-08 10:36:41 - automatic
10
+ * @updatedUser Andrés Quintero - automatic
11
11
  */
12
12
  export declare function renderOption<T>(optionProps: HTMLAttributes<HTMLLIElement>, option: T & {
13
13
  label: string;
@@ -7,7 +7,7 @@ import { ButtonProps } from './types';
7
7
  * @returns
8
8
  * @author SebastianM - automatic
9
9
  * @createdAt 2024-11-06 07:42:00 - automatic
10
- * @updatedAt 2024-12-31 11:23:53 - automatic
10
+ * @updatedAt 2025-01-03 11:42:14 - automatic
11
11
  * @updatedUser Andrés Quintero - automatic
12
12
  */
13
13
  export declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -3,7 +3,7 @@ const buttonStyles = {
3
3
  * Styles for the root element of the button component.
4
4
  * @author SebastianM - automatic
5
5
  * @createdAt 2024-11-06 07:42:00 - automatic
6
- * @updatedAt 2024-12-31 11:23:53 - automatic
6
+ * @updatedAt 2025-01-03 11:42:14 - automatic
7
7
  * @updatedUser Andrés Quintero - automatic
8
8
  */
9
9
  buttonRoot: ({ theme, ownerState }) => ({
@@ -145,7 +145,7 @@ const buttonStyles = {
145
145
  * Styles for the text of the button component.
146
146
  * @author SebastianM - automatic
147
147
  * @createdAt 2024-11-07 18:00:35 - automatic
148
- * @updatedAt 2024-12-31 11:23:53 - automatic
148
+ * @updatedAt 2025-01-03 11:42:14 - automatic
149
149
  * @updatedUser Andrés Quintero - automatic
150
150
  */
151
151
  textButton: ({ theme, ownerState }) => ({
@@ -173,7 +173,7 @@ const buttonStyles = {
173
173
  * Styles for the skeleton button component.
174
174
  * @author SebastianM - automatic
175
175
  * @createdAt 2024-11-06 10:12:30 - automatic
176
- * @updatedAt 2024-12-31 11:23:53 - automatic
176
+ * @updatedAt 2025-01-03 11:42:14 - automatic
177
177
  * @updatedUser Andrés Quintero - automatic
178
178
  */
179
179
  skeletonButton: ({ theme, ownerState }) => ({
@@ -21,4 +21,4 @@ import { CheckboxProps } from './types';
21
21
  * />
22
22
  * ```
23
23
  */
24
- export declare const CheckBox: import('react').ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
24
+ export declare const CheckBox: import('react').ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,66 +1,74 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
- import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
4
- import { useTheme } from "@mui/material";
2
+ import { forwardRef, useId } from "react";
3
+ import { useModuleSkeleton, useEnvironment } from "@m4l/core";
4
+ import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
5
+ import { C as CHECK_BOX_KEY_COMPONENT } from "./constants.js";
6
+ import clsx from "clsx";
5
7
  import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
6
- import { C as CheckBoxRootStyled, M as MUICheckboxStyled, L as LabelCheckBoxStyled, S as SkeletonStyled } from "./slots/CheckBoxSlots.js";
7
- const CheckBox = forwardRef((props, ref) => {
8
+ import { C as CheckBoxRootStyled, M as MUICheckboxStyled, I as IconCheckedStyled, a as IconStyled, T as TypographyStyled, S as SkeletonStyled } from "./slots/CheckBoxSlots.js";
9
+ import { C as CheckBoxSlots } from "./slots/CheckBoxEnum.js";
10
+ const CheckBox = forwardRef((props) => {
8
11
  const {
9
12
  className,
10
- size = "small",
13
+ size = "medium",
11
14
  disabled,
12
- color = "primary",
13
- label,
15
+ color = "default",
14
16
  mandatory,
15
17
  mandatoryMessage,
16
18
  helperMessage,
19
+ id,
17
20
  htmlFor,
18
21
  error,
22
+ inlineText,
23
+ checked,
19
24
  ...others
20
25
  } = props;
21
26
  const { currentSize } = useComponentSize(size);
22
- const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
23
27
  const isSkeleton = useModuleSkeleton();
24
- const theme = useTheme();
25
- const paletteColor = getPropertyByString(
26
- theme.palette,
27
- disabled ? "default" : error ? "error" : color,
28
- theme.palette.default
29
- );
28
+ const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
29
+ const classes = getComponentClasses(CHECK_BOX_KEY_COMPONENT, CheckBoxSlots);
30
+ const { host_static_assets, environment_assets } = useEnvironment();
31
+ const hookId = useId();
32
+ const finalId = id || hookId;
33
+ const checkedIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/check_box/assets/icons/checked.svg`;
34
+ const uncheckedIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/check_box/assets/icons/unchecked.svg`;
30
35
  const ownerState = {
31
- CheckBoxPaletteColor: paletteColor,
32
- CheckBoxDisabled: disabled,
33
- CheckBoxColor: color,
34
- CheckBoxError: error,
35
- CheckBoxSizes: adjustedSize
36
+ disabled,
37
+ color,
38
+ error,
39
+ size,
40
+ checked
36
41
  };
37
- return /* @__PURE__ */ jsx(CheckBoxRootStyled, { ref, ownerState: { ...ownerState }, children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
42
+ return /* @__PURE__ */ jsx(CheckBoxRootStyled, { ownerState: { ...ownerState }, className: clsx(className, classes.root), children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
38
43
  /* @__PURE__ */ jsx(
39
44
  MUICheckboxStyled,
40
45
  {
41
- ownerState: { ownerState },
46
+ ownerState: { ...ownerState },
42
47
  disableRipple: true,
43
- id: htmlFor,
44
- tabIndex: 0,
48
+ id: finalId,
49
+ checked,
50
+ checkedIcon: /* @__PURE__ */ jsx(IconCheckedStyled, { src: checkedIconUrl, size: currentSize, color: disabled ? "text.disabled" : error ? "error.main" : "primary.main", ownerState: { ...ownerState } }),
51
+ icon: /* @__PURE__ */ jsx(IconStyled, { src: uncheckedIconUrl, size: currentSize, ownerState: { ...ownerState }, color: disabled ? "text.disabled" : error ? "error.main" : "text.primary" }),
52
+ disabled,
53
+ inputProps: { "aria-labelledby": finalId, "aria-invalid": error ? "true" : void 0 },
45
54
  ...others
46
55
  }
47
56
  ),
48
- label && /* @__PURE__ */ jsx(
49
- LabelCheckBoxStyled,
57
+ inlineText && /* @__PURE__ */ jsx(
58
+ TypographyStyled,
50
59
  {
60
+ component: "label",
61
+ htmlFor: finalId,
62
+ variant: "body",
51
63
  ownerState: { ...ownerState },
52
- label,
53
- className: "MuiTypography-checkbox",
54
- mandatory,
55
- mandatoryMessage,
56
- helperMessage,
57
- htmlFor,
58
- disabled
64
+ size: adjustedSize,
65
+ disabled,
66
+ children: inlineText
59
67
  }
60
68
  )
61
69
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
62
70
  /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "rounded", width: "24px", height: "24px" }),
63
- label && /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "text", width: "100px", height: "24px" })
71
+ inlineText ? /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "text", width: "100px", height: "24px" }) : null
64
72
  ] }) });
65
73
  });
66
74
  export {
@@ -1,92 +1,84 @@
1
1
  const checkBoxStyles = {
2
2
  /**
3
3
  * Estilos generales para el checkbox
4
- * @author Andrés Quintero - automatic
5
- * @createdAt 2024-12-30 14:36:06 - automatic
6
- * @updatedAt 2024-12-30 14:36:10 - automatic
7
- * @updatedUser Andrés Quintero - automatic
8
4
  */
9
- root: ({ theme, ownerState }) => ({
10
- display: "flex",
11
- alignItems: "center",
12
- outline: "none",
13
- paddingRight: theme.vars.size.baseSpacings.sp1,
14
- overflow: "visible",
15
- boxSizing: "border-box",
16
- gap: theme.vars.size.baseSpacings.sp1,
17
- //Estilos para el checkbox
18
- "& .MuiCheckbox-root": {
19
- color: ownerState.CheckBoxPaletteColor?.main || theme.vars.palette?.text.primary,
5
+ root: ({ theme }) => {
6
+ return {
7
+ display: "flex",
8
+ alignItems: "center",
9
+ outline: "none",
10
+ paddingRight: theme.vars.size.baseSpacings.sp1,
11
+ overflow: "visible",
12
+ boxSizing: "border-box",
13
+ gap: theme.vars.size.baseSpacings.sp1
14
+ // height: theme.vars.size[device][size].action,
15
+ };
16
+ },
17
+ /**
18
+ * Componente MuiCheckBox, FocusVisible para cuando esta seleccionado el CheckBox
19
+ */
20
+ muiCheckBox: ({ theme, ownerState }) => {
21
+ const color = ownerState.error ? "error" : "primary";
22
+ const opacityColor = ownerState.error ? "error" : "default";
23
+ const device = theme.generalSettings.isMobile ? "mobile" : "desktop";
24
+ const size = ownerState.size ?? "medium";
25
+ return {
26
+ overflow: "visible",
27
+ height: theme.vars.size[device][size].action,
28
+ width: theme.vars.size[device][size].action,
20
29
  borderRadius: theme.size.borderRadius.r1,
30
+ "&:hover": {
31
+ backgroundColor: theme.vars.palette[opacityColor].hoverOpacity
32
+ },
21
33
  "&:active": {
22
- color: ownerState.CheckBoxPaletteColor?.active,
23
- backgroundColor: ownerState.CheckBoxPaletteColor?.activeOpacity
34
+ backgroundColor: theme.vars.palette[opacityColor].activeOpacity
24
35
  },
25
36
  "&.Mui-checked": {
26
- borderRadius: theme.size.borderRadius.r1,
27
- color: ownerState.CheckBoxPaletteColor?.main,
28
- "&:active": {
29
- color: ownerState.CheckBoxPaletteColor?.active,
30
- backgroundColor: ownerState.CheckBoxPaletteColor?.activeOpacity
31
- },
32
37
  "&:hover": {
33
- color: ownerState.CheckBoxPaletteColor?.hover,
34
- backgroundColor: ownerState.CheckBoxPaletteColor?.hoverOpacity
38
+ backgroundColor: theme.vars.palette[color].hoverOpacity,
39
+ "& .M4LIcon-icon": {
40
+ backgroundColor: theme.vars.palette[color].hover
41
+ }
42
+ },
43
+ "&:active": {
44
+ backgroundColor: theme.vars.palette[color].activeOpacity,
45
+ "& .M4LIcon-icon": {
46
+ backgroundColor: theme.vars.palette[color].active
47
+ }
35
48
  }
36
49
  },
50
+ "&.Mui-focusVisible, &:focus-visible": {
51
+ outline: `1px solid ${theme.vars.palette["primary"].focusVisible}`,
52
+ outlineOffset: 2
53
+ },
37
54
  // Historia Disabled para CheckBox
38
- ...ownerState.CheckBoxDisabled && {
39
- color: theme.vars.palette?.text.disabled,
40
- pointerEvents: ownerState.CheckBoxDisabled ? "none" : "auto",
55
+ ...ownerState.disabled && {
56
+ pointerEvents: ownerState.disabled ? "none" : "auto",
41
57
  "&:hover": {
42
- pointerEvents: ownerState.CheckBoxDisabled ? "none" : "auto"
58
+ pointerEvents: ownerState.disabled ? "none" : "auto"
43
59
  }
44
60
  }
45
- },
46
- //Estilos para el label del CheckBox Disabled
47
- "& .MuiTypography-root": {
48
- ...ownerState.CheckBoxDisabled && {
49
- color: `${theme.vars.palette?.text.disabled} !important`
50
- }
51
- },
52
- //Clase de estilo para cuando esta en estado hover pero no esta seleccionado el CheckBox
53
- "& .MuiCheckbox-root:not(.Mui-checked):hover": {
54
- backgroundColor: theme.palette.action.selected
55
- }
56
- }),
61
+ };
62
+ },
57
63
  /**
58
- * Componente MuiCheckBox, FocusVisible para cuando esta seleccionado el CheckBox
59
- * @author Andrés Quintero - automatic
60
- * @createdAt 2024-12-30 14:36:06 - automatic
61
- * @updatedAt 2024-12-30 14:36:10 - automatic
62
- * @updatedUser Andrés Quintero - automatic
64
+ * Estilos para el inline-text del CheckBox
63
65
  */
64
- muiCheckBox: ({ theme }) => ({
65
- overflow: "visible",
66
- "&.Mui-focusVisible, &:focus-visible": {
67
- "&::before": {
68
- content: '""',
69
- position: "absolute",
70
- inset: "0px",
71
- border: theme.vars.size.borderStroke.container,
72
- color: theme.vars.palette.primary.main,
73
- borderRadius: theme.vars.size.borderRadius.r1,
74
- boxSizing: "border-box"
75
- }
76
- },
77
- "&.MuiButtonBase-root": {}
66
+ skeletonStyled: ({ theme }) => ({
67
+ borderRadius: theme.vars.size.borderRadius.r1,
68
+ backgroundColor: theme.vars.palette?.skeleton.default
78
69
  }),
70
+ /**
71
+ * El estilado de este slot, se hace en muiCheckBox, debido a que el input absorve los psuedo selectore, entonces hay que hacerlos desde el nodo padre.
72
+ */
73
+ icon: {},
74
+ /**
75
+ * El estilado de este slot, se hace en muiCheckBox, debido a que el input absorve los psuedo selectore, entonces hay que hacerlos desde el nodo padre.
76
+ */
77
+ iconChecked: {},
79
78
  /**
80
79
  * Estilos para el label del CheckBox
81
- * @author Andrés Quintero - automatic
82
- * @createdAt 2024-12-30 14:36:06 - automatic
83
- * @updatedAt 2024-12-30 14:36:10 - automatic
84
- * @updatedUser Andrés Quintero - automatic
85
80
  */
86
- skeletonStyled: ({ theme }) => ({
87
- borderRadius: theme.vars.size.borderRadius.r1
88
- }),
89
- labelCheckBox: {}
81
+ typographyStyled: {}
90
82
  };
91
83
  export {
92
84
  checkBoxStyles as c
@@ -1,6 +1,8 @@
1
1
  export declare enum CheckBoxSlots {
2
2
  root = "root",
3
3
  muiCheckBox = "muiCheckBox",
4
- labelCheckBox = "labelCheckBox",
5
- skeletonStyled = "skeletonStyled"
4
+ typographyStyled = "typographyStyled",
5
+ skeletonStyled = "skeletonStyled",
6
+ iconChecked = "iconChecked",
7
+ icon = "icon"
6
8
  }
@@ -1,8 +1,10 @@
1
1
  var CheckBoxSlots = /* @__PURE__ */ ((CheckBoxSlots2) => {
2
2
  CheckBoxSlots2["root"] = "root";
3
3
  CheckBoxSlots2["muiCheckBox"] = "muiCheckBox";
4
- CheckBoxSlots2["labelCheckBox"] = "labelCheckBox";
4
+ CheckBoxSlots2["typographyStyled"] = "typographyStyled";
5
5
  CheckBoxSlots2["skeletonStyled"] = "skeletonStyled";
6
+ CheckBoxSlots2["iconChecked"] = "iconChecked";
7
+ CheckBoxSlots2["icon"] = "icon";
6
8
  return CheckBoxSlots2;
7
9
  })(CheckBoxSlots || {});
8
10
  export {
@@ -4,7 +4,7 @@ export declare const CheckBoxRootStyled: import('@emotion/styled').StyledCompone
4
4
  export declare const MUICheckboxStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').CheckboxProps, keyof import('@mui/material').CheckboxProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown> & {
5
5
  ownerState: Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown>;
6
6
  }, {}, {}>;
7
- export declare const LabelCheckBoxStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Label').LabelProps, keyof import('../../../Label').LabelProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown> & {
7
+ export declare const TypographyStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Typography/types').TypographyProps, keyof import('../../Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown> & {
8
8
  ownerState: Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown>;
9
9
  }, {}, {}>;
10
10
  export declare const SkeletonStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').SkeletonOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
@@ -12,3 +12,9 @@ export declare const SkeletonStyled: import('@emotion/styled').StyledComponent<P
12
12
  }, "children" | "style" | "variant" | "width" | "height" | "animation" | "sx" | "classes" | "className">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "variant" | "width" | "height" | "translate" | "animation" | "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" | "key"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown> & {
13
13
  ownerState: Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown>;
14
14
  }, {}, {}>;
15
+ export declare const IconCheckedStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Icon').IconProps, keyof import('../../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown> & {
16
+ ownerState: Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown>;
17
+ }, {}, {}>;
18
+ 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').CheckBoxOwnerState> & Record<string, unknown> & {
19
+ ownerState: Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown>;
20
+ }, {}, {}>;