@m4l/components 9.3.34-BE20251125-beta.1 → 9.3.34-BE20251127-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 +17 -9
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionFormCancel/slots/ActionFormCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +1 -1
- package/components/EditLabel/slots/EditLabelSlots.d.ts +1 -1
- package/components/Label/index.d.ts +1 -1
- package/components/Label/types.d.ts +0 -6
- package/components/LoadingError/LoadingError.js +1 -1
- package/components/ModalDialog/slots/ModalDialogSlots.d.ts +1 -1
- package/components/PropertyValue/PropertyValue.js +1 -1
- package/components/SettingsLayout/slots/SettingsLayoutSlots.d.ts +1 -1
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.js +1 -1
- package/components/TabsNavigator/slots/TabsNavigatorSlots.d.ts +10 -10
- package/components/WindowBase/WindowBase.styles.js +0 -8
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +13 -23
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
- package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.js +1 -1
- package/components/hook-form/RHFDatePicker/RHFDatePicker.d.ts +7 -0
- package/components/hook-form/RHFDatePicker/RHFDatePicker.js +85 -0
- package/components/hook-form/RHFDatePicker/RHFDatePicker.styles.d.ts +5 -0
- package/components/hook-form/RHFDatePicker/RHFDatePicker.styles.js +200 -0
- package/components/hook-form/RHFDatePicker/constants.d.ts +4 -0
- package/components/hook-form/RHFDatePicker/constants.js +4 -0
- package/components/hook-form/RHFDatePicker/icons.d.ts +6 -0
- package/components/hook-form/RHFDatePicker/index.d.ts +1 -0
- package/components/hook-form/RHFDatePicker/slots/RHFDatePickerEnum.d.ts +11 -0
- package/components/hook-form/RHFDatePicker/slots/RHFDatePickerEnum.js +15 -0
- package/components/hook-form/RHFDatePicker/slots/RHFDatePickerSlots.d.ts +50 -0
- package/components/hook-form/RHFDatePicker/slots/RHFDatePickerSlots.js +44 -0
- package/components/hook-form/RHFDatePicker/slots/index.d.ts +2 -0
- package/components/hook-form/RHFDatePicker/types.d.ts +61 -0
- package/components/hook-form/RHFDateTime/RHFDateTime.d.ts +24 -1
- package/components/hook-form/RHFDateTimePicker/RHFDateTimePicker.d.ts +11 -0
- package/components/hook-form/RHFDateTimePicker/RHFDateTimePicker.js +8 -0
- package/components/hook-form/RHFDateTimePicker/index.d.ts +1 -0
- package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +1 -1
- package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.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/slots/RHFUploadSingleFileSlots.d.ts +1 -1
- package/components/hook-form/index.d.ts +2 -1
- package/components/index.d.ts +0 -1
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +1 -1
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.js +1 -1
- package/components/mui_extended/Button/slots/ButtonSlots.d.ts +1 -1
- package/components/mui_extended/DatePicker/DatePicker.d.ts +7 -0
- package/components/mui_extended/DatePicker/DatePicker.js +39 -0
- package/components/mui_extended/DatePicker/DatePicker.styles.d.ts +5 -0
- package/components/mui_extended/DatePicker/DatePicker.styles.js +193 -0
- package/components/mui_extended/DatePicker/constants.d.ts +2 -0
- package/components/mui_extended/DatePicker/constants.js +8 -0
- package/components/mui_extended/DatePicker/hooks/useDatePicker/types.d.ts +11 -0
- package/components/mui_extended/DatePicker/hooks/useDatePicker/useDatePicker.d.ts +9 -0
- package/components/mui_extended/DatePicker/hooks/useDatePicker/useDatePicker.js +200 -0
- package/components/mui_extended/DatePicker/icons.d.ts +4 -0
- package/components/mui_extended/DatePicker/icons.js +10 -0
- package/components/mui_extended/DatePicker/index.d.ts +2 -0
- package/components/mui_extended/DatePicker/index.js +1 -0
- package/components/mui_extended/DatePicker/slots/DatePickerEnum.d.ts +10 -0
- package/components/mui_extended/DatePicker/slots/DatePickerEnum.js +14 -0
- package/components/mui_extended/DatePicker/slots/DatePickerSlots.d.ts +44 -0
- package/components/mui_extended/DatePicker/slots/DatePickerSlots.js +46 -0
- package/components/mui_extended/DatePicker/types.d.ts +32 -0
- package/components/mui_extended/LoadingButton/index.js +1 -0
- package/components/mui_extended/LoadingButton/slots/LoadingButtonSlots.d.ts +1 -1
- package/components/mui_extended/NavLink/constants.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
- package/components/mui_extended/TextField/TextField.js +2 -2
- package/components/mui_extended/TextField/TextField.styles.js +1 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +1 -1
- package/components/mui_extended/ToggleButton/slots/ToggleButtonSlots.d.ts +1 -1
- package/components/mui_extended/Tooltip/Tooltip.styles.js +4 -20
- package/components/mui_extended/index.d.ts +1 -0
- package/index.js +74 -72
- package/package.json +1 -1
- package/components/ActionsGroup/ActionsGroup.d.ts +0 -5
- package/components/ActionsGroup/ActionsGroup.js +0 -40
- package/components/ActionsGroup/ActionsGroup.styles.d.ts +0 -2
- package/components/ActionsGroup/ActionsGroup.styles.js +0 -95
- package/components/ActionsGroup/constants.d.ts +0 -2
- package/components/ActionsGroup/constants.js +0 -8
- package/components/ActionsGroup/icons.d.ts +0 -3
- package/components/ActionsGroup/icons.js +0 -6
- package/components/ActionsGroup/index.d.ts +0 -1
- package/components/ActionsGroup/slots/ActionsGroupEnum.d.ts +0 -8
- package/components/ActionsGroup/slots/ActionsGroupEnum.js +0 -12
- package/components/ActionsGroup/slots/ActionsGroupSlots.d.ts +0 -15
- package/components/ActionsGroup/slots/ActionsGroupSlots.js +0 -35
- package/components/ActionsGroup/subcomponents/ActionIconButton/ActionIconButton.d.ts +0 -6
- package/components/ActionsGroup/subcomponents/ActionIconButton/ActionIconButton.js +0 -76
- package/components/ActionsGroup/subcomponents/ActionIconButton/types.d.ts +0 -7
- package/components/ActionsGroup/types.d.ts +0 -60
- package/components/hook-form/RHFActionsGroup/RHFActionsGroup.d.ts +0 -7
- package/components/hook-form/RHFActionsGroup/RHFActionsGroup.js +0 -87
- package/components/hook-form/RHFActionsGroup/RHFActionsGroupStyles.d.ts +0 -2
- package/components/hook-form/RHFActionsGroup/RHFActionsGroupStyles.js +0 -14
- package/components/hook-form/RHFActionsGroup/constants.d.ts +0 -9
- package/components/hook-form/RHFActionsGroup/constants.js +0 -8
- package/components/hook-form/RHFActionsGroup/index.d.ts +0 -2
- package/components/hook-form/RHFActionsGroup/slots/RHFActionsGroupEnum.d.ts +0 -3
- package/components/hook-form/RHFActionsGroup/slots/RHFActionsGroupEnum.js +0 -7
- package/components/hook-form/RHFActionsGroup/slots/RHFActionsGroupSlots.d.ts +0 -1
- package/components/hook-form/RHFActionsGroup/slots/RHFActionsGroupSlots.js +0 -11
- package/components/hook-form/RHFActionsGroup/slots/index.d.ts +0 -2
- package/components/hook-form/RHFActionsGroup/tests/common.d.ts +0 -28
- package/components/hook-form/RHFActionsGroup/types.d.ts +0 -54
- /package/components/{ActionsGroup/__tests__/ActionsGroup.test.d.ts → hook-form/RHFDatePicker/__tests__/RHFDatePicker.test.d.ts} +0 -0
- /package/components/{ActionsGroup → hook-form/RHFDatePicker}/index.js +0 -0
- /package/components/hook-form/{RHFActionsGroup → RHFDatePicker/slots}/index.js +0 -0
- /package/components/hook-form/{RHFActionsGroup/slots → RHFDateTimePicker}/index.js +0 -0
- /package/components/{hook-form/RHFActionsGroup/tests/RHFActionsGroup.test.d.ts → mui_extended/DatePicker/__tests__/DatePicker.test.d.ts} +0 -0
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
3
|
-
import { a as ActionIconButtonSkeletonStyled, b as ActionIconButtonStyled, I as IconTooltipMessageStyled, T as TextTooltipMessageStyled } from "../../slots/ActionsGroupSlots.js";
|
|
4
|
-
import { useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
5
|
-
import { A as ACTIONS_GROUP_ICONS } from "../../icons.js";
|
|
6
|
-
import { a as actionsGroupStyles } from "../../ActionsGroup.styles.js";
|
|
7
|
-
import { T as Tooltip } from "../../../mui_extended/Tooltip/Tooltip.js";
|
|
8
|
-
const ActionIconButton = (props) => {
|
|
9
|
-
const { action, selected, ownerState, onChange, groupDisabled } = props;
|
|
10
|
-
const { iconUrl: urlIcon, onClick, disabled, label } = action;
|
|
11
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
12
|
-
const isSkeleton = useModuleSkeleton();
|
|
13
|
-
const { currentSize } = useComponentSize();
|
|
14
|
-
const handleClick = () => {
|
|
15
|
-
if (disabled) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
onChange?.(action.id);
|
|
19
|
-
onClick?.(action.id);
|
|
20
|
-
};
|
|
21
|
-
if (isSkeleton) {
|
|
22
|
-
return /* @__PURE__ */ jsx(ActionIconButtonSkeletonStyled, { ownerState: { ...ownerState } });
|
|
23
|
-
}
|
|
24
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
-
Tooltip,
|
|
26
|
-
{
|
|
27
|
-
arrow: true,
|
|
28
|
-
PopperProps: {
|
|
29
|
-
modifiers: [
|
|
30
|
-
{
|
|
31
|
-
name: "offset",
|
|
32
|
-
options: {
|
|
33
|
-
offset: [0, 10]
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
},
|
|
38
|
-
slotProps: {
|
|
39
|
-
tooltip: {
|
|
40
|
-
/**
|
|
41
|
-
* Estilos del tooltip.
|
|
42
|
-
*/
|
|
43
|
-
sx: (theme) => typeof actionsGroupStyles.tooltip === "function" ? actionsGroupStyles.tooltip({ theme }) : {}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
-
(disabled || groupDisabled) && /* @__PURE__ */ jsx(
|
|
48
|
-
IconTooltipMessageStyled,
|
|
49
|
-
{
|
|
50
|
-
variant: "text",
|
|
51
|
-
size: "small",
|
|
52
|
-
src: `${host_static_assets}/${environment_assets}/${ACTIONS_GROUP_ICONS.blocked}`
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
/* @__PURE__ */ jsx(TextTooltipMessageStyled, { variant: "body", children: label })
|
|
56
|
-
] }),
|
|
57
|
-
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
58
|
-
ActionIconButtonStyled,
|
|
59
|
-
{
|
|
60
|
-
ownerState: { ...ownerState, itemSelected: selected, itemDisabled: disabled },
|
|
61
|
-
size: currentSize,
|
|
62
|
-
src: urlIcon,
|
|
63
|
-
onClick: handleClick,
|
|
64
|
-
disabled: disabled || groupDisabled,
|
|
65
|
-
variant: "text",
|
|
66
|
-
color: selected ? "primary" : "default",
|
|
67
|
-
"aria-label": label,
|
|
68
|
-
"aria-pressed": selected
|
|
69
|
-
}
|
|
70
|
-
) })
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
};
|
|
74
|
-
export {
|
|
75
|
-
ActionIconButton as A
|
|
76
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionGroupItem, ActionsGroupOwnerState, ActionsGroupProps, ActionsGroupValueType } from '../../types';
|
|
2
|
-
export interface ActionIconButtonProps<T extends ActionsGroupValueType> extends Pick<ActionsGroupProps<T>, 'onChange'> {
|
|
3
|
-
action: ActionGroupItem<T>;
|
|
4
|
-
ownerState: ActionsGroupOwnerState;
|
|
5
|
-
groupDisabled: boolean;
|
|
6
|
-
selected: boolean;
|
|
7
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { M4LOverridesStyleRules } from 'src/@types/augmentations';
|
|
2
|
-
import { ActionsGroupSlots } from './slots/ActionsGroupEnum';
|
|
3
|
-
import { ACTIONS_GROUP_KEY_COMPONENT } from './constants';
|
|
4
|
-
import { Theme } from '@mui/material';
|
|
5
|
-
import { Sizes } from '@m4l/styles';
|
|
6
|
-
export type ActionsGroupValueType = string | number | null;
|
|
7
|
-
export interface ActionGroupItem<T extends ActionsGroupValueType> {
|
|
8
|
-
id: T;
|
|
9
|
-
label: string;
|
|
10
|
-
iconUrl: string;
|
|
11
|
-
onClick?: (item: T) => void;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface ActionsGroupProps<T extends ActionsGroupValueType> {
|
|
15
|
-
/**
|
|
16
|
-
* Indica si el grupo de acciones está deshabilitado.
|
|
17
|
-
*/
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Clase personalizada para el grupo de acciones.
|
|
21
|
-
*/
|
|
22
|
-
className?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Etiqueta accesible para el grupo (role toolbar).
|
|
25
|
-
*/
|
|
26
|
-
ariaLabel?: string;
|
|
27
|
-
/**
|
|
28
|
-
* ID de elemento que etiqueta al grupo (alternativa a ariaLabel).
|
|
29
|
-
*/
|
|
30
|
-
ariaLabelledBy?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Item seleccionado.
|
|
33
|
-
*/
|
|
34
|
-
value: T;
|
|
35
|
-
/**
|
|
36
|
-
* Función que se ejecuta cuando se selecciona una acción.
|
|
37
|
-
*/
|
|
38
|
-
onChange: (newValue: T) => void;
|
|
39
|
-
/**
|
|
40
|
-
* Tamaño del grupo de acciones.
|
|
41
|
-
*/
|
|
42
|
-
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
43
|
-
/**
|
|
44
|
-
* Lista de acciones para el grupo.
|
|
45
|
-
*/
|
|
46
|
-
actions: ActionGroupItem<T>[];
|
|
47
|
-
/**
|
|
48
|
-
* Variante del grupo de acciones.
|
|
49
|
-
*/
|
|
50
|
-
variant?: 'vertical' | 'horizontal';
|
|
51
|
-
}
|
|
52
|
-
export type ActionsGroupSlotsType = keyof typeof ActionsGroupSlots;
|
|
53
|
-
export type ActionsGroupOwnerState = {
|
|
54
|
-
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
55
|
-
disabled?: boolean;
|
|
56
|
-
variant?: 'vertical' | 'horizontal';
|
|
57
|
-
itemSelected?: boolean;
|
|
58
|
-
itemDisabled?: boolean;
|
|
59
|
-
};
|
|
60
|
-
export type ActionsGroupStyles = M4LOverridesStyleRules<ActionsGroupSlotsType, typeof ACTIONS_GROUP_KEY_COMPONENT, Theme>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionsGroupValueType } from '../../ActionsGroup/types';
|
|
2
|
-
import { RHFActionsGroupProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* RHFActionsGroup is a custom actions group component integrated with React Hook Form.
|
|
5
|
-
* It renders an ActionsGroup with form integration, handling value and onChange automatically.
|
|
6
|
-
*/
|
|
7
|
-
export declare const RHFActionsGroup: <T extends ActionsGroupValueType>(props: RHFActionsGroupProps<T>) => JSX.Element;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useId } from "react";
|
|
3
|
-
import { useFormContext, Controller } from "react-hook-form";
|
|
4
|
-
import { A as ActionsGroup } from "../../ActionsGroup/ActionsGroup.js";
|
|
5
|
-
import { r as rhfActionsGroupClasses } from "./constants.js";
|
|
6
|
-
import clsx from "clsx";
|
|
7
|
-
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
8
|
-
import { A as ActionsGroupRootStyled } from "./slots/RHFActionsGroupSlots.js";
|
|
9
|
-
import { L as Label } from "../../Label/Label.js";
|
|
10
|
-
import { H as HelperError } from "../../HelperError/HelperError.js";
|
|
11
|
-
const RHFActionsGroup = (props) => {
|
|
12
|
-
const {
|
|
13
|
-
name,
|
|
14
|
-
actions,
|
|
15
|
-
label,
|
|
16
|
-
disabled,
|
|
17
|
-
className,
|
|
18
|
-
ariaLabel,
|
|
19
|
-
ariaLabelledBy,
|
|
20
|
-
size = "medium",
|
|
21
|
-
variant,
|
|
22
|
-
mandatory,
|
|
23
|
-
mandatoryMessage,
|
|
24
|
-
helperMessage,
|
|
25
|
-
id
|
|
26
|
-
} = props;
|
|
27
|
-
const { control } = useFormContext();
|
|
28
|
-
const { currentSize } = useComponentSize(size);
|
|
29
|
-
const htmlForId = useId();
|
|
30
|
-
const hookId = useId();
|
|
31
|
-
const finalId = id || hookId;
|
|
32
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
-
ActionsGroupRootStyled,
|
|
34
|
-
{
|
|
35
|
-
className: clsx(className, rhfActionsGroupClasses.actionsGroupRoot),
|
|
36
|
-
children: /* @__PURE__ */ jsx(
|
|
37
|
-
Controller,
|
|
38
|
-
{
|
|
39
|
-
name,
|
|
40
|
-
control,
|
|
41
|
-
render: ({ field: { value, onChange }, fieldState: { error } }) => {
|
|
42
|
-
const currentValue = value ?? null;
|
|
43
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
44
|
-
label && /* @__PURE__ */ jsx(
|
|
45
|
-
Label,
|
|
46
|
-
{
|
|
47
|
-
size: currentSize,
|
|
48
|
-
label,
|
|
49
|
-
htmlFor: finalId,
|
|
50
|
-
mandatory,
|
|
51
|
-
mandatoryMessage,
|
|
52
|
-
helperMessage,
|
|
53
|
-
disabled,
|
|
54
|
-
error: !!error
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
/* @__PURE__ */ jsx(
|
|
58
|
-
ActionsGroup,
|
|
59
|
-
{
|
|
60
|
-
actions,
|
|
61
|
-
value: currentValue,
|
|
62
|
-
onChange,
|
|
63
|
-
disabled,
|
|
64
|
-
ariaLabel,
|
|
65
|
-
ariaLabelledBy,
|
|
66
|
-
size,
|
|
67
|
-
variant
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
error?.message && /* @__PURE__ */ jsx(
|
|
71
|
-
HelperError,
|
|
72
|
-
{
|
|
73
|
-
htmlFor: htmlForId,
|
|
74
|
-
size: currentSize,
|
|
75
|
-
message: error.message
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
] });
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
RHFActionsGroup as R
|
|
87
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const rhfActionsGroupStyles = {
|
|
2
|
-
/**
|
|
3
|
-
* Styles for the root component.
|
|
4
|
-
*/
|
|
5
|
-
actionsGroupRoot: ({ theme }) => ({
|
|
6
|
-
display: "flex",
|
|
7
|
-
flexDirection: "column",
|
|
8
|
-
gap: theme.vars.size.baseSpacings.sp1,
|
|
9
|
-
width: "100%"
|
|
10
|
-
})
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
rhfActionsGroupStyles as r
|
|
14
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clave de identificación del componente RHFActionsGroup dentro del sistema.
|
|
3
|
-
*
|
|
4
|
-
* Esta constante se utiliza como identificador único para asociar y personalizar estilos y configuraciones
|
|
5
|
-
* relacionadas con el componente `RHFActionsGroup` dentro del sistema de temas y estilos.
|
|
6
|
-
* @default 'RHFM4LActionsGroup'
|
|
7
|
-
*/
|
|
8
|
-
export declare const RHFACTIONSGROUP_KEY_COMPONENT = "RHFM4LActionsGroup";
|
|
9
|
-
export declare const rhfActionsGroupClasses: Record<"actionsGroupRoot", string>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
|
|
2
|
-
import { R as RHFActionsGroupSlots } from "./slots/RHFActionsGroupEnum.js";
|
|
3
|
-
const RHFACTIONSGROUP_KEY_COMPONENT = "RHFM4LActionsGroup";
|
|
4
|
-
const rhfActionsGroupClasses = getComponentClasses(RHFACTIONSGROUP_KEY_COMPONENT, RHFActionsGroupSlots);
|
|
5
|
-
export {
|
|
6
|
-
RHFACTIONSGROUP_KEY_COMPONENT as R,
|
|
7
|
-
rhfActionsGroupClasses as r
|
|
8
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ActionsGroupRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material";
|
|
2
|
-
import { r as rhfActionsGroupStyles } from "../RHFActionsGroupStyles.js";
|
|
3
|
-
import { R as RHFACTIONSGROUP_KEY_COMPONENT } from "../constants.js";
|
|
4
|
-
import { R as RHFActionsGroupSlots } from "./RHFActionsGroupEnum.js";
|
|
5
|
-
const ActionsGroupRootStyled = styled("div", {
|
|
6
|
-
name: RHFACTIONSGROUP_KEY_COMPONENT,
|
|
7
|
-
slot: RHFActionsGroupSlots.actionsGroupRoot
|
|
8
|
-
})(rhfActionsGroupStyles?.actionsGroupRoot);
|
|
9
|
-
export {
|
|
10
|
-
ActionsGroupRootStyled as A
|
|
11
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { renderMaterialUI } from '../../../../test';
|
|
2
|
-
import { FieldValues } from 'react-hook-form';
|
|
3
|
-
import { RHFActionsGroupProps } from '../types';
|
|
4
|
-
import { ActionGroupItem } from '../../../ActionsGroup/types';
|
|
5
|
-
import * as Yup from 'yup';
|
|
6
|
-
export declare const FIELD_NAME = "rhf-actions-group";
|
|
7
|
-
export declare const FIELD_NAME_REQUIRED = "rhf-actions-group-required";
|
|
8
|
-
export declare const FIELD_NAME_PRESELECTED = "rhf-actions-group-preselected";
|
|
9
|
-
export declare const mockActions: ActionGroupItem<string>[];
|
|
10
|
-
export declare const mockActionPreselected: string;
|
|
11
|
-
export declare const INITIAL_FORM_VALUES: FieldValues;
|
|
12
|
-
export declare const DEFAULT_PROPS: RHFActionsGroupProps<string>;
|
|
13
|
-
export declare const errorMessage = "This field is required";
|
|
14
|
-
export declare const VALIDATION_SCHEMA: Yup.ObjectSchema<import('yup/lib/object').Assign<import('yup/lib/object').ObjectShape, {
|
|
15
|
-
"rhf-actions-group-required": import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
16
|
-
}>, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<import('yup/lib/object').Assign<import('yup/lib/object').ObjectShape, {
|
|
17
|
-
"rhf-actions-group-required": import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
18
|
-
}>>, import('yup/lib/object').AssertsShape<import('yup/lib/object').Assign<import('yup/lib/object').ObjectShape, {
|
|
19
|
-
"rhf-actions-group-required": import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
20
|
-
}>>>;
|
|
21
|
-
/**
|
|
22
|
-
* Renderiza el componente con el contexto de EnvironmentProvider y RHFormProvider.
|
|
23
|
-
*/
|
|
24
|
-
export declare const renderWithContexts: (ui: React.ReactElement, initialValuesFormContext?: FieldValues, validationSchema?: any) => ReturnType<typeof renderMaterialUI>;
|
|
25
|
-
/**
|
|
26
|
-
* Renders the RHFActionsGroup component with the provided props.
|
|
27
|
-
*/
|
|
28
|
-
export declare const renderRHFActionsGroup: (fieldName: string, overrideProps?: Partial<RHFActionsGroupProps<string>>, withFormValidation?: boolean) => ReturnType<typeof renderMaterialUI>;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ActionsGroupValueType, ActionGroupItem } from '../../ActionsGroup/types';
|
|
2
|
-
import { Sizes } from '@m4l/styles';
|
|
3
|
-
import { M4LOverridesStyleRules } from '../../../@types/augmentations';
|
|
4
|
-
import { Theme } from '@mui/material';
|
|
5
|
-
import { RHFActionsGroupSlots } from './slots';
|
|
6
|
-
import { RHFACTIONSGROUP_KEY_COMPONENT } from './constants';
|
|
7
|
-
import { LabelPropsBase } from '../../../components/Label/types';
|
|
8
|
-
/**
|
|
9
|
-
* Props for the RHFActionsGroup component.
|
|
10
|
-
*/
|
|
11
|
-
export interface RHFActionsGroupProps<T extends ActionsGroupValueType> extends LabelPropsBase {
|
|
12
|
-
/**
|
|
13
|
-
* The name of the field in the form.
|
|
14
|
-
*/
|
|
15
|
-
name: string;
|
|
16
|
-
/**
|
|
17
|
-
* List of actions for the group.
|
|
18
|
-
*/
|
|
19
|
-
actions: ActionGroupItem<T>[];
|
|
20
|
-
/**
|
|
21
|
-
* Indicates if the actions group is disabled.
|
|
22
|
-
*/
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Custom class name for the actions group.
|
|
26
|
-
*/
|
|
27
|
-
className?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Accessible label for the group (role toolbar).
|
|
30
|
-
*/
|
|
31
|
-
ariaLabel?: string;
|
|
32
|
-
/**
|
|
33
|
-
* ID of element that labels the group (alternative to ariaLabel).
|
|
34
|
-
*/
|
|
35
|
-
ariaLabelledBy?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Size of the actions group.
|
|
38
|
-
*/
|
|
39
|
-
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
40
|
-
/**
|
|
41
|
-
* Variant of the actions group.
|
|
42
|
-
*/
|
|
43
|
-
variant?: 'vertical' | 'horizontal';
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Owner state for RHFActionsGroup component.
|
|
47
|
-
*/
|
|
48
|
-
export interface RHFActionsGroupOwnerState {
|
|
49
|
-
disabled?: RHFActionsGroupProps<any>['disabled'];
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Styles for RHFActionsGroup component.
|
|
53
|
-
*/
|
|
54
|
-
export type RHFActionsGroupStyles = M4LOverridesStyleRules<keyof typeof RHFActionsGroupSlots, typeof RHFACTIONSGROUP_KEY_COMPONENT, Theme>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|