@m4l/components 8.2.4 → 9.1.0
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 +0 -6
- package/@types/types.d.ts +119 -100
- package/components/AccountPopover/classes/index.d.ts +1 -1
- package/components/CommonActions/components/ActionsContainer/ActionsContainer.d.ts +11 -0
- package/components/CommonActions/components/ActionsContainer/ActionsContainer.js +23 -0
- package/components/CommonActions/components/ActionsContainer/ActionsContainer.test.d.ts +1 -0
- package/components/CommonActions/components/ActionsContainer/ActionsContainerStyles.d.ts +2 -0
- package/components/CommonActions/components/ActionsContainer/ActionsContainerStyles.js +26 -0
- package/components/CommonActions/components/ActionsContainer/constans.d.ts +8 -0
- package/components/CommonActions/components/ActionsContainer/constans.js +4 -0
- package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerEnum.d.ts +3 -0
- package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerEnum.js +7 -0
- package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +4 -0
- package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.js +12 -0
- package/components/CommonActions/components/ActionsContainer/slots/index.d.ts +2 -0
- package/components/CommonActions/components/ActionsContainer/slots/index.js +1 -0
- package/components/CommonActions/components/ActionsContainer/types.d.ts +20 -0
- package/components/CommonActions/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.js +3 -3
- package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.js +10 -10
- package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.d.ts +4 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js +2 -2
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +2 -2
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +1 -1
- package/components/SideBar/classes/index.d.ts +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index.d.ts +5 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index.js +2 -2
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.js +2 -2
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +4 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +2 -2
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.js +3 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/MainActions/index.js +3 -3
- package/components/extended/react-resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
- package/components/extended/react-resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeImage/index.js +1 -1
- package/components/hook-form/RHFInputNumberSpinner/RHFInputNumberSpinner.d.ts +5 -0
- package/components/hook-form/RHFInputNumberSpinner/RHFInputNumberSpinner.styles.d.ts +8 -0
- package/components/hook-form/RHFInputNumberSpinner/constants.d.ts +4 -0
- package/components/hook-form/RHFInputNumberSpinner/slots/RHFInputNumberSpinnerEnum.d.ts +10 -0
- package/components/hook-form/RHFInputNumberSpinner/slots/RHFInputNumberSpinnerSlots.d.ts +28 -0
- package/components/hook-form/RHFInputNumberSpinner/stories/RHFInputNumberSpinner.defaultProps.stories.d.ts +26 -0
- package/components/hook-form/RHFInputNumberSpinner/stories/RHFInputNumberSpinner.error.stories.d.ts +13 -0
- package/components/hook-form/RHFInputNumberSpinner/stories/RHFInputNumberSpinner.variants.stories.d.ts +23 -0
- package/components/hook-form/RHFInputNumberSpinner/types.d.ts +71 -0
- package/components/hook-form/RHFTextField/RHFTextField.js +13 -23
- package/components/hook-form/RHFTextField/RHFTextField.styles.js +104 -157
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFTextField/stories/Error/RHFTextFieldErrorOutlined.stories.d.ts +29 -0
- package/components/hook-form/RHFTextField/stories/Error/RHFTextFieldErrorText.stories.d.ts +29 -0
- package/components/hook-form/RHFTextField/stories/Primary/RHFTextFieldOutlined.stories.d.ts +29 -0
- package/components/hook-form/RHFTextField/stories/Primary/RHFTextFieldText.stories.d.ts +32 -0
- package/components/hook-form/RHFTextField/types.d.ts +3 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.js +2 -2
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MyActions/index.d.ts +4 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MyActions/index.js +2 -2
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/index.js +1 -1
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.d.ts +4 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.js +2 -2
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.js +1 -1
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.js +5 -5
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.d.ts +4 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.js +2 -2
- package/components/modal/WindowConfirm/index.d.ts +5 -0
- package/components/modal/WindowConfirm/index.js +2 -2
- package/components/modal/classes/index.d.ts +2 -2
- package/components/mui_extended/MenuActions/MenuActions.d.ts +8 -1
- package/components/mui_extended/MenuActions/MenuActions.js +55 -77
- package/components/mui_extended/MenuActions/MenuActions.styles.d.ts +4 -0
- package/components/mui_extended/MenuActions/MenuActions.styles.js +11 -38
- package/components/mui_extended/MenuActions/constants.d.ts +17 -0
- package/components/mui_extended/MenuActions/constants.js +6 -2
- package/components/mui_extended/MenuActions/dictionary.d.ts +15 -0
- package/components/mui_extended/MenuActions/slots/MenuActionsEnum.d.ts +8 -5
- package/components/mui_extended/MenuActions/slots/MenuActionsEnum.js +1 -4
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +29 -16
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots.js +16 -33
- package/components/mui_extended/MenuActions/stories/MenuActions.default.stories.d.ts +25 -0
- package/components/mui_extended/MenuActions/stories/MenuActions.othersProps.stories.d.ts +13 -0
- package/components/mui_extended/MenuActions/types.d.ts +80 -18
- package/components/mui_extended/MenuItem/MenuItem.js +85 -0
- package/components/mui_extended/MenuItem/MenuItem.styles.js +121 -0
- package/components/mui_extended/MenuItem/constants.js +4 -0
- package/components/mui_extended/MenuItem/index.js +1 -0
- package/components/mui_extended/MenuItem/slots/MenuItemEnum.js +9 -0
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +24 -0
- package/components/mui_extended/MenuItem/types.js +1 -0
- package/components/mui_extended/Pager/classes/index.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
- package/components/mui_extended/Tab/Slots/TabEnum.d.ts +9 -0
- package/components/mui_extended/Tab/Slots/TabEnum.js +9 -0
- package/components/mui_extended/Tab/Slots/TabSlots.d.ts +26 -0
- package/components/mui_extended/Tab/Slots/TabSlots.js +24 -0
- package/components/mui_extended/Tab/Slots/index.d.ts +2 -0
- package/components/mui_extended/Tab/Slots/index.js +1 -0
- package/components/mui_extended/Tab/Tab.d.ts +5 -0
- package/components/mui_extended/Tab/Tab.js +67 -0
- package/components/mui_extended/Tab/Tab.styles.d.ts +5 -0
- package/components/mui_extended/Tab/Tab.styles.js +147 -0
- package/components/mui_extended/Tab/constants.d.ts +14 -0
- package/components/mui_extended/Tab/constants.js +10 -0
- package/components/mui_extended/Tab/index.d.ts +1 -5
- package/components/mui_extended/Tab/types.d.ts +53 -2
- package/components/mui_extended/TextField/slots/TextFieldEnum.d.ts +1 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +6 -6
- package/components/mui_extended/TextField/types.d.ts +54 -10
- package/components/mui_extended/index.d.ts +1 -1
- package/index.js +3 -3
- package/package.json +1 -1
- package/storybook/components/commonActions/components/ActionsContainer/ActionsContainer.stories.d.ts +13 -0
- package/storybook/components/extended/mui/Tab/stories/Tab.disable.stories.d.ts +36 -0
- package/storybook/components/extended/mui/Tab/stories/Tab.enable.stories.d.ts +36 -0
- package/storybook/components/extended/mui/Tab/stories/Tab.sizes.stories.d.ts +28 -0
- package/storybook/components/extended/mui/Tab/stories/Tab.skeleton.stories.d.ts +32 -0
- package/components/CommonActions/components/Actions/index.d.ts +0 -2
- package/components/CommonActions/components/Actions/index.js +0 -24
- package/components/CommonActions/components/Actions/styles.d.ts +0 -1
- package/components/CommonActions/components/Actions/styles.js +0 -14
- package/components/CommonActions/components/Actions/types.d.ts +0 -4
- package/components/CommonActions/tests/constants.js +0 -4
- package/components/CommonActions/tests/utils.js +0 -7
- package/components/hook-form/RHFTextField/stories/Error/TextFieldErrorOutlined.stories.d.ts +0 -9
- package/components/hook-form/RHFTextField/stories/Error/TextFieldErrorText.stories.d.ts +0 -9
- package/components/hook-form/RHFTextField/stories/Primary/TextFieldOutlined.stories.d.ts +0 -9
- package/components/hook-form/RHFTextField/stories/Primary/TextFieldText.stories.d.ts +0 -9
- package/components/mui_extended/MenuActions/MenuActions.stories.d.ts +0 -25
- package/components/mui_extended/Tab/classes/constants.d.ts +0 -1
- package/components/mui_extended/Tab/classes/constants.js +0 -4
- package/components/mui_extended/Tab/classes/index.d.ts +0 -10
- package/components/mui_extended/Tab/classes/index.js +0 -25
- package/components/mui_extended/Tab/classes/types.d.ts +0 -7
- package/components/mui_extended/Tab/constant.d.ts +0 -1
- package/components/mui_extended/Tab/constant.js +0 -4
- package/components/mui_extended/Tab/index.js +0 -40
- package/components/mui_extended/Tab/styles.d.ts +0 -2
- package/components/mui_extended/Tab/styles.js +0 -11
- package/components/mui_extended/Tab/tests/utils.d.ts +0 -2
- /package/components/{mui_extended/Tab/tests/index.test.d.ts → CommonActions/components/ActionsContainer/ActionsContainer.integration.test.d.ts} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
|
|
4
|
+
import { useTheme } from "@mui/material";
|
|
5
|
+
import { a as TYPOGRAPHY_KEY, b as TAB_SPECIFY, I as ICON_KEY } from "./constants.js";
|
|
6
|
+
import { useRef, useMemo } from "react";
|
|
7
|
+
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
8
|
+
import { R as RootStyled, T as TypographyStyled, I as IconStyled } from "./Slots/TabSlots.js";
|
|
9
|
+
function Tab(props) {
|
|
10
|
+
const {
|
|
11
|
+
SKTWidth,
|
|
12
|
+
SKTHeight,
|
|
13
|
+
size = "medium",
|
|
14
|
+
// Tamaño del tab, por defecto 'medium'.
|
|
15
|
+
disabled,
|
|
16
|
+
// Indica si el tab está deshabilitado.
|
|
17
|
+
label,
|
|
18
|
+
// Texto que se muestra en el tab.
|
|
19
|
+
urlIcon,
|
|
20
|
+
// URL del icono a mostrar en el tab.
|
|
21
|
+
value,
|
|
22
|
+
...other
|
|
23
|
+
// Otras propiedades que se pasan al componente.
|
|
24
|
+
} = props;
|
|
25
|
+
const refMuiTab = useRef(null);
|
|
26
|
+
const isSelected = useMemo(() => {
|
|
27
|
+
if (refMuiTab.current) {
|
|
28
|
+
return refMuiTab.current?.classList?.contains("Mui-selected");
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}, [refMuiTab.current]);
|
|
32
|
+
const { currentSize } = useComponentSize(size);
|
|
33
|
+
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
34
|
+
const isSkeleton = useModuleSkeleton();
|
|
35
|
+
const theme = useTheme();
|
|
36
|
+
const paletteColor = getPropertyByString(theme.vars.palette, disabled || !isSelected || isSkeleton ? "default" : "primary", theme.vars.palette.default);
|
|
37
|
+
const OwnerState = {
|
|
38
|
+
paletteColor,
|
|
39
|
+
size: adjustedSize,
|
|
40
|
+
disabled,
|
|
41
|
+
skeleton: isSkeleton
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
RootStyled,
|
|
45
|
+
{
|
|
46
|
+
ref: refMuiTab,
|
|
47
|
+
label: label ? /* @__PURE__ */ jsx(TypographyStyled, { className: clsx(TYPOGRAPHY_KEY, TAB_SPECIFY), skeletonWidth: 40, ownerState: { OwnerState }, variant: "body", children: label }) : void 0,
|
|
48
|
+
disabled,
|
|
49
|
+
ownerState: { ...OwnerState },
|
|
50
|
+
icon: urlIcon ? /* @__PURE__ */ jsx(
|
|
51
|
+
IconStyled,
|
|
52
|
+
{
|
|
53
|
+
className: clsx(ICON_KEY, TAB_SPECIFY),
|
|
54
|
+
ownerState: { OwnerState },
|
|
55
|
+
src: urlIcon,
|
|
56
|
+
size
|
|
57
|
+
}
|
|
58
|
+
) : void 0,
|
|
59
|
+
value,
|
|
60
|
+
tabIndex: 0,
|
|
61
|
+
...other
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
Tab as T
|
|
67
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
const tabStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Slot Raíz: Estilos para el contenedor principal del componente Tab.
|
|
4
|
+
*/
|
|
5
|
+
root: ({ theme, ownerState }) => ({
|
|
6
|
+
// Estructura y layout básico
|
|
7
|
+
display: "flex",
|
|
8
|
+
flexDirection: "row",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
width: "fit-content",
|
|
11
|
+
minHeight: "fit-content",
|
|
12
|
+
minWidth: "fit-content",
|
|
13
|
+
gap: theme.vars.size.baseSpacings.sp1,
|
|
14
|
+
opacity: 1,
|
|
15
|
+
overflow: "visible",
|
|
16
|
+
// Bordes y radio de borde
|
|
17
|
+
border: theme.vars.size.borderStroke.container,
|
|
18
|
+
borderColor: "transparent",
|
|
19
|
+
borderBottom: 0,
|
|
20
|
+
borderTopLeftRadius: `calc(${theme.vars.size.borderRadius.r1} - 1px)`,
|
|
21
|
+
borderTopRightRadius: `calc(${theme.vars.size.borderRadius.r1} - 1px)`,
|
|
22
|
+
boxSizing: "border-box",
|
|
23
|
+
// Padding
|
|
24
|
+
paddingTop: 0,
|
|
25
|
+
paddingBottom: 0,
|
|
26
|
+
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
27
|
+
paddingRight: theme.vars.size.baseSpacings.sp2,
|
|
28
|
+
position: "relative",
|
|
29
|
+
// Altura para vista móvil y de escritorio basada en el tamaño
|
|
30
|
+
...theme.generalSettings.isMobile ? {
|
|
31
|
+
...ownerState.size === "medium" && {
|
|
32
|
+
height: theme.vars.size.mobile.medium.container
|
|
33
|
+
},
|
|
34
|
+
...ownerState.size === "small" && {
|
|
35
|
+
height: theme.vars.size.mobile.small.container
|
|
36
|
+
}
|
|
37
|
+
} : {
|
|
38
|
+
...ownerState.size === "medium" && {
|
|
39
|
+
height: theme.vars.size.desktop.medium.container
|
|
40
|
+
},
|
|
41
|
+
...ownerState.size === "small" && {
|
|
42
|
+
height: theme.vars.size.desktop.small.container
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
// Ajuste de alineación del icono
|
|
46
|
+
"& .MuiTab-iconWrapper": {
|
|
47
|
+
marginBottom: 1
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* **Pseudoclases**:
|
|
51
|
+
* - Estilos para los estados hover, focus-visible y active.
|
|
52
|
+
*/
|
|
53
|
+
"&:hover": {
|
|
54
|
+
background: theme.vars.palette.background.hover
|
|
55
|
+
},
|
|
56
|
+
"&:focus-visible": {
|
|
57
|
+
background: ownerState.paletteColor?.hoverOpacity,
|
|
58
|
+
"&::before": {
|
|
59
|
+
content: '""',
|
|
60
|
+
position: "absolute",
|
|
61
|
+
top: `-${theme.size.baseSpacings.sp1}`,
|
|
62
|
+
left: `-${theme.size.baseSpacings.sp1}`,
|
|
63
|
+
right: `-${theme.size.baseSpacings.sp1}`,
|
|
64
|
+
bottom: 0,
|
|
65
|
+
boxSizing: "border-box",
|
|
66
|
+
border: theme.vars.size.borderStroke.container,
|
|
67
|
+
borderBottom: 0,
|
|
68
|
+
borderColor: theme.vars.palette.border.main,
|
|
69
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
70
|
+
borderBottomRightRadius: 0,
|
|
71
|
+
borderBottomLeftRadius: 0
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"&:active": {
|
|
75
|
+
background: ownerState.paletteColor?.activeOpacity
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* **Estado Seleccionado**:
|
|
79
|
+
* - Estilos aplicados cuando la pestaña está en estado seleccionado (`.Mui-selected`).
|
|
80
|
+
* - Incluye estilos específicos para el icono y la tipografía.
|
|
81
|
+
*/
|
|
82
|
+
"&.Mui-selected": {
|
|
83
|
+
border: theme.vars.size.borderStroke.container,
|
|
84
|
+
borderColor: theme.vars.palette.border.secondary,
|
|
85
|
+
borderBottom: 0,
|
|
86
|
+
".icon.M4lclassCssSpecificity div": {
|
|
87
|
+
backgroundColor: !ownerState.disabled ? ownerState.paletteColor?.main : theme.vars.palette.text.secondary
|
|
88
|
+
},
|
|
89
|
+
"span": {
|
|
90
|
+
color: !ownerState.disabled ? ownerState.paletteColor?.main : theme.vars.palette.text.secondary
|
|
91
|
+
},
|
|
92
|
+
// Efecto ripple en estado seleccionado
|
|
93
|
+
"& .MuiTouchRipple-root": {
|
|
94
|
+
borderTopLeftRadius: theme.vars.size.baseSpacings["sp0-5"],
|
|
95
|
+
borderTopRightRadius: theme.vars.size.baseSpacings["sp0-5"]
|
|
96
|
+
},
|
|
97
|
+
"&::after": {
|
|
98
|
+
content: '""',
|
|
99
|
+
width: "70%",
|
|
100
|
+
transform: "translateX(20%)",
|
|
101
|
+
height: theme.vars.size.borderRadius["r0-5"],
|
|
102
|
+
left: 0,
|
|
103
|
+
top: -1,
|
|
104
|
+
backgroundColor: ownerState.skeleton ? theme.vars.palette.background.surface : ownerState.disabled ? theme.vars.palette.background.surface : ownerState.paletteColor?.main,
|
|
105
|
+
borderEndStartRadius: theme.vars.size.borderRadius["r0-5"],
|
|
106
|
+
borderEndEndRadius: theme.vars.size.borderRadius["r0-5"],
|
|
107
|
+
position: "absolute"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"&.Mui-selected:hover": {
|
|
111
|
+
backgroundColor: ownerState.paletteColor?.hoverOpacity
|
|
112
|
+
},
|
|
113
|
+
"&.Mui-selected:active": {
|
|
114
|
+
background: ownerState.paletteColor?.activeOpacity,
|
|
115
|
+
".icon.M4lclassCssSpecificity div": {
|
|
116
|
+
backgroundColor: ownerState.paletteColor?.active
|
|
117
|
+
},
|
|
118
|
+
"span": {
|
|
119
|
+
color: ownerState.paletteColor?.active
|
|
120
|
+
},
|
|
121
|
+
"&::after": {
|
|
122
|
+
background: ownerState.paletteColor?.active
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}),
|
|
126
|
+
/**
|
|
127
|
+
* Slot de Icono:
|
|
128
|
+
* - **Estilos Generales**: Configura el color base del ícono, con especificidad adicional para clases específicas.
|
|
129
|
+
*/
|
|
130
|
+
icon: ({ theme }) => ({
|
|
131
|
+
"&.M4lclassCssSpecificity div": {
|
|
132
|
+
backgroundColor: theme.vars.palette.text.secondary
|
|
133
|
+
}
|
|
134
|
+
}),
|
|
135
|
+
/**
|
|
136
|
+
* Slot de Tipografía:
|
|
137
|
+
* - **Estilos Generales**: Configura el color base del texto, aplicando especificidad para clases específicas.
|
|
138
|
+
*/
|
|
139
|
+
tipography: ({ theme }) => ({
|
|
140
|
+
"&.M4lclassCssSpecificity": {
|
|
141
|
+
color: theme.vars.palette.text.secondary
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
};
|
|
145
|
+
export {
|
|
146
|
+
tabStyles as t
|
|
147
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nombre de clase que se usa para dar identidad a los slots del componente.
|
|
3
|
+
*/
|
|
4
|
+
export declare const TAB_KEY_COMPONENT = "M4LTab";
|
|
5
|
+
/**
|
|
6
|
+
* Nombre de clase creado para aportar especificidad a los estilos del componente. Es usado para sobreescribir los estilos de MUI sin
|
|
7
|
+
* tener la necesidad de agregar valores en !important.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TAB_SPECIFY = "M4lclassCssSpecificity";
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export declare const TYPOGRAPHY_KEY = "tipography";
|
|
14
|
+
export declare const ICON_KEY = "icon";
|
|
@@ -1,6 +1,57 @@
|
|
|
1
|
-
import { TabProps as MUITabProps } from '@mui/material';
|
|
2
|
-
|
|
1
|
+
import { TabProps as MUITabProps, PaletteColor, Theme } from '@mui/material';
|
|
2
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
3
|
+
import { Sizes } from '@m4l/styles';
|
|
4
|
+
import { TabSlots } from './Slots/TabEnum';
|
|
5
|
+
import { TAB_KEY_COMPONENT } from './constants';
|
|
6
|
+
/**
|
|
7
|
+
* Propiedades personalizadas para el componente `Tab`, extendiendo algunas propiedades de MUI.
|
|
8
|
+
*/
|
|
9
|
+
export interface TabProps extends Omit<MUITabProps, 'size' | 'label' | 'color'> {
|
|
10
|
+
/**
|
|
11
|
+
* Anchura del componente en estado Skeleton.
|
|
12
|
+
* Puede ser un valor numérico o un string con unidades CSS (por ejemplo, `px`, `%`, etc.).
|
|
13
|
+
*/
|
|
3
14
|
SKTWidth: string | number;
|
|
15
|
+
/**
|
|
16
|
+
* Altura del componente en estado Skeleton.
|
|
17
|
+
* Puede ser un valor numérico o un string con unidades CSS (por ejemplo, `px`, `%`, etc.).
|
|
18
|
+
*/
|
|
4
19
|
SKTHeight: string | number;
|
|
20
|
+
/**
|
|
21
|
+
* Identificador único para pruebas unitarias.
|
|
22
|
+
*/
|
|
5
23
|
dataTestId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Tamaño del `Tab`, limitado a los valores `small` o `medium`.
|
|
26
|
+
*/
|
|
27
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
28
|
+
/**
|
|
29
|
+
* URL del icono a mostrar en el `Tab`.
|
|
30
|
+
*/
|
|
31
|
+
urlIcon?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Texto a mostrar en el `Tab`.
|
|
34
|
+
*/
|
|
35
|
+
label?: string;
|
|
6
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Tipo de slot del `Tab`, basado en las opciones definidas en `TabSlots`.
|
|
39
|
+
*/
|
|
40
|
+
export type TabSlotsType = keyof typeof TabSlots;
|
|
41
|
+
/**
|
|
42
|
+
* Estado interno del propietario del `Tab`.
|
|
43
|
+
*/
|
|
44
|
+
export interface TabOwnerState extends Pick<TabProps, 'size' | 'disabled'> {
|
|
45
|
+
/**
|
|
46
|
+
* Indica si el `Tab` está en estado Skeleton.
|
|
47
|
+
*/
|
|
48
|
+
skeleton: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Color de la paleta asociado al `Tab`.
|
|
51
|
+
*/
|
|
52
|
+
paletteColor: PaletteColor;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Estilos personalizados para el `Tab`, sobreescribiendo las reglas de estilo.
|
|
56
|
+
*/
|
|
57
|
+
export type TabStyles = Partial<OverridesStyleRules<TabSlots, typeof TAB_KEY_COMPONENT, Theme> | undefined> | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const MuiTextFieldStyled: import('@emotion/styled').StyledComponent<Pick<{
|
|
2
2
|
variant?: import('@mui/material').TextFieldVariants | undefined;
|
|
3
|
-
} & Omit<import('@mui/material').FilledTextFieldProps | import('@mui/material').OutlinedTextFieldProps | import('@mui/material').StandardTextFieldProps, "variant">, "children" | "value" | "ref" | "title" | "component" | "size" | "name" | "error" | "select" | "rows" | "id" | "type" | "hidden" | "color" | "content" | "style" | "disabled" | "variant" | "margin" | "translate" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "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" | "label" | "key" | "autoComplete" | "placeholder" | "required" | "fullWidth" | "
|
|
4
|
-
ownerState: Partial<import('../types').
|
|
3
|
+
} & Omit<import('@mui/material').FilledTextFieldProps | import('@mui/material').OutlinedTextFieldProps | import('@mui/material').StandardTextFieldProps, "variant">, "children" | "value" | "ref" | "title" | "component" | "size" | "name" | "error" | "select" | "rows" | "id" | "type" | "hidden" | "color" | "content" | "style" | "disabled" | "variant" | "margin" | "translate" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "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" | "label" | "key" | "autoComplete" | "placeholder" | "required" | "fullWidth" | "maxRows" | "focused" | "hiddenLabel" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "inputProps" | "inputRef" | "multiline" | "minRows" | "SelectProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').TextFieldOwnerState> & Record<string, unknown> & {
|
|
4
|
+
ownerState: Partial<import('../types').TextFieldOwnerState> & Record<string, unknown>;
|
|
5
5
|
}, {}, {}>;
|
|
6
|
-
export declare const TextFieldRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').
|
|
7
|
-
ownerState: Partial<import('../types').
|
|
6
|
+
export declare const TextFieldRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').TextFieldOwnerState> & Record<string, unknown> & {
|
|
7
|
+
ownerState: Partial<import('../types').TextFieldOwnerState> & Record<string, unknown>;
|
|
8
8
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
9
9
|
export declare const MuiSkeletonStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').SkeletonOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
10
10
|
ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
|
|
11
|
-
}, "children" | "style" | "variant" | "width" | "height" | "animation" | "sx" | "classes" | "className">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "variant" | "width" | "height" | "translate" | "animation" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "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" | "key"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').
|
|
12
|
-
ownerState: Partial<import('../types').
|
|
11
|
+
}, "children" | "style" | "variant" | "width" | "height" | "animation" | "sx" | "classes" | "className">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "variant" | "width" | "height" | "translate" | "animation" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "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" | "key"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').TextFieldOwnerState> & Record<string, unknown> & {
|
|
12
|
+
ownerState: Partial<import('../types').TextFieldOwnerState> & Record<string, unknown>;
|
|
13
13
|
}, {}, {}>;
|
|
@@ -4,7 +4,6 @@ import { TextFieldSlots } from './slots/TextFieldEnum';
|
|
|
4
4
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
5
5
|
import { TEXT_FIELD_KEY_COMPONENT } from './constants';
|
|
6
6
|
import { ComponentPalletColor, Sizes } from '@m4l/styles';
|
|
7
|
-
import { LabelProps } from '../../Label/types';
|
|
8
7
|
/**
|
|
9
8
|
* Variants for the TextField component.
|
|
10
9
|
*/
|
|
@@ -17,19 +16,64 @@ export type SkeletonVariants = 'rectangular' | 'circular' | 'text';
|
|
|
17
16
|
* Props for the TextField component.
|
|
18
17
|
*
|
|
19
18
|
*/
|
|
20
|
-
export interface TextFieldProps extends Omit<MUITextFieldProps, 'size' | 'color' | 'disabled' | 'variant'
|
|
19
|
+
export interface TextFieldProps extends Omit<MUITextFieldProps, 'size' | 'color' | 'disabled' | 'variant'> {
|
|
20
|
+
/**
|
|
21
|
+
* todo: documentar
|
|
22
|
+
*/
|
|
21
23
|
dataTestId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Variante del campo de texto.
|
|
26
|
+
* variant="text"
|
|
27
|
+
*/
|
|
22
28
|
variant?: TextFieldVariants;
|
|
29
|
+
/**
|
|
30
|
+
* Indica si el campo de texto está deshabilitado.
|
|
31
|
+
* disabled={true}
|
|
32
|
+
*/
|
|
23
33
|
disabled?: boolean;
|
|
24
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Tamaño del campo de texto.
|
|
36
|
+
* size="medium"
|
|
37
|
+
*/
|
|
38
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
39
|
+
/**
|
|
40
|
+
* Color del campo de texto.
|
|
41
|
+
* color="primary"
|
|
42
|
+
*/
|
|
25
43
|
color?: Extract<ComponentPalletColor, 'primary'>;
|
|
26
44
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Estado del propietario del campo de texto.
|
|
47
|
+
*/
|
|
48
|
+
export interface TextFieldOwnerState {
|
|
49
|
+
/**
|
|
50
|
+
* Indica si el campo de texto está deshabilitado.
|
|
51
|
+
*/
|
|
52
|
+
textFieldDisabled?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Color de la paleta del campo de texto.
|
|
55
|
+
*/
|
|
56
|
+
textFieldPaletteColor: PaletteColor;
|
|
57
|
+
/**
|
|
58
|
+
* Variante del campo de texto.
|
|
59
|
+
*/
|
|
60
|
+
textFieldVariant?: TextFieldVariants;
|
|
61
|
+
/**
|
|
62
|
+
* Color de la paleta del componente del campo de texto.
|
|
63
|
+
*/
|
|
64
|
+
textFieldComponentPaletteColor?: ComponentPalletColor;
|
|
65
|
+
/**
|
|
66
|
+
* Tamaño del campo de texto.
|
|
67
|
+
*/
|
|
68
|
+
textFieldSizes: Extract<Sizes, 'small' | 'medium'>;
|
|
69
|
+
/**
|
|
70
|
+
* Indica si el campo de texto es error.
|
|
71
|
+
*/
|
|
72
|
+
textFieldError?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Color del campo de texto.
|
|
75
|
+
*/
|
|
76
|
+
textFieldColor?: Extract<ComponentPalletColor, 'primary'>;
|
|
77
|
+
}
|
|
33
78
|
export type TextFieldSlotsType = keyof typeof TextFieldSlots;
|
|
34
|
-
export type TextFieldOwnerState = OwnerState;
|
|
35
79
|
export type TextFieldStyles = Partial<OverridesStyleRules<TextFieldSlotsType, typeof TEXT_FIELD_KEY_COMPONENT, Theme> | undefined> | undefined;
|
|
@@ -24,7 +24,7 @@ export * from './TabContent';
|
|
|
24
24
|
export { Pager } from './Pager';
|
|
25
25
|
export type { PagerProps } from './Pager/types';
|
|
26
26
|
export { getPagerComponentsDictionary } from './Pager/dicctionary';
|
|
27
|
-
export { Tab } from './Tab';
|
|
27
|
+
export { Tab } from './Tab/Tab';
|
|
28
28
|
export * from './TabContext';
|
|
29
29
|
export * from './Typography/Typography';
|
|
30
30
|
export * from './ToggleButton';
|
package/index.js
CHANGED
|
@@ -65,7 +65,7 @@ import { a as a5 } from "./components/DynamicFilter/dictionary.js";
|
|
|
65
65
|
import { D as D4 } from "./components/DynamicFilter/DynamicFilter.js";
|
|
66
66
|
import { H } from "./components/HelperError/HelperError.js";
|
|
67
67
|
import { L as L3 } from "./components/Label/Label.js";
|
|
68
|
-
import { A as A6 } from "./components/CommonActions/components/
|
|
68
|
+
import { A as A6 } from "./components/CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
69
69
|
import { A as A7 } from "./components/CommonActions/components/ActionCancel/index.js";
|
|
70
70
|
import { A as A8 } from "./components/CommonActions/components/ActionIntro/index.js";
|
|
71
71
|
import { A as A9 } from "./components/CommonActions/components/ActionFormCancel/index.js";
|
|
@@ -151,7 +151,7 @@ import { L as L9 } from "./components/mui_extended/LinkWithRoute/index.js";
|
|
|
151
151
|
import { L as L10 } from "./components/mui_extended/LoadingButton/index.js";
|
|
152
152
|
import { P as P13 } from "./components/mui_extended/Pager/index.js";
|
|
153
153
|
import { g as g26 } from "./components/mui_extended/Pager/dicctionary.js";
|
|
154
|
-
import { T as T5 } from "./components/mui_extended/Tab/
|
|
154
|
+
import { T as T5 } from "./components/mui_extended/Tab/Tab.js";
|
|
155
155
|
import { a as a9 } from "./components/mui_extended/MenuActions/dictionary.js";
|
|
156
156
|
import { a as a10, M as M11 } from "./components/mui_extended/MenuActions/MenuActions.js";
|
|
157
157
|
import { T as T6 } from "./components/mui_extended/Tooltip/Tooltip.js";
|
|
@@ -192,7 +192,7 @@ export {
|
|
|
192
192
|
A9 as ActionFormCancel,
|
|
193
193
|
A10 as ActionFormIntro,
|
|
194
194
|
A8 as ActionIntro,
|
|
195
|
-
A6 as
|
|
195
|
+
A6 as ActionsContainer,
|
|
196
196
|
A as AnimatedScroll,
|
|
197
197
|
A11 as AppBar,
|
|
198
198
|
A13 as AppBarComercial,
|
package/package.json
CHANGED
package/storybook/components/commonActions/components/ActionsContainer/ActionsContainer.stories.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ActionsContainer } from '../../../../../src/components/CommonActions/components/ActionsContainer/ActionsContainer';
|
|
3
|
+
declare const meta: Meta<typeof ActionsContainer>;
|
|
4
|
+
type Story = StoryObj<typeof ActionsContainer>;
|
|
5
|
+
/**
|
|
6
|
+
* Base story for `ActionsContainer` in standard mode.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Default: Story;
|
|
9
|
+
/**
|
|
10
|
+
* Story for `ActionsContainer` with action buttons.
|
|
11
|
+
*/
|
|
12
|
+
export declare const WithActionsButtons: Story;
|
|
13
|
+
export default meta;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Tab } from '../../../../../../src/components/mui_extended/Tab';
|
|
3
|
+
/**
|
|
4
|
+
* Información meta para Storybook del componente `Tab`, en la variante deshabilitada.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: Meta<typeof Tab>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof Tab>;
|
|
9
|
+
/**
|
|
10
|
+
* Historia `Base`: Tab deshabilitado con icono, texto, y sin efecto ripple.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Base: Story;
|
|
13
|
+
/**
|
|
14
|
+
* Historia `DisabledActiveWithIconAndText`: Tab activo, deshabilitado, con icono y texto.
|
|
15
|
+
*/
|
|
16
|
+
export declare const DisabledActiveWithIconAndText: Story;
|
|
17
|
+
/**
|
|
18
|
+
* Historia `DisabledActiveWithText`: Tab activo, deshabilitado, solo con texto.
|
|
19
|
+
*/
|
|
20
|
+
export declare const DisabledActiveWithText: Story;
|
|
21
|
+
/**
|
|
22
|
+
* Historia `DisabledActiveWithIcon`: Tab activo, deshabilitado, solo con icono.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DisabledActiveWithIcon: Story;
|
|
25
|
+
/**
|
|
26
|
+
* Historia `DisabledDefaultWithIconAndText`: Tab por defecto, deshabilitado, con icono y texto.
|
|
27
|
+
*/
|
|
28
|
+
export declare const DisabledDefaultWithIconAndText: Story;
|
|
29
|
+
/**
|
|
30
|
+
* Historia `DisabledDefaultActiveWithText`: Tab por defecto activo, deshabilitado, solo con texto.
|
|
31
|
+
*/
|
|
32
|
+
export declare const DisabledDefaultActiveWithText: Story;
|
|
33
|
+
/**
|
|
34
|
+
* Historia `DisabledDefaultActiveWithIcon`: Tab por defecto activo, deshabilitado, solo con icono.
|
|
35
|
+
*/
|
|
36
|
+
export declare const DisabledDefaultActiveWithIcon: Story;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Tab } from '../../../../../../src/components/mui_extended/Tab';
|
|
3
|
+
/**
|
|
4
|
+
* The Tab component groups related content, enabling navigation without leaving the page.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: Meta<typeof Tab>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof Tab>;
|
|
9
|
+
/**
|
|
10
|
+
* Base tab component with icon and text
|
|
11
|
+
*/
|
|
12
|
+
export declare const Base: Story;
|
|
13
|
+
/**
|
|
14
|
+
* Active Tab with icon and text
|
|
15
|
+
*/
|
|
16
|
+
export declare const ActiveWithIconAndText: Story;
|
|
17
|
+
/**
|
|
18
|
+
* Active Tab with text only
|
|
19
|
+
*/
|
|
20
|
+
export declare const ActiveWithText: Story;
|
|
21
|
+
/**
|
|
22
|
+
* Active Tab with icon only
|
|
23
|
+
*/
|
|
24
|
+
export declare const ActiveWithIcon: Story;
|
|
25
|
+
/**
|
|
26
|
+
* Default Tab with icon and text
|
|
27
|
+
*/
|
|
28
|
+
export declare const DefaultWithIconAndText: Story;
|
|
29
|
+
/**
|
|
30
|
+
* Default active Tab with text only
|
|
31
|
+
*/
|
|
32
|
+
export declare const DefaultActiveWithText: Story;
|
|
33
|
+
/**
|
|
34
|
+
* Default active Tab with icon only
|
|
35
|
+
*/
|
|
36
|
+
export declare const DefaultActiveWithIcon: Story;
|