@m4l/components 9.1.78 → 9.1.80

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 (48) hide show
  1. package/components/Label/Label.styles.js +32 -18
  2. package/components/NumberInput/NumberInput.js +124 -0
  3. package/components/NumberInput/NumberInput.styles.js +199 -0
  4. package/components/NumberInput/constants.js +4 -0
  5. package/components/NumberInput/hooks/useNumberInput/NumberInputActions.js +12 -0
  6. package/components/NumberInput/hooks/useNumberInput/NumberInputReducer.js +106 -0
  7. package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +364 -0
  8. package/components/NumberInput/slots/NumberInputEnum.js +13 -0
  9. package/components/NumberInput/slots/NumberInputSlots.js +43 -0
  10. package/components/NumberInput/utils.js +23 -0
  11. package/components/PropertyValue/PropertyValue.d.ts +1 -1
  12. package/components/PropertyValue/PropertyValue.js +5 -17
  13. package/components/PropertyValue/PropertyValue.styles.js +6 -6
  14. package/components/extended/React-Splitter/SplitLayout/SplitLayout.d.ts +14 -0
  15. package/components/extended/React-Splitter/SplitLayout/SplitLayout.js +53 -0
  16. package/components/extended/React-Splitter/SplitLayout/SplitLayout.styles.d.ts +2 -0
  17. package/components/extended/React-Splitter/SplitLayout/SplitLayout.styles.js +157 -0
  18. package/components/extended/React-Splitter/SplitLayout/constants.d.ts +9 -0
  19. package/components/extended/React-Splitter/SplitLayout/constants.js +6 -0
  20. package/components/extended/React-Splitter/SplitLayout/slots/SplitLayoutEnum.d.ts +5 -0
  21. package/components/extended/React-Splitter/SplitLayout/slots/SplitLayoutEnum.js +9 -0
  22. package/components/extended/React-Splitter/SplitLayout/slots/SplitLayoutSlots.d.ts +3 -0
  23. package/components/extended/React-Splitter/SplitLayout/slots/SplitLayoutSlots.js +21 -0
  24. package/components/extended/React-Splitter/SplitLayout/tests/SplitLayout.test.d.ts +1 -0
  25. package/components/{SplitLayout → extended/React-Splitter/SplitLayout}/types.d.ts +11 -5
  26. package/components/hook-form/RHFNumberInput/RHFNumberInput.js +89 -0
  27. package/components/hook-form/RHFNumberInput/RHFNumberInput.styles.js +16 -0
  28. package/components/hook-form/RHFNumberInput/constants.js +4 -0
  29. package/components/hook-form/RHFNumberInput/slots/RHFNumberInputEnum.js +7 -0
  30. package/components/hook-form/RHFNumberInput/slots/RHFNumberInputSlots.js +11 -0
  31. package/components/hook-form/index.d.ts +1 -0
  32. package/components/index.d.ts +2 -2
  33. package/index.js +23 -21
  34. package/package.json +1 -1
  35. package/components/SplitLayout/SplitLayout.d.ts +0 -16
  36. package/components/SplitLayout/SplitLayout.js +0 -57
  37. package/components/SplitLayout/classes/constants.d.ts +0 -1
  38. package/components/SplitLayout/classes/constants.js +0 -4
  39. package/components/SplitLayout/classes/index.d.ts +0 -17
  40. package/components/SplitLayout/classes/index.js +0 -33
  41. package/components/SplitLayout/classes/types.d.ts +0 -10
  42. package/components/SplitLayout/index.d.ts +0 -2
  43. package/components/SplitLayout/styles.d.ts +0 -3
  44. package/components/SplitLayout/styles.js +0 -29
  45. package/components/SplitLayout/tests/constants.d.ts +0 -1
  46. package/components/SplitLayout/tests/constants.js +0 -4
  47. package/components/SplitLayout/tests/utils.d.ts +0 -2
  48. package/components/SplitLayout/tests/utils.js +0 -7
