@m4l/components 8.1.0-beta.devManuela.HelperError → 8.1.0-beta.devManuela.TextField
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/export.d.ts +4 -1
- package/@types/types.d.ts +12 -0
- package/components/DynamicFilter/DynamicFIlter.styles.js +156 -0
- package/components/GridLayout/subcomponents/withSizeProvider/index.d.ts +2 -2
- package/components/HelperError/HelperError.d.ts +11 -1
- package/components/HelperError/HelperError.js +2 -18
- package/components/HelperError/HelperError.styles.js +2 -2
- package/components/HelperError/constant.d.ts +0 -4
- package/components/HelperError/slots/HelperErrorEnum.d.ts +0 -3
- package/components/HelperError/slots/HelperErrorSlots.d.ts +4 -4
- package/components/HelperError/types.d.ts +4 -22
- package/components/Icon/Icon.styles.js +1 -1
- package/components/Label/Label.d.ts +17 -1
- package/components/Label/Label.js +8 -3
- package/components/Label/Label.styles.js +43 -6
- package/components/Label/{Label.stories.d.ts → stories/PaletteColor/DefaultinternalManagement/LabelDefaultInternal.stories.d.ts} +6 -8
- package/components/Label/stories/PaletteColor/DefaultinternalManagement/LabelDefaultPredeterminado.stories.d.ts +18 -0
- package/components/Label/stories/PaletteColor/DefaultinternalManagement/commonProps/LabelDefaultInternalVariants.stories.d.ts +14 -0
- package/components/Label/stories/PaletteColor/DefaultinternalManagement/commonProps/LabelDefaultVariants.stories.d.ts +14 -0
- package/components/Label/types.d.ts +7 -1
- package/components/MFLoader/MFLoader.d.ts +6 -0
- package/components/MFLoader/MFLoader.js +3 -0
- package/components/NavLink/NavLink.d.ts +4 -0
- package/components/areas/components/AreasViewer/classes/index.d.ts +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/PanelWindows/index.d.ts +2 -2
- package/components/areas/contexts/AreasContext/store.d.ts +4 -0
- package/components/areas/contexts/AreasContext/store.js +268 -0
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeImage/index.d.ts +4 -0
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeText/index.d.ts +4 -0
- package/components/hook-form/RHFTextField/RHFTextField.js +15 -4
- package/components/hook-form/RHFTextField/RHFTextField.styles.js +266 -96
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +10 -10
- package/components/hook-form/RHFTextField/stories/Default/RHFTextFieldDisabledOutlined.stories.d.ts +10 -0
- package/components/hook-form/RHFTextField/stories/Default/RHFTextFieldDisabledText.stories.d.ts +10 -0
- package/components/hook-form/RHFTextField/stories/Default/RHFTextFieldSkeleton.stories.d.ts +6 -0
- package/components/hook-form/RHFTextField/stories/Error/TextFieldErrorOutlined.stories.d.ts +9 -0
- package/components/hook-form/RHFTextField/stories/Error/TextFieldErrorText.stories.d.ts +9 -0
- package/components/hook-form/RHFTextField/stories/Primary/TextFieldOutlined.stories.d.ts +9 -0
- package/components/hook-form/RHFTextField/stories/Primary/TextFieldText.stories.d.ts +9 -0
- package/components/hook-form/RHFTextField/types.d.ts +10 -2
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/index.d.ts +2 -2
- package/components/maps/components/Map/contexts/MapContext/store.d.ts +2 -2
- package/components/maps/components/Map/contexts/MapContext/store.js +272 -152
- package/components/maps/components/Map/hooks/useAutoFocus/index.d.ts +2 -2
- package/components/maps/components/Map/pluginLayers/PolylineWithArrows/index.d.ts +2 -2
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/index.d.ts +2 -2
- package/components/mui_extended/Accordion/Accordion.d.ts +4 -0
- package/components/mui_extended/IconButton/IconButton.d.ts +2 -2
- package/components/mui_extended/IconButton/IconButton.styles.js +18 -2
- package/components/mui_extended/LoadingButton/index.d.ts +4 -0
- package/components/mui_extended/Skeleton/Skeleton.d.ts +4 -0
- package/components/mui_extended/Skeleton/skeleton.styles.js +4 -0
- package/components/mui_extended/TextField/TextField.d.ts +5 -0
- package/components/mui_extended/TextField/TextField.styles.d.ts +2 -0
- package/components/mui_extended/TextField/constants.d.ts +1 -0
- package/components/mui_extended/TextField/index.d.ts +1 -0
- package/components/mui_extended/TextField/slots/TextFieldEnum.d.ts +5 -0
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +13 -0
- package/components/mui_extended/TextField/slots/index.d.ts +2 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Default/TextFieldDisabledOutlined.stories.d.ts +15 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Default/TextFieldDisabledText.stories.d.ts +15 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Default/TextFieldSkeleton.stories.d.ts +11 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/TextFieldErrorOutlined.stories.d.ts +9 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/TextFieldErrorText.stories.d.ts +9 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/states/stateOutlined/TextFieldErrorOutlinedStateActive.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/states/stateOutlined/TextFieldErrorOutlinedStateEnabled.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/states/stateOutlined/TextFieldErrorOutlinedStateFocus.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/states/stateOutlined/TextFieldErrorOutlinedStateHover.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/states/stateText/TextFieldTextErrorStateActive.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/states/stateText/TextFieldTextErrorStateEnabled.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/states/stateText/TextFieldTextErrorStateFocus.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Error/states/stateText/TextFieldTextErrorStateHover.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/TextFieldOutlined.stories.d.ts +9 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/TextFieldText.stories.d.ts +12 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/states/stateOutlined/TextFieldPrimaryOutlinedStateActive.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/states/stateOutlined/TextFieldPrimaryOutlinedStateEnabled.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/states/stateOutlined/TextFieldPrimaryOutlinedStateFocus.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/states/stateOutlined/TextFieldPrimaryOutlinedStateHover.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/states/stateText/TextFieldTextPrimaryStateActive.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/states/stateText/TextFieldTextPrimaryStateEnabled.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/states/stateText/TextFieldTextPrimaryStateFocus.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/Primary/states/stateText/TextFieldTextPrimaryStateHover.stories.d.ts +14 -0
- package/components/mui_extended/TextField/stories/PaletteColorTextField/sizes/TextFieldSizes.stories.d.ts +16 -0
- package/components/mui_extended/TextField/types.d.ts +35 -0
- package/components/mui_extended/Typography/Typography.d.ts +4 -0
- package/components/mui_extended/Typography/typography.styles.js +4 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts +2 -2
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +82 -18
- package/contexts/RealTimeContext/store.d.ts +2 -2
- package/contexts/RealTimeContext/store.js +22 -6
- package/hooks/useSizeContainer/index.d.ts +2 -2
- package/package.json +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.stories.d.ts +0 -14
|
@@ -1,111 +1,281 @@
|
|
|
1
|
-
import { inputBaseClasses } from "@mui/material/InputBase";
|
|
2
1
|
const rhfTextFieldStyles = {
|
|
3
|
-
root: {
|
|
4
|
-
display: "flex",
|
|
5
|
-
flexDirection: "column",
|
|
6
|
-
width: "100%",
|
|
7
|
-
gap: "2px",
|
|
8
|
-
outline: "unset",
|
|
9
|
-
height: "auto",
|
|
10
|
-
"& .MuiFormControl-root": {
|
|
11
|
-
minHeight: "24px",
|
|
12
|
-
height: "auto",
|
|
13
|
-
"& .MuiInputBase-multiline": {
|
|
14
|
-
minHeight: "24px",
|
|
15
|
-
height: "auto",
|
|
16
|
-
"& .MuiInputBase-input": {
|
|
17
|
-
padding: "4px"
|
|
18
|
-
},
|
|
19
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
20
|
-
height: "100%",
|
|
21
|
-
padding: "4px"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
/**
|
|
27
|
-
* TODO: Documentar
|
|
28
|
-
*/
|
|
29
|
-
label: ({ theme }) => ({
|
|
30
|
-
color: theme.vars.palette.text.secondary,
|
|
31
|
-
transition: "all .5s ease"
|
|
32
|
-
}),
|
|
33
2
|
/**
|
|
34
|
-
*
|
|
3
|
+
* Estilos personalizados para el componente RHFTextField.
|
|
4
|
+
* @author Bruce Escobar - automatic
|
|
5
|
+
* @createdAt 2024-10-22 09:41:31 - automatic
|
|
6
|
+
* @updatedAt 2024-10-22 09:42:39 - automatic
|
|
7
|
+
* @updatedUser Bruce Escobar - automatic
|
|
35
8
|
*/
|
|
36
|
-
textField: ({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
padding: "0px 8px"
|
|
9
|
+
textField: ({ ownerState, theme }) => ({
|
|
10
|
+
"&.rhf-text-field-root": {
|
|
11
|
+
width: "100%",
|
|
12
|
+
padding: 0,
|
|
13
|
+
borderRadius: theme.size.borderRadius.r1,
|
|
14
|
+
// Condiciones de tamaño Medium en el root
|
|
15
|
+
...ownerState.sizes === "medium" && {
|
|
16
|
+
...theme.generalSettings.isMobile ? {
|
|
17
|
+
height: theme.vars.size.mobile.medium.action,
|
|
18
|
+
width: theme.vars.size.mobile.medium.action
|
|
19
|
+
} : {
|
|
20
|
+
height: theme.vars.size.desktop.medium.action,
|
|
21
|
+
width: theme.vars.size.desktop.medium.action
|
|
50
22
|
}
|
|
51
23
|
},
|
|
52
|
-
//
|
|
53
|
-
...ownerState.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
height:
|
|
59
|
-
|
|
60
|
-
[theme.breakpoints.up("sm")]: {
|
|
61
|
-
height: "24px",
|
|
62
|
-
padding: "0px 8px"
|
|
24
|
+
// Condiciones de tamaño Small en el root
|
|
25
|
+
...ownerState.sizes === "small" && {
|
|
26
|
+
...theme.generalSettings.isMobile ? {
|
|
27
|
+
height: theme.vars.size.mobile.small.action,
|
|
28
|
+
width: theme.vars.size.mobile.small.action
|
|
29
|
+
} : {
|
|
30
|
+
height: theme.vars.size.desktop.medium.action,
|
|
31
|
+
width: theme.vars.size.desktop.medium.action
|
|
63
32
|
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"& .MuiInputBase-input": {
|
|
67
|
-
fontSize: "0.875rem",
|
|
68
|
-
padding: "0px",
|
|
69
|
-
height: "100%"
|
|
70
|
-
},
|
|
71
|
-
"& .MuiOutlinedInput-root": {
|
|
72
|
-
"&:not(.Mui-focused,input:disabled):hover fieldset": {
|
|
73
|
-
transition: "all .3s ease",
|
|
74
|
-
borderColor: ownerState?.error === true ? theme.vars.palette.error.main : theme.vars.palette.primary.light,
|
|
75
|
-
color: theme.vars.palette.primary?.active,
|
|
76
|
-
background: theme.vars.palette.primary.opacity
|
|
77
|
-
},
|
|
78
|
-
"&:has(:disabled) fieldset": {
|
|
79
|
-
color: theme.vars.palette.text.disabled
|
|
80
33
|
},
|
|
81
|
-
|
|
82
|
-
|
|
34
|
+
// Variant Outlined TextField
|
|
35
|
+
...ownerState.variantRHFTextField === "outlined" && {
|
|
36
|
+
"& .MuiInputBase-root": {
|
|
37
|
+
padding: 0,
|
|
38
|
+
minHeight: 0,
|
|
39
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
40
|
+
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
41
|
+
borderRadius: theme.size.borderRadius.r1,
|
|
42
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
43
|
+
border: theme.vars.size.borderStroke.actionInput,
|
|
44
|
+
borderColor: theme.vars.palette.border.default
|
|
45
|
+
},
|
|
46
|
+
//Active para primary para el icono y placeholder
|
|
47
|
+
"&:active": {
|
|
48
|
+
":focus-within": {
|
|
49
|
+
"&:focus-within .MuiInputBase-input::placeholder": {
|
|
50
|
+
color: theme.vars.palette.primary.active
|
|
51
|
+
},
|
|
52
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
53
|
+
backgroundColor: theme.vars.palette.primary.active
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
//Estilos de focus primary para el icono y placeholder
|
|
58
|
+
":focus-within": {
|
|
59
|
+
"&:focus-within .MuiInputBase-input::placeholder": {
|
|
60
|
+
color: ownerState.paletteColor?.main
|
|
61
|
+
},
|
|
62
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
63
|
+
backgroundColor: ownerState.paletteColor?.main
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
//Estilos del hover primar
|
|
67
|
+
"&:hover": {
|
|
68
|
+
backgroundColor: ownerState.paletteColor?.hoverOpacity
|
|
69
|
+
},
|
|
70
|
+
//Estilos del InputBase
|
|
71
|
+
"& .MuiInputBase-input": {
|
|
72
|
+
...ownerState.error && {
|
|
73
|
+
borderColor: ownerState.error ? theme.vars.palette.border.error : theme.vars.palette.border.default
|
|
74
|
+
},
|
|
75
|
+
//Estilos del InputBase en hover
|
|
76
|
+
"&:hover ~ .MuiOutlinedInput-notchedOutline": {
|
|
77
|
+
...ownerState.error && {
|
|
78
|
+
borderColor: ownerState.error ? theme.vars.palette.border.error : theme.vars.palette.border.default
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
//Estilos del InputBase en Focus
|
|
82
|
+
"&:focus ~ .MuiOutlinedInput-notchedOutline": {
|
|
83
|
+
borderColor: ownerState.error ? theme.vars.palette.error.main : theme.vars.palette.primary.main
|
|
84
|
+
},
|
|
85
|
+
//Estilos del InputBase en Active
|
|
86
|
+
"&:active ~ .MuiOutlinedInput-notchedOutline": {
|
|
87
|
+
borderColor: ownerState.error ? theme.vars.palette.error.active : theme.vars.palette.primary.active
|
|
88
|
+
},
|
|
89
|
+
//Estilos del InputBase en placeholder default
|
|
90
|
+
"&::placeholder": {
|
|
91
|
+
color: theme.vars.palette.text.primary
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
//Este estilo se asegura de que los campos de entrada que han sido autocompletados por el navegador no tengan ningún relleno adicional
|
|
95
|
+
"& .MuiOutlinedInput-input:-webkit-autofill": {
|
|
96
|
+
padding: 0
|
|
97
|
+
},
|
|
98
|
+
// Historia Error variante Outlined
|
|
99
|
+
...ownerState.error && {
|
|
100
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
101
|
+
borderColor: ownerState.error ? theme.vars.palette.border.error : theme.vars.palette.border.default
|
|
102
|
+
},
|
|
103
|
+
//Estilos del hover Error
|
|
104
|
+
"&:hover": {
|
|
105
|
+
backgroundColor: theme.vars.palette.error.hoverOpacity,
|
|
106
|
+
borderColor: ownerState.paletteColor?.main
|
|
107
|
+
},
|
|
108
|
+
//Estilos focus Error el icono y placeholder de color error
|
|
109
|
+
"&:focus-within": {
|
|
110
|
+
"&:focus-within .MuiInputBase-input::placeholder": {
|
|
111
|
+
color: ownerState.error ? theme.vars.palette.error.main : theme.vars.palette.primary.main
|
|
112
|
+
},
|
|
113
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
114
|
+
backgroundColor: ownerState.error ? theme.vars.palette.error.main : theme.vars.palette.primary.main
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
//Estilos active Error el icono y placeholder de color error
|
|
118
|
+
"&:active": {
|
|
119
|
+
"&:focus-within": {
|
|
120
|
+
"&:focus-within .MuiInputBase-input::placeholder": {
|
|
121
|
+
color: theme.vars.palette.error.active
|
|
122
|
+
},
|
|
123
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
124
|
+
backgroundColor: theme.vars.palette.error.active
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
// Historia Disabled para Outlined
|
|
130
|
+
...ownerState.disabled && {
|
|
131
|
+
borderColor: theme.palette.border.disabled,
|
|
132
|
+
pointerEvents: ownerState.disabled ? "none" : "auto",
|
|
133
|
+
"&:hover": {
|
|
134
|
+
pointerEvents: ownerState.disabled ? "none" : "auto"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
83
138
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
139
|
+
// Variant Text RHFTextField
|
|
140
|
+
...ownerState.variantRHFTextField === "text" && {
|
|
141
|
+
borderColor: "transparent",
|
|
142
|
+
"& .MuiInputBase-root": {
|
|
143
|
+
padding: 0,
|
|
144
|
+
minHeight: 0,
|
|
145
|
+
borderColor: "transparent",
|
|
146
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
147
|
+
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
148
|
+
borderRadius: theme.size.borderRadius.r1,
|
|
149
|
+
//Estilos para los bordes del campo de texto
|
|
150
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
151
|
+
border: theme.vars.size.borderStroke.actionInput,
|
|
152
|
+
borderColor: theme.vars.palette.border.default,
|
|
153
|
+
borderTop: theme.vars.palette.primary.main,
|
|
154
|
+
borderLeft: "transparent",
|
|
155
|
+
borderRight: "transparent"
|
|
156
|
+
},
|
|
157
|
+
//Estilo Focus para primary para el icono y placeholder
|
|
158
|
+
":focus-within": {
|
|
159
|
+
borderColor: theme.palette.border.main,
|
|
160
|
+
"&:focus-within .MuiInputBase-input::placeholder": {
|
|
161
|
+
color: ownerState.paletteColor?.main
|
|
162
|
+
},
|
|
163
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
164
|
+
backgroundColor: theme.vars.palette.primary.main
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
//Estilo Active para primary para el icono y placeholder
|
|
168
|
+
"&:active": {
|
|
169
|
+
":focus-within": {
|
|
170
|
+
"&:focus-within .MuiInputBase-input::placeholder": {
|
|
171
|
+
color: theme.vars.palette.primary.active
|
|
172
|
+
},
|
|
173
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
174
|
+
backgroundColor: theme.vars.palette.primary.active
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
//Estilos para Hover Text
|
|
179
|
+
"&:hover": {
|
|
180
|
+
borderColor: "transparent",
|
|
181
|
+
backgroundColor: ownerState.paletteColor?.hoverOpacity
|
|
182
|
+
},
|
|
183
|
+
//Estilos del InputBase
|
|
184
|
+
"& .MuiInputBase-input": {
|
|
185
|
+
"&:hover ~ .MuiOutlinedInput-notchedOutline": {
|
|
186
|
+
borderColor: ownerState.error ? theme.vars.palette.error.main : theme.vars.palette.primary.main
|
|
187
|
+
},
|
|
188
|
+
//Estilo Focus del InputBase
|
|
189
|
+
"&:focus ~ .MuiOutlinedInput-notchedOutline": {
|
|
190
|
+
borderColor: ownerState.error ? theme.vars.palette.error.main : theme.vars.palette.primary.main
|
|
191
|
+
},
|
|
192
|
+
//Estilo Active del InputBase
|
|
193
|
+
"&:active ~ .MuiOutlinedInput-notchedOutline": {
|
|
194
|
+
borderColor: ownerState.error ? theme.vars.palette.error.active : theme.vars.palette.primary.active,
|
|
195
|
+
"&:focus-within .MuiInputBase-input::placeholder": {
|
|
196
|
+
color: theme.vars.palette.primary.active
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"&::placeholder": {
|
|
200
|
+
color: theme.vars.palette.text.primary
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
//Este estilo se asegura de que los campos de entrada que han sido autocompletados por el navegador no tengan ningún relleno adicional
|
|
204
|
+
"& .MuiOutlinedInput-input:-webkit-autofill": {
|
|
205
|
+
padding: 0
|
|
206
|
+
},
|
|
207
|
+
// Historia Error
|
|
208
|
+
...ownerState.error && {
|
|
209
|
+
// Historia Error variante Text
|
|
210
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
211
|
+
borderColor: theme.vars.palette.border.error,
|
|
212
|
+
borderTop: theme.vars.palette.border.error,
|
|
213
|
+
borderLeft: "transparent",
|
|
214
|
+
borderRight: "transparent",
|
|
215
|
+
"&:focus": { borderColor: theme.vars.palette.error.main }
|
|
216
|
+
},
|
|
217
|
+
//Estilos del hover Error
|
|
218
|
+
"&:hover": {
|
|
219
|
+
backgroundColor: theme.vars.palette.error.hoverOpacity
|
|
220
|
+
},
|
|
221
|
+
// Estilos focus Error el icono y placeholder de color error
|
|
222
|
+
"&:focus-within": {
|
|
223
|
+
borderColor: ownerState.error ? theme.vars.palette.error.main : theme.vars.palette.primary.main,
|
|
224
|
+
"&:focus-within .MuiInputBase-input::placeholder": {
|
|
225
|
+
color: ownerState.error ? theme.vars.palette.error.main : theme.vars.palette.primary.main
|
|
226
|
+
},
|
|
227
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
228
|
+
backgroundColor: ownerState.error ? theme.vars.palette.error.main : theme.vars.palette.primary.main
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
// Estilos active Error el icono y placeholder de color error
|
|
232
|
+
"&:active": {
|
|
233
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
234
|
+
borderColor: theme.vars.palette.error.main
|
|
235
|
+
},
|
|
236
|
+
":focus-within": {
|
|
237
|
+
"&:focus-within .MuiInputBase-input::placeholder": {
|
|
238
|
+
color: theme.vars.palette.error.active
|
|
239
|
+
},
|
|
240
|
+
'&:focus-within [class*="M4LIcon-icon"]:not(.MuiIconButton-root [class*="M4LIcon-icon"])': {
|
|
241
|
+
backgroundColor: theme.vars.palette.error.active
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
// Historia Disabled
|
|
247
|
+
...ownerState.disabled && {
|
|
248
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
249
|
+
borderColor: theme.palette.border.disabled,
|
|
250
|
+
borderTop: theme.palette.border.disabled,
|
|
251
|
+
borderLeft: "transparent",
|
|
252
|
+
borderRight: "transparent"
|
|
253
|
+
},
|
|
254
|
+
pointerEvents: ownerState.disabled ? "none" : "auto",
|
|
255
|
+
"&:hover": {
|
|
256
|
+
pointerEvents: ownerState.disabled ? "none" : "auto"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
87
261
|
}
|
|
88
262
|
}),
|
|
89
|
-
/* SkeletonTextField Styles */
|
|
90
|
-
skeletonTextFieldRoot: {
|
|
91
|
-
display: "flex",
|
|
92
|
-
flexDirection: "column",
|
|
93
|
-
width: "100%",
|
|
94
|
-
gap: "4px"
|
|
95
|
-
},
|
|
96
263
|
/**
|
|
97
|
-
*
|
|
264
|
+
* Estilos personalizados para el componente Skeleton.
|
|
265
|
+
* @author Bruce Escobar - automatic
|
|
266
|
+
* @createdAt 2024-10-22 09:41:31 - automatic
|
|
267
|
+
* @updatedAt 2024-10-22 09:42:39 - automatic
|
|
268
|
+
* @updatedUser Bruce Escobar - automatic
|
|
98
269
|
*/
|
|
99
|
-
wrapperSkeletonRHFTextField: ({ theme }) => ({
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
height: "20px"
|
|
270
|
+
wrapperSkeletonRHFTextField: ({ ownerState, theme }) => ({
|
|
271
|
+
borderRadius: theme.size.borderRadius.r1,
|
|
272
|
+
...ownerState.size === "small" && {
|
|
273
|
+
...theme.generalSettings.isMobile ? { height: theme.vars.size.mobile.small.action } : { height: theme.vars.size.desktop.small.action }
|
|
274
|
+
},
|
|
275
|
+
// Condiciones de tamaño Medium en el root
|
|
276
|
+
...ownerState.size === "medium" && {
|
|
277
|
+
...theme.generalSettings.isMobile ? { height: theme.vars.size.mobile.medium.action } : { height: theme.vars.size.desktop.medium.action }
|
|
278
|
+
}
|
|
109
279
|
})
|
|
110
280
|
};
|
|
111
281
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export declare const RHFTextFieldRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').
|
|
2
|
-
ownerState: Partial<import('..').
|
|
1
|
+
export declare const RHFTextFieldRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
|
|
2
|
+
ownerState: Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown>;
|
|
3
3
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
4
|
-
export declare const LabelStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Label').LabelProps, keyof import('../../../Label').LabelProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').
|
|
5
|
-
ownerState: Partial<import('..').
|
|
4
|
+
export declare const LabelStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Label').LabelProps, keyof import('../../../Label').LabelProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
|
|
5
|
+
ownerState: Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown>;
|
|
6
6
|
}, {}, {}>;
|
|
7
7
|
export declare const TextFieldStyled: import('@emotion/styled').StyledComponent<Pick<{
|
|
8
8
|
variant?: import('@mui/material').TextFieldVariants | undefined;
|
|
9
|
-
} & Omit<import('@mui/material').FilledTextFieldProps | import('@mui/material').StandardTextFieldProps | import('@mui/material').OutlinedTextFieldProps, "variant">, "color" | "content" | "translate" | "margin" | "size" | "disabled" | "sx" | "classes" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "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" | "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" | "children" | "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" | "onResize" | "onResizeCapture" | "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" | "ref" | "error" | "name" | "label" | "select" | "key" | "component" | "value" | "type" | "variant" | "autoComplete" | "placeholder" | "required" | "rows" | "fullWidth" | "inputProps" | "inputRef" | "SelectProps" | "multiline" | "maxRows" | "minRows" | "hiddenLabel" | "focused" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').
|
|
10
|
-
ownerState: Partial<import('..').
|
|
9
|
+
} & Omit<import('@mui/material').FilledTextFieldProps | import('@mui/material').StandardTextFieldProps | import('@mui/material').OutlinedTextFieldProps, "variant">, "color" | "content" | "translate" | "margin" | "size" | "disabled" | "sx" | "classes" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "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" | "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" | "children" | "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" | "onResize" | "onResizeCapture" | "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" | "ref" | "error" | "name" | "label" | "select" | "key" | "component" | "value" | "type" | "variant" | "autoComplete" | "placeholder" | "required" | "rows" | "fullWidth" | "inputProps" | "inputRef" | "SelectProps" | "multiline" | "maxRows" | "minRows" | "hiddenLabel" | "focused" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
|
|
10
|
+
ownerState: Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown>;
|
|
11
11
|
}, {}, {}>;
|
|
12
|
-
export declare const SkeletonTextFieldRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').
|
|
13
|
-
ownerState: Partial<import('..').
|
|
12
|
+
export declare const SkeletonTextFieldRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
|
|
13
|
+
ownerState: Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown>;
|
|
14
14
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
15
|
-
export declare const WrapperSkeletonRHFTextFieldStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').
|
|
16
|
-
ownerState: Partial<import('..').
|
|
15
|
+
export declare const WrapperSkeletonRHFTextFieldStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
|
|
16
|
+
ownerState: Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown>;
|
|
17
17
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
package/components/hook-form/RHFTextField/stories/Default/RHFTextFieldDisabledOutlined.stories.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { RHFTextField } from '../../..';
|
|
3
|
+
declare const meta: Meta<typeof RHFTextField>;
|
|
4
|
+
type Story = StoryObj<typeof RHFTextField>;
|
|
5
|
+
export declare const OutlinedDisabled: Story;
|
|
6
|
+
export declare const WhitoutEndAdorment: Story;
|
|
7
|
+
export declare const WhitAdorment: Story;
|
|
8
|
+
export declare const WhitoutStartAdorment: Story;
|
|
9
|
+
export declare const WhitoutAdorment: Story;
|
|
10
|
+
export default meta;
|
package/components/hook-form/RHFTextField/stories/Default/RHFTextFieldDisabledText.stories.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { RHFTextField } from '../../..';
|
|
3
|
+
declare const meta: Meta<typeof RHFTextField>;
|
|
4
|
+
type Story = StoryObj<typeof RHFTextField>;
|
|
5
|
+
export declare const TextDisabled: Story;
|
|
6
|
+
export declare const WhitoutEndAdorment: Story;
|
|
7
|
+
export declare const WhitoutStartAdorment: Story;
|
|
8
|
+
export declare const WhitAdorment: Story;
|
|
9
|
+
export declare const WhitoutAdorment: Story;
|
|
10
|
+
export default meta;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { RHFTextField } from '../../..';
|
|
3
|
+
declare const meta: Meta<typeof RHFTextField>;
|
|
4
|
+
type Story = StoryObj<typeof RHFTextField>;
|
|
5
|
+
/**
|
|
6
|
+
* Error en RHFTextField outlined y text se utiliza para mostrar un campo de texto que indica un estado de error. Esto es útil para proporcionar retroalimentación visual al usuario cuando hay un problema con la entrada de datos.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ErrorOutlined: Story;
|
|
9
|
+
export default meta;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { RHFTextField } from '../../..';
|
|
3
|
+
declare const meta: Meta<typeof RHFTextField>;
|
|
4
|
+
type Story = StoryObj<typeof RHFTextField>;
|
|
5
|
+
/**
|
|
6
|
+
* Error en RHFTextField outlined y text se utiliza para mostrar un campo de texto que indica un estado de error. Esto es útil para proporcionar retroalimentación visual al usuario cuando hay un problema con la entrada de datos.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ErrorText: Story;
|
|
9
|
+
export default meta;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { RHFTextField } from '../../..';
|
|
3
|
+
declare const meta: Meta<typeof RHFTextField>;
|
|
4
|
+
type Story = StoryObj<typeof RHFTextField>;
|
|
5
|
+
/**
|
|
6
|
+
* Story for the primary outlined RHFvariants of the TextField component.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PrimaryOutlined: Story;
|
|
9
|
+
export default meta;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { RHFTextField } from '../../..';
|
|
3
|
+
declare const meta: Meta<typeof RHFTextField>;
|
|
4
|
+
type Story = StoryObj<typeof RHFTextField>;
|
|
5
|
+
/**
|
|
6
|
+
* Story for the primary text variant of the TextField component.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PrimaryText: Story;
|
|
9
|
+
export default meta;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Theme } from '@mui/material/styles';
|
|
2
2
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
3
|
-
import { TextFieldProps } from '@mui/material';
|
|
3
|
+
import { TextFieldProps, PaletteColor } from '@mui/material';
|
|
4
4
|
import { ReactElement } from 'react';
|
|
5
5
|
import { LabelProps } from '../../Label/types';
|
|
6
6
|
import { RHFTextFieldSlots } from './slots';
|
|
7
7
|
import { RHF_TEXT_FIELD_KEY_COMPONENT } from './constant';
|
|
8
|
+
import { ComponentPalletColor } from '@m4l/styles';
|
|
9
|
+
export type VariantsRHFTextField = 'outlined' | 'text';
|
|
8
10
|
export type RHFTextFieldVariants = 'info' | 'success' | 'warning' | null;
|
|
9
11
|
export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputProps' | 'variant' | 'label' | 'theme'>, Omit<LabelProps, 'label'> {
|
|
10
12
|
skeletonWidth?: string | number;
|
|
@@ -24,6 +26,8 @@ export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputP
|
|
|
24
26
|
label?: string;
|
|
25
27
|
/** Etiqueta que se utiliza para condicionar el valor del campo de texto para que sea de tipo entero o decimal.*/
|
|
26
28
|
isInteger?: boolean;
|
|
29
|
+
color?: Extract<ComponentPalletColor, 'primary'>;
|
|
30
|
+
RHFvariants?: VariantsRHFTextField;
|
|
27
31
|
}
|
|
28
32
|
export interface RHFTextFieldState extends Pick<RHFTextFieldProps, 'size' | 'disabled'> {
|
|
29
33
|
type: 'password' | 'text';
|
|
@@ -31,6 +35,10 @@ export interface RHFTextFieldState extends Pick<RHFTextFieldProps, 'size' | 'dis
|
|
|
31
35
|
isTabSelected: boolean;
|
|
32
36
|
variant: RHFTextFieldVariants | 'warning' | 'error' | null;
|
|
33
37
|
}
|
|
34
|
-
export type RHFTextFieldOwnerState = RHFTextFieldProps
|
|
38
|
+
export type RHFTextFieldOwnerState = RHFTextFieldProps & {
|
|
39
|
+
componentPaletteColor?: ComponentPalletColor;
|
|
40
|
+
paletteColor: PaletteColor;
|
|
41
|
+
variantRHFTextField?: VariantsRHFTextField;
|
|
42
|
+
};
|
|
35
43
|
export type RHFTextFieldSlotsType = keyof typeof RHFTextFieldSlots;
|
|
36
44
|
export type RHFTextFieldStyles = Partial<OverridesStyleRules<RHFTextFieldSlotsType, typeof RHF_TEXT_FIELD_KEY_COMPONENT, Theme> | undefined> | undefined;
|
|
@@ -2,8 +2,8 @@ import { UploadImageProps } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* TODO: Documentar
|
|
4
4
|
* @author Juan Escobar - automatic
|
|
5
|
-
* @updatedAt 2024-10-
|
|
6
|
-
* @updatedUser
|
|
5
|
+
* @updatedAt 2024-10-22 09:42:39 - automatic
|
|
6
|
+
* @updatedUser Bruce Escobar - automatic
|
|
7
7
|
* @createdAt 2024-10-15 17:33:28 - automatic
|
|
8
8
|
*/
|
|
9
9
|
export default function UploadImage({ error, file, helperText, sx, ...other }: UploadImageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,8 +8,8 @@ import { MapStateWithActions, InitialMapStoreProps } from './types';
|
|
|
8
8
|
/**
|
|
9
9
|
* TODO: Documentar
|
|
10
10
|
* @author Juan Escobar - automatic
|
|
11
|
-
* @updatedAt 2024-10-
|
|
12
|
-
* @updatedUser
|
|
11
|
+
* @updatedAt 2024-10-22 09:42:39 - automatic
|
|
12
|
+
* @updatedUser Bruce Escobar - automatic
|
|
13
13
|
* @createdAt 2024-10-15 17:33:28 - automatic
|
|
14
14
|
*/
|
|
15
15
|
export declare const createMapStore: (initProps: InitialMapStoreProps) => Omit<Omit<import('zustand').StoreApi<MapStateWithActions>, "setState"> & {
|