@m4l/components 9.2.60-16062025.beta.2 → 9.2.60-24062025.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/types.d.ts +8 -0
- package/components/Chip/Chip.js +9 -10
- package/components/Chip/ChipStyles.js +13 -2
- package/components/Chip/constants.d.ts +9 -0
- package/components/Chip/constants.js +6 -2
- package/components/Chip/slots/ChipEnum.d.ts +3 -0
- package/components/Chip/slots/ChipEnum.js +6 -1
- package/components/Chip/slots/ChipSlots.js +1 -1
- package/components/DataGrid/Datagrid.styles.js +3 -0
- package/components/DynamicFilter/DynamicFilter.styles.js +16 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +2 -2
- package/components/DynamicSort/DynamicSort.styles.js +11 -8
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +2 -2
- package/components/LanguagePopover/LanguagePopover.js +8 -6
- package/components/LanguagePopover/LanguagePopover.styles.js +25 -4
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +9 -3
- package/components/LanguagePopover/slots/LanguagePopoverSlots.js +1 -3
- package/components/LanguagePopover/types.d.ts +6 -1
- package/components/PropertyValue/PropertyValue.styles.js +1 -1
- package/components/WindowBase/constants.d.ts +1 -0
- package/components/WindowBase/constants.js +5 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +3 -1
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +3 -3
- package/components/hook-form/RHFTextField/RHFTextField.js +1 -0
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +1 -1
- package/components/mui_extended/Button/Button.js +3 -1
- package/components/mui_extended/Button/ButtonStyles.js +6 -1
- package/components/mui_extended/Button/types.d.ts +1 -1
- package/components/mui_extended/NavLink/NavLink.js +3 -1
- package/components/mui_extended/NavLink/NavLink.styles.js +2 -1
- package/components/mui_extended/NavLink/types.d.ts +3 -1
- package/components/mui_extended/TextField/TextField.styles.js +14 -12
- package/index.d.ts +1 -0
- package/index.js +8 -7
- package/package.json +3 -3
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +1 -0
- package/utils/index.d.ts +1 -0
package/@types/types.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ import { ScrollBarOwnerState, ScrollBarSlotsType } from '../components/ScrollBar
|
|
|
148
148
|
|
|
149
149
|
import { SplitLayoutOwnerState } from '../components/extended/React-resizable-panels/types';
|
|
150
150
|
import { ObjectLogsOwnerState, ObjectLogsSlotsType } from '../components/ObjectLogs/types';
|
|
151
|
+
import { LanguagePopoverOwnerState, LanguagePopoverSlotsType } from '../components/LanguagePopover/types';
|
|
151
152
|
declare module '@mui/material/styles' {
|
|
152
153
|
// Define the slots in the theme
|
|
153
154
|
interface ComponentNameToClassKey {
|
|
@@ -226,6 +227,7 @@ declare module '@mui/material/styles' {
|
|
|
226
227
|
M4LScrollbar: ScrollBarSlotsType;
|
|
227
228
|
M4LSplitLayout: SplitLayoutOwnerState;
|
|
228
229
|
M4LObjectLogs: ObjectLogsSlotsType;
|
|
230
|
+
M4LLanguagePopover: LanguagePopoverSlotsType;
|
|
229
231
|
}
|
|
230
232
|
interface ComponentsPropsList {
|
|
231
233
|
// Extend ComponentsProps or ComponentsOwnerState(this extend ComponentProps)
|
|
@@ -304,6 +306,7 @@ declare module '@mui/material/styles' {
|
|
|
304
306
|
M4LScrollBar: Partial<ScrollBarOwnerState>;
|
|
305
307
|
M4LSplitLayout: Partial<SplitLayoutOwnerState>;
|
|
306
308
|
M4LObjectLogs: Partial<ObjectLogsOwnerState>;
|
|
309
|
+
M4LLanguagePopover: Partial<LanguagePopoverOwnerState>;
|
|
307
310
|
}
|
|
308
311
|
interface Components {
|
|
309
312
|
M4LDynamicFilter?: {
|
|
@@ -691,5 +694,10 @@ declare module '@mui/material/styles' {
|
|
|
691
694
|
styleOverrides?: ComponentsOverrides<Theme>['M4LObjectLogs'];
|
|
692
695
|
variants?: ComponentsVariants['M4LObjectLogs'];
|
|
693
696
|
};
|
|
697
|
+
M4LLanguagePopover?: {
|
|
698
|
+
defaultProps?: ComponentsPropsList['M4LLanguagePopover'];
|
|
699
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LLanguagePopover'];
|
|
700
|
+
variants?: ComponentsVariants['M4LLanguagePopover'];
|
|
701
|
+
};
|
|
694
702
|
}
|
|
695
703
|
}
|
package/components/Chip/Chip.js
CHANGED
|
@@ -28,16 +28,14 @@ const Chip = forwardRef((props, ref) => {
|
|
|
28
28
|
const { currentSize } = useComponentSize(size);
|
|
29
29
|
const isSkeleton = useModuleSkeleton();
|
|
30
30
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
31
|
-
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
32
31
|
const ownerState = useMemo(() => ({
|
|
33
32
|
interactive: !!onClick,
|
|
34
|
-
size:
|
|
35
|
-
chipSize: adjustedSize,
|
|
33
|
+
size: currentSize,
|
|
36
34
|
variant,
|
|
37
35
|
color,
|
|
38
36
|
opacity,
|
|
39
37
|
externalColor
|
|
40
|
-
}), [
|
|
38
|
+
}), [currentSize, variant, color, opacity, externalColor, onClick]);
|
|
41
39
|
const renderIcon = useMemo(() => (icon, instaceDataTestId) => {
|
|
42
40
|
if (!icon) {
|
|
43
41
|
return null;
|
|
@@ -50,12 +48,12 @@ const Chip = forwardRef((props, ref) => {
|
|
|
50
48
|
{
|
|
51
49
|
ownerState: { ...ownerState },
|
|
52
50
|
src: icon,
|
|
53
|
-
size:
|
|
51
|
+
size: currentSize,
|
|
54
52
|
instaceDataTestId
|
|
55
53
|
}
|
|
56
54
|
);
|
|
57
55
|
}
|
|
58
|
-
}, [ownerState,
|
|
56
|
+
}, [ownerState, currentSize]);
|
|
59
57
|
if (isSkeleton) {
|
|
60
58
|
return /* @__PURE__ */ jsx(
|
|
61
59
|
SkeletonChipStyled,
|
|
@@ -75,7 +73,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
75
73
|
ChipRootStyled,
|
|
76
74
|
{
|
|
77
75
|
role: "button-chip",
|
|
78
|
-
size:
|
|
76
|
+
size: currentSize,
|
|
79
77
|
onClick,
|
|
80
78
|
ownerState: { ...ownerState },
|
|
81
79
|
className: clsx(className, CHIP_CLASSES.root),
|
|
@@ -85,17 +83,18 @@ const Chip = forwardRef((props, ref) => {
|
|
|
85
83
|
...others,
|
|
86
84
|
children: [
|
|
87
85
|
renderIcon(startIcon, "ChipStartIcon"),
|
|
88
|
-
/* @__PURE__ */ jsx(TextChipStyled, { size:
|
|
86
|
+
/* @__PURE__ */ jsx(TextChipStyled, { size: currentSize, ownerState: { ...ownerState }, color, children: label }),
|
|
89
87
|
renderIcon(endIcon, "ChipEndIcon"),
|
|
90
88
|
onDeleted && /* @__PURE__ */ jsx(
|
|
91
89
|
IconButtonStyled,
|
|
92
90
|
{
|
|
93
91
|
...iconButtonProps,
|
|
94
92
|
src: iconClose,
|
|
95
|
-
size:
|
|
93
|
+
size: currentSize,
|
|
96
94
|
ownerState: { ...ownerState },
|
|
97
95
|
onClick: handleDelete,
|
|
98
|
-
disabled: disabledDeleteButton
|
|
96
|
+
disabled: disabledDeleteButton,
|
|
97
|
+
className: CHIP_CLASSES.closeIcon
|
|
99
98
|
}
|
|
100
99
|
)
|
|
101
100
|
]
|
|
@@ -43,8 +43,8 @@ const chipStyles = {
|
|
|
43
43
|
display: "flex",
|
|
44
44
|
alignItems: "center",
|
|
45
45
|
padding: theme.vars.size.baseSpacings.sp1,
|
|
46
|
-
paddingRight: 0,
|
|
47
46
|
borderRadius: theme.vars.size.borderRadius["r0-5"],
|
|
47
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
48
48
|
width: "max-content",
|
|
49
49
|
cursor: "pointer",
|
|
50
50
|
color,
|
|
@@ -72,6 +72,17 @@ const chipStyles = {
|
|
|
72
72
|
border: `${theme.vars.size.borderStroke.container}`,
|
|
73
73
|
borderColor: bgColor
|
|
74
74
|
},
|
|
75
|
+
"&&& .M4LChip-closeIcon": {
|
|
76
|
+
...getSizeStyles(
|
|
77
|
+
theme,
|
|
78
|
+
ownerState?.size || "medium",
|
|
79
|
+
"base",
|
|
80
|
+
(size) => ({
|
|
81
|
+
height: size,
|
|
82
|
+
width: size
|
|
83
|
+
})
|
|
84
|
+
)
|
|
85
|
+
},
|
|
75
86
|
variants: []
|
|
76
87
|
};
|
|
77
88
|
},
|
|
@@ -81,7 +92,7 @@ const chipStyles = {
|
|
|
81
92
|
textChip: ({ theme }) => ({
|
|
82
93
|
whiteSpace: "nowrap",
|
|
83
94
|
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
84
|
-
paddingRight: theme.vars.size.baseSpacings.
|
|
95
|
+
paddingRight: theme.vars.size.baseSpacings.sp1
|
|
85
96
|
}),
|
|
86
97
|
/**
|
|
87
98
|
* Styles for the chip icon element.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChipSlots, ChipComplementaryClasses } from './slots/ChipEnum';
|
|
1
2
|
/**
|
|
2
3
|
* Clave de identificación del componente Chip dentro del sistema.
|
|
3
4
|
*
|
|
@@ -6,6 +7,14 @@
|
|
|
6
7
|
* @default 'M4LChip'
|
|
7
8
|
*/
|
|
8
9
|
export declare const CHIP_KEY_COMPONENT = "M4LChip";
|
|
10
|
+
export declare const COMBINED_CHIP_ENUMS: {
|
|
11
|
+
closeIcon: ChipComplementaryClasses.closeIcon;
|
|
12
|
+
root: ChipSlots.root;
|
|
13
|
+
skeletonChip: ChipSlots.skeletonChip;
|
|
14
|
+
chipIcon: ChipSlots.chipIcon;
|
|
15
|
+
textChip: ChipSlots.textChip;
|
|
16
|
+
iconButton: ChipSlots.iconButton;
|
|
17
|
+
};
|
|
9
18
|
/**
|
|
10
19
|
* Inventario de clases CSS para el componente Chip
|
|
11
20
|
*/
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
-
import { C as ChipSlots } from "./slots/ChipEnum.js";
|
|
2
|
+
import { C as ChipComplementaryClasses, a as ChipSlots } from "./slots/ChipEnum.js";
|
|
3
3
|
const CHIP_KEY_COMPONENT = "M4LChip";
|
|
4
|
-
const
|
|
4
|
+
const COMBINED_CHIP_ENUMS = {
|
|
5
|
+
...ChipSlots,
|
|
6
|
+
...ChipComplementaryClasses
|
|
7
|
+
};
|
|
8
|
+
const CHIP_CLASSES = getComponentClasses(CHIP_KEY_COMPONENT, COMBINED_CHIP_ENUMS);
|
|
5
9
|
export {
|
|
6
10
|
CHIP_CLASSES as C,
|
|
7
11
|
CHIP_KEY_COMPONENT as a
|
|
@@ -6,6 +6,11 @@ var ChipSlots = /* @__PURE__ */ ((ChipSlots2) => {
|
|
|
6
6
|
ChipSlots2["iconButton"] = "iconButton";
|
|
7
7
|
return ChipSlots2;
|
|
8
8
|
})(ChipSlots || {});
|
|
9
|
+
var ChipComplementaryClasses = /* @__PURE__ */ ((ChipComplementaryClasses2) => {
|
|
10
|
+
ChipComplementaryClasses2["closeIcon"] = "closeIcon";
|
|
11
|
+
return ChipComplementaryClasses2;
|
|
12
|
+
})(ChipComplementaryClasses || {});
|
|
9
13
|
export {
|
|
10
|
-
|
|
14
|
+
ChipComplementaryClasses as C,
|
|
15
|
+
ChipSlots as a
|
|
11
16
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
2
|
import { c as chipStyles } from "../ChipStyles.js";
|
|
3
3
|
import { a as CHIP_KEY_COMPONENT } from "../constants.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as ChipSlots } from "./ChipEnum.js";
|
|
5
5
|
import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
|
|
6
6
|
import { T as Typography } from "../../mui_extended/Typography/Typography.js";
|
|
7
7
|
import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
|
|
@@ -68,6 +68,9 @@ const dataGridStyles = {
|
|
|
68
68
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
69
69
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
70
70
|
height: "fit-content",
|
|
71
|
+
...theme.generalSettings.isMobile && {
|
|
72
|
+
minHeight: theme.vars.size.baseSpacings.sp10
|
|
73
|
+
},
|
|
71
74
|
"& .mobile-menu-actions": {
|
|
72
75
|
marginRight: "auto"
|
|
73
76
|
}
|
|
@@ -33,7 +33,7 @@ const dynamicFilterStyles = {
|
|
|
33
33
|
height: "fit-content",
|
|
34
34
|
borderRadius: theme.vars.size.borderRadius.r2,
|
|
35
35
|
background: theme.vars.palette.background.default,
|
|
36
|
-
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1px ${theme.vars.palette.border.
|
|
36
|
+
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1px ${theme.vars.palette.border.default}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`,
|
|
37
37
|
overflow: "hidden",
|
|
38
38
|
'&:has([aria-expanded="true"])': {
|
|
39
39
|
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1.3px ${theme.vars.palette.border.main}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`
|
|
@@ -173,7 +173,7 @@ const dynamicFilterStyles = {
|
|
|
173
173
|
alignItems: "center",
|
|
174
174
|
borderTopRightRadius: theme.vars.size.borderRadius.r1,
|
|
175
175
|
borderBottomRightRadius: theme.vars.size.borderRadius.r1,
|
|
176
|
-
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.
|
|
176
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.default}`,
|
|
177
177
|
...!ownerState?.visibleRefresh && !ownerState?.isDirty && {
|
|
178
178
|
display: "none"
|
|
179
179
|
},
|
|
@@ -250,6 +250,12 @@ const dynamicFilterStyles = {
|
|
|
250
250
|
minWidth: "220px",
|
|
251
251
|
maxWidth: "420px",
|
|
252
252
|
height: "fit-content"
|
|
253
|
+
},
|
|
254
|
+
"& .M4LWindowBase-root": {
|
|
255
|
+
border: "unset!important",
|
|
256
|
+
"& .M4LWindowBase-headerWindowComponent": {
|
|
257
|
+
cursor: "unset"
|
|
258
|
+
}
|
|
253
259
|
}
|
|
254
260
|
}
|
|
255
261
|
}),
|
|
@@ -276,7 +282,14 @@ const dynamicFilterStyles = {
|
|
|
276
282
|
})
|
|
277
283
|
)
|
|
278
284
|
}),
|
|
279
|
-
|
|
285
|
+
/**
|
|
286
|
+
* popoverFilterContainerFields: Estilos del contenedor de los campos del menú emergente de filtro.
|
|
287
|
+
*/
|
|
288
|
+
popoverFilterContainerFields: ({ theme }) => ({
|
|
289
|
+
display: "flex",
|
|
290
|
+
flexDirection: "column",
|
|
291
|
+
gap: theme.vars.size.baseSpacings.sp4
|
|
292
|
+
})
|
|
280
293
|
};
|
|
281
294
|
export {
|
|
282
295
|
dynamicFilterStyles as d
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { B as BOOLEAN_OPERATORS } from "../../../constants.js";
|
|
@@ -29,7 +29,7 @@ function BooleanFilter() {
|
|
|
29
29
|
],
|
|
30
30
|
[getLabel]
|
|
31
31
|
);
|
|
32
|
-
return /* @__PURE__ */ jsxs(
|
|
32
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33
33
|
/* @__PURE__ */ jsx(
|
|
34
34
|
RHFAutocomplete,
|
|
35
35
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
@@ -23,7 +23,7 @@ function DateTimeFilter() {
|
|
|
23
23
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
24
24
|
[getLabel, restritcOperatorsTo]
|
|
25
25
|
);
|
|
26
|
-
return /* @__PURE__ */ jsxs(
|
|
26
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27
27
|
/* @__PURE__ */ jsx(
|
|
28
28
|
RHFAutocomplete,
|
|
29
29
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
@@ -24,7 +24,7 @@ function NumberFilter() {
|
|
|
24
24
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
25
25
|
[getLabel, restritcOperatorsTo]
|
|
26
26
|
);
|
|
27
|
-
return /* @__PURE__ */ jsxs(
|
|
27
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
28
|
/* @__PURE__ */ jsx(
|
|
29
29
|
RHFAutocomplete,
|
|
30
30
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { S as SELECT_ASYNC_OPERATORS_MULTIPLE, c as SELECT_ASYNC_OPERATORS_SINGLE } from "../../../constants.js";
|
|
@@ -22,7 +22,7 @@ function SelectAsyncFilter() {
|
|
|
22
22
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
23
23
|
[getLabel, isMultiple, restritcOperatorsTo]
|
|
24
24
|
);
|
|
25
|
-
return /* @__PURE__ */ jsxs(
|
|
25
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26
26
|
/* @__PURE__ */ jsx(
|
|
27
27
|
RHFAutocomplete,
|
|
28
28
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { d as SELECT_OPERATORS_MULTIPLE, e as SELECT_OPERATORS_SINGLE } from "../../../constants.js";
|
|
@@ -19,7 +19,7 @@ function SelectFilter() {
|
|
|
19
19
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
20
20
|
[getLabel, isMultiple, restritcOperatorsTo]
|
|
21
21
|
);
|
|
22
|
-
return /* @__PURE__ */ jsxs(
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
23
|
/* @__PURE__ */ jsx(
|
|
24
24
|
RHFAutocomplete,
|
|
25
25
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { f as STRING_OPERATORS } from "../../../constants.js";
|
|
@@ -17,7 +17,7 @@ function StringFilter() {
|
|
|
17
17
|
})).filter((o) => restritcOperatorsTo ? restritcOperatorsTo.includes(o.id) : true),
|
|
18
18
|
[getLabel, restritcOperatorsTo]
|
|
19
19
|
);
|
|
20
|
-
return /* @__PURE__ */ jsxs(
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
21
|
/* @__PURE__ */ jsx(
|
|
22
22
|
RHFAutocomplete,
|
|
23
23
|
{
|
|
@@ -33,7 +33,7 @@ const dynamicSortStyles = {
|
|
|
33
33
|
height: "fit-content",
|
|
34
34
|
borderRadius: theme.vars.size.borderRadius.r2,
|
|
35
35
|
background: theme.vars.palette.background.default,
|
|
36
|
-
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1px ${theme.vars.palette.border.
|
|
36
|
+
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1px ${theme.vars.palette.border.default}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`,
|
|
37
37
|
overflow: "hidden",
|
|
38
38
|
'&:has([aria-expanded="true"])': {
|
|
39
39
|
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1.3px ${theme.vars.palette.border.main}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`
|
|
@@ -172,7 +172,7 @@ const dynamicSortStyles = {
|
|
|
172
172
|
alignItems: "center",
|
|
173
173
|
borderTopRightRadius: theme.vars.size.borderRadius.r1,
|
|
174
174
|
borderBottomRightRadius: theme.vars.size.borderRadius.r1,
|
|
175
|
-
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.
|
|
175
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.default}`,
|
|
176
176
|
...!ownerState?.visibleRefresh && !ownerState?.isDirty && {
|
|
177
177
|
display: "none"
|
|
178
178
|
},
|
|
@@ -250,6 +250,12 @@ const dynamicSortStyles = {
|
|
|
250
250
|
minWidth: "220px",
|
|
251
251
|
maxWidth: "420px",
|
|
252
252
|
height: "fit-content"
|
|
253
|
+
},
|
|
254
|
+
"& .M4LWindowBase-root": {
|
|
255
|
+
border: "unset!important",
|
|
256
|
+
"& .M4LWindowBase-headerWindowComponent": {
|
|
257
|
+
cursor: "unset"
|
|
258
|
+
}
|
|
253
259
|
}
|
|
254
260
|
}
|
|
255
261
|
}),
|
|
@@ -257,12 +263,9 @@ const dynamicSortStyles = {
|
|
|
257
263
|
* popoverSortContainerFields: Estilos del contenedor de campos del menú emergente de ordenamiento.
|
|
258
264
|
*/
|
|
259
265
|
popoverSortContainerFields: ({ theme }) => ({
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
flexDirection: "column",
|
|
264
|
-
gap: theme.vars.size.baseSpacings.sp2
|
|
265
|
-
}
|
|
266
|
+
display: "flex",
|
|
267
|
+
flexDirection: "column",
|
|
268
|
+
gap: theme.vars.size.baseSpacings.sp4
|
|
266
269
|
}),
|
|
267
270
|
/**
|
|
268
271
|
* popoverSortActions: Estilos del contenedor de acciones del menú emergente de ordenamiento.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { S as SORT_ICONS } from "../../../icons.js";
|
|
@@ -25,7 +25,7 @@ function StringSort() {
|
|
|
25
25
|
],
|
|
26
26
|
[getLabel, host_static_assets, environment_assets]
|
|
27
27
|
);
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
28
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
29
29
|
RHFSelect,
|
|
30
30
|
{
|
|
31
31
|
size,
|
|
@@ -5,17 +5,16 @@ import { useEnvironment, useNetwork } from "@m4l/core";
|
|
|
5
5
|
import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
6
6
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { I as Image } from "../Image/Image.js";
|
|
8
|
-
import { L as LanguagePopoverRootStyled, P as PaperStyled
|
|
8
|
+
import { L as LanguagePopoverRootStyled, P as PaperStyled } from "./slots/LanguagePopoverSlots.js";
|
|
9
9
|
import { L as LANGUAGE_POPOVER_KEY_COMPONENT } from "./constants.js";
|
|
10
10
|
import { L as LanguagePopoverSlots } from "./slots/LanguagePopoverEnum.js";
|
|
11
11
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
12
12
|
function LanguagePopover(props) {
|
|
13
13
|
const {
|
|
14
14
|
disabled,
|
|
15
|
-
size
|
|
15
|
+
size
|
|
16
16
|
} = props;
|
|
17
17
|
const { currentSize } = useComponentSize(size);
|
|
18
|
-
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
19
18
|
const isFirstRender = useFirstRender();
|
|
20
19
|
const { currentLocale, onChangeLocale } = useLocales();
|
|
21
20
|
const { domain_token } = useEnvironment();
|
|
@@ -59,7 +58,7 @@ function LanguagePopover(props) {
|
|
|
59
58
|
return {
|
|
60
59
|
type: "menuItem",
|
|
61
60
|
label: option?.name,
|
|
62
|
-
startIcon: /* @__PURE__ */ jsx(Image, { src: option?.urlIcon, enableIntersectionObserver: false }),
|
|
61
|
+
startIcon: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Image, { src: option?.urlIcon, enableIntersectionObserver: false }) }),
|
|
63
62
|
onClick: () => onChangeLocale(option)
|
|
64
63
|
};
|
|
65
64
|
});
|
|
@@ -68,11 +67,14 @@ function LanguagePopover(props) {
|
|
|
68
67
|
return /* @__PURE__ */ jsx(
|
|
69
68
|
LanguagePopoverRootStyled,
|
|
70
69
|
{
|
|
71
|
-
|
|
70
|
+
ownerState: {
|
|
71
|
+
size: currentSize
|
|
72
|
+
},
|
|
73
|
+
size: currentSize,
|
|
72
74
|
className: classRoot,
|
|
73
75
|
...getPropDataTestId(LANGUAGE_POPOVER_KEY_COMPONENT, LanguagePopoverSlots.root),
|
|
74
76
|
disabled,
|
|
75
|
-
icon: /* @__PURE__ */ jsx(
|
|
77
|
+
icon: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Image, { src: currentLocale?.urlIcon, enableIntersectionObserver: false }) }),
|
|
76
78
|
menuActions: getMenuActionsOptions(),
|
|
77
79
|
onOpen: handleMenuOpenChange,
|
|
78
80
|
slots: {
|
|
@@ -1,8 +1,29 @@
|
|
|
1
|
+
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
1
2
|
const languagePopoverStyles = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
* Estilos del root
|
|
5
|
+
*/
|
|
6
|
+
root: ({ theme, ownerState }) => ({
|
|
7
|
+
"&": {
|
|
8
|
+
display: "flex",
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
...getSizeStyles(
|
|
12
|
+
theme,
|
|
13
|
+
ownerState?.size || "medium",
|
|
14
|
+
"action",
|
|
15
|
+
(size) => ({
|
|
16
|
+
width: size,
|
|
17
|
+
height: size
|
|
18
|
+
})
|
|
19
|
+
),
|
|
20
|
+
"& .MuiButtonBase-root > div": {
|
|
21
|
+
position: "absolute",
|
|
22
|
+
inset: theme.vars.size.baseSpacings.sp1
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}),
|
|
26
|
+
image: {},
|
|
6
27
|
/**
|
|
7
28
|
* Estilos del paper
|
|
8
29
|
*/
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
export declare const LanguagePopoverRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../MenuActions/types').MenuActionsProps, keyof import('../../MenuActions/types').MenuActionsProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown
|
|
2
|
-
|
|
1
|
+
export declare const LanguagePopoverRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../MenuActions/types').MenuActionsProps, keyof import('../../MenuActions/types').MenuActionsProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('..').LanguagePopoverOwnerState> & Record<string, unknown>) | undefined;
|
|
3
|
+
}, {}, {}>;
|
|
4
|
+
export declare const ImageStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
|
+
ownerState?: (Partial<import('..').LanguagePopoverOwnerState> & Record<string, unknown>) | undefined;
|
|
6
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
3
7
|
export declare const PaperStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').PaperOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
8
|
ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}, "children" | "style" | "square" | "variant" | "className" | "classes" | "sx" | "elevation">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "square" | "variant" | "translate" | "className" | "classes" | "sx" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "elevation"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown
|
|
9
|
+
}, "children" | "style" | "square" | "variant" | "className" | "classes" | "sx" | "elevation">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "square" | "variant" | "translate" | "className" | "classes" | "sx" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "elevation"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
10
|
+
ownerState?: (Partial<import('..').LanguagePopoverOwnerState> & Record<string, unknown>) | undefined;
|
|
11
|
+
}, {}, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
|
-
import { I as Image } from "../../Image/Image.js";
|
|
3
2
|
import { M as MenuActions } from "../../MenuActions/MenuActions.js";
|
|
4
3
|
import { L as LANGUAGE_POPOVER_KEY_COMPONENT } from "../constants.js";
|
|
5
4
|
import { l as languagePopoverStyles } from "../LanguagePopover.styles.js";
|
|
@@ -9,7 +8,7 @@ const LanguagePopoverRootStyled = styled(MenuActions, {
|
|
|
9
8
|
name: LANGUAGE_POPOVER_KEY_COMPONENT,
|
|
10
9
|
slot: LanguagePopoverSlots.root
|
|
11
10
|
})(languagePopoverStyles.root);
|
|
12
|
-
|
|
11
|
+
styled("div", {
|
|
13
12
|
name: LANGUAGE_POPOVER_KEY_COMPONENT,
|
|
14
13
|
slot: LanguagePopoverSlots.image
|
|
15
14
|
})(languagePopoverStyles.image);
|
|
@@ -18,7 +17,6 @@ const PaperStyled = styled(Paper, {
|
|
|
18
17
|
slot: LanguagePopoverSlots.paper
|
|
19
18
|
})(languagePopoverStyles.paper);
|
|
20
19
|
export {
|
|
21
|
-
ImageStyled as I,
|
|
22
20
|
LanguagePopoverRootStyled as L,
|
|
23
21
|
PaperStyled as P
|
|
24
22
|
};
|
|
@@ -17,4 +17,9 @@ export interface LanguagePopoverProps {
|
|
|
17
17
|
*/
|
|
18
18
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
19
19
|
}
|
|
20
|
-
export type
|
|
20
|
+
export type LanguagePopoverSlotsType = keyof typeof Slots;
|
|
21
|
+
export interface LanguagePopoverOwnerState {
|
|
22
|
+
size: LanguagePopoverProps['size'];
|
|
23
|
+
image?: string;
|
|
24
|
+
}
|
|
25
|
+
export type LanguagePopoverStyles = M4LOverridesStyleRules<LanguagePopoverSlotsType, typeof LANGUAGE_POPOVER_KEY_COMPONENT, Theme>;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { W as WindowBaseSlots } from "./slots/WindowBaseEnum.js";
|
|
1
3
|
const WINDOW_BASE_KEY_COMPONENT = "M4LWindowBase";
|
|
4
|
+
const WINDOW_BASE_CLASSES = getComponentClasses(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots);
|
|
2
5
|
export {
|
|
3
|
-
WINDOW_BASE_KEY_COMPONENT as W
|
|
6
|
+
WINDOW_BASE_KEY_COMPONENT as W,
|
|
7
|
+
WINDOW_BASE_CLASSES as a
|
|
4
8
|
};
|
|
@@ -8,6 +8,8 @@ import { deepEqual } from "fast-equals";
|
|
|
8
8
|
import { useFormatter } from "@m4l/graphics";
|
|
9
9
|
import { u as useButtonActions } from "./useButtonActions.js";
|
|
10
10
|
import { H as HeaderWindowComponentStyled, c as HeaderContentStyled, I as IconWindowStyled, d as ContainerTitleSubtitleStyled, e as TitleWindowStyled, P as PointIconStyled, S as SubtitleWindowStyled, f as IconsWrapperStyled, g as ContainerLeftActionsStyled, M as MenuActionsWindowsStyled } from "../../slots/WindowBaseSlots.js";
|
|
11
|
+
import { a as WINDOW_BASE_CLASSES } from "../../constants.js";
|
|
12
|
+
import clsx from "clsx";
|
|
11
13
|
const HeaderWindowBase = (props) => {
|
|
12
14
|
const {
|
|
13
15
|
title,
|
|
@@ -105,7 +107,7 @@ const HeaderWindowBase = (props) => {
|
|
|
105
107
|
};
|
|
106
108
|
const IconButtonLeftActions = useButtonActions(leftActions);
|
|
107
109
|
const IconButtonRightActions = useButtonActions(rightActions);
|
|
108
|
-
return /* @__PURE__ */ jsxs(HeaderWindowComponentStyled, { className: dragResizeWindowRNDClasses.draggableHandle, ownerState, children: [
|
|
110
|
+
return /* @__PURE__ */ jsxs(HeaderWindowComponentStyled, { className: clsx(dragResizeWindowRNDClasses.draggableHandle, WINDOW_BASE_CLASSES.headerWindowComponent), ownerState, children: [
|
|
109
111
|
/* @__PURE__ */ jsxs(HeaderContentStyled, { ownerState, children: [
|
|
110
112
|
iconUrl && /* @__PURE__ */ jsx(IconWindowStyled, { size, ownerState, src: iconUrl, "aria-label": "main icon" }),
|
|
111
113
|
/* @__PURE__ */ jsxs(ContainerTitleSubtitleStyled, { size, ownerState, children: [
|
|
@@ -73,7 +73,7 @@ const splitLayoutStyles = {
|
|
|
73
73
|
width: theme.vars.size.baseSpacings.sp5,
|
|
74
74
|
height: theme.vars.size.baseSpacings.sp5,
|
|
75
75
|
"& .M4LIcon-icon": {
|
|
76
|
-
backgroundColor: theme.vars.palette.primary.
|
|
76
|
+
backgroundColor: theme.vars.palette.primary.focusVisible
|
|
77
77
|
},
|
|
78
78
|
"&::before": {
|
|
79
79
|
content: `""`,
|
|
@@ -138,12 +138,12 @@ const splitLayoutStyles = {
|
|
|
138
138
|
},
|
|
139
139
|
"&.M4LSplitLayout-splitResizeHandle-vertical": {
|
|
140
140
|
"&:after": {
|
|
141
|
-
boxShadow: `inset 0px 1px 0px 0px ${theme.vars.palette.primary.
|
|
141
|
+
boxShadow: `inset 0px 1px 0px 0px ${theme.vars.palette.primary.focusVisible}`
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
144
|
"&.M4LSplitLayout-splitResizeHandle-horizontal": {
|
|
145
145
|
"&:after": {
|
|
146
|
-
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.primary.
|
|
146
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.primary.focusVisible}`
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -87,6 +87,7 @@ const RHFTextField = forwardRef((props, ref) => {
|
|
|
87
87
|
InputLabelProps: { shrink: true },
|
|
88
88
|
autoComplete,
|
|
89
89
|
onChange: onInternalChange,
|
|
90
|
+
variant,
|
|
90
91
|
value: type === "number" ? isNaN(parseFloat(value)) ? "" : value : value || "",
|
|
91
92
|
fullWidth: true,
|
|
92
93
|
error: !!error,
|
|
@@ -6,8 +6,8 @@ const rhfTextFieldPasswordStyles = {
|
|
|
6
6
|
root: ({ theme, ownerState }) => ({
|
|
7
7
|
display: "flex",
|
|
8
8
|
flexDirection: "column",
|
|
9
|
-
borderAlingment: "center",
|
|
10
9
|
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
10
|
+
width: "100%",
|
|
11
11
|
"& .MuiFormControl-root": {
|
|
12
12
|
minHeight: "100%",
|
|
13
13
|
...getHeightSizeStyles(
|
|
@@ -16,6 +16,7 @@ const Button = forwardRef((props, ref) => {
|
|
|
16
16
|
size,
|
|
17
17
|
variant = "contained",
|
|
18
18
|
skeletonWidth = "15%",
|
|
19
|
+
fullWidth = false,
|
|
19
20
|
...others
|
|
20
21
|
} = props;
|
|
21
22
|
const { currentSize } = useComponentSize(size);
|
|
@@ -31,7 +32,8 @@ const Button = forwardRef((props, ref) => {
|
|
|
31
32
|
variant,
|
|
32
33
|
disabled,
|
|
33
34
|
paletteColor,
|
|
34
|
-
color
|
|
35
|
+
color,
|
|
36
|
+
fullWidth
|
|
35
37
|
};
|
|
36
38
|
if (isSkeleton) {
|
|
37
39
|
return /* @__PURE__ */ jsx(SkeletonButtonStyled, { "data-testid": "SkeletonButton", width: skeletonWidth, ownerState: { ...ownerState } });
|
|
@@ -21,7 +21,7 @@ export interface ButtonProps extends Omit<MUIButtonProps, 'size' | 'variant' | '
|
|
|
21
21
|
/**
|
|
22
22
|
* Owner state of the `Button` used to define internal style and behavior properties.
|
|
23
23
|
*/
|
|
24
|
-
export interface ButtonOwnerState extends Pick<ButtonProps, 'size' | 'variant' | 'color' | 'disabled'> {
|
|
24
|
+
export interface ButtonOwnerState extends Pick<ButtonProps, 'size' | 'variant' | 'color' | 'disabled' | 'fullWidth'> {
|
|
25
25
|
disabled?: boolean;
|
|
26
26
|
paletteColor: PaletteColor;
|
|
27
27
|
}
|
|
@@ -15,6 +15,7 @@ const NavLink = (props) => {
|
|
|
15
15
|
skeletonWidth,
|
|
16
16
|
color,
|
|
17
17
|
dataTestId,
|
|
18
|
+
whiteSpace = false,
|
|
18
19
|
...others
|
|
19
20
|
} = props;
|
|
20
21
|
const isSkeleton = useModuleSkeleton();
|
|
@@ -22,7 +23,8 @@ const NavLink = (props) => {
|
|
|
22
23
|
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
23
24
|
const ownerState = {
|
|
24
25
|
disabled,
|
|
25
|
-
size
|
|
26
|
+
size,
|
|
27
|
+
whiteSpace
|
|
26
28
|
};
|
|
27
29
|
return /* @__PURE__ */ jsx(
|
|
28
30
|
RouterNavLinkRootStyled,
|
|
@@ -22,9 +22,11 @@ export interface NavLinkProps extends RouterNavLinkProps, Pick<TypographyProps,
|
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
/** Estilos personalizados para el componente. */
|
|
24
24
|
dataTestId?: string;
|
|
25
|
+
/** Define el white space del texto. Por defecto es 'normal'. */
|
|
26
|
+
whiteSpace?: boolean;
|
|
25
27
|
}
|
|
26
28
|
/** Estado del propietario del NavLink.*/
|
|
27
|
-
export type NavLinkOwnerState = Pick<NavLinkProps, 'color'> & {
|
|
29
|
+
export type NavLinkOwnerState = Pick<NavLinkProps, 'color' | 'whiteSpace'> & {
|
|
28
30
|
/** Indica si el NavLink está deshabilitado. */
|
|
29
31
|
disabled?: boolean;
|
|
30
32
|
/** Define el tamaño de la etiqueta. Puede ser 'small' o 'medium'. Por defecto es 'medium'.*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getTypographyStyles } from "../../../utils/getTypographyStyles.js";
|
|
2
|
-
import { a as getHeightSizeStyles } from "../../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
|
+
import { a as getHeightSizeStyles, g as getSizeStyles } from "../../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
3
|
import { T as TEXT_FIELD_CLASSES } from "./constants.js";
|
|
4
4
|
const textFieldStyles = {
|
|
5
5
|
/**
|
|
@@ -28,17 +28,19 @@ const textFieldStyles = {
|
|
|
28
28
|
// transición
|
|
29
29
|
transition: "all 0.2s ease",
|
|
30
30
|
// Espaciado entre elementos
|
|
31
|
-
...
|
|
32
|
-
theme
|
|
31
|
+
...getSizeStyles(
|
|
32
|
+
theme,
|
|
33
33
|
ownerState?.size || "medium",
|
|
34
34
|
"action",
|
|
35
|
-
(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
}
|
|
35
|
+
(size) => ({
|
|
36
|
+
height: "auto",
|
|
37
|
+
minHeight: size
|
|
38
|
+
})
|
|
41
39
|
),
|
|
40
|
+
"& .MuiInputBase-input.MuiInputBase-inputMultiline": {
|
|
41
|
+
paddingTop: theme.vars.size.baseSpacings.sp1,
|
|
42
|
+
paddingBottom: theme.vars.size.baseSpacings.sp1
|
|
43
|
+
},
|
|
42
44
|
...ownerState?.readOnly ? {
|
|
43
45
|
backgroundColor: theme.vars.palette.background.neutral
|
|
44
46
|
} : {}
|
|
@@ -90,7 +92,7 @@ const textFieldStyles = {
|
|
|
90
92
|
}
|
|
91
93
|
},
|
|
92
94
|
"&:not(.M4LTextField-readOnly ) .MuiInputBase-root:hover": {
|
|
93
|
-
backgroundColor:
|
|
95
|
+
backgroundColor: theme.vars.palette.default.hoverOpacity,
|
|
94
96
|
...ownerState?.error && {
|
|
95
97
|
borderColor: `${ownerState?.paletteColor?.hover}!important`,
|
|
96
98
|
"& .MuiInputAdornment-root .M4LIcon-icon": {
|
|
@@ -125,13 +127,13 @@ const textFieldStyles = {
|
|
|
125
127
|
...ownerState?.variant === "contained" && {
|
|
126
128
|
[`&.${TEXT_FIELD_CLASSES.contained} .MuiInputBase-root`]: {
|
|
127
129
|
border: "none",
|
|
128
|
-
backgroundColor: ownerState?.readOnly ? theme.vars.palette.background.neutral : theme.vars.palette[ownerState?.color || "default"][ownerState?.error ? "toneOpacity" : "
|
|
130
|
+
backgroundColor: ownerState?.readOnly ? theme.vars.palette.background.neutral : theme.vars.palette[ownerState?.color || "default"][ownerState?.error ? "toneOpacity" : "enabledOpacity"]
|
|
129
131
|
},
|
|
130
132
|
...ownerState?.error && !ownerState?.readOnly && {
|
|
131
133
|
border: theme.vars.size.borderStroke.actionInput,
|
|
132
134
|
borderColor: `${ownerState?.paletteColor?.enabled}!important`
|
|
133
135
|
},
|
|
134
|
-
"&:not(.M4LTextField-readOnly
|
|
136
|
+
"&:not(.M4LTextField-readOnly) .MuiInputBase-root:focus-within": {
|
|
135
137
|
border: theme.vars.size.borderStroke.actionInput,
|
|
136
138
|
borderColor: `${ownerState?.paletteColor?.enabled}!important`
|
|
137
139
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -210,12 +210,12 @@ import { g as g30 } from "./utils/getComponentUtilityClass.js";
|
|
|
210
210
|
import { g as g31 } from "./utils/getPaletteColor.js";
|
|
211
211
|
import { g as g32 } from "./utils/getTypographyStyles.js";
|
|
212
212
|
import { g as g33 } from "./utils/getIconColor.js";
|
|
213
|
-
import { a as a16 } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
213
|
+
import { a as a16, g as g34 } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
214
214
|
import { O as O2 } from "./utils/ObjectQueue.js";
|
|
215
|
-
import { g as
|
|
215
|
+
import { g as g35, a as a17 } from "./utils/getComponentSlotRoot.js";
|
|
216
216
|
import { f } from "./utils/formatDistanceToNow/formatDistanteToNow.js";
|
|
217
|
-
import { g as
|
|
218
|
-
import { g as
|
|
217
|
+
import { g as g36 } from "./utils/getValidDate.js";
|
|
218
|
+
import { g as g37 } from "./utils/getNullGuard.js";
|
|
219
219
|
export {
|
|
220
220
|
A7 as AREAS_DICCTIONARY,
|
|
221
221
|
a3 as AREAS_DICTIONARY_ID,
|
|
@@ -394,7 +394,7 @@ export {
|
|
|
394
394
|
b2 as getAreasComponentsDictionary,
|
|
395
395
|
g3 as getAreasDictionary,
|
|
396
396
|
g4 as getCommonActionsDictionary,
|
|
397
|
-
|
|
397
|
+
g35 as getComponentClasses,
|
|
398
398
|
a17 as getComponentSlotRoot,
|
|
399
399
|
g30 as getComponentUtilityClass,
|
|
400
400
|
g5 as getDataGridComponentsDictionary,
|
|
@@ -418,7 +418,7 @@ export {
|
|
|
418
418
|
a14 as getModalDialogComponentsDictionary,
|
|
419
419
|
g27 as getModalDictionary,
|
|
420
420
|
g25 as getNoItemSelectedComponentsDictionary,
|
|
421
|
-
|
|
421
|
+
g37 as getNullGuard,
|
|
422
422
|
g26 as getObjectLogsComponentsDictionary,
|
|
423
423
|
g11 as getPagerComponentsDictionary,
|
|
424
424
|
g31 as getPaletteColor,
|
|
@@ -427,9 +427,10 @@ export {
|
|
|
427
427
|
g19 as getRHFAutocompleteComponentsDictionary,
|
|
428
428
|
g9 as getRawFiltersForNetwork,
|
|
429
429
|
g10 as getRawSortsForNetwork,
|
|
430
|
+
g34 as getSizeStyles,
|
|
430
431
|
g32 as getTypographyStyles,
|
|
431
432
|
g13 as getUncertaintyFormat,
|
|
432
|
-
|
|
433
|
+
g36 as getValidDate,
|
|
433
434
|
g29 as getformAddEditDictionary,
|
|
434
435
|
i as isEqualLayout,
|
|
435
436
|
k as isEqualLayouts,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.2.60-
|
|
3
|
+
"version": "9.2.60-24062025.beta.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "M4L Components",
|
|
6
6
|
"lint-staged": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@googlemaps/js-api-loader": "^1.16.6",
|
|
12
12
|
"@hookform/resolvers": "2.9.11",
|
|
13
13
|
"@m4l/core": "^2.0.0",
|
|
14
|
-
"@m4l/graphics": "
|
|
15
|
-
"@m4l/styles": "7.1.29-
|
|
14
|
+
"@m4l/graphics": "7.1.2-24062025.beta.1",
|
|
15
|
+
"@m4l/styles": "7.1.29-24062025.beta.1",
|
|
16
16
|
"@microlink/react-json-view": "^1.23.3",
|
|
17
17
|
"@mui/lab": "5.0.0-alpha.173",
|
|
18
18
|
"@mui/material": "5.16.7",
|
package/utils/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './getComponentSlotRoot';
|
|
|
7
7
|
export { getTypographyStyles } from './getTypographyStyles';
|
|
8
8
|
export { getIconColor } from './getIconColor';
|
|
9
9
|
export { getHeightSizeStyles } from './getSizeStyles';
|
|
10
|
+
export { getSizeStyles } from './getSizeStyles';
|
|
10
11
|
export * from './formatDistanceToNow';
|
|
11
12
|
export * from './getValidDate';
|
|
12
13
|
export * from './getNullGuard';
|