@@ -0,0 +1,157 @@
1
+ const splitLayoutStyles = {
2
+ /**
3
+ * Estilos para root
4
+ */
5
+ root: ({ theme }) => ({
6
+ display: "flex",
7
+ flexDirection: "column",
8
+ position: "relative",
9
+ flexGrow: 1,
10
+ overflow: "hidden",
11
+ // Configuracion por defecto en horizontal
12
+ "& .splitter-layout": {
13
+ position: "absolute",
14
+ display: "flex",
15
+ flexDirection: "row",
16
+ width: "100%",
17
+ height: "100%",
18
+ overflow: "hidden",
19
+ gap: theme.vars.size.baseSpacings.sp2
20
+ },
21
+ // Configuracion de ambos paneles a dividir
22
+ "& .splitter-layout .layout-pane": {
23
+ position: "relative",
24
+ flex: "0 0 auto",
25
+ overflow: "hidden"
26
+ },
27
+ // Configuración del panel principal
28
+ "& .splitter-layout .layout-pane.layout-pane-primary": {
29
+ flex: "1 1 auto"
30
+ },
31
+ // Configuración del cursor en horizontal
32
+ "& .splitter-layout.layout-changing": {
33
+ cursor: "col-resize"
34
+ },
35
+ // Configuración barran grande cuando es horizontal
36
+ "& .splitter-layout > .layout-splitter": {
37
+ display: "flex",
38
+ alignItems: "center",
39
+ backgroundColor: "none",
40
+ boxSizing: "border-box",
41
+ backgroundClip: "padding-box",
42
+ // Propiedades del horizontal
43
+ width: "8px",
44
+ margin: "0 0.5px",
45
+ borderLeft: "4px solid hsla(0, 0%, 5%, 0)",
46
+ borderRight: "4px solid hsla(0, 0%, 5%, 0)",
47
+ cursor: "col-resize",
48
+ justifyContent: "center",
49
+ height: "100%"
50
+ },
51
+ // Configuración divisorra interna posición horizontal del split
52
+ "& .splitter-layout .layout-splitter:before": {
53
+ content: `""`,
54
+ height: "56px",
55
+ width: "4px",
56
+ top: "calc(50% - 22.5px)",
57
+ position: "absolute",
58
+ background: theme.vars.palette.primary.enabled,
59
+ borderRadius: theme.vars.size.borderRadius["r0-5"],
60
+ margin: "1px 0px"
61
+ },
62
+ // Hover de la barra externa en posición horizontal
63
+ "& .splitter-layout > .layout-splitter:hover": {
64
+ borderRadius: "2px",
65
+ borderLeft: `2px`,
66
+ borderRight: `2px`
67
+ },
68
+ // Configuración del cursor en horizontal
69
+ "& .splitter-layout.splitter-layout-vertical.layout-changing": {
70
+ cursor: "row-resize"
71
+ },
72
+ // Barra divisora vertical del split
73
+ "& .splitter-layout.splitter-layout-vertical > .layout-splitter": {
74
+ height: theme.vars.size.baseSpacings.sp2,
75
+ width: "100% !important",
76
+ margin: "1px 0",
77
+ cursor: "row-resize"
78
+ },
79
+ // Configuración barra divisora interna vertical del split
80
+ "& .splitter-layout.splitter-layout-vertical .layout-splitter:before": {
81
+ width: "56px !important",
82
+ height: "4px !important",
83
+ left: "calc(50% - 22.5px)",
84
+ top: "unset",
85
+ background: theme.vars.palette.primary.enabled,
86
+ borderRadius: "2px",
87
+ zIndex: "1"
88
+ },
89
+ // Color del hover y el arrastrando del splitter
90
+ "& .splitter-layout > .layout-splitter:hover:before, .splitter-layout.layout-changing > .layout-splitter:before": {
91
+ // barra interna vertical
92
+ background: theme.vars.palette.primary.hover
93
+ },
94
+ // Dirección flex cuando es vertical
95
+ "& .splitter-layout.splitter-layout-vertical": {
96
+ flexDirection: "column",
97
+ position: "relative",
98
+ "& .layout-splitter:after": {
99
+ content: `""`,
100
+ height: "2px",
101
+ left: "0",
102
+ right: "0",
103
+ /* top: 'calc(50% - 6px)', */
104
+ position: "absolute",
105
+ background: theme.vars.palette?.border.default
106
+ }
107
+ },
108
+ "& .splitter-layout:not(.splitter-layout-vertical)": {
109
+ "& .layout-splitter:after": {
110
+ content: `""`,
111
+ width: "2px",
112
+ top: "0",
113
+ bottom: "0",
114
+ position: "absolute",
115
+ background: theme.vars.palette?.border.default
116
+ }
117
+ }
118
+ }),
119
+ /**
120
+ * SplitMaster firstPart
121
+ */
122
+ splitMaster: () => ({
123
+ position: "relative",
124
+ width: "100%",
125
+ height: "100%",
126
+ display: "flex",
127
+ flexDirection: "column",
128
+ overflow: "hidden",
129
+ "& .M4LStack-root": {
130
+ gap: "8px"
131
+ }
132
+ }),
133
+ /**
134
+ * SplitMaster secondPart
135
+ */
136
+ splitDetail: () => ({
137
+ position: "relative",
138
+ width: "100%",
139
+ height: "100%",
140
+ display: "flex",
141
+ flexDirection: "column",
142
+ justifyContent: "center",
143
+ alignItems: "center",
144
+ overflow: "hidden",
145
+ left: "0px",
146
+ right: "0px",
147
+ top: "0px",
148
+ bottom: "0px",
149
+ "& .M4LStack-root": {
150
+ //gap: '8px',
151
+ overflow: "hidden"
152
+ }
153
+ })
154
+ };
155
+ export {
156
+ splitLayoutStyles as s
157
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Clave de identificación del componente SplitLayout dentro del sistema.
3
+ *
4
+ * Esta constante se utiliza como identificador único para asociar y personalizar estilos y configuraciones
5
+ * relacionadas con el componente `SplitLayout` dentro del sistema de temas y estilos.
6
+ * @default 'SplitLayout'
7
+ */
8
+ export declare const SPLIT_LAYOUT_KEY_COMPONENT = "M4LSplitLayout";
9
+ export declare const SPLIT_LAYOUT_PREFIX = "M4LSplitLayout";
@@ -0,0 +1,6 @@
1
+ const SPLIT_LAYOUT_KEY_COMPONENT = "M4LSplitLayout";
2
+ const SPLIT_LAYOUT_PREFIX = "M4LSplitLayout";
3
+ export {
4
+ SPLIT_LAYOUT_PREFIX as S,
5
+ SPLIT_LAYOUT_KEY_COMPONENT as a
6
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum SplitLayoutSlots {
2
+ root = "root",
3
+ splitMaster = "splitMaster",
4
+ splitDetail = "splitDetail"
5
+ }
@@ -0,0 +1,9 @@
1
+ var SplitLayoutSlots = /* @__PURE__ */ ((SplitLayoutSlots2) => {
2
+ SplitLayoutSlots2["root"] = "root";
3
+ SplitLayoutSlots2["splitMaster"] = "splitMaster";
4
+ SplitLayoutSlots2["splitDetail"] = "splitDetail";
5
+ return SplitLayoutSlots2;
6
+ })(SplitLayoutSlots || {});
7
+ export {
8
+ SplitLayoutSlots as S
9
+ };
@@ -0,0 +1,3 @@
1
+ export declare const SplitLayoutRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
2
+ export declare const SplitMasterStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
3
+ export declare const SplitDetailStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
@@ -0,0 +1,21 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { s as splitLayoutStyles } from "../SplitLayout.styles.js";
3
+ import { a as SPLIT_LAYOUT_KEY_COMPONENT } from "../constants.js";
4
+ import { S as SplitLayoutSlots } from "./SplitLayoutEnum.js";
5
+ const SplitLayoutRootStyled = styled("div", {
6
+ name: SPLIT_LAYOUT_KEY_COMPONENT,
7
+ slot: SplitLayoutSlots.root
8
+ })(splitLayoutStyles.root);
9
+ const SplitMasterStyled = styled("div", {
10
+ name: SPLIT_LAYOUT_KEY_COMPONENT,
11
+ slot: SplitLayoutSlots.splitMaster
12
+ })(splitLayoutStyles.splitMaster);
13
+ const SplitDetailStyled = styled("div", {
14
+ name: SPLIT_LAYOUT_KEY_COMPONENT,
15
+ slot: SplitLayoutSlots.splitDetail
16
+ })(splitLayoutStyles.splitDetail);
17
+ export {
18
+ SplitLayoutRootStyled as S,
19
+ SplitMasterStyled as a,
20
+ SplitDetailStyled as b
21
+ };
@@ -1,4 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
+ import { Theme } from '@mui/material';
3
+ import { M4LOverridesStyleRules } from 'src/@types/augmentations';
4
+ import { SplitLayoutSlots as slots } from './slots/SplitLayoutEnum';
5
+ import { SPLIT_LAYOUT_KEY_COMPONENT } from './constants';
2
6
  export type SplitPosition = 'vertical' | 'horizontal' | 'none';
3
7
  /** Es una interfaz que define las propiedades aceptadas por el componente SplitLayout. */
4
8
  export interface SplitLayoutProps {
@@ -9,12 +13,14 @@ export interface SplitLayoutProps {
9
13
  /** permite establecer un tamaño inicial específico para la segunda parte del diseño dividido.*/
10
14
  secondParrtInitialSize?: number;
11
15
  /**representa el contenido o componente que se mostrará en la primera parte de la interfaz de usuario. */
12
- firstPart: ((props?: any) => JSX.Element) | ReactNode;
16
+ firstPart?: ((props?: any) => JSX.Element) | ReactNode;
13
17
  /** representa el contenido o componente que se mostrará en la segunda parte de la interfaz de usuario,la parte sea de abajo o a la derecha*/
14
- secondPart: ((props?: any) => JSX.Element) | ReactNode;
18
+ secondPart?: ((props?: any) => JSX.Element) | ReactNode;
15
19
  /** se utiliza para permitir que el componente SplitLayout reciba clases CSS personalizadas desde el componente padre, lo que permite una mayor flexibilidad en la estilización de este componente.*/
16
20
  className?: string;
21
+ /**
22
+ * se utiliza el `dataTestId` para las pruebas unitarias
23
+ */
24
+ dataTestId?: string;
17
25
  }
18
- /**Una manera de gestionar y mantener el estado del propietario dentro del componente SplitLayout.
19
- * En este contexto OwnerState está siendo utilizado para almacenar información sobre la posición de la división en el diseño dividido, para controlar cómo se visualiza o se comporta el diseño dividido en la interfaz de usuario */
20
- export type OwnerState = Pick<SplitLayoutProps, 'splitPosition'>;
26
+ export type SplitLayoutStyles = M4LOverridesStyleRules<keyof typeof slots, typeof SPLIT_LAYOUT_KEY_COMPONENT, Theme>;
@@ -0,0 +1,89 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { useFormContext, Controller } from "react-hook-form";
3
+ import useId from "@mui/material/utils/useId";
4
+ import { g as getPropDataTestId } from "../../../test/getNameDataTestId.js";
5
+ import { L as Label } from "../../Label/Label.js";
6
+ import { H as HelperError } from "../../HelperError/HelperError.js";
7
+ import { N as NumberInput } from "../../NumberInput/NumberInput.js";
8
+ import { R as RHFNumberInputSlots } from "./slots/RHFNumberInputEnum.js";
9
+ import { R as RHF_NUMBER_INPUT_KEY_COMPONENT } from "./constants.js";
10
+ import { R as RootStyled } from "./slots/RHFNumberInputSlots.js";
11
+ import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
12
+ const RHFNumberInput = (props) => {
13
+ const {
14
+ name,
15
+ max,
16
+ min,
17
+ step,
18
+ disabled,
19
+ size = "medium",
20
+ variant = "outlined",
21
+ label,
22
+ mandatory,
23
+ mandatoryMessage,
24
+ helperMessage,
25
+ startAdornment,
26
+ endAdornment,
27
+ ...others
28
+ } = props;
29
+ const { control } = useFormContext();
30
+ const { currentSize } = useComponentSize(size);
31
+ const ownerState = {
32
+ iconSize: currentSize
33
+ };
34
+ const htmlForId = useId();
35
+ return /* @__PURE__ */ jsx(
36
+ RootStyled,
37
+ {
38
+ ownerState: { ...ownerState },
39
+ ...getPropDataTestId(RHF_NUMBER_INPUT_KEY_COMPONENT, RHFNumberInputSlots.root),
40
+ children: /* @__PURE__ */ jsx(
41
+ Controller,
42
+ {
43
+ name,
44
+ control,
45
+ render: ({ field: { value, onChange }, fieldState: { error } }) => {
46
+ const onChangeLocal = (_event, newValue) => {
47
+ onChange(newValue);
48
+ };
49
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
50
+ label && /* @__PURE__ */ jsx(
51
+ Label,
52
+ {
53
+ htmlFor: htmlForId,
54
+ label,
55
+ mandatory,
56
+ mandatoryMessage,
57
+ helperMessage,
58
+ size
59
+ }
60
+ ),
61
+ /* @__PURE__ */ jsx(
62
+ NumberInput,
63
+ {
64
+ id: htmlForId,
65
+ size,
66
+ step,
67
+ max,
68
+ min,
69
+ value,
70
+ onChange: onChangeLocal,
71
+ variant,
72
+ disabled,
73
+ startAdornment,
74
+ endAdornment,
75
+ error: !!error,
76
+ ...others
77
+ }
78
+ ),
79
+ error?.message && /* @__PURE__ */ jsx(HelperError, { htmlFor: htmlForId, size, message: error.message })
80
+ ] });
81
+ }
82
+ }
83
+ )
84
+ }
85
+ );
86
+ };
87
+ export {
88
+ RHFNumberInput as R
89
+ };
@@ -0,0 +1,16 @@
1
+ const rhfNumberInputStyles = {
2
+ /**
3
+ * Estilos para el slot `root`.
4
+ *
5
+ * Se utiliza para aplicar estilos personalizados al contenedor principal
6
+ * del componente `RHFInputNumberSpinner`.
7
+ */
8
+ root: ({ theme }) => ({
9
+ display: "flex",
10
+ flexDirection: "column",
11
+ gap: theme.vars.size.baseSpacings.sp1
12
+ })
13
+ };
14
+ export {
15
+ rhfNumberInputStyles as r
16
+ };
@@ -0,0 +1,4 @@
1
+ const RHF_NUMBER_INPUT_KEY_COMPONENT = "M4LRHFNumberInput";
2
+ export {
3
+ RHF_NUMBER_INPUT_KEY_COMPONENT as R
4
+ };
@@ -0,0 +1,7 @@
1
+ var RHFNumberInputSlots = /* @__PURE__ */ ((RHFNumberInputSlots2) => {
2
+ RHFNumberInputSlots2["root"] = "root";
3
+ return RHFNumberInputSlots2;
4
+ })(RHFNumberInputSlots || {});
5
+ export {
6
+ RHFNumberInputSlots as R
7
+ };
@@ -0,0 +1,11 @@
1
+ import { styled } from "@mui/material";
2
+ import { R as RHF_NUMBER_INPUT_KEY_COMPONENT } from "../constants.js";
3
+ import { r as rhfNumberInputStyles } from "../RHFNumberInput.styles.js";
4
+ import { R as RHFNumberInputSlots } from "./RHFNumberInputEnum.js";
5
+ const RootStyled = styled("div", {
6
+ name: RHF_NUMBER_INPUT_KEY_COMPONENT,
7
+ slot: RHFNumberInputSlots.root
8
+ })(rhfNumberInputStyles?.root);
9
+ export {
10
+ RootStyled as R
11
+ };
@@ -13,4 +13,5 @@ export * from './RHFTextFieldPassword';
13
13
  export { RHFPeriod } from './RHFPeriod/RHFPeriod';
