@m4l/components 9.1.131 → 9.1.133
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.
- package/components/Chip/Chip.js +21 -21
- package/components/Chip/ChipStyles.js +22 -50
- package/components/Chip/slots/ChipSlots.js +2 -2
- package/components/Chip/types.d.ts +1 -1
- package/components/DynamicFilter/store/DynamicFilterContext.js +2 -2
- package/components/DynamicSort/DynamicSort.styles.js +13 -16
- package/components/Icon/Icon.js +13 -7
- package/components/Icon/Icon.styles.js +23 -20
- package/components/Icon/types.d.ts +9 -6
- package/components/Label/Label.styles.js +1 -1
- package/components/NumberInput/NumberInput.styles.js +1 -1
- package/components/ObjectLogs/components/DetailFormatter/index.js +2 -2
- package/components/PaperForm/styles.js +1 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +1 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.styles.js +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/useHeaderActions.js +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/WindowModal.js +2 -2
- package/components/areas/contexts/AreasContext/index.js +2 -2
- package/components/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.styles.js +1 -1
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.js +2 -2
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +1 -1
- package/components/mui_extended/Autocomplete/Autocomplete.styles.js +1 -1
- package/components/mui_extended/CheckBox/CheckBox.styles.js +1 -1
- package/components/mui_extended/DateTimePicker/DateTimePicker.styles.js +1 -1
- package/components/mui_extended/IconButton/IconButton.d.ts +2 -1
- package/components/mui_extended/IconButton/IconButton.js +18 -20
- package/components/mui_extended/IconButton/IconButton.styles.js +118 -162
- package/components/mui_extended/IconButton/types.d.ts +3 -4
- package/components/mui_extended/MenuDivider/MenuDivider.styles.js +1 -1
- package/components/mui_extended/MenuItem/MenuItem.js +27 -20
- package/components/mui_extended/MenuItem/MenuItem.styles.js +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +6 -6
- package/components/mui_extended/NavLink/NavLink.styles.js +1 -1
- package/components/mui_extended/Select/Select.styles.js +1 -3
- package/components/mui_extended/TextField/TextField.styles.js +1 -1
- package/components/mui_extended/Typography/typography.styles.js +1 -2
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/useHeaderActionsPopups.js +2 -2
- package/index.js +7 -7
- package/package.json +4 -4
- package/utils/getSizeStyles/getSizeStyles.d.ts +1 -2
- package/utils/getSizeStyles/getSizeStyles.js +4 -4
package/components/Chip/Chip.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { forwardRef } from "react";
|
|
4
|
+
import { forwardRef, useMemo } from "react";
|
|
5
5
|
import { C as CHIP_CLASSES } from "./constants.js";
|
|
6
6
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
7
|
-
import { S as SkeletonChipStyled, C as ChipRootStyled, T as TextChipStyled,
|
|
7
|
+
import { I as IconStyled, S as SkeletonChipStyled, C as ChipRootStyled, T as TextChipStyled, a as IconButtonStyled } from "./slots/ChipSlots.js";
|
|
8
8
|
const Chip = forwardRef((props, ref) => {
|
|
9
9
|
const {
|
|
10
10
|
endIcon,
|
|
@@ -26,30 +26,16 @@ const Chip = forwardRef((props, ref) => {
|
|
|
26
26
|
const isSkeleton = useModuleSkeleton();
|
|
27
27
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
28
28
|
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
29
|
-
const ownerState = {
|
|
29
|
+
const ownerState = useMemo(() => ({
|
|
30
30
|
interactive: !!onClick,
|
|
31
31
|
size: adjustedSize,
|
|
32
|
+
chipSize: adjustedSize,
|
|
32
33
|
variant,
|
|
33
34
|
color,
|
|
34
35
|
opacity,
|
|
35
36
|
externalColor
|
|
36
|
-
};
|
|
37
|
-
const
|
|
38
|
-
e.stopPropagation();
|
|
39
|
-
onDeleted?.(e);
|
|
40
|
-
};
|
|
41
|
-
if (isSkeleton) {
|
|
42
|
-
return /* @__PURE__ */ jsx(
|
|
43
|
-
SkeletonChipStyled,
|
|
44
|
-
{
|
|
45
|
-
"data-testid": "SkeletonButton",
|
|
46
|
-
width: skeletonWidth,
|
|
47
|
-
ownerState: { ...ownerState }
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
const iconClose = `${host_static_assets}/${environment_assets}/frontend/components/chip/assets/icons/closeSmall.svg`;
|
|
52
|
-
const renderIcon = (icon, instaceDataTestId) => {
|
|
37
|
+
}), [adjustedSize, variant, color, opacity, externalColor, onClick]);
|
|
38
|
+
const renderIcon = useMemo(() => (icon, instaceDataTestId) => {
|
|
53
39
|
if (!icon) {
|
|
54
40
|
return null;
|
|
55
41
|
}
|
|
@@ -59,7 +45,6 @@ const Chip = forwardRef((props, ref) => {
|
|
|
59
45
|
return /* @__PURE__ */ jsx(
|
|
60
46
|
IconStyled,
|
|
61
47
|
{
|
|
62
|
-
color,
|
|
63
48
|
ownerState: { ...ownerState },
|
|
64
49
|
src: icon,
|
|
65
50
|
size: adjustedSize,
|
|
@@ -67,6 +52,21 @@ const Chip = forwardRef((props, ref) => {
|
|
|
67
52
|
}
|
|
68
53
|
);
|
|
69
54
|
}
|
|
55
|
+
}, [ownerState, adjustedSize]);
|
|
56
|
+
if (isSkeleton) {
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
SkeletonChipStyled,
|
|
59
|
+
{
|
|
60
|
+
"data-testid": "SkeletonButton",
|
|
61
|
+
width: skeletonWidth,
|
|
62
|
+
ownerState: { ...ownerState }
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
const iconClose = `${host_static_assets}/${environment_assets}/frontend/components/chip/assets/icons/closeSmall.svg`;
|
|
67
|
+
const handleDelete = (e) => {
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
onDeleted?.(e);
|
|
70
70
|
};
|
|
71
71
|
return /* @__PURE__ */ jsxs(
|
|
72
72
|
ChipRootStyled,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as
|
|
1
|
+
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
2
|
const getColors = (theme, ownerState) => {
|
|
3
3
|
const keyColor = ownerState.variant === "contained" ? ownerState.color + "Contained" : ownerState.color + "Outlined";
|
|
4
4
|
const finalPalette = ownerState.externalColor ? ownerState.externalColor : theme.vars.palette.chips[keyColor ?? "default"];
|
|
@@ -24,11 +24,8 @@ const chipStyles = {
|
|
|
24
24
|
cursor: "pointer",
|
|
25
25
|
color,
|
|
26
26
|
backgroundColor: !(ownerState.variant === "outlined") ? bgColor : "transparent",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// },
|
|
30
|
-
...getHeightSizeStyles(
|
|
31
|
-
theme.generalSettings.isMobile,
|
|
27
|
+
...getSizeStyles(
|
|
28
|
+
theme,
|
|
32
29
|
ownerState.size || "medium",
|
|
33
30
|
"base"
|
|
34
31
|
),
|
|
@@ -81,30 +78,16 @@ const chipStyles = {
|
|
|
81
78
|
"& .M4LIcon-icon": {
|
|
82
79
|
backgroundColor: `${color} !important`
|
|
83
80
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
// Estilos específicos para el tamaño medium
|
|
97
|
-
...ownerState.size === "medium" && {
|
|
98
|
-
...theme.generalSettings.isMobile ? {
|
|
99
|
-
height: theme.vars.size.mobile.medium.base,
|
|
100
|
-
width: theme.vars.size.mobile.medium.base,
|
|
101
|
-
minHeight: theme.vars.size.mobile.medium.base
|
|
102
|
-
} : {
|
|
103
|
-
height: theme.vars.size.desktop.medium.base,
|
|
104
|
-
width: theme.vars.size.desktop.medium.base,
|
|
105
|
-
minHeight: theme.vars.size.desktop.medium.base
|
|
106
|
-
}
|
|
107
|
-
}
|
|
81
|
+
...getSizeStyles(
|
|
82
|
+
theme,
|
|
83
|
+
ownerState.size || "medium",
|
|
84
|
+
"base",
|
|
85
|
+
(size) => ({
|
|
86
|
+
height: size,
|
|
87
|
+
width: size,
|
|
88
|
+
minHeight: size
|
|
89
|
+
})
|
|
90
|
+
)
|
|
108
91
|
};
|
|
109
92
|
},
|
|
110
93
|
/**
|
|
@@ -113,26 +96,15 @@ const chipStyles = {
|
|
|
113
96
|
skeletonChip: ({ theme, ownerState }) => ({
|
|
114
97
|
width: "100%",
|
|
115
98
|
background: theme.vars.palette.skeleton.transition,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
// Estilos específicos para el tamaño medium
|
|
127
|
-
...ownerState.size === "medium" && {
|
|
128
|
-
...theme.generalSettings.isMobile ? {
|
|
129
|
-
height: theme.vars.size.mobile.medium.base,
|
|
130
|
-
minHeight: theme.vars.size.mobile.medium.base
|
|
131
|
-
} : {
|
|
132
|
-
height: theme.vars.size.desktop.medium.base,
|
|
133
|
-
minHeight: theme.vars.size.desktop.medium.base
|
|
134
|
-
}
|
|
135
|
-
}
|
|
99
|
+
...getSizeStyles(
|
|
100
|
+
theme,
|
|
101
|
+
ownerState.size || "medium",
|
|
102
|
+
"base",
|
|
103
|
+
(size) => ({
|
|
104
|
+
height: size,
|
|
105
|
+
minHeight: size
|
|
106
|
+
})
|
|
107
|
+
)
|
|
136
108
|
})
|
|
137
109
|
};
|
|
138
110
|
export {
|
|
@@ -28,8 +28,8 @@ const IconButtonStyled = styled(IconButton, {
|
|
|
28
28
|
})(chipStyles?.iconButton);
|
|
29
29
|
export {
|
|
30
30
|
ChipRootStyled as C,
|
|
31
|
-
|
|
31
|
+
IconStyled as I,
|
|
32
32
|
SkeletonChipStyled as S,
|
|
33
33
|
TextChipStyled as T,
|
|
34
|
-
|
|
34
|
+
IconButtonStyled as a
|
|
35
35
|
};
|
|
@@ -3,7 +3,7 @@ import { createContext, useRef, useEffect } from "react";
|
|
|
3
3
|
import { useStore } from "zustand";
|
|
4
4
|
import { shallow } from "zustand/shallow";
|
|
5
5
|
import { useModuleDictionary, useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
6
|
-
import {
|
|
6
|
+
import { useIsMobile, useFirstRender } from "@m4l/graphics";
|
|
7
7
|
import { c as createDynamicFilterStore } from "./DynamicFilterStore.js";
|
|
8
8
|
import { A as ALL_FIELD } from "../constants.js";
|
|
9
9
|
import { f as formatToRawFilter } from "../helpers/formatToRowFilter.js";
|
|
@@ -24,7 +24,7 @@ function DynamicFilterProvider(props) {
|
|
|
24
24
|
const { getLabel } = useModuleDictionary();
|
|
25
25
|
const dynamicFilterStoreRef = useRef();
|
|
26
26
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
27
|
-
const isDesktop =
|
|
27
|
+
const isDesktop = !useIsMobile();
|
|
28
28
|
const isSkeleton = useModuleSkeleton();
|
|
29
29
|
const isFirstRender = useFirstRender([isDesktop, isSkeleton]);
|
|
30
30
|
if (!dynamicFilterStoreRef.current) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as containerQuery } from "../../utils/containerQuery.js";
|
|
2
2
|
import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
|
|
3
|
-
import {
|
|
3
|
+
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
4
4
|
const CONTAINER_QUERY_NAME = "dynamic";
|
|
5
5
|
const dynamicSortStyles = {
|
|
6
6
|
/**
|
|
@@ -55,13 +55,12 @@ const dynamicSortStyles = {
|
|
|
55
55
|
overflow: "hidden",
|
|
56
56
|
...getSizeStyles(
|
|
57
57
|
theme,
|
|
58
|
-
theme.generalSettings.isMobile,
|
|
59
58
|
ownerState.size || "medium",
|
|
60
59
|
"container",
|
|
61
|
-
(
|
|
62
|
-
height,
|
|
63
|
-
minHeight:
|
|
64
|
-
maxHeight:
|
|
60
|
+
(size) => ({
|
|
61
|
+
height: size,
|
|
62
|
+
minHeight: size,
|
|
63
|
+
maxHeight: size
|
|
65
64
|
})
|
|
66
65
|
),
|
|
67
66
|
maxWidth: "135px",
|
|
@@ -81,13 +80,12 @@ const dynamicSortStyles = {
|
|
|
81
80
|
inputSortInput: ({ theme, ownerState }) => ({
|
|
82
81
|
...getSizeStyles(
|
|
83
82
|
theme,
|
|
84
|
-
theme.generalSettings.isMobile,
|
|
85
83
|
ownerState.size || "medium",
|
|
86
84
|
"action",
|
|
87
|
-
(
|
|
88
|
-
height,
|
|
89
|
-
minHeight:
|
|
90
|
-
maxHeight:
|
|
85
|
+
(size) => ({
|
|
86
|
+
height: size,
|
|
87
|
+
minHeight: size,
|
|
88
|
+
maxHeight: size
|
|
91
89
|
})
|
|
92
90
|
),
|
|
93
91
|
...getTypographyStyles(
|
|
@@ -314,13 +312,12 @@ const dynamicSortStyles = {
|
|
|
314
312
|
marginRight: theme.vars.size.baseSpacings.sp2,
|
|
315
313
|
...getSizeStyles(
|
|
316
314
|
theme,
|
|
317
|
-
theme.generalSettings.isMobile,
|
|
318
315
|
ownerState.size || "medium",
|
|
319
316
|
"base",
|
|
320
|
-
(
|
|
321
|
-
height,
|
|
322
|
-
minHeight:
|
|
323
|
-
maxHeight:
|
|
317
|
+
(size) => ({
|
|
318
|
+
height: size,
|
|
319
|
+
minHeight: size,
|
|
320
|
+
maxHeight: size
|
|
324
321
|
})
|
|
325
322
|
)
|
|
326
323
|
})
|
package/components/Icon/Icon.js
CHANGED
|
@@ -17,16 +17,21 @@ const Icon = (props) => {
|
|
|
17
17
|
className,
|
|
18
18
|
placement = "bottom",
|
|
19
19
|
instaceDataTestId,
|
|
20
|
-
disabled
|
|
20
|
+
disabled,
|
|
21
|
+
selected,
|
|
22
|
+
enabledSelected
|
|
21
23
|
} = props;
|
|
22
24
|
const { currentSize } = useComponentSize(size);
|
|
25
|
+
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
23
26
|
const isSkeleton = useModuleSkeleton();
|
|
24
27
|
const ownerState = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
size: adjustedSize,
|
|
29
|
+
color,
|
|
30
|
+
src,
|
|
31
|
+
disabled,
|
|
32
|
+
rotationAngle,
|
|
33
|
+
selected,
|
|
34
|
+
enabledSelected,
|
|
30
35
|
isSkeleton
|
|
31
36
|
};
|
|
32
37
|
const classKey = getComponentClasses(ICON_KEY_COMPONENT, IconSlots);
|
|
@@ -38,6 +43,7 @@ const Icon = (props) => {
|
|
|
38
43
|
title: tooltipContent,
|
|
39
44
|
ownerState: { ...ownerState },
|
|
40
45
|
placement,
|
|
46
|
+
size: adjustedSize,
|
|
41
47
|
...getPropDataTestId(ICON_PREFIX, IconSlots.tooltip, instaceDataTestId),
|
|
42
48
|
children: /* @__PURE__ */ jsx(
|
|
43
49
|
RootStyled,
|
|
@@ -74,7 +80,7 @@ const Icon = (props) => {
|
|
|
74
80
|
)
|
|
75
81
|
}
|
|
76
82
|
),
|
|
77
|
-
isSkeleton && /* @__PURE__ */ jsx(IconSkeletonStyled, { className: classKey.iconSkeleton, role: "icon-skeleton", variant: "rectangular", ownerState: { ...ownerState } })
|
|
83
|
+
isSkeleton && /* @__PURE__ */ jsx(IconSkeletonStyled, { className: classKey.iconSkeleton, role: "icon-skeleton", size: adjustedSize, variant: "rectangular", ownerState: { ...ownerState } })
|
|
78
84
|
] });
|
|
79
85
|
};
|
|
80
86
|
export {
|
|
@@ -14,7 +14,7 @@ const iconStyles = {
|
|
|
14
14
|
alignItems: "center",
|
|
15
15
|
width: "fit-content",
|
|
16
16
|
transition: "transform 0.5s ease-in-out",
|
|
17
|
-
...ownerState.
|
|
17
|
+
...ownerState.size === "medium" && {
|
|
18
18
|
...theme.generalSettings.isMobile ? {
|
|
19
19
|
width: theme.vars.size.mobile.medium.base,
|
|
20
20
|
height: theme.vars.size.mobile.medium.base
|
|
@@ -23,7 +23,7 @@ const iconStyles = {
|
|
|
23
23
|
height: theme.vars.size.desktop.medium.base
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
...ownerState.
|
|
26
|
+
...ownerState.size === "small" && {
|
|
27
27
|
...theme.generalSettings.isMobile ? {
|
|
28
28
|
width: theme.vars.size.mobile.small.base,
|
|
29
29
|
height: theme.vars.size.mobile.small.base
|
|
@@ -40,22 +40,25 @@ const iconStyles = {
|
|
|
40
40
|
* del ícono basada en el ángulo de rotación proporcionado, y el color de fondo que
|
|
41
41
|
* se ajusta de acuerdo con el estado de deshabilitación o no del ícono.
|
|
42
42
|
*/
|
|
43
|
-
icon: ({ theme, ownerState }) =>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
icon: ({ theme, ownerState }) => {
|
|
44
|
+
const backgroundColor = ownerState.disabled ? theme.vars.palette.text.disabled : ownerState.selected && ownerState.enabledSelected ? `${theme.vars.palette.primary.selected} !important` : getPropertyByString(theme.vars.palette, String(ownerState.color), "text.primary");
|
|
45
|
+
return {
|
|
46
|
+
maskPosition: "center",
|
|
47
|
+
maskRepeat: "no-repeat",
|
|
48
|
+
maskSize: "cover",
|
|
49
|
+
WebkitMaskRepeat: "no-repeat",
|
|
50
|
+
mask: `url(${ownerState.src})`,
|
|
51
|
+
WebkitMask: `url(${ownerState.src})`,
|
|
52
|
+
WebkitMaskSize: "cover",
|
|
53
|
+
...ownerState.rotationAngle && {
|
|
54
|
+
transform: `rotate(${ownerState.rotationAngle}deg)`
|
|
55
|
+
},
|
|
56
|
+
backgroundColor,
|
|
57
|
+
width: "inherit",
|
|
58
|
+
height: "inherit",
|
|
59
|
+
variants: []
|
|
60
|
+
};
|
|
61
|
+
},
|
|
59
62
|
/**
|
|
60
63
|
* Slot iconSkeleton: Define los estilos para el esqueleto del ícono.
|
|
61
64
|
* Se utiliza cuando el ícono aún no está completamente cargado, proporcionando
|
|
@@ -65,7 +68,7 @@ const iconStyles = {
|
|
|
65
68
|
iconSkeleton: ({ theme, ownerState }) => ({
|
|
66
69
|
"&.M4lclassCssSpecificity": {
|
|
67
70
|
borderRadius: theme.size.borderRadius.r1,
|
|
68
|
-
...ownerState.
|
|
71
|
+
...ownerState.size === "medium" && {
|
|
69
72
|
...theme.generalSettings.isMobile ? {
|
|
70
73
|
width: theme.vars.size.mobile.medium.base,
|
|
71
74
|
height: theme.vars.size.mobile.medium.base
|
|
@@ -74,7 +77,7 @@ const iconStyles = {
|
|
|
74
77
|
height: theme.vars.size.desktop.medium.base
|
|
75
78
|
}
|
|
76
79
|
},
|
|
77
|
-
...ownerState.
|
|
80
|
+
...ownerState.size === "small" && {
|
|
78
81
|
...theme.generalSettings.isMobile ? {
|
|
79
82
|
width: theme.vars.size.mobile.small.base,
|
|
80
83
|
height: theme.vars.size.mobile.small.base
|
|
@@ -43,16 +43,19 @@ export interface IconProps extends Pick<TooltipProps, 'placement'> {
|
|
|
43
43
|
* Valor que en caso de ser verdadero debe de pintar el svg con color text disabled.
|
|
44
44
|
*/
|
|
45
45
|
disabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Valor que define si el icono debe de estar seleccionado pero depende de la propiedad enableSelected.
|
|
48
|
+
*/
|
|
49
|
+
selected?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Valor que define si el icono debe de estar seleccionado pero depende de la propiedad selected.
|
|
52
|
+
*/
|
|
53
|
+
enabledSelected?: boolean;
|
|
46
54
|
}
|
|
47
55
|
/**
|
|
48
56
|
* Define las las propiedades usadas para estilizar el componente desde el css.
|
|
49
57
|
*/
|
|
50
|
-
export interface IconOwnerState {
|
|
51
|
-
iconSize: Sizes;
|
|
52
|
-
iconRotationAngle?: number;
|
|
53
|
-
iconColor: IconColors;
|
|
54
|
-
iconDisabled?: boolean;
|
|
55
|
-
iconSrc: string;
|
|
58
|
+
export interface IconOwnerState extends Pick<IconProps, 'selected' | 'enabledSelected' | 'size' | 'rotationAngle' | 'color' | 'disabled' | 'src'> {
|
|
56
59
|
isSkeleton: boolean;
|
|
57
60
|
}
|
|
58
61
|
export type IconSlotsType = keyof typeof IconSlots;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as getHeightSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
3
|
const labelStyles = {
|
|
4
4
|
/**
|
|
5
5
|
* Estilos para el contenedor raíz del Label 🏷️
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as getHeightSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
3
|
const numberInputStyles = {
|
|
4
4
|
/**
|
|
5
5
|
* Estilos aplicados al contenedor principal (root).
|
|
@@ -4,7 +4,7 @@ import { D as DetailDialog } from "../DetailDialog/index.js";
|
|
|
4
4
|
import { u as useModal } from "../../../../hooks/useModal/index.js";
|
|
5
5
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
6
6
|
import { I as Icon } from "../../../Icon/Icon.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
8
8
|
import { S as Stack } from "../../../mui_extended/Stack/Stack.js";
|
|
9
9
|
import { W as WindowBase } from "../../../WindowBase/WindowBase.js";
|
|
10
10
|
function DetailFormatter(props) {
|
|
@@ -12,7 +12,7 @@ function DetailFormatter(props) {
|
|
|
12
12
|
const { openModal } = useModal();
|
|
13
13
|
const { getLabel } = useModuleDictionary();
|
|
14
14
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
15
|
-
const isDesktop =
|
|
15
|
+
const isDesktop = !useIsMobile();
|
|
16
16
|
const onClickDetail = () => {
|
|
17
17
|
openModal({
|
|
18
18
|
// onQueryClose: () => closeModal(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as getHeightSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
2
|
const paperFormStyles = {
|
|
3
3
|
/**
|
|
4
4
|
*************************************************************
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as getHeightSizeStyles } from "../../../../../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
2
|
import { a as ITEM_IN_TREE_ACTIVE, I as ITEM_ACTIVE } from "../../../../constants.js";
|
|
3
3
|
const containerMenuItemsMainStyles = {
|
|
4
4
|
/**
|
|
@@ -5,7 +5,7 @@ import { I as ICONS } from "../../../../../../../../icons.js";
|
|
|
5
5
|
import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../../../../../../../dictionary.js";
|
|
6
6
|
import { g as getMainActions, a as getMenuActions } from "./helper.js";
|
|
7
7
|
import { shallow } from "zustand/shallow";
|
|
8
|
-
import {
|
|
8
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
9
9
|
const useHeaderActions = ({
|
|
10
10
|
windowId,
|
|
11
11
|
areaId,
|
|
@@ -13,7 +13,7 @@ const useHeaderActions = ({
|
|
|
13
13
|
}) => {
|
|
14
14
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
15
15
|
const { getLabel } = useModuleDictionary();
|
|
16
|
-
const isDesktop =
|
|
16
|
+
const isDesktop = !useIsMobile();
|
|
17
17
|
const urlPrefix = `${host_static_assets}/${environment_assets}`;
|
|
18
18
|
const moduleActions = useAreasStore(
|
|
19
19
|
(state) => {
|
|
@@ -4,12 +4,12 @@ import { R as ResizableBox } from "../../../../../../../extended/React-Resizable
|
|
|
4
4
|
import { u as useAreasStore } from "../../../../../../hooks/useAreas/index.js";
|
|
5
5
|
import { W as Window } from "../Window/Window.js";
|
|
6
6
|
import Draggable from "react-draggable";
|
|
7
|
-
import {
|
|
7
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
8
8
|
import { b as WrapperWindowModalStyled } from "../../../../slots/AreasViewerSlots.js";
|
|
9
9
|
const WindowModal = (props) => {
|
|
10
10
|
const { windowId } = props;
|
|
11
11
|
const { onClose } = useAreasStore((state) => state.hashWindowsModals[windowId]);
|
|
12
|
-
const isDesktop =
|
|
12
|
+
const isDesktop = !useIsMobile();
|
|
13
13
|
const DragabblePaperComponent = (_props) => {
|
|
14
14
|
return /* @__PURE__ */ jsx(
|
|
15
15
|
Draggable,
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext, useRef, useCallback, useEffect } from "react";
|
|
3
3
|
import { useStore } from "zustand";
|
|
4
4
|
import { shallow } from "zustand/shallow";
|
|
5
|
-
import {
|
|
5
|
+
import { useIsMobile, useFirstRender } from "@m4l/graphics";
|
|
6
6
|
import { useHostTools, useModuleDictionary, useNetwork, useModuleSkeleton, useFlagsStore, CommonFlags, EmitEvents } from "@m4l/core";
|
|
7
7
|
import { c as createAreasStore } from "./store.js";
|
|
8
8
|
const AreasContext = createContext(null);
|
|
@@ -11,7 +11,7 @@ function AreasProvider(props) {
|
|
|
11
11
|
const { events_add_listener, events_remove_listener } = useHostTools();
|
|
12
12
|
const { getLabel } = useModuleDictionary();
|
|
13
13
|
const { networkOperation } = useNetwork();
|
|
14
|
-
const isDesktop =
|
|
14
|
+
const isDesktop = !useIsMobile();
|
|
15
15
|
const isSkeleton = useModuleSkeleton();
|
|
16
16
|
const isFirstRender = useFirstRender([getLabel]);
|
|
17
17
|
const { addFlag } = useFlagsStore((state) => state.flagsActions);
|
package/components/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.styles.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as getHeightSizeStyles } from "../../../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
2
|
const propagateLoaderSpinnerStyles = {
|
|
3
3
|
/**
|
|
4
4
|
* Estilos del componente raíz del contenedor de la ventana.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { getPropertyByString } from "@m4l/core";
|
|
3
|
-
import {
|
|
3
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
4
4
|
import { useTheme } from "@mui/material";
|
|
5
5
|
import { useState, useEffect } from "react";
|
|
6
6
|
import { useFormContext, Controller } from "react-hook-form";
|
|
@@ -32,7 +32,7 @@ function RHFAutocomplete(props) {
|
|
|
32
32
|
} = props;
|
|
33
33
|
const theme = useTheme();
|
|
34
34
|
const [open, setOpen] = useState(false);
|
|
35
|
-
const isDesktop =
|
|
35
|
+
const isDesktop = !useIsMobile();
|
|
36
36
|
const onCloseLocal = (event, reason) => {
|
|
37
37
|
setOpen(false);
|
|
38
38
|
if (onClose) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getTypographyStyles } from "../../../utils/getTypographyStyles.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as getHeightSizeStyles } from "../../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
3
|
const dateTimePickerStyles = {
|
|
4
4
|
/**
|
|
5
5
|
* Estilos para el root cuando esta en Desktop 💻
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { IconButtonProps } from './types';
|
|
2
3
|
/**
|
|
3
4
|
*Los Icon button son habitualmente ubicados en barras de aplicaciones y barras de herramientas. Además, resulta adecuado emplear iconos en botones de alternancia que posibilitan la selección o deselección de una única opción, como añadir o eliminar una estrella a un elemento.
|
|
4
5
|
* @param props
|
|
5
6
|
* @returns
|
|
6
7
|
*/
|
|
7
|
-
export declare const IconButton:
|
|
8
|
+
export declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|