@m4l/components 9.1.130 → 9.1.132
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 +3 -3
- package/components/DynamicSort/DynamicSort.d.ts +4 -1
- package/components/DynamicSort/DynamicSort.styles.js +88 -126
- package/components/DynamicSort/constants.d.ts +0 -1
- package/components/DynamicSort/constants.js +0 -1
- package/components/DynamicSort/icons.d.ts +2 -0
- package/components/DynamicSort/icons.js +6 -0
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +23 -43
- package/components/DynamicSort/slots/DynamicSortSlots.js +30 -57
- package/components/DynamicSort/slots/SlotsEnum.d.ts +2 -9
- package/components/DynamicSort/slots/SlotsEnum.js +1 -8
- package/components/DynamicSort/store/DynamicSortContext.d.ts +3 -3
- package/components/DynamicSort/store/DynamicSortContext.js +10 -4
- package/components/DynamicSort/store/DynamicSortStore.d.ts +1 -177
- package/components/DynamicSort/store/DynamicSortStore.js +10 -1
- package/components/DynamicSort/store/type.d.ts +186 -0
- package/components/DynamicSort/store/useDynamicSortStore.d.ts +2 -2
- package/components/DynamicSort/subcomponents/AppliedSortChip/AppliedSortChip.d.ts +1 -1
- package/components/DynamicSort/subcomponents/AppliedSortChip/AppliedSortChip.js +18 -20
- package/components/DynamicSort/subcomponents/AppliedSortChip/useAppliedSortChip.d.ts +2 -2
- package/components/DynamicSort/subcomponents/AppliedSortChip/useAppliedSortChip.js +4 -4
- package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.d.ts +1 -1
- package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.js +14 -2
- package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.d.ts +1 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.d.ts +1 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +4 -3
- package/components/DynamicSort/subcomponents/DynamicSortBase/useDynamicSortBase.d.ts +2 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/useDynamicSortBase.js +2 -1
- package/components/DynamicSort/subcomponents/FieldTypes/DataTypeComponent.d.ts +1 -1
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/helpers.d.ts +8 -8
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/helpers.js +11 -14
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +16 -12
- package/components/DynamicSort/subcomponents/FieldTypes/fieldFactory.d.ts +1 -1
- package/components/DynamicSort/subcomponents/InputSort/InputSort.d.ts +1 -1
- package/components/DynamicSort/subcomponents/InputSort/InputSort.js +8 -10
- package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.js +9 -8
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +8 -6
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +8 -9
- package/components/DynamicSort/tests/DynamicSort.test.d.ts +1 -0
- package/components/DynamicSort/types.d.ts +9 -2
- 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/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/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.styles.js +1 -1
- 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/index.js +7 -7
- package/package.json +1 -1
- package/utils/getSizeStyles/getSizeStyles.d.ts +1 -2
- package/utils/getSizeStyles/getSizeStyles.js +4 -4
- package/components/DynamicSort/DynamicSort.stories.d.ts +0 -21
- package/components/DynamicSort/subcomponents/InputSort/InputSortSkeleton.d.ts +0 -5
- package/components/DynamicSort/subcomponents/InputSort/InputSortSkeleton.js +0 -19
- package/components/DynamicSort/subcomponents/SortActions/SortActionsSkeleton.d.ts +0 -5
- package/components/DynamicSort/subcomponents/SortActions/SortActionsSkeleton.js +0 -12
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
|
};
|
|
@@ -29,7 +29,7 @@ export interface ChipProps {
|
|
|
29
29
|
/**
|
|
30
30
|
* Defines the variant of the `Chip` (default 'contained').
|
|
31
31
|
*/
|
|
32
|
-
variant?: ChipVariants;
|
|
32
|
+
variant?: ChipVariants | string;
|
|
33
33
|
/**
|
|
34
34
|
* Defines the color of the `Chip`.
|
|
35
35
|
*/
|
|
@@ -49,7 +49,7 @@ export interface ChipProps {
|
|
|
49
49
|
/**
|
|
50
50
|
* Function to be executed when the `Chip` is clicked.
|
|
51
51
|
*/
|
|
52
|
-
onClick?: () => void;
|
|
52
|
+
onClick?: (() => void) | ((event: any) => void);
|
|
53
53
|
/**
|
|
54
54
|
* Props for the close icon button.
|
|
55
55
|
*/
|
|
@@ -63,7 +63,7 @@ export interface ChipProps {
|
|
|
63
63
|
*/
|
|
64
64
|
className?: string;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* If the `Chip` is focusable.
|
|
67
67
|
*/
|
|
68
68
|
focusable?: boolean;
|
|
69
69
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { DynamicSortProps } from './types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* El DynamicSort es un componente que permite ordenar de manera acendentente o descendente una lista de elementos.
|
|
4
|
+
*
|
|
5
|
+
* ### Dependecias:
|
|
6
|
+
*- **`useFlagsPresent:`** Hook que permite verificar si una lista de flags se encuentran presentes.
|
|
4
7
|
*/
|
|
5
8
|
export declare function DynamicSort(props: DynamicSortProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { alpha } from "@mui/material";
|
|
2
1
|
import { c as containerQuery } from "../../utils/containerQuery.js";
|
|
2
|
+
import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
|
|
3
|
+
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
3
4
|
const CONTAINER_QUERY_NAME = "dynamic";
|
|
4
5
|
const dynamicSortStyles = {
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Root: Estilos del contenedor principal del componente.
|
|
8
|
+
*/
|
|
9
|
+
root: () => ({
|
|
6
10
|
containerName: CONTAINER_QUERY_NAME,
|
|
7
11
|
containerType: "inline-size",
|
|
8
12
|
width: "100%",
|
|
9
13
|
height: "auto",
|
|
10
14
|
padding: 0
|
|
11
|
-
},
|
|
15
|
+
}),
|
|
12
16
|
/**
|
|
13
|
-
*
|
|
17
|
+
* innerContainer: Estilos del contenedor interno del componente.
|
|
14
18
|
*/
|
|
15
19
|
innerContainer: ({ theme, ownerState }) => ({
|
|
16
20
|
display: "grid",
|
|
@@ -39,15 +43,26 @@ const dynamicSortStyles = {
|
|
|
39
43
|
} : {}
|
|
40
44
|
}),
|
|
41
45
|
/**
|
|
42
|
-
*
|
|
46
|
+
* inputSort: Estilos del contenedor del campo de entrada de ordenamiento.
|
|
43
47
|
*/
|
|
44
|
-
inputSort: ({ theme }) => ({
|
|
48
|
+
inputSort: ({ theme, ownerState }) => ({
|
|
45
49
|
gridArea: "input-sort",
|
|
46
50
|
display: "flex",
|
|
47
51
|
flexDirection: "row",
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
53
|
+
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
50
54
|
height: "100%",
|
|
55
|
+
overflow: "hidden",
|
|
56
|
+
...getSizeStyles(
|
|
57
|
+
theme,
|
|
58
|
+
ownerState.size || "medium",
|
|
59
|
+
"container",
|
|
60
|
+
(size) => ({
|
|
61
|
+
height: size,
|
|
62
|
+
minHeight: size,
|
|
63
|
+
maxHeight: size
|
|
64
|
+
})
|
|
65
|
+
),
|
|
51
66
|
maxWidth: "135px",
|
|
52
67
|
width: "100%",
|
|
53
68
|
alignItems: "center",
|
|
@@ -56,26 +71,34 @@ const dynamicSortStyles = {
|
|
|
56
71
|
borderRight: "1px solid",
|
|
57
72
|
borderColor: theme.vars.palette.border?.default,
|
|
58
73
|
[containerQuery(theme.breakpoints, CONTAINER_QUERY_NAME)]: {
|
|
59
|
-
height: "32px",
|
|
60
|
-
width: "100%",
|
|
61
|
-
maxWidth: "100%",
|
|
62
74
|
borderRight: "none"
|
|
63
|
-
},
|
|
64
|
-
[theme.breakpoints.down("sm")]: {
|
|
65
|
-
height: "44px",
|
|
66
|
-
justifyContent: "center"
|
|
67
75
|
}
|
|
68
76
|
}),
|
|
69
77
|
/**
|
|
70
|
-
*
|
|
78
|
+
* inputSortInput: Estilos del campo de entrada de ordenamiento.
|
|
71
79
|
*/
|
|
72
|
-
inputSortInput: ({ theme }) => ({
|
|
73
|
-
...
|
|
80
|
+
inputSortInput: ({ theme, ownerState }) => ({
|
|
81
|
+
...getSizeStyles(
|
|
82
|
+
theme,
|
|
83
|
+
ownerState.size || "medium",
|
|
84
|
+
"action",
|
|
85
|
+
(size) => ({
|
|
86
|
+
height: size,
|
|
87
|
+
minHeight: size,
|
|
88
|
+
maxHeight: size
|
|
89
|
+
})
|
|
90
|
+
),
|
|
91
|
+
...getTypographyStyles(
|
|
92
|
+
theme.generalSettings.isMobile,
|
|
93
|
+
ownerState.size || "medium",
|
|
94
|
+
"body"
|
|
95
|
+
),
|
|
74
96
|
background: theme.vars.palette.background.default,
|
|
75
97
|
color: theme.vars.palette.text.secondary,
|
|
76
|
-
border:
|
|
98
|
+
border: 0,
|
|
77
99
|
borderColor: "transparent",
|
|
78
|
-
|
|
100
|
+
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
101
|
+
paddingRight: theme.vars.size.baseSpacings.sp2,
|
|
79
102
|
width: "100%",
|
|
80
103
|
height: "100%",
|
|
81
104
|
"&::placeholder": {
|
|
@@ -96,19 +119,19 @@ const dynamicSortStyles = {
|
|
|
96
119
|
}),
|
|
97
120
|
inputSortIcon: {},
|
|
98
121
|
/**
|
|
99
|
-
*
|
|
122
|
+
* appliedSorts: Estilos del contenedor de los campos de ordenamiento aplicados.
|
|
100
123
|
*/
|
|
101
124
|
appliedSorts: ({ theme }) => ({
|
|
102
125
|
gridArea: "applied-sorts",
|
|
103
126
|
width: "100%",
|
|
104
127
|
height: "fit-content",
|
|
128
|
+
overflow: "hidden",
|
|
105
129
|
paddingLeft: theme.spacing(1),
|
|
106
130
|
borderLeft: "none",
|
|
107
131
|
margin: "0px",
|
|
108
132
|
padding: "0px 4px",
|
|
109
133
|
[containerQuery(theme.breakpoints, CONTAINER_QUERY_NAME)]: {
|
|
110
134
|
height: "auto",
|
|
111
|
-
padding: "4px",
|
|
112
135
|
display: "flex",
|
|
113
136
|
borderTop: "1px solid ",
|
|
114
137
|
borderColor: theme.vars.palette.border?.secondary,
|
|
@@ -118,7 +141,7 @@ const dynamicSortStyles = {
|
|
|
118
141
|
}
|
|
119
142
|
}),
|
|
120
143
|
/**
|
|
121
|
-
*
|
|
144
|
+
* appliedSortInnerContainer: Estilos del contenedor interno de los campos de ordenamiento aplicados.
|
|
122
145
|
*/
|
|
123
146
|
appliedSortInnerContainer: ({ theme }) => ({
|
|
124
147
|
padding: "2px",
|
|
@@ -141,107 +164,48 @@ const dynamicSortStyles = {
|
|
|
141
164
|
}
|
|
142
165
|
}),
|
|
143
166
|
/**
|
|
144
|
-
*
|
|
167
|
+
* appliedSortChip: Estilos del chip de ordenamiento aplicado.
|
|
145
168
|
*/
|
|
146
169
|
appliedSortChip: ({ theme }) => ({
|
|
147
|
-
|
|
148
|
-
justifyContent: "center",
|
|
149
|
-
alignItems: "center",
|
|
150
|
-
overflow: "visible",
|
|
151
|
-
width: "auto",
|
|
152
|
-
height: "24px",
|
|
153
|
-
minHeight: theme.spacing(3),
|
|
154
|
-
paddingLeft: theme.spacing(1),
|
|
155
|
-
borderColor: alpha(`${theme.colorSchemes.finalTheme.palette.divider}`, 0.1),
|
|
156
|
-
border: "none",
|
|
157
|
-
borderRadius: "4px",
|
|
158
|
-
backgroundColor: theme.vars.palette.background?.surface,
|
|
159
|
-
color: theme.vars.palette.text.secondary,
|
|
160
|
-
...theme.typography.body,
|
|
161
|
-
[theme.breakpoints.down("sm")]: {
|
|
162
|
-
height: "fit-content"
|
|
163
|
-
}
|
|
164
|
-
}),
|
|
165
|
-
appliedSortChipIcon: {},
|
|
166
|
-
/**
|
|
167
|
-
* TODO: Documentar
|
|
168
|
-
*/
|
|
169
|
-
appliedSortChipInfo: ({ theme }) => ({
|
|
170
|
-
...theme.typography.body2,
|
|
171
|
-
display: "flex",
|
|
172
|
-
justifyContent: "center",
|
|
173
|
-
alignItems: "center",
|
|
174
|
-
width: "auto",
|
|
175
|
-
height: "100%",
|
|
176
|
-
marginRight: theme.spacing(1),
|
|
177
|
-
marginLeft: theme.spacing(1),
|
|
178
|
-
whiteSpace: "nowrap",
|
|
179
|
-
border: "none",
|
|
180
|
-
backgroundColor: "transparent"
|
|
181
|
-
}),
|
|
182
|
-
/**
|
|
183
|
-
* TODO: Documentar
|
|
184
|
-
*/
|
|
185
|
-
appliedSortChipInfoFieldName: ({ theme }) => ({
|
|
186
|
-
...theme.typography.subtitle2,
|
|
187
|
-
color: theme.vars.palette.text.secondary
|
|
188
|
-
}),
|
|
189
|
-
/**
|
|
190
|
-
* TODO: Documentar
|
|
191
|
-
*/
|
|
192
|
-
appliedSortChipInfoOperator: ({ theme }) => ({
|
|
193
|
-
...theme.typography.body2,
|
|
194
|
-
marginLeft: theme.spacing(1.5),
|
|
195
|
-
fontStyle: "italic",
|
|
196
|
-
color: theme.vars.palette.text.secondary
|
|
197
|
-
}),
|
|
198
|
-
/**
|
|
199
|
-
* TODO: Documentar
|
|
200
|
-
*/
|
|
201
|
-
appliedSortChipInfoOperands: ({ theme }) => ({
|
|
202
|
-
...theme.typography.body2,
|
|
203
|
-
marginLeft: theme.spacing(1.5),
|
|
170
|
+
backgroundColor: theme.vars.palette.chips?.defaultContained.backgroundColor,
|
|
204
171
|
color: theme.vars.palette.text.secondary
|
|
205
172
|
}),
|
|
206
|
-
appliedSortChipRemoveButton: {},
|
|
207
173
|
/**
|
|
208
|
-
*
|
|
174
|
+
* actions: Estilos del contenedor de los botones de acción.
|
|
209
175
|
*/
|
|
210
176
|
actions: ({ theme }) => ({
|
|
177
|
+
overflow: "hidden",
|
|
211
178
|
gridArea: "actions-sort",
|
|
212
179
|
display: "flex",
|
|
213
180
|
flexDirection: "row",
|
|
214
|
-
gap: "
|
|
215
|
-
padding:
|
|
181
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
182
|
+
padding: theme.vars.size.baseSpacings.sp1,
|
|
216
183
|
height: "100%",
|
|
217
184
|
alignItems: "center",
|
|
218
|
-
borderTopRightRadius:
|
|
219
|
-
borderBottomRightRadius:
|
|
220
|
-
borderLeft:
|
|
185
|
+
borderTopRightRadius: theme.vars.size.borderRadius.r1,
|
|
186
|
+
borderBottomRightRadius: theme.vars.size.borderRadius.r1,
|
|
187
|
+
borderLeft: theme.vars.size.borderStroke.container,
|
|
221
188
|
borderColor: theme.vars.palette.border?.default
|
|
222
189
|
}),
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
justifyContent: "center",
|
|
226
|
-
alignItems: "center",
|
|
227
|
-
width: "24px",
|
|
228
|
-
height: "24px"
|
|
190
|
+
actionsClearButton: {
|
|
191
|
+
visibility: "visible"
|
|
229
192
|
},
|
|
230
|
-
actionsClearButton: {},
|
|
231
193
|
/**
|
|
232
|
-
*
|
|
194
|
+
* actionsSubmitButton: Estilos del botón de acción de envío de formulario.
|
|
233
195
|
*/
|
|
234
196
|
actionsSubmitButton: ({ theme, ownerState }) => ({
|
|
235
|
-
...ownerState.isValid === false ? { border: `1px dashed ${theme.vars.palette.error.main}` } : {
|
|
197
|
+
...ownerState.isValid === false ? { border: `1px dashed ${theme.vars.palette.error.main}` } : {
|
|
198
|
+
visibility: "visible"
|
|
199
|
+
}
|
|
236
200
|
}),
|
|
237
201
|
/**
|
|
238
|
-
*
|
|
202
|
+
* popoverMenu: Estilos del menú emergente.
|
|
239
203
|
*/
|
|
240
204
|
popoverMenu: ({ theme }) => ({
|
|
241
205
|
"& .MuiPaper-root": {
|
|
242
206
|
display: "flex",
|
|
243
207
|
flexDirection: "column",
|
|
244
|
-
padding: "8px !important",
|
|
208
|
+
padding: "8px 0 !important",
|
|
245
209
|
gap: "4px",
|
|
246
210
|
borderRadius: "6px",
|
|
247
211
|
[theme.breakpoints.down("md")]: {
|
|
@@ -252,31 +216,10 @@ const dynamicSortStyles = {
|
|
|
252
216
|
}
|
|
253
217
|
}
|
|
254
218
|
}),
|
|
255
|
-
|
|
256
|
-
* TODO: Documentar
|
|
257
|
-
*/
|
|
258
|
-
popoverMenuItem: ({ theme }) => ({
|
|
259
|
-
paddingLeft: "4px",
|
|
260
|
-
paddingRight: "4px",
|
|
261
|
-
borderRadius: "4px",
|
|
262
|
-
"&:hover": {
|
|
263
|
-
...theme.typography.body,
|
|
264
|
-
color: theme.vars.palette.primary?.hover,
|
|
265
|
-
background: theme.vars.palette.background?.surface,
|
|
266
|
-
borderRadius: "4px",
|
|
267
|
-
padding: "4px 12px 4px 8px"
|
|
268
|
-
}
|
|
269
|
-
}),
|
|
270
|
-
/**
|
|
271
|
-
* TODO: Documentar
|
|
272
|
-
*/
|
|
273
|
-
popoverMenuItemLabel: ({ theme }) => ({
|
|
274
|
-
...theme.typography.body,
|
|
275
|
-
color: theme.vars.palette.text.primary
|
|
276
|
-
}),
|
|
219
|
+
popoverMenuItem: {},
|
|
277
220
|
popoverMenuItemIcon: {},
|
|
278
221
|
/**
|
|
279
|
-
*
|
|
222
|
+
* popoverSort: Estilos del menú emergente de ordenamiento.
|
|
280
223
|
*/
|
|
281
224
|
popoverSort: ({ theme }) => ({
|
|
282
225
|
width: "auto",
|
|
@@ -299,7 +242,7 @@ const dynamicSortStyles = {
|
|
|
299
242
|
}
|
|
300
243
|
}),
|
|
301
244
|
/**
|
|
302
|
-
*
|
|
245
|
+
* popoverSortHeader: Estilos del encabezado del menú emergente de ordenamiento.
|
|
303
246
|
*/
|
|
304
247
|
popoverSortHeader: ({ theme }) => ({
|
|
305
248
|
backgroundColor: theme.vars.palette.background?.surface,
|
|
@@ -317,14 +260,14 @@ const dynamicSortStyles = {
|
|
|
317
260
|
}),
|
|
318
261
|
popoverSortHeaderIcon: {},
|
|
319
262
|
/**
|
|
320
|
-
*
|
|
263
|
+
* popoverSortHeaderTitle: Estilos del título del menú emergente de ordenamiento.
|
|
321
264
|
*/
|
|
322
265
|
popoverSortHeaderTitle: ({ theme }) => ({
|
|
323
266
|
...theme.typography.paragraphDens,
|
|
324
267
|
color: theme.vars.palette.text.primary
|
|
325
268
|
}),
|
|
326
269
|
/**
|
|
327
|
-
*
|
|
270
|
+
* popoverSortContainerFields: Estilos del contenedor de campos del menú emergente de ordenamiento.
|
|
328
271
|
*/
|
|
329
272
|
popoverSortContainerFields: ({ theme }) => ({
|
|
330
273
|
height: "fit-content",
|
|
@@ -341,7 +284,7 @@ const dynamicSortStyles = {
|
|
|
341
284
|
}
|
|
342
285
|
}),
|
|
343
286
|
/**
|
|
344
|
-
*
|
|
287
|
+
* popoverSortActions: Estilos del contenedor de acciones del menú emergente de ordenamiento.
|
|
345
288
|
*/
|
|
346
289
|
popoverSortActions: ({ theme }) => ({
|
|
347
290
|
display: "flex",
|
|
@@ -358,6 +301,25 @@ const dynamicSortStyles = {
|
|
|
358
301
|
height: "36px"
|
|
359
302
|
}
|
|
360
303
|
}
|
|
304
|
+
}),
|
|
305
|
+
/**
|
|
306
|
+
* inputSortInputSkeleton: Estilos del esqueleto del campo de entrada de ordenamiento.
|
|
307
|
+
*/
|
|
308
|
+
inputSortInputSkeleton: ({ theme, ownerState }) => ({
|
|
309
|
+
width: "100%",
|
|
310
|
+
minWidth: "80px",
|
|
311
|
+
marginLeft: theme.vars.size.baseSpacings.sp2,
|
|
312
|
+
marginRight: theme.vars.size.baseSpacings.sp2,
|
|
313
|
+
...getSizeStyles(
|
|
314
|
+
theme,
|
|
315
|
+
ownerState.size || "medium",
|
|
316
|
+
"base",
|
|
317
|
+
(size) => ({
|
|
318
|
+
height: size,
|
|
319
|
+
minHeight: size,
|
|
320
|
+
maxHeight: size
|
|
321
|
+
})
|
|
322
|
+
)
|
|
361
323
|
})
|
|
362
324
|
};
|
|
363
325
|
export {
|
|
@@ -4,7 +4,6 @@ export declare const ASSETS_URL = "frontend/components/Dynamic_sort/assets/icons
|
|
|
4
4
|
export declare const ASSETS: {
|
|
5
5
|
readonly refresh: "restart.svg";
|
|
6
6
|
readonly sort: "sort.svg";
|
|
7
|
-
readonly close: "close.svg";
|
|
8
7
|
readonly list_bulleted: "list_bulleted.svg";
|
|
9
8
|
readonly clean: "clean.svg";
|
|
10
9
|
};
|