14
14
  export { getPeriodComponetsDictionary } from '../Period/dictionary';
15
15
  export { RHFRadioGroup } from './RHFRadioGroup';
16
+ export { RHFNumberInput } from './RHFNumberInput/RHFNumberInput';
16
17
  export * from './RHFUpload';
@@ -43,7 +43,7 @@ export type { MenuAction, ComponentActionProps } from './MenuActions/types';
43
43
  export * from './extended/React-Resizable';
44
44
  export * from './ScrollBar';
45
45
  export { ScrollToTop } from './ScrollToTop';
46
- export * from './SplitLayout/SplitLayout';
46
+ export * from './extended/React-Splitter/SplitLayout/SplitLayout';
47
47
  export * from './ToastContainer';
48
48
  export * from './SideBar';
49
49
  export * from './AppBar';
@@ -53,6 +53,6 @@ export * from './popups';
53
53
  export * from './commercial';
54
54
  export * from './MFIsolationApp';
55
55
  export * from './BaseModule';
56
- export type { SplitPosition } from './SplitLayout/types';
56
+ export type { SplitPosition } from './extended/React-Splitter/SplitLayout/types';
57
57
  export * from './mui_extended';
58
58
  export * from './WindowBase';
package/index.js CHANGED
@@ -36,11 +36,12 @@ import { R as R6 } from "./components/hook-form/RHFHelperError/index.js";
36
36
  import { R as R7 } from "./components/hook-form/RHFPeriod/RHFPeriod.js";
