@m4l/components 9.1.53 → 9.1.55
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 +10 -1
- package/components/Chip/Chip.js +108 -0
- package/components/Chip/ChipStyles.js +533 -0
- package/components/Chip/constants.d.ts +4 -0
- package/components/Chip/constants.js +8 -0
- package/components/Chip/slots/ChipEnum.d.ts +7 -7
- package/components/Chip/slots/ChipEnum.js +11 -0
- package/components/Chip/slots/ChipSlots.js +35 -0
- package/components/Chip/slots/index.js +1 -0
- package/components/Chip/types.d.ts +41 -11
- package/components/DynamicFilter/types.d.ts +2 -2
- package/components/Label/Label.styles.js +28 -8
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +9 -21
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +24 -0
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +3 -5
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.js +161 -4
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.test.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/constants.d.ts +9 -0
- package/components/hook-form/RHFAutocomplete/constants.js +4 -0
- package/components/hook-form/RHFAutocomplete/oldTypes.d.ts +43 -0
- package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteEnum.d.ts +4 -0
- package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteEnum.js +8 -0
- package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteSlots.d.ts +6 -0
- package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteSlots.js +17 -0
- package/components/hook-form/RHFAutocomplete/slots/index.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/slots/index.js +1 -0
- package/components/hook-form/RHFAutocomplete/types.d.ts +63 -25
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.d.ts +5 -8
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js +105 -4
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsyncStyles.d.ts +2 -0
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsyncStyles.js +6 -0
- package/components/hook-form/RHFAutocompleteAsync/constants.d.ts +9 -0
- package/components/hook-form/RHFAutocompleteAsync/constants.js +4 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteEnumAsync.d.ts +3 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteEnumAsync.js +7 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteSlotsAsync.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteSlotsAsync.js +12 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/index.d.ts +2 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/index.js +1 -0
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +19 -5
- package/components/mui_extended/Autocomplete/Autocomplete.d.ts +1 -1
- package/components/mui_extended/Autocomplete/Autocomplete.js +299 -0
- package/components/mui_extended/Autocomplete/AutocompleteStyles.js +136 -0
- package/components/mui_extended/Autocomplete/constants.js +4 -0
- package/components/mui_extended/Autocomplete/dictionary.d.ts +0 -2
- package/components/mui_extended/Autocomplete/index.js +1 -0
- package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +3 -0
- package/components/mui_extended/Autocomplete/renderOptions/index.js +24 -0
- package/components/mui_extended/Autocomplete/slots /AutocompleteEnum.d.ts +2 -1
- package/components/mui_extended/Autocomplete/slots /AutocompleteEnum.js +19 -0
- package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.d.ts +3 -0
- package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.js +72 -0
- package/components/mui_extended/Autocomplete/slots /index.js +1 -0
- package/components/mui_extended/Autocomplete/types.d.ts +2 -2
- package/components/mui_extended/CircularProgress/CircularProgress.js +1 -1
- package/components/mui_extended/MenuItem/MenuItem.js +11 -12
- package/components/mui_extended/MenuItem/MenuItem.styles.js +56 -66
- package/components/mui_extended/MenuItem/constants.d.ts +4 -0
- package/components/mui_extended/MenuItem/constants.js +5 -1
- package/components/mui_extended/MenuItem/slots/MenuItemEnum.d.ts +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemEnum.js +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +3 -3
- package/components/mui_extended/MenuItem/types.d.ts +32 -11
- package/components/mui_extended/Pager/classes/index.d.ts +1 -1
- package/components/mui_extended/Popper/Popper.js +79 -0
- package/components/mui_extended/Popper/PopperStyles.js +265 -0
- package/components/mui_extended/Popper/constants.js +4 -0
- package/components/mui_extended/Popper/index.js +1 -0
- package/components/mui_extended/Popper/slots/PopperEnum.js +6 -0
- package/components/mui_extended/Popper/slots/PopperStlots.js +12 -0
- package/components/mui_extended/Popper/slots/index.js +1 -0
- package/components/mui_extended/Popper/types.js +1 -0
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
- package/components/mui_extended/TextField/TextField.js +11 -11
- package/components/mui_extended/TextField/TextField.styles.js +108 -203
- package/components/mui_extended/TextField/constants.d.ts +10 -0
- package/components/mui_extended/TextField/constants.js +8 -3
- package/components/mui_extended/TextField/slots/TextFieldEnum.d.ts +4 -0
- package/components/mui_extended/TextField/slots/TextFieldEnum.js +7 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.js +1 -1
- package/components/mui_extended/TextField/types.d.ts +3 -4
- package/components/mui_extended/Typography/Typography.js +4 -3
- package/components/mui_extended/Typography/constants.d.ts +4 -0
- package/components/mui_extended/Typography/constants.js +5 -1
- package/components/mui_extended/Typography/slots/typographySlots.js +1 -1
- package/package.json +1 -1
- package/utils/getHeightSizeStyles.d.ts +12 -0
- package/utils/getHeightSizeStyles.js +13 -0
- package/components/hook-form/RHFAutocomplete/classes/constant.d.ts +0 -1
- package/components/hook-form/RHFAutocomplete/classes/constant.js +0 -4
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +0 -19
- package/components/hook-form/RHFAutocomplete/classes/index.js +0 -77
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +0 -26
- package/components/hook-form/RHFAutocomplete/styles.d.ts +0 -1
- package/components/hook-form/RHFAutocomplete/styles.js +0 -7
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeImage/index.d.ts +0 -5
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeImage/index.js +0 -293
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeText/index.d.ts +0 -9
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeText/index.js +0 -281
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.d.ts +0 -6
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.js +0 -25
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +0 -1
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.js +0 -9
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/index.d.ts +0 -5
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/index.js +0 -28
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/types.d.ts +0 -6
- package/components/hook-form/RHFAutocomplete/test/constants.d.ts +0 -2
- package/components/hook-form/RHFAutocomplete/test/constants.js +0 -6
- package/components/hook-form/RHFAutocomplete/test/utils.d.ts +0 -2
- package/components/hook-form/RHFAutocomplete/test/utils.js +0 -7
- package/components/hook-form/RHFAutocompleteAsync/classes/constant.d.ts +0 -1
- package/components/hook-form/RHFAutocompleteAsync/classes/constant.js +0 -4
- package/components/hook-form/RHFAutocompleteAsync/classes/index.d.ts +0 -9
- package/components/hook-form/RHFAutocompleteAsync/classes/index.js +0 -26
- package/components/hook-form/RHFAutocompleteAsync/classes/types.d.ts +0 -4
- package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +0 -4
- package/components/hook-form/RHFAutocompleteAsync/styles.js +0 -34
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeImage/index.d.ts +0 -10
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeImage/index.js +0 -103
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeText/index.d.ts +0 -9
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeText/index.js +0 -103
- package/components/hook-form/RHFAutocompleteAsync/tests/constants.d.ts +0 -1
- package/components/hook-form/RHFAutocompleteAsync/tests/constants.js +0 -4
- package/components/hook-form/RHFAutocompleteAsync/tests/utils.d.ts +0 -2
- package/components/hook-form/RHFAutocompleteAsync/tests/utils.js +0 -7
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { g as getTypographyStyles } from "../../../utils/getTypographyStyles.js";
|
|
2
|
+
import { g as getHeightSizeStyles } from "../../../utils/getHeightSizeStyles.js";
|
|
3
|
+
import { T as TEXT_FIELD_CLASSES } from "./constants.js";
|
|
1
4
|
const textFieldStyles = {
|
|
2
5
|
/**
|
|
3
6
|
* Estilos personalizados para el componente TextField.
|
|
@@ -8,210 +11,115 @@ const textFieldStyles = {
|
|
|
8
11
|
*/
|
|
9
12
|
root: ({ ownerState, theme }) => ({
|
|
10
13
|
width: "100%",
|
|
14
|
+
height: "auto",
|
|
11
15
|
padding: 0,
|
|
12
16
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
13
17
|
display: "flex",
|
|
14
|
-
// Estilos
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
// Estilos globales del TextField 🌎
|
|
19
|
+
"& .MuiInputBase-root": {
|
|
20
|
+
// Paddings
|
|
21
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
22
|
+
paddingRight: 0,
|
|
23
|
+
paddingTop: 0,
|
|
24
|
+
paddingBottom: 0,
|
|
25
|
+
// Estilo de los bordes
|
|
26
|
+
border: theme.vars.size.borderStroke.actionInput,
|
|
27
|
+
borderColor: ownerState.error ? `${ownerState.paletteColor?.enabled}!important` : `${theme.vars.palette.border.default}!important`,
|
|
28
|
+
// Redondeado de los bordes
|
|
29
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
30
|
+
// Altura
|
|
31
|
+
height: "100%",
|
|
32
|
+
// transición
|
|
33
|
+
transition: "all 0.2s ease",
|
|
34
|
+
// Espaciado entre elementos
|
|
35
|
+
...getHeightSizeStyles(
|
|
36
|
+
theme.generalSettings.isMobile,
|
|
37
|
+
ownerState.size || "medium",
|
|
38
|
+
"action",
|
|
39
|
+
(height) => {
|
|
40
|
+
return {
|
|
41
|
+
height: "auto",
|
|
42
|
+
minHeight: height
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
// ↴ Overrides ❌
|
|
47
|
+
// Estilos del input
|
|
48
|
+
"& > .MuiInputBase-input": {
|
|
49
|
+
// ↴ Overrides ❌
|
|
40
50
|
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
backgroundColor:
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
//Estilos del InputBase
|
|
79
|
-
"& .MuiInputBase-input": {
|
|
80
|
-
padding: "0px",
|
|
81
|
-
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
82
|
-
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
83
|
-
height: "inherit",
|
|
84
|
-
//Estilos del InputBase en hover
|
|
85
|
-
"&:hover ~ .MuiOutlinedInput-notchedOutline": {
|
|
86
|
-
...ownerState.error && {
|
|
87
|
-
borderColor: ownerState.error ? theme.vars.palette.border.error : theme.vars.palette.border.default
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
// Estilos del InputBase en Focus
|
|
91
|
-
"&:focus ~ .MuiOutlinedInput-notchedOutline": {
|
|
92
|
-
borderColor: ownerState.error ? theme.vars.palette.border.error : ownerState.paletteColor?.selected
|
|
93
|
-
},
|
|
94
|
-
//Estilos del InputBase en placeholder default
|
|
95
|
-
"&::placeholder": {
|
|
96
|
-
color: theme.palette.text.disabled
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
//Este estilo se asegura de que los campos de entrada que han sido autocompletados por el navegador no tengan ningún relleno adicional
|
|
100
|
-
"& .MuiOutlinedInput-input:-webkit-autofill": {
|
|
101
|
-
padding: 0
|
|
102
|
-
},
|
|
103
|
-
// Historia Disabled para Outlined
|
|
51
|
+
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
52
|
+
paddingTop: 0,
|
|
53
|
+
paddingBottom: 0,
|
|
54
|
+
fontFamily: theme.typography.fontFamily,
|
|
55
|
+
color: ownerState.disabled ? theme.vars.palette.text.disabled : theme.vars.palette.text.primary,
|
|
56
|
+
...getTypographyStyles(
|
|
57
|
+
theme.generalSettings.isMobile,
|
|
58
|
+
ownerState.size || "medium",
|
|
59
|
+
"body"
|
|
60
|
+
),
|
|
61
|
+
"&::placeholder": {
|
|
62
|
+
color: theme.palette.text.disabled
|
|
63
|
+
},
|
|
64
|
+
"&:-webkit-autofill": {
|
|
65
|
+
backgroundColor: "transparent!important"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
// Estilos de cuando esta deshabilitado
|
|
69
|
+
...ownerState.disabled && {
|
|
70
|
+
borderColor: `${theme.vars.palette.border.disabled}!important`,
|
|
71
|
+
pointerEvents: ownerState.disabled ? "none" : "auto"
|
|
72
|
+
},
|
|
73
|
+
// Estilos del los adorments
|
|
74
|
+
"& .MuiInputAdornment-root": {
|
|
75
|
+
height: "auto",
|
|
76
|
+
width: "auto",
|
|
77
|
+
// ↴ Overrides ❌
|
|
78
|
+
margin: 0
|
|
79
|
+
},
|
|
80
|
+
// Estilos de la mascara fieldset, es un elemento interno del textfield, material lo usa como mascara para el estilo.
|
|
81
|
+
// por practicidad se oculta en nuestra versión, sin embargo no se elimina porque es parte de la semántica del componente.
|
|
82
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
83
|
+
all: "unset",
|
|
84
|
+
display: "none"
|
|
85
|
+
},
|
|
86
|
+
"& .MuiInputAdornment-root .M4LIcon-icon": {
|
|
87
|
+
backgroundColor: ownerState.error ? ownerState.paletteColor?.enabled : theme.vars.palette.text.primary,
|
|
104
88
|
...ownerState.disabled && {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
backgroundColor: theme.vars.palette.text.disabled
|
|
115
|
-
},
|
|
116
|
-
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
117
|
-
backgroundColor: theme.vars.palette.text.disabled
|
|
89
|
+
backgroundColor: theme.vars.palette.text.disabled
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"&:hover": {
|
|
93
|
+
backgroundColor: ownerState.paletteColor?.hoverOpacity,
|
|
94
|
+
...ownerState.error && {
|
|
95
|
+
borderColor: `${ownerState.paletteColor?.hover}!important`,
|
|
96
|
+
"& .MuiInputAdornment-root .M4LIcon-icon": {
|
|
97
|
+
backgroundColor: ownerState.paletteColor?.hover
|
|
118
98
|
}
|
|
119
99
|
}
|
|
100
|
+
},
|
|
101
|
+
"&:focus-within": {
|
|
102
|
+
borderColor: `${ownerState.paletteColor?.focus}!important`,
|
|
103
|
+
"& .MuiInputAdornment-root .M4LIcon-icon": {
|
|
104
|
+
backgroundColor: ownerState.paletteColor?.focus
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
// Variant Outlined TextField
|
|
109
|
+
...ownerState.TextFieldvariant === "outlined" && {
|
|
110
|
+
[`&.${TEXT_FIELD_CLASSES.outlined} .MuiInputBase-root`]: {
|
|
111
|
+
// Estilos de borde
|
|
112
|
+
border: theme.vars.size.borderStroke.actionInput
|
|
120
113
|
}
|
|
121
114
|
},
|
|
122
115
|
// Variant Text TextField
|
|
123
|
-
...ownerState.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
131
|
-
borderRadius: theme.vars.size.borderRadius.r1,
|
|
132
|
-
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
133
|
-
backgroundColor: theme.vars.palette.text.primary
|
|
134
|
-
},
|
|
135
|
-
'[class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
136
|
-
backgroundColor: theme.vars.palette.text.primary
|
|
137
|
-
},
|
|
138
|
-
//Estilos para los bordes del campo de texto
|
|
139
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
140
|
-
minHeight: 0,
|
|
141
|
-
border: theme.vars.size.borderStroke.actionInput,
|
|
142
|
-
borderColor: ownerState.error ? ownerState.paletteColor?.main : theme.vars.palette.border.default,
|
|
143
|
-
borderLeft: "transparent",
|
|
144
|
-
borderTop: "transparent",
|
|
145
|
-
borderRight: "transparent"
|
|
146
|
-
},
|
|
147
|
-
//Estilo Hover para primary para el Icono e IconButton
|
|
148
|
-
"&:hover": {
|
|
149
|
-
backgroundColor: ownerState.error ? "inherit" : theme.palette.primary.hoverOpacity,
|
|
150
|
-
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
151
|
-
backgroundColor: theme.vars.palette.text.primary
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
//Estilo Focus para primary para el Icono e IconButton
|
|
155
|
-
":focus-within": {
|
|
156
|
-
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
157
|
-
backgroundColor: theme.vars.palette.text.primary
|
|
158
|
-
},
|
|
159
|
-
'&:focus-within .MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
160
|
-
backgroundColor: theme.vars.palette.text.primary
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
//Estilo Active para primary para el Icono e IconButton
|
|
164
|
-
"&:active": {
|
|
165
|
-
":focus-within": {
|
|
166
|
-
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
167
|
-
backgroundColor: theme.vars.palette.text.primary
|
|
168
|
-
},
|
|
169
|
-
'&:focus-within .MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
170
|
-
backgroundColor: theme.vars.palette.text.primary
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
//Estilos del InputBase
|
|
175
|
-
"& .MuiInputBase-input": {
|
|
176
|
-
padding: "0px",
|
|
177
|
-
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
178
|
-
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
179
|
-
height: "inherit",
|
|
180
|
-
//Estilo Focus del InputBase
|
|
181
|
-
"&:focus ~ .MuiOutlinedInput-notchedOutline": {
|
|
182
|
-
borderColor: ownerState.error ? theme.vars.palette.border.error : ownerState.paletteColor?.selected
|
|
183
|
-
},
|
|
184
|
-
// Estilos del InputBase en placeholder default
|
|
185
|
-
"&::placeholder": {
|
|
186
|
-
color: theme.palette.text.disabled
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
//Este estilo se asegura de que los campos de entrada que han sido autocompletados por el navegador no tengan ningún relleno adicional
|
|
190
|
-
"& .MuiOutlinedInput-input:-webkit-autofill": {
|
|
191
|
-
padding: 0
|
|
192
|
-
},
|
|
193
|
-
// Historia Disabled
|
|
194
|
-
...ownerState.disabled && {
|
|
195
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
196
|
-
borderColor: theme.palette.border.disabled,
|
|
197
|
-
borderTop: theme.palette.border.disabled,
|
|
198
|
-
borderLeft: "transparent",
|
|
199
|
-
borderRight: "transparent"
|
|
200
|
-
},
|
|
201
|
-
pointerEvents: ownerState.disabled ? "none" : "auto",
|
|
202
|
-
"&:hover": {
|
|
203
|
-
pointerEvents: ownerState.disabled ? "none" : "auto"
|
|
204
|
-
},
|
|
205
|
-
"& .MuiInputBase-input::placeholder": {
|
|
206
|
-
color: theme.palette.text.disabled
|
|
207
|
-
},
|
|
208
|
-
'[class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
209
|
-
backgroundColor: theme.vars.palette.text.disabled
|
|
210
|
-
},
|
|
211
|
-
'.MuiIconButton-root [class*="M4LIcon-icon"]': {
|
|
212
|
-
backgroundColor: theme.vars.palette.text.disabled
|
|
213
|
-
}
|
|
214
|
-
}
|
|
116
|
+
...ownerState.TextFieldvariant === "text" && {
|
|
117
|
+
[`&.${TEXT_FIELD_CLASSES.text} .MuiInputBase-root`]: {
|
|
118
|
+
// Estilos de borde por el formato de variante, solo se aplica para borde inferior.
|
|
119
|
+
borderTop: 0,
|
|
120
|
+
borderLeft: 0,
|
|
121
|
+
borderRight: 0,
|
|
122
|
+
borderBottom: theme.vars.size.borderStroke.actionInput
|
|
215
123
|
}
|
|
216
124
|
}
|
|
217
125
|
}),
|
|
@@ -223,17 +131,14 @@ const textFieldStyles = {
|
|
|
223
131
|
* @updatedUser Andrés Quintero - automatic
|
|
224
132
|
*/
|
|
225
133
|
skeleton: ({ ownerState, theme }) => ({
|
|
226
|
-
|
|
134
|
+
[`&.${TEXT_FIELD_CLASSES.skeleton}`]: {
|
|
227
135
|
display: "flex",
|
|
228
|
-
height: theme.vars.size.desktop.medium.action,
|
|
229
136
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
230
|
-
...
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
...theme.generalSettings.isMobile ? { height: theme.vars.size.mobile.medium.action } : { height: theme.vars.size.desktop.medium.action }
|
|
236
|
-
}
|
|
137
|
+
...getHeightSizeStyles(
|
|
138
|
+
theme.generalSettings.isMobile,
|
|
139
|
+
ownerState.size || "medium",
|
|
140
|
+
"action"
|
|
141
|
+
)
|
|
237
142
|
}
|
|
238
143
|
})
|
|
239
144
|
};
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
import { TexFieldComplementaryClasses, TextFieldSlots } from './slots';
|
|
1
2
|
export declare const TEXT_FIELD_KEY_COMPONENT = "M4LTextField";
|
|
3
|
+
export declare const COMBINATED_TEXTFIELD_ENUMS: {
|
|
4
|
+
outlined: TexFieldComplementaryClasses.outlined;
|
|
5
|
+
text: TexFieldComplementaryClasses.text;
|
|
6
|
+
root: TextFieldSlots.root;
|
|
7
|
+
skeleton: TextFieldSlots.skeleton;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Inventario de clases CSS para el componente TextField
|
|
11
|
+
*/
|
|
2
12
|
export declare const TEXT_FIELD_CLASSES: Record<string, string>;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
|
|
2
|
-
import { T as TextFieldSlots } from "./slots/TextFieldEnum.js";
|
|
2
|
+
import { T as TextFieldSlots, a as TexFieldComplementaryClasses } from "./slots/TextFieldEnum.js";
|
|
3
3
|
const TEXT_FIELD_KEY_COMPONENT = "M4LTextField";
|
|
4
|
-
|
|
4
|
+
const COMBINATED_TEXTFIELD_ENUMS = {
|
|
5
|
+
...TextFieldSlots,
|
|
6
|
+
...TexFieldComplementaryClasses
|
|
7
|
+
};
|
|
8
|
+
const TEXT_FIELD_CLASSES = getComponentClasses(TEXT_FIELD_KEY_COMPONENT, COMBINATED_TEXTFIELD_ENUMS);
|
|
5
9
|
export {
|
|
6
|
-
|
|
10
|
+
TEXT_FIELD_CLASSES as T,
|
|
11
|
+
TEXT_FIELD_KEY_COMPONENT as a
|
|
7
12
|
};
|
|
@@ -3,6 +3,12 @@ var TextFieldSlots = /* @__PURE__ */ ((TextFieldSlots2) => {
|
|
|
3
3
|
TextFieldSlots2["skeleton"] = "skeleton";
|
|
4
4
|
return TextFieldSlots2;
|
|
5
5
|
})(TextFieldSlots || {});
|
|
6
|
+
var TexFieldComplementaryClasses = /* @__PURE__ */ ((TexFieldComplementaryClasses2) => {
|
|
7
|
+
TexFieldComplementaryClasses2["outlined"] = "outlined";
|
|
8
|
+
TexFieldComplementaryClasses2["text"] = "text";
|
|
9
|
+
return TexFieldComplementaryClasses2;
|
|
10
|
+
})(TexFieldComplementaryClasses || {});
|
|
6
11
|
export {
|
|
7
|
-
TextFieldSlots as T
|
|
12
|
+
TextFieldSlots as T,
|
|
13
|
+
TexFieldComplementaryClasses as a
|
|
8
14
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextField } from "@mui/material";
|
|
2
2
|
import { styled } from "@mui/material/styles";
|
|
3
|
-
import {
|
|
3
|
+
import { a as TEXT_FIELD_KEY_COMPONENT } from "../constants.js";
|
|
4
4
|
import { t as textFieldStyles } from "../TextField.styles.js";
|
|
5
5
|
import { T as TextFieldSlots } from "./TextFieldEnum.js";
|
|
6
6
|
import { S as Skeleton } from "../../Skeleton/Skeleton.js";
|
|
@@ -3,7 +3,7 @@ import { Theme, PaletteColor } from '@mui/material';
|
|
|
3
3
|
import { TextFieldSlots } from './slots/TextFieldEnum';
|
|
4
4
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
5
5
|
import { TEXT_FIELD_KEY_COMPONENT } from './constants';
|
|
6
|
-
import {
|
|
6
|
+
import { Sizes } from '@m4l/styles';
|
|
7
7
|
/**
|
|
8
8
|
* Variants for the TextField component.
|
|
9
9
|
*/
|
|
@@ -40,7 +40,6 @@ export interface TextFieldProps extends Omit<MUITextFieldProps, 'size' | 'color'
|
|
|
40
40
|
* Color del campo de texto.
|
|
41
41
|
* color="primary"
|
|
42
42
|
*/
|
|
43
|
-
color?: Extract<ComponentPalletColor, 'default' | 'primary'>;
|
|
44
43
|
/**
|
|
45
44
|
* Indica si el campo de texto debe aceptar solo texto.
|
|
46
45
|
*/
|
|
@@ -59,9 +58,9 @@ export interface TextFieldOwnerState {
|
|
|
59
58
|
*/
|
|
60
59
|
paletteColor: PaletteColor;
|
|
61
60
|
/**
|
|
62
|
-
* Variante del campo de texto.
|
|
61
|
+
* Variante del campo de texto. Se asigna prefijo al nombre para no colicionar con la propiedad de Skeleton variant.
|
|
63
62
|
*/
|
|
64
|
-
|
|
63
|
+
TextFieldvariant?: TextFieldVariants;
|
|
65
64
|
/**
|
|
66
65
|
* Tamaño del campo de texto.
|
|
67
66
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { useModuleSkeleton } from "@m4l/core";
|
|
4
|
-
import { T as TYPOGRAPHY_CLASS_NAME_SPECIFY, a as TYPOGRAPHY_KEY_COMPONENT } from "./constants.js";
|
|
4
|
+
import { T as TYPOGRAPHY_CLASS_NAME_SPECIFY, a as TYPOGRAPHY_CLASSES, b as TYPOGRAPHY_KEY_COMPONENT } from "./constants.js";
|
|
5
5
|
import { T as TypographySlots } from "./slots/typographyEnum.js";
|
|
6
6
|
import { S as StyledMUITypography, a as StyledSkeleton } from "./slots/typographySlots.js";
|
|
7
7
|
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
@@ -30,7 +30,7 @@ function Typography(props) {
|
|
|
30
30
|
return /* @__PURE__ */ jsx(
|
|
31
31
|
StyledMUITypography,
|
|
32
32
|
{
|
|
33
|
-
className: clsx(className, TYPOGRAPHY_CLASS_NAME_SPECIFY),
|
|
33
|
+
className: clsx(className, TYPOGRAPHY_CLASS_NAME_SPECIFY, TYPOGRAPHY_CLASSES.root),
|
|
34
34
|
variant,
|
|
35
35
|
ownerState: { ...ownerState },
|
|
36
36
|
...getPropDataTestId(TYPOGRAPHY_KEY_COMPONENT, TypographySlots.root, dataTestid),
|
|
@@ -40,7 +40,8 @@ function Typography(props) {
|
|
|
40
40
|
{
|
|
41
41
|
width: index === skeletonRows - 1 ? skeletonWidth : "100%",
|
|
42
42
|
variant: "text",
|
|
43
|
-
ownerState: { ...ownerState }
|
|
43
|
+
ownerState: { ...ownerState },
|
|
44
|
+
className: TYPOGRAPHY_CLASSES.skeleton
|
|
44
45
|
},
|
|
45
46
|
index
|
|
46
47
|
))
|
|
@@ -7,3 +7,7 @@ export declare const TYPOGRAPHY_KEY_COMPONENT = "M4LTypography";
|
|
|
7
7
|
* tener la necesidad de agregar valores en !important.
|
|
8
8
|
*/
|
|
9
9
|
export declare const TYPOGRAPHY_CLASS_NAME_SPECIFY = "M4lclassCssSpecificity";
|
|
10
|
+
/**
|
|
11
|
+
* Inventario de clases CSS para el componente Typography.
|
|
12
|
+
*/
|
|
13
|
+
export declare const TYPOGRAPHY_CLASSES: Record<string, string>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { T as TypographySlots } from "./slots/typographyEnum.js";
|
|
1
3
|
const TYPOGRAPHY_KEY_COMPONENT = "M4LTypography";
|
|
2
4
|
const TYPOGRAPHY_CLASS_NAME_SPECIFY = "M4lclassCssSpecificity";
|
|
5
|
+
const TYPOGRAPHY_CLASSES = getComponentClasses(TYPOGRAPHY_KEY_COMPONENT, TypographySlots);
|
|
3
6
|
export {
|
|
4
7
|
TYPOGRAPHY_CLASS_NAME_SPECIFY as T,
|
|
5
|
-
|
|
8
|
+
TYPOGRAPHY_CLASSES as a,
|
|
9
|
+
TYPOGRAPHY_KEY_COMPONENT as b
|
|
6
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Typography } from "@mui/material";
|
|
2
2
|
import { styled } from "@mui/material/styles";
|
|
3
|
-
import {
|
|
3
|
+
import { b as TYPOGRAPHY_KEY_COMPONENT } from "../constants.js";
|
|
4
4
|
import { T as TypographySlots } from "./typographyEnum.js";
|
|
5
5
|
import { t as typographyStyles } from "../typography.styles.js";
|
|
6
6
|
import { S as Skeleton } from "../../Skeleton/Skeleton.js";
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Sizes, SizesComponentsTypes } from '@m4l/styles';
|
|
2
|
+
/**
|
|
3
|
+
* Utilidad que se encarga de obtener los estilos de tamaño de altura para ser usados en el css de los componentes.
|
|
4
|
+
* @param isMobile - Modalidad de dispositivo en el que se encuentra la aplicación (Escritorio y móvil). Se espera que se obtenga del objeto
|
|
5
|
+
* theme.generalSettings.isMobile.
|
|
6
|
+
* @param size - Formato de tamaño definido por el componente o el contexto de AppearanceComponentProvider, puede ser small,
|
|
7
|
+
* medium o large.
|
|
8
|
+
* @param variantSize - Variante de tamaño que se desea aplicar al componente.
|
|
9
|
+
* @param css - Estilos css adicionales o una función que devuelve un objeto de estilos. Si es una función, recibe `heightSize` como argumento.
|
|
10
|
+
* @returns Objeto con los estilos calculados.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getHeightSizeStyles: (isMobile: boolean, size: Extract<Sizes, "small" | "medium">, variantSize: SizesComponentsTypes, css?: Record<string, any> | ((heightSize: string | number) => Record<string, any>)) => any;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { POINTER_QR_MOBILE_SIZES, POINTER_QR_DESKTOP_SIZES } from "@m4l/styles";
|
|
2
|
+
const getHeightSizeStyles = (isMobile, size, variantSize, css) => {
|
|
3
|
+
const pointerQrSource = isMobile ? POINTER_QR_MOBILE_SIZES : POINTER_QR_DESKTOP_SIZES;
|
|
4
|
+
const heightSize = pointerQrSource[size][variantSize];
|
|
5
|
+
const resolvedCss = typeof css === "function" ? css(heightSize) : css;
|
|
6
|
+
return {
|
|
7
|
+
height: heightSize,
|
|
8
|
+
...resolvedCss
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
getHeightSizeStyles as g
|
|
13
|
+
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const componentName = "M4LRHFAutocomplete";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { RHFAutocompleteClassesType } from './types';
|
|
2
|
-
import { OwnerState } from '../types';
|
|
3
|
-
export declare const autocompleteClasses: RHFAutocompleteClassesType;
|
|
4
|
-
export declare function getRHFAutocompleteClassesUtilityClass(slot: string): string;
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Documentar
|
|
7
|
-
*/
|
|
8
|
-
export declare const useUtilityClasses: (ownerState: OwnerState) => {
|
|
9
|
-
skeleton: string;
|
|
10
|
-
root: string;
|
|
11
|
-
popper: string;
|
|
12
|
-
label: string;
|
|
13
|
-
skeletonRoot: string;
|
|
14
|
-
skeletonContainerText: string;
|
|
15
|
-
containerRefreshDown: string;
|
|
16
|
-
iconRefresh: string;
|
|
17
|
-
iconDown: string;
|
|
18
|
-
chip: string;
|
|
19
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
import { c as componentName } from "./constant.js";
|
|
4
|
-
generateUtilityClasses(
|
|
5
|
-
componentName,
|
|
6
|
-
[
|
|
7
|
-
/* elements */
|
|
8
|
-
"root",
|
|
9
|
-
"withImage",
|
|
10
|
-
"skeleton",
|
|
11
|
-
"label",
|
|
12
|
-
"popper",
|
|
13
|
-
"skeletonRoot",
|
|
14
|
-
"skeletonContainerText",
|
|
15
|
-
"containerRefreshDown",
|
|
16
|
-
"iconRefresh",
|
|
17
|
-
"iconDown",
|
|
18
|
-
/* states or variants of elements */
|
|
19
|
-
"variantInfo",
|
|
20
|
-
"isDisabled",
|
|
21
|
-
"imageWidthDefined",
|
|
22
|
-
"variantSuccess",
|
|
23
|
-
"variantWarning",
|
|
24
|
-
"variantError",
|
|
25
|
-
"sizeSmall",
|
|
26
|
-
"sizeMedium",
|
|
27
|
-
"isFocus",
|
|
28
|
-
"isTabSelected",
|
|
29
|
-
"chip"
|
|
30
|
-
]
|
|
31
|
-
);
|
|
32
|
-
function getRHFAutocompleteClassesUtilityClass(slot) {
|
|
33
|
-
return generateUtilityClass(componentName, slot);
|
|
34
|
-
}
|
|
35
|
-
const useUtilityClasses = (ownerState) => {
|
|
36
|
-
const slots = {
|
|
37
|
-
root: [
|
|
38
|
-
"root",
|
|
39
|
-
ownerState.size === "small" && "sizeSmall",
|
|
40
|
-
ownerState.size === "medium" && "sizeMedium",
|
|
41
|
-
ownerState.isFocus && "isFocus",
|
|
42
|
-
ownerState.isTabSelected && "isTabSelected",
|
|
43
|
-
ownerState.disabled && "isDisabled",
|
|
44
|
-
ownerState.semantics === "info" && "variantInfo",
|
|
45
|
-
ownerState.semantics === "success" && "variantSuccess",
|
|
46
|
-
ownerState.semantics === "warning" && "variantWarning",
|
|
47
|
-
ownerState.semantics === "error" && "variantError",
|
|
48
|
-
ownerState.multiple && "multiple"
|
|
49
|
-
],
|
|
50
|
-
skeleton: ["skeleton"],
|
|
51
|
-
label: ["label"],
|
|
52
|
-
popper: [
|
|
53
|
-
"popper",
|
|
54
|
-
ownerState.size === "small" && "sizeSmall",
|
|
55
|
-
ownerState.size === "medium" && "sizeMedium",
|
|
56
|
-
ownerState.imageScale && "imageScale",
|
|
57
|
-
ownerState.imageRepeat && "imageRepeat"
|
|
58
|
-
],
|
|
59
|
-
skeletonRoot: ["skeletonRoot"],
|
|
60
|
-
skeletonContainerText: ["SkeletonContainerText"],
|
|
61
|
-
containerRefreshDown: ["containerRefreshDown"],
|
|
62
|
-
iconRefresh: ["iconRefresh"],
|
|
63
|
-
iconDown: ["iconDown"],
|
|
64
|
-
chip: [
|
|
65
|
-
"chip",
|
|
66
|
-
ownerState.size === "small" && "sizeSmall",
|
|
67
|
-
ownerState.size === "medium" && "sizeMedium"
|
|
68
|
-
]
|
|
69
|
-
};
|
|
70
|
-
const composedClasses = unstable_composeClasses(slots, getRHFAutocompleteClassesUtilityClass, {});
|
|
71
|
-
return {
|
|
72
|
-
...composedClasses
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
export {
|
|
76
|
-
useUtilityClasses as u
|
|
77
|
-
};
|