@m4l/components 9.3.25 → 9.3.27-BE071125-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/types.d.ts +18 -5
- package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +1 -1
- package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.js +1 -1
- package/components/AppBar/slots/AppBarSlots.d.ts +1 -1
- package/components/Card/constants.d.ts +1 -1
- package/components/Chip/constants.d.ts +1 -1
- package/components/Chip/slots/ChipSlots.d.ts +1 -1
- package/components/Color/slots/ColorSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +17 -8
- package/components/CommonActions/components/ActionFormCancel/types.d.ts +9 -0
- package/components/ContainerFlow/constants.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/index.d.ts +1 -0
- package/components/DataGrid/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/editors/EditLabelEditor/formatter.d.ts +8 -0
- package/components/DataGrid/subcomponents/editors/EditLabelEditor/index.d.ts +3 -0
- package/components/DataGrid/subcomponents/editors/EditLabelEditor/types.d.ts +5 -0
- package/components/DataGrid/subcomponents/editors/EditLabelEditor/useColumnEditLabel.d.ts +9 -0
- package/components/DataGrid/tests/helpers/types.d.ts +2 -0
- package/components/DataGrid/types.d.ts +2 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +2 -2
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +2 -2
- package/components/EditLabel/EditLabel.d.ts +7 -0
- package/components/EditLabel/EditLabel.styles.d.ts +2 -0
- package/components/EditLabel/constants.d.ts +2 -0
- package/components/EditLabel/hooks/types.d.ts +17 -0
- package/components/EditLabel/hooks/useEditLabel.d.ts +7 -0
- package/components/EditLabel/icons.d.ts +5 -0
- package/components/EditLabel/index.d.ts +2 -0
- package/components/EditLabel/slots/EditLabelEnum.d.ts +8 -0
- package/components/EditLabel/slots/EditLabelSlots.d.ts +18 -0
- package/components/EditLabel/test/EditLabel.test.d.ts +1 -0
- package/components/EditLabel/types.d.ts +43 -0
- package/components/FormContainer/constants.d.ts +1 -1
- package/components/Icon/Icon.js +6 -3
- package/components/Icon/types.d.ts +4 -0
- package/components/Image/constant.d.ts +1 -1
- package/components/ImageText/ImageText.styles.js +1 -1
- package/components/ImageText/constants.d.ts +1 -1
- package/components/Label/Label.js +1 -1
- package/components/LanguagePopover/LanguagePopover.js +2 -0
- package/components/MFIsolationApp/MFIsolationApp.js +13 -8
- package/components/MFIsolationApp/MFIsolationApp.styles.d.ts +2 -0
- package/components/MFIsolationApp/MFIsolationApp.styles.js +22 -0
- package/components/MFIsolationApp/constants.d.ts +1 -0
- package/components/MFIsolationApp/constants.js +4 -0
- package/components/MFIsolationApp/icons.d.ts +3 -0
- package/components/MFIsolationApp/icons.js +6 -0
- package/components/MFIsolationApp/slots/MFIsolationAppEnum.d.ts +4 -0
- package/components/MFIsolationApp/slots/MFIsolationAppEnum.js +8 -0
- package/components/MFIsolationApp/slots/MFIsolationAppSlots.d.ts +2 -0
- package/components/MFIsolationApp/slots/MFIsolationAppSlots.js +17 -0
- package/components/MFIsolationApp/subcomponents/AppBarSettings/AppBarSettings.js +21 -0
- package/components/MFIsolationApp/subcomponents/AppBarSettings/index.js +1 -0
- package/components/MFIsolationApp/types.d.ts +8 -0
- package/components/MFIsolationAppStorybook/MFIsolationAppStorybook.js +137 -0
- package/components/MFIsolationAppStorybook/index.js +1 -0
- package/components/MFIsolationAppStorybook/subcomponents/MFAuthAppStorybook/MFAuthAppStorybook.js +44 -0
- package/components/MFIsolationAppStorybook/subcomponents/MFAuthAppStorybook/index.js +1 -0
- package/components/MFIsolationAppStorybook/types.d.ts +0 -4
- package/components/MenuActions/MenuActions.js +1 -1
- package/components/MenuActions/constants.d.ts +1 -1
- package/components/MenuActions/slots/MenuActionsSlots.d.ts +1 -1
- package/components/ModalDialog/ModalDialog.js +1 -0
- package/components/NoItemSelected/constant.d.ts +1 -1
- package/components/NumberInput/slots/NumberInputSlots.d.ts +2 -2
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +1 -1
- package/components/PaperForm/PaperForm.js +1 -1
- package/components/PaperForm/components/Header.js +9 -7
- package/components/PaperForm/styles.js +9 -4
- package/components/PaperForm/types.d.ts +3 -2
- package/components/SideBar/slots/SideBarSlots.d.ts +1 -1
- package/components/Stepper/Stepper.styles.js +2 -0
- package/components/Stepper/dictionary.js +0 -1
- package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.d.ts +13 -0
- package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.js +111 -0
- package/components/Stepper/subcomponents/StepArea/hooks/useVisibileSteps.d.ts +8 -0
- package/components/Stepper/subcomponents/StepArea/hooks/useVisibileSteps.js +79 -0
- package/components/Stepper/subcomponents/StepArea/index.js +7 -115
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.d.ts +2 -2
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.js +3 -53
- package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.js +3 -2
- package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.js +3 -2
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.js +24 -5
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/hooks/useIsStepVisible.d.ts +8 -0
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/hooks/useIsStepVisible.js +93 -0
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.js +2 -51
- package/components/Stepper/types.d.ts +4 -0
- package/components/ToastContainer/ToastContainer.js +1 -0
- package/components/ToastContainer/constants.d.ts +1 -1
- package/components/ToastContainer/constants.js +1 -1
- package/components/ToastContainer/slots/toastContainerSlots.d.ts +2 -2
- package/components/WindowBase/constants.d.ts +1 -1
- package/components/WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.js +47 -3
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +1 -1
- package/components/WindowBase/subcomponents/Component/index.d.ts +12 -1
- package/components/WindowBase/subcomponents/Component/index.js +56 -2
- package/components/WindowBase/subcomponents/Component/types.d.ts +1 -0
- package/components/WindowBase/types.d.ts +1 -1
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +1 -1
- package/components/areas/contexts/AreasContext/store.js +5 -1
- package/components/areas/contexts/AreasContext/types.d.ts +1 -1
- package/components/extended/React-Json-Viewer/constants.d.ts +1 -1
- package/components/extended/React-resizable-panels/SplitLayout.js +1 -1
- package/components/formatters/ChipStatusFormatter/constants.d.ts +1 -1
- package/components/formatters/EditLabelFormatter/EditLabelFormatter.d.ts +5 -0
- package/components/formatters/EditLabelFormatter/EditLabelFormatter.styles.d.ts +2 -0
- package/components/formatters/EditLabelFormatter/constants.d.ts +5 -0
- package/components/formatters/EditLabelFormatter/index.d.ts +2 -0
- package/components/formatters/EditLabelFormatter/slots/EditLabelFormatterEnum.d.ts +4 -0
- package/components/formatters/EditLabelFormatter/slots/EditLabelFormatterSlots.d.ts +5 -0
- package/components/formatters/EditLabelFormatter/test/EditLabelFormatter.test.d.ts +1 -0
- package/components/formatters/EditLabelFormatter/types.d.ts +23 -0
- package/components/formatters/TagsFormatter/constants.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.js +7 -1
- package/components/hook-form/RHFAutocomplete/constants.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/types.d.ts +13 -0
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js +7 -1
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteSlotsAsync.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/constants.d.ts +1 -1
- package/components/hook-form/RHFSelect/constants.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/slots/RHFUploadImageSlots.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/constants.d.ts +25 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/constants.js +5 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/slots/RHFUploadSingleFileSlots.d.ts +1 -1
- package/components/hook-form/RHFormContext/index.d.ts +109 -9
- package/components/hook-form/RHFormContext/index.js +23 -21
- package/components/hook-form/RHFormContext/styles.js +2 -1
- package/components/hook-form/RHFormContext/types.d.ts +64 -1
- package/components/index.d.ts +1 -0
- package/components/mui_extended/Autocomplete/Autocomplete.d.ts +4 -8
- package/components/mui_extended/Autocomplete/Autocomplete.js +24 -112
- package/components/mui_extended/Autocomplete/Autocomplete.styles.js +41 -12
- package/components/mui_extended/Autocomplete/hooks/useAutocomplete/useAutocomplete.d.ts +26 -0
- package/components/mui_extended/Autocomplete/hooks/useAutocomplete/useAutocomplete.js +166 -0
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.js +2 -1
- package/components/mui_extended/Autocomplete/hooks/useMultipleChips.d.ts +17 -0
- package/components/mui_extended/Autocomplete/hooks/useMultipleChips.js +108 -0
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.d.ts +0 -2
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.js +11 -17
- package/components/mui_extended/Autocomplete/slots/AutocompleteEnum.d.ts +2 -1
- package/components/mui_extended/Autocomplete/slots/AutocompleteEnum.js +1 -0
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +4 -1
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.js +5 -0
- package/components/mui_extended/Autocomplete/subcomponents/LoadingText/LoadingText.d.ts +2 -0
- package/components/mui_extended/Autocomplete/subcomponents/LoadingText/LoadingText.js +14 -0
- package/components/mui_extended/Autocomplete/subcomponents/LoadingText/index.d.ts +1 -0
- package/components/mui_extended/Autocomplete/subcomponents/LoadingText/index.js +1 -0
- package/components/mui_extended/Autocomplete/subcomponents/NoOptionsText/NoOptionsText.d.ts +2 -0
- package/components/mui_extended/Autocomplete/subcomponents/NoOptionsText/NoOptionsText.js +14 -0
- package/components/mui_extended/Autocomplete/subcomponents/NoOptionsText/index.d.ts +1 -0
- package/components/mui_extended/Autocomplete/subcomponents/NoOptionsText/index.js +1 -0
- package/components/mui_extended/Autocomplete/subcomponents/PopperComponent/PopperComponent.d.ts +8 -0
- package/components/mui_extended/Autocomplete/subcomponents/PopperComponent/PopperComponent.js +23 -0
- package/components/mui_extended/Autocomplete/subcomponents/PopperComponent/index.d.ts +2 -0
- package/components/mui_extended/Autocomplete/subcomponents/PopperComponent/index.js +1 -0
- package/components/mui_extended/Autocomplete/subcomponents/PopperComponent/types.d.ts +7 -0
- package/components/mui_extended/Autocomplete/subcomponents/PopperComponent/types.js +1 -0
- package/components/mui_extended/Autocomplete/subcomponents/RenderAdornment/RenderAdornment.d.ts +6 -0
- package/components/mui_extended/Autocomplete/subcomponents/RenderAdornment/RenderAdornment.js +45 -0
- package/components/mui_extended/Autocomplete/subcomponents/renderOptions/index.d.ts +9 -0
- package/components/mui_extended/Autocomplete/subcomponents/renderOptions/index.js +61 -0
- package/components/mui_extended/Autocomplete/subcomponents/renderOptions/types.d.ts +7 -0
- package/components/mui_extended/Autocomplete/types.d.ts +21 -1
- package/components/mui_extended/Button/Button.js +15 -4
- package/components/mui_extended/Button/ButtonStyles.js +165 -82
- package/components/mui_extended/Button/{constans.d.ts → constants.d.ts} +1 -0
- package/components/mui_extended/Button/constants.js +8 -0
- package/components/mui_extended/Button/slots/ButtonSlots.js +1 -1
- package/components/mui_extended/Button/types.d.ts +1 -1
- package/components/mui_extended/CheckBox/CheckBox.js +1 -0
- package/components/mui_extended/CircularProgress/types.d.ts +1 -1
- package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.d.ts +1 -1
- package/components/mui_extended/IconButton/constants.d.ts +1 -1
- package/components/mui_extended/IconButton/constants.js +4 -1
- package/components/mui_extended/MenuItem/MenuItem.js +1 -1
- package/components/mui_extended/MenuItem/MenuItem.styles.js +4 -1
- package/components/mui_extended/MenuItem/constants.d.ts +1 -1
- package/components/mui_extended/NavLink/constants.d.ts +1 -1
- package/components/mui_extended/Select/Select.js +71 -29
- package/components/mui_extended/Select/Select.styles.js +41 -6
- package/components/mui_extended/Select/constants.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
- package/components/mui_extended/Select/types.d.ts +6 -1
- package/components/mui_extended/TextField/constants.d.ts +1 -1
- package/components/mui_extended/TimePicker/slots/TimePickerSlots.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
- package/components/mui_extended/Tooltip/Tooltip.styles.js +16 -4
- package/components/mui_extended/Tooltip/constants.d.ts +1 -1
- package/components/mui_extended/Typography/constants.d.ts +1 -1
- package/components/mui_extended/Typography/types.d.ts +2 -1
- package/components/mui_extended/Typography/typography.styles.js +4 -9
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +5 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +1 -1
- package/components/popups/components/PopupsProvider/hooks/usePopups.d.ts +2 -4
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +19 -7
- package/components/popups/components/PopupsViewer/PopupsViewer.js +1 -1
- package/components/popups/components/PopupsViewer/PopupsViewer.styles.js +1 -1
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +32 -21
- package/contexts/AppearanceComponentContext/AppearanceComponentContext.js +9 -1
- package/index.js +74 -70
- package/package.json +1 -1
- package/utils/getComponentSlotRoot.d.ts +3 -1
- package/components/mui_extended/Autocomplete/hooks/useStartAdornments.d.ts +0 -21
- package/components/mui_extended/Autocomplete/hooks/useStartAdornments.js +0 -31
- package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +0 -22
- package/components/mui_extended/Autocomplete/renderOptions/index.js +0 -24
- package/components/mui_extended/Button/constans.js +0 -4
- /package/components/{MFIsolationAppStorybook → MFIsolationApp}/subcomponents/AppBarSettings/AppBarSettings.d.ts +0 -0
- /package/components/{MFIsolationAppStorybook → MFIsolationApp}/subcomponents/AppBarSettings/index.d.ts +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEnvironment, useModuleSkeleton, useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { useTheme } from "@mui/material";
|
|
4
|
+
import { useForkRef } from "@mui/material/utils";
|
|
4
5
|
import clsx from "clsx";
|
|
5
|
-
import { forwardRef, useMemo, useState, useCallback } from "react";
|
|
6
|
+
import { forwardRef, useMemo, useState, useRef, useCallback, useEffect } from "react";
|
|
6
7
|
import { A as ArrowDownStyled, a as AdormentStyled, S as SelectRootStyled, b as SkeletonSelectStyled, M as MenuItemListStyled, c as MenuItemNoOptionStyled, L as LabelPlaceholerStyled, R as RenderValueContainerStyled, d as RenderValueTypography } from "./slots/SelectSlots.js";
|
|
7
8
|
import { I as ICON_ARROW_DOWN, S as SELECT_CLASSES, a as SELECT_KEY_COMPONENT } from "./constants.js";
|
|
8
9
|
import { S as SELECT_DICTIONARY } from "./dictionary.js";
|
|
@@ -23,6 +24,7 @@ const Select = forwardRef(
|
|
|
23
24
|
placeholder,
|
|
24
25
|
className,
|
|
25
26
|
dataTestId,
|
|
27
|
+
readOnly = false,
|
|
26
28
|
...otherProps
|
|
27
29
|
}, ref) {
|
|
28
30
|
const { currentSize } = useComponentSize(size);
|
|
@@ -33,22 +35,27 @@ const Select = forwardRef(
|
|
|
33
35
|
const arrowDropDownIcon = `${host_static_assets}/${environment_assets}/${ICON_ARROW_DOWN}`;
|
|
34
36
|
const selectedValue = useMemo(() => value, [value]);
|
|
35
37
|
const [openLocal, setOpenLocal] = useState(false);
|
|
38
|
+
const selectRef = useRef(null);
|
|
36
39
|
const theme = useTheme();
|
|
37
40
|
const ownerState = useMemo(() => ({
|
|
38
41
|
size: adjustedSize,
|
|
39
42
|
disabled,
|
|
40
43
|
error,
|
|
41
44
|
variant,
|
|
42
|
-
multiple
|
|
43
|
-
|
|
45
|
+
multiple,
|
|
46
|
+
readOnly
|
|
47
|
+
}), [adjustedSize, disabled, error, variant, multiple, readOnly]);
|
|
44
48
|
const handleLocalChange = useCallback((event) => {
|
|
49
|
+
if (readOnly || disabled) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
45
52
|
const newValue = event.target.value;
|
|
46
53
|
if (!onChange) {
|
|
47
54
|
return;
|
|
48
55
|
}
|
|
49
56
|
if (multiple) {
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
if (Array.isArray(newValue)) {
|
|
58
|
+
const selectedOptions = options.filter((option) => newValue.includes(option.id));
|
|
52
59
|
onChange(selectedOptions);
|
|
53
60
|
}
|
|
54
61
|
} else {
|
|
@@ -57,28 +64,41 @@ const Select = forwardRef(
|
|
|
57
64
|
onChange(selectedOption);
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
|
-
}, [multiple, onChange, options]);
|
|
67
|
+
}, [multiple, onChange, options, readOnly, disabled]);
|
|
61
68
|
const handleDelete = useCallback((optionToDelete) => {
|
|
69
|
+
if (readOnly || disabled) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
62
72
|
if (multiple && Array.isArray(selectedValue)) {
|
|
63
73
|
const newSelectedOptions = options.filter((option) => option.id !== optionToDelete.id && selectedValue.includes(option.id));
|
|
64
74
|
onChange?.(newSelectedOptions);
|
|
65
75
|
}
|
|
66
|
-
}, [multiple, selectedValue, onChange, options]);
|
|
76
|
+
}, [multiple, selectedValue, onChange, options, readOnly, disabled]);
|
|
77
|
+
const handleToggleClick = useCallback(() => {
|
|
78
|
+
if (disabled || readOnly) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (multiple) {
|
|
82
|
+
if (!openLocal) {
|
|
83
|
+
setOpenLocal(true);
|
|
84
|
+
}
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
setOpenLocal(!openLocal);
|
|
88
|
+
}, [disabled, readOnly, multiple, openLocal]);
|
|
67
89
|
const ArrowIcon = useMemo(() => {
|
|
68
90
|
return () => /* @__PURE__ */ jsx(
|
|
69
91
|
ArrowDownStyled,
|
|
70
92
|
{
|
|
71
93
|
ownerState: { ...ownerState },
|
|
72
94
|
icon: arrowDropDownIcon,
|
|
73
|
-
disabled,
|
|
95
|
+
disabled: disabled || readOnly,
|
|
74
96
|
size: adjustedSize,
|
|
75
|
-
onClick:
|
|
76
|
-
!disabled && setOpenLocal(!openLocal);
|
|
77
|
-
},
|
|
97
|
+
onClick: handleToggleClick,
|
|
78
98
|
rotationAngle: openLocal ? 180 : 0
|
|
79
99
|
}
|
|
80
100
|
);
|
|
81
|
-
}, [ownerState, arrowDropDownIcon, disabled, adjustedSize, openLocal]);
|
|
101
|
+
}, [ownerState, arrowDropDownIcon, disabled, readOnly, adjustedSize, openLocal, handleToggleClick]);
|
|
82
102
|
const RenderIcon = useCallback((icon) => {
|
|
83
103
|
if (!icon) {
|
|
84
104
|
return null;
|
|
@@ -91,7 +111,7 @@ const Select = forwardRef(
|
|
|
91
111
|
{
|
|
92
112
|
src: icon,
|
|
93
113
|
size: adjustedSize,
|
|
94
|
-
className: SELECT_CLASSES.
|
|
114
|
+
className: SELECT_CLASSES.adorment,
|
|
95
115
|
disabled
|
|
96
116
|
}
|
|
97
117
|
);
|
|
@@ -104,8 +124,8 @@ const Select = forwardRef(
|
|
|
104
124
|
e.stopPropagation();
|
|
105
125
|
}, []);
|
|
106
126
|
const renderValue = () => {
|
|
107
|
-
if (
|
|
108
|
-
return /* @__PURE__ */ jsx(LabelPlaceholerStyled, { variant: "body", color: "text.disabled", children: placeholder });
|
|
127
|
+
if (selectedValue === null || selectedValue === void 0 || multiple && Array.isArray(selectedValue) && selectedValue.length === 0) {
|
|
128
|
+
return /* @__PURE__ */ jsx(LabelPlaceholerStyled, { ownerState: { disabled, readOnly }, variant: "body", color: "text.disabled", children: placeholder });
|
|
109
129
|
}
|
|
110
130
|
if (multiple) {
|
|
111
131
|
if (!Array.isArray(selectedValue)) {
|
|
@@ -124,7 +144,7 @@ const Select = forwardRef(
|
|
|
124
144
|
label: option.label,
|
|
125
145
|
startIcon: option.startAdornment,
|
|
126
146
|
opacity: true,
|
|
127
|
-
onDeleted: () => handleDelete(option),
|
|
147
|
+
onDeleted: readOnly || disabled ? void 0 : () => handleDelete(option),
|
|
128
148
|
iconButtonProps: { onMouseDown: onMouseDownIconButtonChip, onKeyDown: onKeyDownIconButtonChip }
|
|
129
149
|
},
|
|
130
150
|
option.id
|
|
@@ -135,17 +155,26 @@ const Select = forwardRef(
|
|
|
135
155
|
const selectedOption = options.find((option) => String(option.id) === String(selectedValue));
|
|
136
156
|
return selectedOption ? /* @__PURE__ */ jsxs(RenderValueContainerStyled, { ownerState: { ...ownerState }, className: SELECT_CLASSES.renderValueContainer, children: [
|
|
137
157
|
selectedOption.startAdornment && RenderIcon(selectedOption.startAdornment),
|
|
138
|
-
/* @__PURE__ */ jsx(RenderValueTypography, { variant: "body", color: "text.primary", size: adjustedSize, className: SELECT_CLASSES.renderValueTypography, children: selectedOption.label })
|
|
158
|
+
/* @__PURE__ */ jsx(RenderValueTypography, { ownerState: { disabled, readOnly }, variant: "body", color: "text.primary", size: adjustedSize, className: SELECT_CLASSES.renderValueTypography, children: selectedOption.label })
|
|
139
159
|
] }) : "";
|
|
140
160
|
}
|
|
141
161
|
};
|
|
142
162
|
const onOpen = useCallback(() => {
|
|
163
|
+
if (disabled || readOnly) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
143
166
|
setOpenLocal(true);
|
|
144
|
-
}, []);
|
|
167
|
+
}, [disabled, readOnly]);
|
|
145
168
|
const onClose = useCallback(() => {
|
|
146
169
|
setOpenLocal(false);
|
|
147
170
|
}, []);
|
|
171
|
+
useEffect(() => {
|
|
172
|
+
if (readOnly && openLocal) {
|
|
173
|
+
setOpenLocal(false);
|
|
174
|
+
}
|
|
175
|
+
}, [readOnly, openLocal]);
|
|
148
176
|
const StyledSelect = useMemo(() => SelectRootStyled(), []);
|
|
177
|
+
const handleRef = useForkRef(selectRef, ref);
|
|
149
178
|
if (isSkeleton) {
|
|
150
179
|
return /* @__PURE__ */ jsx(SkeletonSelectStyled, { ownerState: { ...ownerState }, className: SELECT_CLASSES.skeletonSelect });
|
|
151
180
|
}
|
|
@@ -154,7 +183,7 @@ const Select = forwardRef(
|
|
|
154
183
|
{
|
|
155
184
|
...otherProps,
|
|
156
185
|
...getPropDataTestId(SELECT_KEY_COMPONENT, SelectSlots.root, dataTestId),
|
|
157
|
-
ref,
|
|
186
|
+
ref: handleRef,
|
|
158
187
|
className: clsx(SELECT_CLASSES.root, SELECT_CLASSES[variant], className),
|
|
159
188
|
ownerState: { ...ownerState },
|
|
160
189
|
IconComponent: ArrowIcon,
|
|
@@ -165,29 +194,42 @@ const Select = forwardRef(
|
|
|
165
194
|
disabled,
|
|
166
195
|
error,
|
|
167
196
|
renderValue,
|
|
168
|
-
open: openLocal,
|
|
197
|
+
open: readOnly ? false : openLocal,
|
|
169
198
|
native: false,
|
|
170
199
|
onOpen,
|
|
171
200
|
onClose,
|
|
201
|
+
onClick: handleToggleClick,
|
|
172
202
|
displayEmpty: true,
|
|
203
|
+
inputProps: {
|
|
204
|
+
...otherProps.inputProps,
|
|
205
|
+
readOnly
|
|
206
|
+
},
|
|
173
207
|
MenuProps: {
|
|
174
208
|
disableScrollLock: true,
|
|
209
|
+
anchorOrigin: {
|
|
210
|
+
vertical: "bottom",
|
|
211
|
+
horizontal: "left"
|
|
212
|
+
},
|
|
213
|
+
transformOrigin: {
|
|
214
|
+
vertical: "top",
|
|
215
|
+
horizontal: "left"
|
|
216
|
+
},
|
|
175
217
|
sx: {
|
|
176
218
|
"& .MuiPaper-root": {
|
|
177
|
-
|
|
178
|
-
paddingBottom: theme.vars.size.baseSpacings.sp3,
|
|
179
|
-
paddingLeft: 0,
|
|
180
|
-
paddingRight: 0,
|
|
219
|
+
padding: theme.vars.size.baseSpacings.sp1,
|
|
181
220
|
maxHeight: "200px",
|
|
182
221
|
overflow: "auto",
|
|
222
|
+
minWidth: `${(selectRef?.current?.offsetWidth ?? 0) + 1}px!important`,
|
|
223
|
+
// +1 para incluir el border del contenedor root.
|
|
183
224
|
"& .MuiList-root": {
|
|
184
225
|
padding: 0,
|
|
185
|
-
display: "
|
|
186
|
-
|
|
226
|
+
display: "grid",
|
|
227
|
+
gridTemplateColumns: "auto",
|
|
187
228
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
188
|
-
width: "fit-content",
|
|
229
|
+
width: "fit-content!important",
|
|
230
|
+
minWidth: "100%",
|
|
189
231
|
"& .MuiMenuItem-root": {
|
|
190
|
-
width: "
|
|
232
|
+
width: "100%"
|
|
191
233
|
}
|
|
192
234
|
}
|
|
193
235
|
}
|
|
@@ -201,7 +243,7 @@ const Select = forwardRef(
|
|
|
201
243
|
return /* @__PURE__ */ jsx(
|
|
202
244
|
MenuItemListStyled,
|
|
203
245
|
{
|
|
204
|
-
className: SELECT_CLASSES.
|
|
246
|
+
className: SELECT_CLASSES.menuItem,
|
|
205
247
|
ownerState: { ...ownerState },
|
|
206
248
|
size: adjustedSize,
|
|
207
249
|
value: option.id,
|
|
@@ -13,6 +13,18 @@ const selectStyles = {
|
|
|
13
13
|
border: theme.vars.size.borderStroke.actionInput,
|
|
14
14
|
borderColor: ownerState?.error ? theme.vars.palette[color].enabled : theme.vars.palette.border.default,
|
|
15
15
|
padding: 0,
|
|
16
|
+
cursor: ownerState?.readOnly || ownerState?.disabled ? "default" : "pointer",
|
|
17
|
+
...ownerState?.readOnly && {
|
|
18
|
+
"& .M4LSelect-renderValueTypography": {
|
|
19
|
+
userSelect: "text",
|
|
20
|
+
cursor: "text"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"& .MuiSelect-nativeInput": {
|
|
24
|
+
inset: 0,
|
|
25
|
+
border: "unset",
|
|
26
|
+
outline: "unset"
|
|
27
|
+
},
|
|
16
28
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
17
29
|
all: "unset",
|
|
18
30
|
display: "none"
|
|
@@ -41,7 +53,10 @@ const selectStyles = {
|
|
|
41
53
|
boxSizing: "border-box",
|
|
42
54
|
display: "flex",
|
|
43
55
|
flexDirection: "column",
|
|
44
|
-
flexWrap: "unset"
|
|
56
|
+
flexWrap: "unset",
|
|
57
|
+
...ownerState?.readOnly && {
|
|
58
|
+
cursor: "default"
|
|
59
|
+
}
|
|
45
60
|
},
|
|
46
61
|
// Estilos para la variante text
|
|
47
62
|
[`&&&.${SELECT_CLASSES.text}`]: {
|
|
@@ -106,8 +121,12 @@ const selectStyles = {
|
|
|
106
121
|
}
|
|
107
122
|
}),
|
|
108
123
|
arrowDown: {},
|
|
109
|
-
|
|
110
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Styles for the render value typography
|
|
126
|
+
*/
|
|
127
|
+
renderValueTypography: ({ ownerState }) => ({
|
|
128
|
+
lineHeight: "inherit!important",
|
|
129
|
+
cursor: ownerState?.readOnly || ownerState?.disabled ? "default" : "pointer"
|
|
111
130
|
}),
|
|
112
131
|
// chip: () => ({
|
|
113
132
|
// }),
|
|
@@ -122,16 +141,32 @@ const selectStyles = {
|
|
|
122
141
|
* Styles for the label placeholder
|
|
123
142
|
* @returns {object} The styles for the label placeholder
|
|
124
143
|
*/
|
|
125
|
-
labelPlaceholer: ({ theme }) => ({
|
|
144
|
+
labelPlaceholer: ({ theme, ownerState }) => ({
|
|
126
145
|
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
127
|
-
paddingRight: theme.vars.size.baseSpacings.sp3
|
|
146
|
+
paddingRight: theme.vars.size.baseSpacings.sp3,
|
|
147
|
+
cursor: ownerState?.readOnly || ownerState?.disabled ? "default" : "pointer"
|
|
128
148
|
}),
|
|
129
149
|
/**
|
|
130
150
|
* Styles for the menu item select
|
|
131
151
|
* @param {object} theme - The theme object
|
|
132
152
|
* @returns {object} The styles for the menu item select
|
|
133
153
|
*/
|
|
134
|
-
menuItem: {
|
|
154
|
+
menuItem: {
|
|
155
|
+
"& .M4LMenuItem-menuItemContainer": {
|
|
156
|
+
width: "fit-content",
|
|
157
|
+
overflow: "unset",
|
|
158
|
+
"& .M4LImage-root": {
|
|
159
|
+
flexGrow: 1,
|
|
160
|
+
overflow: "auto",
|
|
161
|
+
flexShrink: 0
|
|
162
|
+
},
|
|
163
|
+
"& .M4LTypography-root": {
|
|
164
|
+
textOverflow: "unset",
|
|
165
|
+
overflow: "unset",
|
|
166
|
+
whiteSpace: "unset"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
135
170
|
/**
|
|
136
171
|
* Estilos del menuItem que no tiene opciones
|
|
137
172
|
* @param {object} theme - The theme object
|
|
@@ -28,4 +28,4 @@ export declare const COMBINATED_TEXTFIELD_ENUMS: {
|
|
|
28
28
|
/**
|
|
29
29
|
* Inventario de clases CSS para el componente Select
|
|
30
30
|
*/
|
|
31
|
-
export declare const SELECT_CLASSES: Record<
|
|
31
|
+
export declare const SELECT_CLASSES: Record<"text" | "menuItem" | "outlined" | "root" | "adorment" | "menuItemNoOptions" | "renderValueContainer" | "arrowDown" | "renderValueTypography" | "labelOption" | "labelPlaceholer" | "skeletonSelect", string>;
|
|
@@ -24,7 +24,7 @@ export declare const SkeletonSelectStyled: import('@emotion/styled').StyledCompo
|
|
|
24
24
|
export declare const RenderValueContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
25
25
|
ownerState?: any;
|
|
26
26
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
27
|
-
export declare const ArrowDownStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "placement" | "rotationAngle" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
27
|
+
export declare const ArrowDownStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "placement" | "rotationAngle" | "ariaLabel" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
28
28
|
ownerState?: any;
|
|
29
29
|
}, {}, {}>;
|
|
30
30
|
export declare const RenderValueTypography: import('@emotion/styled').StyledComponent<Pick<import('../../Typography/types').TypographyProps, keyof import('../../Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
@@ -45,6 +45,10 @@ export interface BaseSelectProps {
|
|
|
45
45
|
* Identificador único del componente, para pruebas automatizadas.
|
|
46
46
|
*/
|
|
47
47
|
dataTestId?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Define si el Select está en modo solo lectura.
|
|
50
|
+
*/
|
|
51
|
+
readOnly?: boolean;
|
|
48
52
|
}
|
|
49
53
|
export type SelectOptionValue<T extends string | number, Multiple> = Multiple extends true ? Array<SelectOption<T>> : SelectOption<T> | null;
|
|
50
54
|
/**
|
|
@@ -72,8 +76,9 @@ export interface SelectProps<T extends string | number, Multiple extends boolean
|
|
|
72
76
|
* Propiedades internas que definen el estado del componente `Select`.
|
|
73
77
|
* paletteColor - Color de la paleta aplicado al Select.
|
|
74
78
|
*/
|
|
75
|
-
export interface SelectOwnerState<T extends string | number, Multiple extends boolean | undefined = false> extends Pick<SelectProps<T, Multiple>, 'classes' | 'size' | 'error' | 'variant' | 'disabled' | 'multiple'> {
|
|
79
|
+
export interface SelectOwnerState<T extends string | number, Multiple extends boolean | undefined = false> extends Pick<SelectProps<T, Multiple>, 'classes' | 'size' | 'error' | 'variant' | 'disabled' | 'multiple' | 'readOnly'> {
|
|
76
80
|
disabled?: boolean;
|
|
81
|
+
readOnly?: boolean;
|
|
77
82
|
}
|
|
78
83
|
/**
|
|
79
84
|
* Define los tipos de slots disponibles en el Select.
|
|
@@ -15,4 +15,4 @@ export declare const COMBINATED_TEXTFIELD_ENUMS: {
|
|
|
15
15
|
/**
|
|
16
16
|
* Inventario de clases CSS para el componente TextField
|
|
17
17
|
*/
|
|
18
|
-
export declare const TEXT_FIELD_CLASSES: Record<
|
|
18
|
+
export declare const TEXT_FIELD_CLASSES: Record<"text" | "contained" | "outlined" | "skeleton" | "root" | "readOnly" | "limitContainer" | "limitTextFirst" | "limitTextSeparator" | "limitTextSecond", string>;
|
|
@@ -12,7 +12,7 @@ export declare const PaperStyled: import('@emotion/styled').StyledComponent<Pick
|
|
|
12
12
|
}, "children" | "style" | "square" | "variant" | "className" | "classes" | "sx" | "elevation">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "square" | "variant" | "translate" | "className" | "classes" | "sx" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "elevation"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
13
13
|
ownerState?: (Partial<import('../types').TimePickerOwnerState> & Record<string, unknown>) | undefined;
|
|
14
14
|
}, {}, {}>;
|
|
15
|
-
export declare const IconButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "placement" | "rotationAngle" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
15
|
+
export declare const IconButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "placement" | "rotationAngle" | "ariaLabel" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
16
16
|
ownerState?: (Partial<import('../types').TimePickerOwnerState> & Record<string, unknown>) | undefined;
|
|
17
17
|
}, {}, {}>;
|
|
18
18
|
export declare const SkeletonStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Skeleton/types').SkeletonProps, keyof import('../../Skeleton/types').SkeletonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ToggleIconButtonRootStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "placement" | "rotationAngle" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').ToggleIconButtonOwnerState> & Record<string, unknown> & {
|
|
1
|
+
export declare const ToggleIconButtonRootStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "placement" | "rotationAngle" | "ariaLabel" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').ToggleIconButtonOwnerState> & Record<string, unknown> & {
|
|
2
2
|
ownerState: Partial<import('..').ToggleIconButtonOwnerState> & Record<string, unknown>;
|
|
3
3
|
}, {}, {}>;
|
|
@@ -8,6 +8,7 @@ const tooltipStyles = {
|
|
|
8
8
|
* Estilos del texto del componente Tooltip
|
|
9
9
|
*/
|
|
10
10
|
text: ({ theme, ownerState }) => ({
|
|
11
|
+
color: theme.vars.palette.text.contrastText,
|
|
11
12
|
...getTypographyStyles(
|
|
12
13
|
theme.generalSettings.isMobile,
|
|
13
14
|
ownerState?.size || "medium",
|
|
@@ -18,14 +19,25 @@ const tooltipStyles = {
|
|
|
18
19
|
* Estilos del componente Tooltip
|
|
19
20
|
*/
|
|
20
21
|
tooltip: ({ theme }) => ({
|
|
21
|
-
background: theme.vars.palette.background.
|
|
22
|
+
background: theme.vars.palette.background.contrastDefault,
|
|
22
23
|
padding: theme.vars.size.baseSpacings.sp2,
|
|
23
24
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
24
25
|
boxShadow: theme.vars.customShadows.z3,
|
|
25
|
-
".MuiTooltip-arrow": {
|
|
26
|
+
"&.MuiTooltip-tooltipPlacementLeft .MuiTooltip-arrow": {
|
|
27
|
+
marginRight: "-0.6em"
|
|
28
|
+
},
|
|
29
|
+
"&.MuiTooltip-tooltipPlacementTop .MuiTooltip-arrow": {
|
|
30
|
+
marginBottom: "-0.6em"
|
|
31
|
+
},
|
|
32
|
+
"&&& .MuiTooltip-arrow": {
|
|
33
|
+
overflow: "visible",
|
|
26
34
|
"&::before": {
|
|
27
|
-
backgroundColor: theme.vars.palette.background.
|
|
28
|
-
borderRadius: theme.vars.size.borderRadius["
|
|
35
|
+
backgroundColor: theme.vars.palette.background.contrastDefault,
|
|
36
|
+
borderRadius: theme.vars.size.borderRadius["r1"],
|
|
37
|
+
width: theme.vars.size.baseSpacings.sp3,
|
|
38
|
+
height: theme.vars.size.baseSpacings.sp3,
|
|
39
|
+
border: "unset",
|
|
40
|
+
margin: "unset"
|
|
29
41
|
}
|
|
30
42
|
}
|
|
31
43
|
})
|
|
@@ -2,7 +2,7 @@ export declare const TOOLTIP_KEY_COMPONENT = "M4LTooltip";
|
|
|
2
2
|
/**
|
|
3
3
|
* Clases del componente Tooltip
|
|
4
4
|
*/
|
|
5
|
-
export declare const TOOLTIP_CLASSES: Record<
|
|
5
|
+
export declare const TOOLTIP_CLASSES: Record<"text" | "tooltip" | "root", string>;
|
|
6
6
|
/**
|
|
7
7
|
* Desplazamiento predeterminado del tooltip (X, Y)
|
|
8
8
|
*/
|
|
@@ -10,7 +10,7 @@ export declare const TYPOGRAPHY_CLASS_NAME_SPECIFY = "M4lclassCssSpecificity";
|
|
|
10
10
|
/**
|
|
11
11
|
* Inventario de clases CSS para el componente Typography.
|
|
12
12
|
*/
|
|
13
|
-
export declare const TYPOGRAPHY_CLASSES: Record<
|
|
13
|
+
export declare const TYPOGRAPHY_CLASSES: Record<"skeleton" | "root", string>;
|
|
14
14
|
export declare const TYPOGRAPHY_FONTS: {
|
|
15
15
|
Inter: string;
|
|
16
16
|
Jura: string;
|
|
@@ -3,6 +3,7 @@ import { Sizes, TypographyVariants } from '@m4l/styles';
|
|
|
3
3
|
import { TypographySlots } from './slots/typographyEnum';
|
|
4
4
|
import { TYPOGRAPHY_KEY_COMPONENT } from './constants';
|
|
5
5
|
import { M4LOverridesStyleRules } from '../../../@types/augmentations';
|
|
6
|
+
import { DeepKeyOf } from '../../../utils/types';
|
|
6
7
|
/**
|
|
7
8
|
* Define los colores de tipografía disponibles para el componente.
|
|
8
9
|
*/
|
|
@@ -23,7 +24,7 @@ export interface TypographyProps extends Omit<MUITypographyProps, 'color' | 'var
|
|
|
23
24
|
/**
|
|
24
25
|
* Opción de color usada para pintar el componente.
|
|
25
26
|
*/
|
|
26
|
-
color?:
|
|
27
|
+
color?: DeepKeyOf<Theme['vars']['palette']> | string;
|
|
27
28
|
/**
|
|
28
29
|
* Opciones de tamaño del componente.
|
|
29
30
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getPropertyByString } from "@m4l/core";
|
|
1
2
|
import { g as getSizeStyles } from "../../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
3
|
import { g as getTypographyStyles } from "../../../utils/getTypographyStyles.js";
|
|
3
4
|
const typographyStyles = {
|
|
@@ -19,17 +20,11 @@ const typographyStyles = {
|
|
|
19
20
|
flexDirection: "column"
|
|
20
21
|
},
|
|
21
22
|
// Override de estilos generales de MUI 🚫
|
|
22
|
-
// color text.primary 🎨
|
|
23
|
-
...ownerState?.color === "text.primary" && {
|
|
24
|
-
color: theme.vars.palette.text.primary
|
|
25
|
-
},
|
|
26
|
-
// color text.secondary 🎨
|
|
27
|
-
...ownerState?.color === "text.secondary" && {
|
|
28
|
-
color: theme.vars.palette.text.secondary
|
|
29
|
-
},
|
|
30
23
|
// color text.disabled 🎨
|
|
31
|
-
...
|
|
24
|
+
...ownerState?.disabled || ownerState?.color === "text.disabled" ? {
|
|
32
25
|
color: theme.vars.palette.text.disabled
|
|
26
|
+
} : {
|
|
27
|
+
color: getPropertyByString(theme.vars.palette, ownerState?.color || "text.primary", "text.primary")
|
|
33
28
|
},
|
|
34
29
|
...getTypographyStyles(
|
|
35
30
|
theme.generalSettings.isMobile,
|
|
@@ -262,10 +262,14 @@ const createPopupsStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
262
262
|
/**
|
|
263
263
|
* closePopup: Cierra un popup
|
|
264
264
|
*/
|
|
265
|
-
close: (popupId) => {
|
|
265
|
+
close: (popupId, useFnQueryClose = true) => {
|
|
266
266
|
if (!get().hashPopups[popupId]) {
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
|
+
if (get().hashPopups[popupId].fnQueryClose && useFnQueryClose) {
|
|
270
|
+
get().hashPopups[popupId].fnQueryClose?.();
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
269
273
|
set((state) => {
|
|
270
274
|
state.hashPopups[popupId].status = "closing";
|
|
271
275
|
});
|
|
@@ -296,7 +296,7 @@ export interface PopupsProviderStoreStateWithActions extends PopupsProviderStore
|
|
|
296
296
|
/**
|
|
297
297
|
* pasa el status a closing para que las las transiciones se ejecuten.
|
|
298
298
|
*/
|
|
299
|
-
close: (popupId: string) => void;
|
|
299
|
+
close: (popupId: string, useFnQueryClose?: boolean) => void;
|
|
300
300
|
/**
|
|
301
301
|
* Modifica un popup espeficio
|
|
302
302
|
*/
|