37
37
  import { g as g6 } from "./components/Period/dictionary.js";
38
38
  import { R as R8 } from "./components/hook-form/RHFRadioGroup/RHFRadioGroup.js";
39
- import { R as R9 } from "./components/hook-form/RHFColorPicker/RFHColorPicker.js";
40
- import { R as R10 } from "./components/hook-form/RHFCheckbox/RHFCheckbox.js";
41
- import { R as R11 } from "./components/hook-form/RHFTextField/RHFTextField.js";
42
- import { R as R12 } from "./components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js";
43
- import { R as R13 } from "./components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.js";
39
+ import { R as R9 } from "./components/hook-form/RHFNumberInput/RHFNumberInput.js";
40
+ import { R as R10 } from "./components/hook-form/RHFColorPicker/RFHColorPicker.js";
41
+ import { R as R11 } from "./components/hook-form/RHFCheckbox/RHFCheckbox.js";
42
+ import { R as R12 } from "./components/hook-form/RHFTextField/RHFTextField.js";
43
+ import { R as R13 } from "./components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js";
44
+ import { R as R14 } from "./components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.js";
44
45
  import { B } from "./components/formatters/BooleanFormatter/BooleanFormatter.js";
45
46
  import { D as D2, u as u4 } from "./components/formatters/DateFormatter/DateFormatter.js";
