@m4l/components 9.3.43 → 9.4.0-JA-20251207-Beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/export.d.ts +2 -2
- package/@types/types.d.ts +18 -10
- package/components/CheckableList/CheckableList.d.ts +20 -0
- package/components/CheckableList/CheckableList.js +225 -0
- package/components/CheckableList/CheckableList.styles.d.ts +2 -0
- package/components/CheckableList/CheckableList.styles.js +247 -0
- package/components/CheckableList/constants.d.ts +5 -0
- package/components/CheckableList/constants.js +17 -0
- package/components/CheckableList/dictionary.d.ts +14 -0
- package/components/CheckableList/dictionary.js +14 -0
- package/components/CheckableList/hooks/index.d.ts +6 -0
- package/components/CheckableList/hooks/useCheckableListHandlers.d.ts +21 -0
- package/components/CheckableList/hooks/useCheckableListHandlers.js +66 -0
- package/components/CheckableList/hooks/useCheckableListItems.d.ts +19 -0
- package/components/CheckableList/hooks/useCheckableListItems.js +79 -0
- package/components/CheckableList/hooks/useCheckableListRender.d.ts +52 -0
- package/components/CheckableList/hooks/useCheckableListRender.js +223 -0
- package/components/CheckableList/hooks/useCheckableListSelection.d.ts +19 -0
- package/components/CheckableList/hooks/useCheckableListSelection.js +69 -0
- package/components/CheckableList/hooks/useCheckableListState.d.ts +17 -0
- package/components/CheckableList/hooks/useCheckableListState.js +59 -0
- package/components/CheckableList/hooks/useCheckableListVirtualization.d.ts +14 -0
- package/components/CheckableList/hooks/useCheckableListVirtualization.js +42 -0
- package/components/CheckableList/icons.d.ts +5 -0
- package/components/CheckableList/icons.js +8 -0
- package/components/CheckableList/index.d.ts +3 -0
- package/components/CheckableList/index.js +1 -0
- package/components/CheckableList/slots/index.d.ts +2 -0
- package/components/CheckableList/slots/index.js +1 -0
- package/components/CheckableList/slots/slots.d.ts +26 -0
- package/components/CheckableList/slots/slots.js +30 -0
- package/components/CheckableList/slots/styled.d.ts +72 -0
- package/components/CheckableList/slots/styled.js +130 -0
- package/components/CheckableList/types.d.ts +277 -0
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +1 -1
- package/components/DataGrid/Datagrid.styles.js +8 -8
- package/components/DataGrid/subcomponents/CheckboxCellAdapter/index.js +2 -2
- package/components/DataGrid/subcomponents/Table/subcomponents/RadioFormatter.d.ts +6 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/RadioFormatter.js +12 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/RadioSelectColumn.js +2 -2
- package/components/DynamicFilter/store/DynamicFilterContext.js +11 -0
- package/components/DynamicFilter/store/DynamicFilterStore.js +9 -0
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/useDynamicFilterBase.d.ts +1 -1
- package/components/DynamicFilter/types.d.ts +4 -0
- package/components/DynamicSort/store/DynamicSortStore.js +6 -0
- package/components/DynamicSort/subcomponents/DynamicSortBase/useDynamicSortBase.d.ts +1 -1
- package/components/DynamicSort/types.d.ts +4 -0
- package/components/MFIsolationApp/slots/MFIsolationAppSlots.d.ts +2 -2
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +1 -1
- package/components/Stepper/Stepper.styles.js +13 -8
- package/components/WindowBase/hooks/useDynamicMFParameters/index.d.ts +4 -4
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/commercial/SectionCommercial/styles.d.ts +1 -1
- package/components/hook-form/RHFCheckableList/RHFCheckableList.d.ts +7 -0
- package/components/hook-form/RHFCheckableList/RHFCheckableList.js +91 -0
- package/components/hook-form/RHFCheckableList/RHFCheckableList.styles.d.ts +2 -0
- package/components/hook-form/RHFCheckableList/RHFCheckableList.styles.js +30 -0
- package/components/hook-form/RHFCheckableList/constants.d.ts +8 -0
- package/components/hook-form/RHFCheckableList/constants.js +11 -0
- package/components/hook-form/RHFCheckableList/index.d.ts +2 -0
- package/components/hook-form/RHFCheckableList/index.js +1 -0
- package/components/hook-form/RHFCheckableList/slots/RHFCheckableListEnum.d.ts +6 -0
- package/components/hook-form/RHFCheckableList/slots/RHFCheckableListEnum.js +10 -0
- package/components/hook-form/RHFCheckableList/slots/RHFCheckableListSlots.d.ts +20 -0
- package/components/hook-form/RHFCheckableList/slots/RHFCheckableListSlots.js +29 -0
- package/components/hook-form/RHFCheckableList/slots/index.d.ts +2 -0
- package/components/hook-form/RHFCheckableList/types.d.ts +60 -0
- package/components/hook-form/RHFColorPicker/hooks/useColorPicker/useColorPicker.d.ts +1 -1
- package/components/hook-form/RHFPeriod/subcomponents/Period/Period.js +3 -4
- package/components/hook-form/RHFRadioGroup/RHFRadioGroup.d.ts +3 -3
- package/components/hook-form/RHFRadioGroup/RHFRadioGroup.js +66 -24
- package/components/hook-form/RHFRadioGroup/RHFRadioGroup.styles.d.ts +5 -0
- package/components/hook-form/RHFRadioGroup/RHFRadioGroup.styles.js +29 -0
- package/components/hook-form/RHFRadioGroup/constants.d.ts +5 -0
- package/components/hook-form/RHFRadioGroup/constants.js +8 -0
- package/components/hook-form/RHFRadioGroup/formatters/OptionIconLabelFormatter/index.d.ts +2 -2
- package/components/hook-form/RHFRadioGroup/slots/slots.d.ts +5 -0
- package/components/hook-form/RHFRadioGroup/slots/slots.js +9 -0
- package/components/hook-form/RHFRadioGroup/slots/styled.d.ts +9 -0
- package/components/hook-form/RHFRadioGroup/slots/styled.js +20 -0
- package/components/hook-form/RHFRadioGroup/types.d.ts +55 -11
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/UploadImage.js +1 -1
- package/components/hook-form/index.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/mui_extended/CheckBox/CheckBox.js +2 -0
- package/components/mui_extended/Radio/Radio.d.ts +20 -0
- package/components/mui_extended/{RadioButton/RadioButton.js → Radio/Radio.js} +27 -26
- package/components/mui_extended/Radio/Radio.styles.d.ts +2 -0
- package/components/mui_extended/{RadioButton/RadioButton.styles.js → Radio/Radio.styles.js} +17 -42
- package/components/mui_extended/Radio/constants.d.ts +2 -0
- package/components/mui_extended/Radio/constants.js +8 -0
- package/components/mui_extended/Radio/index.d.ts +1 -0
- package/components/mui_extended/Radio/index.js +1 -0
- package/components/mui_extended/Radio/slots/slots.d.ts +6 -0
- package/components/mui_extended/Radio/slots/slots.js +10 -0
- package/components/mui_extended/{RadioButton/slots/RadioButtonSlots.d.ts → Radio/slots/styled.d.ts} +6 -12
- package/components/mui_extended/Radio/slots/styled.js +28 -0
- package/components/mui_extended/Radio/types.d.ts +53 -0
- package/components/mui_extended/Stack/Stack.d.ts +1 -1
- package/components/mui_extended/Stack/Stack.js +5 -2
- package/components/mui_extended/index.d.ts +1 -1
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortEnum.d.ts +2 -1
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortEnum.js +1 -0
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.d.ts +6 -3
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.js +6 -0
- package/hooks/useDynamicFilterAndSort/styles.js +23 -0
- package/hooks/useDynamicFilterAndSort/types.d.ts +2 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +27 -21
- package/index.js +145 -139
- package/package.json +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/RadioButtonFormatter.d.ts +0 -6
- package/components/DataGrid/subcomponents/Table/subcomponents/RadioButtonFormatter.js +0 -12
- package/components/hook-form/RHFRadioGroup/formatters/OptionIconLabelFormatter/index.js +0 -16
- package/components/mui_extended/RadioButton/RadioButton.d.ts +0 -24
- package/components/mui_extended/RadioButton/RadioButton.styles.d.ts +0 -2
- package/components/mui_extended/RadioButton/constants.d.ts +0 -1
- package/components/mui_extended/RadioButton/constants.js +0 -4
- package/components/mui_extended/RadioButton/index.d.ts +0 -1
- package/components/mui_extended/RadioButton/slots/RadioButtonEnum.d.ts +0 -8
- package/components/mui_extended/RadioButton/slots/RadioButtonEnum.js +0 -12
- package/components/mui_extended/RadioButton/slots/RadioButtonSlots.js +0 -39
- package/components/mui_extended/RadioButton/types.d.ts +0 -50
- /package/components/{mui_extended/RadioButton → CheckableList/hooks}/index.js +0 -0
- /package/components/DataGrid/tests/table/subcomponents/{RadioButtonFormatter.test.d.ts → RadioFormatter.test.d.ts} +0 -0
- /package/components/mui_extended/{RadioButton → Radio}/icons.d.ts +0 -0
- /package/components/mui_extended/{RadioButton → Radio}/icons.js +0 -0
- /package/components/mui_extended/{RadioButton/tests/RadioButton.test.d.ts → Radio/tests/Radio.test.d.ts} +0 -0
|
@@ -1,14 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { RadioGroupProps, Theme } from '@mui/material';
|
|
2
|
+
import { M4LOverridesStyleRules } from 'src/@types/augmentations';
|
|
3
|
+
import { RHFRADIO_GROUP_KEY_COMPONENT } from './constants';
|
|
4
|
+
import { RHFRadioGroupSlots } from './slots/slots';
|
|
5
|
+
import { LabelProps } from '../../Label/types';
|
|
6
|
+
import { Sizes } from '@m4l/styles';
|
|
7
|
+
import { HelperErrorProps } from '../../HelperError';
|
|
8
|
+
export type GetOptionLabelType<T> = (option: T) => string | undefined;
|
|
9
|
+
export type GetOptionValueType<T> = (option: T) => string | number;
|
|
10
|
+
export interface RHFRadioGroupProps<T> extends RadioGroupProps, Omit<LabelProps, 'dataTestId' | 'error' | 'children' | 'className' | 'disabled' | 'size' | 'skeletonWidth'> {
|
|
11
|
+
/**
|
|
12
|
+
* Identificador para el manejo de campos en react hook form.
|
|
13
|
+
*/
|
|
6
14
|
name: string;
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Tamaño del componente
|
|
17
|
+
*/
|
|
18
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
19
|
+
/**
|
|
20
|
+
* Propiedad que deshabilita la interacción del componente.
|
|
21
|
+
*/
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Nombre de clase CSS personalizada que se aplicará al componente.
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Propiedad usada para facilitar la identificación del componente en las pruebas.
|
|
29
|
+
*/
|
|
30
|
+
dataTestId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Medida de anchura para el esqueleto del label
|
|
33
|
+
*/
|
|
34
|
+
labelSkeletonWidth?: LabelProps['skeletonWidth'];
|
|
35
|
+
/**
|
|
36
|
+
* Medida de anchura para el esqueleto del helperError
|
|
37
|
+
*/
|
|
38
|
+
helperErrorSkeletonWidth?: HelperErrorProps['skeletonWidth'];
|
|
39
|
+
/**
|
|
40
|
+
* Opciones del componente
|
|
41
|
+
*/
|
|
9
42
|
options: T[];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Componente de control para la opción
|
|
45
|
+
*/
|
|
46
|
+
ControlOption?: React.ComponentType<any>;
|
|
47
|
+
/**
|
|
48
|
+
* Función para obtener el label de la opción
|
|
49
|
+
*/
|
|
50
|
+
getOptionLabel: GetOptionLabelType<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Función para obtener el valor de la opción
|
|
53
|
+
*/
|
|
54
|
+
getOptionValue: GetOptionValueType<T>;
|
|
14
55
|
}
|
|
56
|
+
export type RHFRadioGroupOwnerState = {};
|
|
57
|
+
export type RHFRadioGroupSlotsType = keyof typeof RHFRadioGroupSlots;
|
|
58
|
+
export type RHFRadioGroupStyles = M4LOverridesStyleRules<RHFRadioGroupSlotsType, typeof RHFRADIO_GROUP_KEY_COMPONENT, Theme>;
|
package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/UploadImage.js
CHANGED
|
@@ -9,8 +9,8 @@ import { U as UploadImageSlots } from "../../slots/RHFUploadImageEnum.js";
|
|
|
9
9
|
import { U as UploadImageRootStyled, C as ContentModuleLayoutStyled, a as ContainPreviewStyled, I as IconButtonRemoveStyled, b as ContentImageStyled, c as ContentImageTextStyled, T as TypographyStyled, d as ContentMessageStyled, D as DividerStyled, B as ButtonStyled } from "../../slots/RHFUploadImageSlots.js";
|
|
10
10
|
import { g as getUploadImageDictionary, C as COMPONENTS_DICTIONARY_KEYS } from "./dictionary.js";
|
|
11
11
|
import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
|
|
12
|
-
import { g as getComponentClasses } from "../../../../../../utils/getComponentSlotRoot.js";
|
|
13
12
|
import { T as Typography } from "../../../../../mui_extended/Typography/Typography.js";
|
|
13
|
+
import { g as getComponentClasses } from "../../../../../../utils/getComponentSlotRoot.js";
|
|
14
14
|
const UploadImage = (props) => {
|
|
15
15
|
const { file, size, onDrop, onRemove, maxSize, dataTestId, error = false, multiple, disabled, ...other } = props;
|
|
16
16
|
const { currentSize } = useComponentSize(size);
|
|
@@ -4,6 +4,7 @@ export { getRHFAutocompleteComponentsDictionary } from './RHFAutocomplete/dictio
|
|
|
4
4
|
export { RHFAutocompleteAsync } from './RHFAutocompleteAsync/RHFAutocompleteAsync';
|
|
5
5
|
export { getRHFAutocompleteAsyncComponentsDictionary } from './RHFAutocompleteAsync/dictionary';
|
|
6
6
|
export * from './RHFCheckbox/RHFCheckbox';
|
|
7
|
+
export * from './RHFCheckableList';
|
|
7
8
|
export { RHFDateTime } from './RHFDateTime';
|
|
8
9
|
export { RHFDateTimePicker } from './RHFDateTimePicker';
|
|
9
10
|
export { RHFDatePicker } from './RHFDatePicker';
|
package/components/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ const CheckBox = forwardRef((props, ref) => {
|
|
|
32
32
|
const finalId = id || hookId;
|
|
33
33
|
const checkedIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/check_box/assets/icons/checked.svg`;
|
|
34
34
|
const uncheckedIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/check_box/assets/icons/unchecked.svg`;
|
|
35
|
+
const indeterminateIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/check_box/assets/icons/indeterminate.svg`;
|
|
35
36
|
const ownerState = {
|
|
36
37
|
disabled,
|
|
37
38
|
color,
|
|
@@ -48,6 +49,7 @@ const CheckBox = forwardRef((props, ref) => {
|
|
|
48
49
|
disableRipple: true,
|
|
49
50
|
id: finalId,
|
|
50
51
|
checked,
|
|
52
|
+
indeterminateIcon: /* @__PURE__ */ jsx(IconStyled, { src: indeterminateIconUrl, size: currentSize, color: disabled ? "text.disabled" : error ? "error.enabled" : "primary.enabled", ownerState: { ...ownerState } }),
|
|
51
53
|
checkedIcon: /* @__PURE__ */ jsx(IconCheckedStyled, { src: checkedIconUrl, size: currentSize, color: disabled ? "text.disabled" : error ? "error.enabled" : "primary.enabled", ownerState: { ...ownerState } }),
|
|
52
54
|
icon: /* @__PURE__ */ jsx(IconStyled, { src: uncheckedIconUrl, size: currentSize, ownerState: { ...ownerState }, color: disabled ? "text.disabled" : error ? "error.enabled" : "text.primary" }),
|
|
53
55
|
disabled,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RadioProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente Radio 🔘
|
|
4
|
+
*
|
|
5
|
+
* Este componente representa un radio button personalizado que puede ser utilizado en formularios y otros lugares donde se necesite una opción de selección única.
|
|
6
|
+
* @param {RadioProps} props - Las propiedades del componente.
|
|
7
|
+
* @param {React.Ref<HTMLButtonElement>} ref - La referencia al elemento raíz del componente.
|
|
8
|
+
* @returns {JSX.Element} El componente Radio renderizado.
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Radio
|
|
12
|
+
* size="medium"
|
|
13
|
+
* disabled={false}
|
|
14
|
+
* color="primary"
|
|
15
|
+
* mandatory={true}
|
|
16
|
+
* error={false}
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare const Radio: import('react').ForwardRefExoticComponent<Omit<RadioProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useId } from "react";
|
|
3
3
|
import { useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
4
|
-
import { R as
|
|
4
|
+
import { R as RadioRootStyled, M as MUIRadioStyled, I as InlineTextStyled, S as SkeletonStyled } from "./slots/styled.js";
|
|
5
5
|
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
6
|
-
import { R as
|
|
6
|
+
import { R as RADIO_CLASSES, a as RADIO_KEY_COMPONENT } from "./constants.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { p as pathIcons } from "./icons.js";
|
|
9
9
|
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
10
|
-
|
|
10
|
+
import { I as Icon } from "../../Icon/Icon.js";
|
|
11
|
+
const Radio = forwardRef(
|
|
11
12
|
(props, ref) => {
|
|
12
13
|
const {
|
|
13
14
|
className,
|
|
14
15
|
size = "medium",
|
|
15
16
|
disabled,
|
|
16
17
|
color = "default",
|
|
17
|
-
mandatory,
|
|
18
|
-
mandatoryMessage,
|
|
19
|
-
helperMessage,
|
|
20
|
-
id,
|
|
21
|
-
htmlFor,
|
|
22
18
|
error,
|
|
23
|
-
inlineText,
|
|
24
19
|
checked = false,
|
|
20
|
+
inlineText,
|
|
21
|
+
onChange,
|
|
22
|
+
value,
|
|
23
|
+
id,
|
|
25
24
|
...others
|
|
26
25
|
} = props;
|
|
27
26
|
const { currentSize } = useComponentSize(size);
|
|
28
27
|
const isSkeleton = useModuleSkeleton();
|
|
29
|
-
const
|
|
30
|
-
const classes = getComponentSlotRoot(RADIO_BUTTON_KEY_COMPONENT);
|
|
28
|
+
const classRoot = getComponentSlotRoot(RADIO_KEY_COMPONENT);
|
|
31
29
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
32
30
|
const hookId = useId();
|
|
33
31
|
const finalId = id || hookId;
|
|
@@ -35,64 +33,67 @@ const RadioButton = forwardRef(
|
|
|
35
33
|
disabled,
|
|
36
34
|
color,
|
|
37
35
|
error,
|
|
38
|
-
size,
|
|
36
|
+
size: currentSize,
|
|
39
37
|
checked
|
|
40
38
|
};
|
|
41
39
|
return /* @__PURE__ */ jsx(
|
|
42
|
-
|
|
40
|
+
RadioRootStyled,
|
|
43
41
|
{
|
|
44
42
|
ownerState: { ...ownerState },
|
|
45
|
-
className: clsx(className,
|
|
43
|
+
className: clsx(className, classRoot),
|
|
46
44
|
children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
45
|
/* @__PURE__ */ jsx(
|
|
48
46
|
MUIRadioStyled,
|
|
49
47
|
{
|
|
50
48
|
ref,
|
|
49
|
+
id: finalId,
|
|
51
50
|
ownerState: { ...ownerState },
|
|
52
51
|
disableRipple: true,
|
|
53
|
-
id: finalId,
|
|
54
52
|
checked,
|
|
55
53
|
checkedIcon: /* @__PURE__ */ jsx(
|
|
56
|
-
|
|
54
|
+
Icon,
|
|
57
55
|
{
|
|
58
56
|
src: `${host_static_assets}/${environment_assets}/${pathIcons.checked}`,
|
|
59
57
|
size: currentSize,
|
|
60
|
-
color: disabled ? "text.disabled" : error ? "error.enabled" : "primary.enabled"
|
|
61
|
-
ownerState: { ...ownerState }
|
|
58
|
+
color: disabled ? "text.disabled" : error ? "error.enabled" : "primary.enabled"
|
|
62
59
|
}
|
|
63
60
|
),
|
|
64
61
|
icon: /* @__PURE__ */ jsx(
|
|
65
|
-
|
|
62
|
+
Icon,
|
|
66
63
|
{
|
|
67
64
|
src: `${host_static_assets}/${environment_assets}/${pathIcons.unchecked}`,
|
|
68
65
|
size: currentSize,
|
|
69
|
-
ownerState: { ...ownerState },
|
|
70
66
|
color: disabled ? "text.disabled" : error ? "error.enabled" : "text.secondary"
|
|
71
67
|
}
|
|
72
68
|
),
|
|
73
69
|
disabled,
|
|
74
70
|
inputProps: {
|
|
75
|
-
"aria-
|
|
76
|
-
|
|
71
|
+
"aria-invalid": error ? "true" : void 0,
|
|
72
|
+
// 'aria-label': value+ '',
|
|
73
|
+
"aria-label": "Select row",
|
|
74
|
+
...inlineText && { "aria-labelledby": `${finalId}-label` }
|
|
77
75
|
},
|
|
76
|
+
value,
|
|
77
|
+
onChange,
|
|
78
78
|
...others
|
|
79
79
|
}
|
|
80
80
|
),
|
|
81
81
|
inlineText && /* @__PURE__ */ jsx(
|
|
82
|
-
|
|
82
|
+
InlineTextStyled,
|
|
83
83
|
{
|
|
84
|
+
id: `${finalId}-label`,
|
|
84
85
|
component: "label",
|
|
85
86
|
htmlFor: finalId,
|
|
86
87
|
variant: "body",
|
|
87
88
|
ownerState: { ...ownerState },
|
|
88
|
-
size:
|
|
89
|
+
size: currentSize,
|
|
89
90
|
disabled,
|
|
90
91
|
ellipsis: true,
|
|
91
92
|
children: inlineText
|
|
92
93
|
}
|
|
93
94
|
)
|
|
94
95
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
95
|
-
/* @__PURE__ */ jsx(SkeletonStyled, { variant: "rounded", className:
|
|
96
|
+
/* @__PURE__ */ jsx(SkeletonStyled, { variant: "rounded", className: RADIO_CLASSES.skeleton }),
|
|
96
97
|
inlineText ? /* @__PURE__ */ jsx(
|
|
97
98
|
SkeletonStyled,
|
|
98
99
|
{
|
|
@@ -106,5 +107,5 @@ const RadioButton = forwardRef(
|
|
|
106
107
|
}
|
|
107
108
|
);
|
|
108
109
|
export {
|
|
109
|
-
|
|
110
|
+
Radio as R
|
|
110
111
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { R as RADIO_CLASSES } from "./constants.js";
|
|
1
2
|
import { g as getSizeStyles } from "../../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
3
|
const radioButtonStyles = {
|
|
3
4
|
/**
|
|
4
5
|
* Estilos generales para el radio button 🟦
|
|
5
|
-
* @param {object} theme - El tema de MUI.
|
|
6
|
-
* @returns {object} - Los estilos aplicados al root del radio button.
|
|
7
6
|
*/
|
|
8
7
|
root: ({ theme }) => ({
|
|
9
8
|
display: "flex",
|
|
@@ -12,18 +11,17 @@ const radioButtonStyles = {
|
|
|
12
11
|
overflow: "visible",
|
|
13
12
|
boxSizing: "border-box",
|
|
14
13
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
15
|
-
width: "fit-content"
|
|
14
|
+
width: "fit-content",
|
|
15
|
+
cursor: "pointer"
|
|
16
16
|
}),
|
|
17
17
|
/**
|
|
18
|
-
* Componente MuiRadio, FocusVisible para cuando está seleccionado el
|
|
19
|
-
* @param {object} theme - El tema de MUI.
|
|
20
|
-
* @param {object} ownerState - El estado del componente.
|
|
21
|
-
* @returns {object} - Los estilos aplicados al MuiRadio.
|
|
18
|
+
* Componente MuiRadio, FocusVisible para cuando está seleccionado el Radio 🟩
|
|
22
19
|
*/
|
|
23
20
|
muiRadio: ({ theme, ownerState }) => {
|
|
24
21
|
const color = ownerState?.error ? "error" : "primary";
|
|
25
22
|
const opacityColor = ownerState?.error ? "error" : "default";
|
|
26
23
|
return {
|
|
24
|
+
hola: 1,
|
|
27
25
|
overflow: "visible",
|
|
28
26
|
...getSizeStyles(
|
|
29
27
|
theme,
|
|
@@ -69,16 +67,21 @@ const radioButtonStyles = {
|
|
|
69
67
|
};
|
|
70
68
|
},
|
|
71
69
|
/**
|
|
72
|
-
* Estilos para el
|
|
73
|
-
* @param {object} theme - El tema de MUI.
|
|
74
|
-
* @param {object} ownerState - El estado del componente.
|
|
75
|
-
* @returns {object} - Los estilos aplicados al skeletonStyled.
|
|
70
|
+
* Estilos para el texto inline del Radio 📝
|
|
76
71
|
*/
|
|
77
|
-
|
|
72
|
+
inlineText: () => {
|
|
73
|
+
return {
|
|
74
|
+
cursor: "inherit"
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Estilos para el skeleton del Radio 📝
|
|
79
|
+
*/
|
|
80
|
+
skeleton: ({ theme, ownerState }) => {
|
|
78
81
|
return {
|
|
79
82
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
80
83
|
backgroundColor: theme.vars.palette?.skeleton.default,
|
|
81
|
-
|
|
84
|
+
[`&.${RADIO_CLASSES.skeleton}`]: {
|
|
82
85
|
...getSizeStyles(
|
|
83
86
|
theme,
|
|
84
87
|
ownerState?.size || "medium",
|
|
@@ -88,38 +91,10 @@ const radioButtonStyles = {
|
|
|
88
91
|
width: size
|
|
89
92
|
};
|
|
90
93
|
}
|
|
91
|
-
),
|
|
92
|
-
...getSizeStyles(
|
|
93
|
-
theme,
|
|
94
|
-
ownerState?.size || "small",
|
|
95
|
-
"action",
|
|
96
|
-
(size) => {
|
|
97
|
-
return {
|
|
98
|
-
width: size
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
94
|
)
|
|
102
|
-
},
|
|
103
|
-
"&.radioSkeletonInlineText": {
|
|
104
|
-
width: theme.vars.size.baseSpacings.sp12,
|
|
105
|
-
borderRadius: theme.vars.size.borderRadius.r1,
|
|
106
|
-
...getSizeStyles(theme, ownerState?.size || "medium", "base"),
|
|
107
|
-
...getSizeStyles(theme, ownerState?.size || "small", "base")
|
|
108
95
|
}
|
|
109
96
|
};
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Estilos para el inline-text del RadioButton 📝
|
|
113
|
-
*/
|
|
114
|
-
typographyStyled: {},
|
|
115
|
-
/**
|
|
116
|
-
* El estilado de este slot, se hace en muiRadio, debido a que el input absorbe los pseudo selectores, entonces hay que hacerlos desde el nodo padre. 🟨
|
|
117
|
-
*/
|
|
118
|
-
icon: {},
|
|
119
|
-
/**
|
|
120
|
-
* El estilado de este slot, se hace en muiRadio, debido a que el input absorbe los pseudo selectores, entonces hay que hacerlos desde el nodo padre. 🟨
|
|
121
|
-
*/
|
|
122
|
-
iconChecked: {}
|
|
97
|
+
}
|
|
123
98
|
};
|
|
124
99
|
export {
|
|
125
100
|
radioButtonStyles as r
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { R as RadioSlots } from "./slots/slots.js";
|
|
3
|
+
const RADIO_KEY_COMPONENT = "M4LRadio";
|
|
4
|
+
const RADIO_CLASSES = getComponentClasses(RADIO_KEY_COMPONENT, RadioSlots);
|
|
5
|
+
export {
|
|
6
|
+
RADIO_CLASSES as R,
|
|
7
|
+
RADIO_KEY_COMPONENT as a
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Radio } from './Radio';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var RadioSlots = /* @__PURE__ */ ((RadioSlots2) => {
|
|
2
|
+
RadioSlots2["root"] = "root";
|
|
3
|
+
RadioSlots2["muiRadio"] = "muiRadio";
|
|
4
|
+
RadioSlots2["skeleton"] = "skeleton";
|
|
5
|
+
RadioSlots2["inlineText"] = "inlineText";
|
|
6
|
+
return RadioSlots2;
|
|
7
|
+
})(RadioSlots || {});
|
|
8
|
+
export {
|
|
9
|
+
RadioSlots as R
|
|
10
|
+
};
|
package/components/mui_extended/{RadioButton/slots/RadioButtonSlots.d.ts → Radio/slots/styled.d.ts}
RENAMED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
ownerState?: (Partial<import('../types').
|
|
1
|
+
export declare const RadioRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('../types').RadioOwnerState> & Record<string, unknown>) | undefined;
|
|
3
3
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
4
|
export declare const MUIRadioStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').RadioProps, keyof import('@mui/material').RadioProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
|
-
ownerState?: (Partial<import('../types').
|
|
5
|
+
ownerState?: (Partial<import('../types').RadioOwnerState> & Record<string, unknown>) | undefined;
|
|
6
6
|
}, {}, {}>;
|
|
7
|
-
export declare const
|
|
8
|
-
ownerState?: (Partial<import('../types').
|
|
7
|
+
export declare const InlineTextStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../Typography/types').TypographyProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>, "size" | "children" | "title" | "component" | "zIndex" | "id" | "disabled" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "variant" | "color" | "dataTestid" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "className" | "style" | "classes" | "sx" | "p" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "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" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "htmlFor" | "gutterBottom" | "noWrap" | "variantMapping" | "skeletonWidth" | "skeletonRows" | "ellipsis" | keyof import('react').RefAttributes<HTMLSpanElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
8
|
+
ownerState?: (Partial<import('../types').RadioOwnerState> & Record<string, unknown>) | undefined;
|
|
9
9
|
}, {}, {}>;
|
|
10
10
|
export declare const SkeletonStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').SkeletonOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
11
11
|
ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
|
|
12
12
|
}, "children" | "variant" | "height" | "width" | "animation" | "className" | "style" | "classes" | "sx">, "children" | "ref" | "title" | "id" | "variant" | "color" | "content" | "height" | "translate" | "width" | "animation" | "className" | "style" | "classes" | "sx" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "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"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
13
|
-
ownerState?: (Partial<import('../types').
|
|
14
|
-
}, {}, {}>;
|
|
15
|
-
export declare const IconCheckedStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Icon').IconProps, keyof import('../../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
16
|
-
ownerState?: (Partial<import('../types').RadioButtonOwnerState> & Record<string, unknown>) | undefined;
|
|
17
|
-
}, {}, {}>;
|
|
18
|
-
export declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Icon').IconProps, keyof import('../../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
19
|
-
ownerState?: (Partial<import('../types').RadioButtonOwnerState> & Record<string, unknown>) | undefined;
|
|
13
|
+
ownerState?: (Partial<import('../types').RadioOwnerState> & Record<string, unknown>) | undefined;
|
|
20
14
|
}, {}, {}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { Radio, Skeleton } from "@mui/material";
|
|
3
|
+
import { R as RadioSlots } from "./slots.js";
|
|
4
|
+
import { a as RADIO_KEY_COMPONENT } from "../constants.js";
|
|
5
|
+
import { r as radioButtonStyles } from "../Radio.styles.js";
|
|
6
|
+
import { T as Typography } from "../../Typography/Typography.js";
|
|
7
|
+
const RadioRootStyled = styled("div", {
|
|
8
|
+
name: RADIO_KEY_COMPONENT,
|
|
9
|
+
slot: RadioSlots.root
|
|
10
|
+
})(radioButtonStyles.root);
|
|
11
|
+
const MUIRadioStyled = styled(Radio, {
|
|
12
|
+
name: RADIO_KEY_COMPONENT,
|
|
13
|
+
slot: RadioSlots.muiRadio
|
|
14
|
+
})(radioButtonStyles.muiRadio);
|
|
15
|
+
const InlineTextStyled = styled(Typography, {
|
|
16
|
+
name: RADIO_KEY_COMPONENT,
|
|
17
|
+
slot: RadioSlots.inlineText
|
|
18
|
+
})(radioButtonStyles.inlineText);
|
|
19
|
+
const SkeletonStyled = styled(Skeleton, {
|
|
20
|
+
name: RADIO_KEY_COMPONENT,
|
|
21
|
+
slot: RadioSlots.skeleton
|
|
22
|
+
})(radioButtonStyles.skeleton);
|
|
23
|
+
export {
|
|
24
|
+
InlineTextStyled as I,
|
|
25
|
+
MUIRadioStyled as M,
|
|
26
|
+
RadioRootStyled as R,
|
|
27
|
+
SkeletonStyled as S
|
|
28
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { RadioProps as MUIRadioProps, Theme } from '@mui/material';
|
|
2
|
+
import { RadioSlots } from './slots/slots';
|
|
3
|
+
import { ComponentPalletColor, Sizes } from '@m4l/styles';
|
|
4
|
+
import { M4LOverridesStyleRules } from '../../../@types/augmentations';
|
|
5
|
+
import { RADIO_KEY_COMPONENT } from './constants';
|
|
6
|
+
export interface RadioProps extends MUIRadioProps {
|
|
7
|
+
/**
|
|
8
|
+
* El texto que se muestra junto al radio button
|
|
9
|
+
*/
|
|
10
|
+
inlineText?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Tamaño
|
|
13
|
+
*/
|
|
14
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
15
|
+
/**
|
|
16
|
+
* Color
|
|
17
|
+
*/
|
|
18
|
+
color?: Extract<ComponentPalletColor, 'default'>;
|
|
19
|
+
/**
|
|
20
|
+
* Indica si hay un error en el Radio.
|
|
21
|
+
*/
|
|
22
|
+
error?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface RadioOwnerState {
|
|
25
|
+
/**
|
|
26
|
+
* Indica si el Radio está marcado.
|
|
27
|
+
*/
|
|
28
|
+
checked?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Indica si el Radio está deshabilitado.
|
|
31
|
+
*/
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* El tamaño del Radio.
|
|
35
|
+
*/
|
|
36
|
+
size: Extract<Sizes, 'small' | 'medium'>;
|
|
37
|
+
/**
|
|
38
|
+
* El color del Radio.
|
|
39
|
+
*/
|
|
40
|
+
color: Extract<ComponentPalletColor, 'default'>;
|
|
41
|
+
/**
|
|
42
|
+
* Indica si hay un error en el Radio.
|
|
43
|
+
*/
|
|
44
|
+
error?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Tipos de slots de Radio
|
|
48
|
+
*/
|
|
49
|
+
export type RadioSlotsType = keyof typeof RadioSlots;
|
|
50
|
+
/**
|
|
51
|
+
* Estilos del Radio
|
|
52
|
+
*/
|
|
53
|
+
export type RadioStyles = M4LOverridesStyleRules<RadioSlotsType, typeof RADIO_KEY_COMPONENT, Theme>;
|
|
@@ -2,4 +2,4 @@ import { StackProps } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Stack es un componente contenedor para organizar elementos vertical u horizontalmente.
|
|
4
4
|
*/
|
|
5
|
-
export declare const Stack: (
|
|
5
|
+
export declare const Stack: import('react').ForwardRefExoticComponent<Omit<StackProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
2
3
|
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
3
4
|
import { S as STACK_KEY_COMPONENT } from "./constant.js";
|
|
4
5
|
import { M as MUISTackRootStyled } from "./slots/StackSlot.js";
|
|
5
6
|
import { S as StackSlots } from "./slots/StackEnum.js";
|
|
6
|
-
const Stack = (props) => {
|
|
7
|
+
const Stack = forwardRef((props, ref) => {
|
|
7
8
|
const {
|
|
8
9
|
children,
|
|
9
10
|
flexDirection,
|
|
@@ -15,6 +16,7 @@ const Stack = (props) => {
|
|
|
15
16
|
return /* @__PURE__ */ jsx(
|
|
16
17
|
MUISTackRootStyled,
|
|
17
18
|
{
|
|
19
|
+
ref,
|
|
18
20
|
ownerState: { ...width && { width }, ...height && { height } },
|
|
19
21
|
flexDirection,
|
|
20
22
|
...getPropDataTestId(STACK_KEY_COMPONENT, StackSlots.root, dataTestId),
|
|
@@ -22,7 +24,8 @@ const Stack = (props) => {
|
|
|
22
24
|
children
|
|
23
25
|
}
|
|
24
26
|
);
|
|
25
|
-
};
|
|
27
|
+
});
|
|
28
|
+
Stack.displayName = "Stack";
|
|
26
29
|
export {
|
|
27
30
|
Stack as S
|
|
28
31
|
};
|
|
@@ -8,7 +8,7 @@ export { Breadcrumbs } from './Breadcrumbs';
|
|
|
8
8
|
export type { TLink } from './Breadcrumbs/types';
|
|
9
9
|
export * from './Button/Button';
|
|
10
10
|
export * from './CheckBox';
|
|
11
|
-
export * from './
|
|
11
|
+
export * from './Radio';
|
|
12
12
|
export { CircularProgress } from './CircularProgress';
|
|
13
13
|
export { Badge } from './Badge';
|
|
14
14
|
export * from './ImageButton/ImageButton';
|