46
47
  import { U, g as g7 } from "./components/formatters/UncertaintyFormatter/UncertaintyFormatter.js";
@@ -73,7 +74,7 @@ import { d, g as g13 } from "./components/CommonActions/dictionary.js";
73
74
  import { D as D5 } from "./components/DragResizeWindow/DragResizeWindow.js";
74
75
  import { d as d2 } from "./components/DragResizeWindow/classes/index.js";
75
76
  import { G } from "./components/GridLayout/GridLayout.js";
76
- import { R as R14 } from "./components/GridLayout/subcomponents/Responsive/index.js";
77
+ import { R as R15 } from "./components/GridLayout/subcomponents/Responsive/index.js";
77
78
  import { c as c3, d as d3, e } from "./components/GridLayout/subcomponents/Responsive/responsiveUtils.js";
78
79
  import { i, k } from "./components/GridLayout/utils.js";
79
80
  import { w } from "./components/GridLayout/subcomponents/withSizeProvider/index.js";
@@ -127,10 +128,10 @@ import { H as H4 } from "./components/HelmetPage/index.js";
127
128
  import { P as P11 } from "./components/PropertyValue/PropertyValue.js";
128
129
  import { a as a9 } from "./components/MenuActions/dictionary.js";
129
130
  import { a as a10, M as M11 } from "./components/MenuActions/MenuActions.js";
130
- import { R as R15 } from "./components/extended/React-Resizable/Resizable/Resizable.js";
131
- import { R as R16 } from "./components/extended/React-Resizable/ResizableBox/ResizableBox.js";
131
+ import { R as R16 } from "./components/extended/React-Resizable/Resizable/Resizable.js";
132
+ import { R as R17 } from "./components/extended/React-Resizable/ResizableBox/ResizableBox.js";
132
133
  import { S as S3 } from "./components/ScrollBar/index.js";
133
- import { S as S4 } from "./components/SplitLayout/SplitLayout.js";
134
+ import { S as S4 } from "./components/extended/React-Splitter/SplitLayout/SplitLayout.js";
134
135
  import { T as T3 } from "./components/ToastContainer/ToastContainer.js";
135
136
  import { T as T4 } from "./components/ToastContainer/subcomponents/ToastMessage/ToastMessage.js";
136
137
  import { S as S5 } from "./components/SideBar/SideBar.js";
@@ -182,12 +183,12 @@ import { T as T17 } from "./components/mui_extended/ToggleIconButton/constants.j
182
183
  import { T as T18 } from "./components/mui_extended/ToggleIconButton/slots/ToggleIconButtonEnum.js";
183
184
  import { T as T19 } from "./components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.js";
184
185
  import { a as a13, D as D6, M as M13 } from "./components/areas/contexts/DynamicMFParmsContext/index.js";
185
- import { F, R as R17, u as u9 } from "./components/hook-form/RHFormContext/index.js";
186
+ import { F, R as R18, u as u9 } from "./components/hook-form/RHFormContext/index.js";
186
187
  import { g as g26 } from "./components/hook-form/RHFormContext/dictionary.js";
187
188
  import { u as u10 } from "./contexts/AppearanceComponentContext/useAppearanceComponentStore.js";
188
189
  import { A as A16 } from "./contexts/AppearanceComponentContext/AppearanceComponentContext.js";
189
190
  import { a as a14, M as M14 } from "./contexts/ModalContext/index.js";
190
- import { a as a15, R as R18 } from "./contexts/RealTimeContext/RealTimeContext.js";
191
+ import { a as a15, R as R19 } from "./contexts/RealTimeContext/RealTimeContext.js";
191
192
  import { u as u11 } from "./hooks/useFormAddEdit/index.js";
192
193
  import { u as u12 } from "./hooks/useModal/index.js";
193
194
  import { u as u13 } from "./hooks/useTab/index.js";
@@ -310,23 +311,24 @@ export {
310
311
  P11 as PropertyValue,
311
312
  R as RHFAutocomplete,
312
313
  R2 as RHFAutocompleteAsync,
313
- R10 as RHFCheckbox,
314
- R9 as RHFColorPicker,
314
+ R11 as RHFCheckbox,
315
+ R10 as RHFColorPicker,
315
316
  R3 as RHFDateTime,
316
317
  R6 as RHFHelperError,
317
318
  R4 as RHFMultiCheckbox,
319
+ R9 as RHFNumberInput,
318
320
  R7 as RHFPeriod,
319
321
  R8 as RHFRadioGroup,
320
322
  R5 as RHFSelect,
321
- R11 as RHFTextField,
322
- R12 as RHFTextFieldPassword,
323
- R13 as RHFUploadImage,
324
- R17 as RHFormProvider,
323
+ R12 as RHFTextField,
324
+ R13 as RHFTextFieldPassword,
325
+ R14 as RHFUploadImage,
326
+ R18 as RHFormProvider,
325
327
  a15 as RealTimeContext,
326
- R18 as RealTimeProvider,
327
- R15 as Resizable,
328
- R16 as ResizableBox,
329
- R14 as Responsive,
328
+ R19 as RealTimeProvider,
329
+ R16 as Resizable,
330
+ R17 as ResizableBox,
331
+ R15 as Responsive,
330
332
  S3 as ScrollBar,
331
333
  S as ScrollToTop,
332
334
  S6 as SectionCommercial,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.1.78",
3
+ "version": "9.1.80",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
@@ -1,16 +0,0 @@
1
- import { SplitLayoutProps } from './types';
2
- /**
3
- * Propiedades para el componente SplitLayout.
4
- * @param {SplitLayoutProps} props
5
- * splitPosition - determina la orientación de la división entre las dos partes de la interfaz de usuario. Puede tener tres valores: "vertical", "horizontal" o "none".
6
- * props.firstPart - representa el contenido o componente que se mostrará en la primera parte de la interfaz de usuario.
7
- * props.secondPart - Esta propiedad representa el contenido o componente que se mostrará en la segunda parte de la interfaz de usuario,la parte sea de abajo o a la derecha
8
- * props.secondParrtInitialSize - te permite establecer un tamaño inicial específico para la segunda parte del diseño dividido.
9
- * props.percentage - La propiedad percentage en la interfaz SplitLayoutProps indica si el tamaño inicial de la segunda parte del diseño dividido se proporciona en porcentaje en lugar de píxeles.
10
- * props.className - se utiliza para permitir que el componente SplitLayout reciba clases CSS personalizadas desde el componente padre, lo que permite una mayor flexibilidad en la estilización de este componente.
11
- * @returns
12
- */
13
- /**
14
- * TODO: Documentar
15
- */
16
- export declare function SplitLayout(props: SplitLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -1,57 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { S as SplitLayoutRoot, a as SplitMaster, b as SplitDetail } from "./styles.js";
3
- import { u as useSplitLayoutUtilityClasses } from "./classes/index.js";
4
- import clsx from "clsx";
5
- import { T as TEST_PROP_ID } from "../../test/constants_no_mock.js";
6
- import { g as getNameSplitLayoutDataTestId } from "./tests/utils.js";
7
- import { S as SplitterLayout } from "../../internal_libs/react-splitter-layout.js";
8
- function SplitLayout(props) {
9
- const {
10
- splitPosition,
11
- firstPart,
12
- secondPart,
13
- secondParrtInitialSize = 50,
14
- percentage = true,
15
- className
16
- } = props;
17
- const ownerState = {
18
- splitPosition
19
- };
20
- const classes = useSplitLayoutUtilityClasses(ownerState);
21
- return /* @__PURE__ */ jsx(
22
- SplitLayoutRoot,
23
- {
24
- className: clsx(classes.root, className),
25
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameSplitLayoutDataTestId("root") } : {},
26
- children: SplitterLayout ? /* @__PURE__ */ jsxs(
27
- SplitterLayout,
28
- {
29
- vertical: splitPosition === "vertical",
30
- percentage,
31
- secondaryInitialSize: secondParrtInitialSize,
32
- children: [
33
- /* @__PURE__ */ jsx(
34
- SplitMaster,
35
- {
36
- className: classes.firstPart,
37
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameSplitLayoutDataTestId("firstPart") } : {},
38
- children: typeof firstPart === "function" ? firstPart() : firstPart
39
- }
40
- ),
41
- splitPosition !== "none" && /* @__PURE__ */ jsx(
42
- SplitDetail,
43
- {
44
- className: classes.secondPart,
45
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameSplitLayoutDataTestId("secondPart") } : {},
46
- children: typeof secondPart === "function" ? secondPart() : secondPart
47
- }
48
- )
49
- ]
50
- }
51
- ) : null
52
- }
53
- );
54
- }
55
- export {
56
- SplitLayout as S
57
- };
@@ -1 +0,0 @@
1
- export declare const componentName = "M4LSplitLayout";
@@ -1,4 +0,0 @@
1
- const componentName = "M4LSplitLayout";
2
- export {
3
- componentName as c
4
- };
@@ -1,17 +0,0 @@
1
- import { SplitLayoutClassesType } from './types';
2
- import { OwnerState } from '../types';
3
- /**
4
- * Esta es una constante que se está exportando y que contiene las clases de estilo generadas para el componente SplitLayout.
5
- *
6
- */
7
- export declare const splitLayoutClasses: SplitLayoutClassesType;
8
- export declare function getSplitLayoutUtilityClass(slot: string): string;
9
- /**
10
- * Es un hook que facilita la gestión de clases de estilo para el componente SplitLayout, permitiendo una mayor flexibilidad en la aplicación de estilos basados en el estado del propietario.
11
- * @param {OwnerState} ownerState - El estado del propietario del componente SplitLayout.
12
- */
13
- export declare const useSplitLayoutUtilityClasses: (ownerState: OwnerState) => {
14
- root: string;
15
- firstPart: string;
16
- secondPart: string;
17
- };
@@ -1,33 +0,0 @@
1
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
2
- import { unstable_composeClasses } from "@mui/base";
3
- import { c as componentName } from "./constants.js";
4
- generateUtilityClasses(componentName, [
5
- /* elements */
6
- "root",
7
- "firstPart",
8
- "secondPart",
9
- /* states or variants of elements */
10
- "stateVertical",
11
- "stateHorizontal"
12
- ]);
13
- function getSplitLayoutUtilityClass(slot) {
14
- return generateUtilityClass(componentName, slot);
15
- }
16
- const useSplitLayoutUtilityClasses = (ownerState) => {
17
- const slots = {
18
- root: [
19
- "root",
20
- ownerState.splitPosition === "vertical" && "stateVertical",
21
- ownerState.splitPosition === "horizontal" && "stateHorizontal"
22
- ],
23
- firstPart: ["firstPart"],
24
- secondPart: ["secondPart"]
25
- };
26
- const composedClasses = unstable_composeClasses(slots, getSplitLayoutUtilityClass, {});
27
- return {
28
- ...composedClasses
29
- };
30
- };
31
- export {
32
- useSplitLayoutUtilityClasses as u
33
- };