@m4l/components 9.1.76 → 9.1.78
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 +11 -2
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index.js +1 -1
- package/components/HelperError/HelperError.d.ts +1 -1
- package/components/HelperError/HelperError.js +16 -21
- package/components/HelperError/HelperError.styles.js +25 -15
- package/components/HelperError/constant.d.ts +0 -1
- package/components/HelperError/constant.js +0 -2
- package/components/HelperError/slots/HelperErrorSlots.js +2 -1
- package/components/HelperError/types.d.ts +6 -10
- package/components/Label/Label.js +1 -1
- package/components/Label/Label.styles.js +62 -19
- package/components/Label/types.d.ts +1 -0
- package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.d.ts +53 -0
- package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.js +54 -0
- package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.styles.d.ts +2 -0
- package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.styles.js +11 -0
- package/components/formatters/UncertaintyFormatter/constants.d.ts +1 -0
- package/components/formatters/UncertaintyFormatter/constants.js +4 -0
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterEnum.d.ts +3 -0
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterEnum.js +7 -0
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterSlots.d.ts +1 -0
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterSlots.js +12 -0
- package/components/formatters/UncertaintyFormatter/tests/UncertaintyFormatter.test.d.ts +1 -0
- package/components/formatters/UncertaintyFormatter/types.d.ts +45 -1
- package/components/formatters/index.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/RHFCheckBox.styles.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/RHFCheckBox.styles.js +31 -0
- package/components/hook-form/RHFCheckbox/RHFCheckbox.d.ts +2 -2
- package/components/hook-form/RHFCheckbox/RHFCheckbox.js +57 -67
- package/components/hook-form/RHFCheckbox/constants.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/constants.js +7 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxEnum.d.ts +6 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxEnum.js +10 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +4 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.js +28 -0
- package/components/hook-form/RHFCheckbox/slots/index.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/types.d.ts +33 -5
- package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.js +1 -1
- package/components/mui_extended/CheckBox/CheckBox.d.ts +2 -2
- package/components/mui_extended/CheckBox/CheckBox.js +4 -3
- package/components/mui_extended/CheckBox/CheckBox.styles.js +64 -15
- package/components/mui_extended/CheckBox/types.d.ts +31 -6
- package/index.js +1 -1
- package/package.json +1 -1
- package/components/HelperError/HelperError.stories.d.ts +0 -13
- package/components/formatters/UncertaintyFormatter/index.d.ts +0 -9
- package/components/formatters/UncertaintyFormatter/index.js +0 -29
- package/components/hook-form/RHFCheckbox/classes/index.d.ts +0 -12
- package/components/hook-form/RHFCheckbox/classes/index.js +0 -44
- package/components/hook-form/RHFCheckbox/classes/types.d.ts +0 -12
- package/components/hook-form/RHFCheckbox/styles.d.ts +0 -6
- package/components/hook-form/RHFCheckbox/styles.js +0 -24
- package/components/hook-form/RHFCheckbox/test/constants.d.ts +0 -4
- package/components/hook-form/RHFCheckbox/test/constants.js +0 -4
- package/components/hook-form/RHFCheckbox/test/utils.d.ts +0 -2
- package/components/hook-form/RHFCheckbox/test/utils.js +0 -7
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const rhfCheckBoxStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Estilo raíz del componente 🏠
|
|
4
|
+
* @param {object} theme - El tema de MUI.
|
|
5
|
+
* @returns {object} - Los estilos aplicados al root del componente.
|
|
6
|
+
*/
|
|
7
|
+
root: ({ theme }) => ({
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: "column",
|
|
10
|
+
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
11
|
+
}),
|
|
12
|
+
/**
|
|
13
|
+
* Estilo del CheckBox ✅
|
|
14
|
+
*/
|
|
15
|
+
checkBox: {},
|
|
16
|
+
/**
|
|
17
|
+
* Estilo del Label de Checkbox 🏷️
|
|
18
|
+
* @returns {object} - Los estilos aplicados al Label del Checkbox.
|
|
19
|
+
*/
|
|
20
|
+
labelComponent: () => ({}),
|
|
21
|
+
/**
|
|
22
|
+
* Estilo del contenedor de Typography del CheckBox 📝
|
|
23
|
+
* @returns {object} - Los estilos aplicados al contenedor de Typography del CheckBox.
|
|
24
|
+
*/
|
|
25
|
+
containerCheckTypography: () => ({
|
|
26
|
+
"&.MuiSkeleton-root": {}
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
rhfCheckBoxStyles as r
|
|
31
|
+
};
|
|
@@ -5,6 +5,6 @@ import { RHFCheckboxProps } from './types';
|
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* El RHFCheckbox es un componente de checkbox que se integra con react-hook-form para manejar formularios en React. Proporciona características adicionales como validación, mensajes de ayuda, y soporte para un estado de esqueleto. Es útil para asegurar que los formularios sean manejados de manera eficiente y consistente, con una experiencia de usuario mejorada.
|
|
9
9
|
*/
|
|
10
|
-
export declare
|
|
10
|
+
export declare const RHFCheckbox: import('react').ForwardRefExoticComponent<Omit<RHFCheckboxProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,89 +1,79 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useId } from "react";
|
|
2
3
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
|
-
import { R as RHFCheckboxRoot, C as ContainerCheckTypography } from "./
|
|
4
|
-
import { u as
|
|
5
|
-
import { g as getNameDataTestId } from "./test/utils.js";
|
|
6
|
-
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.js";
|
|
7
|
-
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
8
|
-
import { u as useFormFocus } from "../../../hooks/useFormFocus/index.js";
|
|
9
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
10
|
-
import { C as CheckBox } from "../../mui_extended/CheckBox/CheckBox.js";
|
|
4
|
+
import { R as RHFCheckboxRoot, L as LabelComponent, C as ContainerCheckTypography, a as CheckBoxStyled } from "./slots/RHFCheckBoxSlots.js";
|
|
5
|
+
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
11
6
|
import { H as HelperError } from "../../HelperError/HelperError.js";
|
|
12
|
-
|
|
7
|
+
const RHFCheckbox = forwardRef(function RHFCheckbox2(props, ref) {
|
|
13
8
|
const {
|
|
14
9
|
name,
|
|
15
|
-
|
|
10
|
+
size = "medium",
|
|
16
11
|
label,
|
|
17
12
|
disabled = false,
|
|
18
13
|
mandatory,
|
|
14
|
+
id,
|
|
19
15
|
mandatoryMessage,
|
|
20
|
-
helperMessage
|
|
16
|
+
helperMessage,
|
|
17
|
+
inlineText,
|
|
18
|
+
helperText
|
|
21
19
|
} = props;
|
|
22
20
|
const {
|
|
23
21
|
control,
|
|
24
22
|
formState: { errors }
|
|
25
23
|
} = useFormContext();
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const isDesktop = useResponsiveDesktop();
|
|
24
|
+
const { currentSize } = useComponentSize(size);
|
|
25
|
+
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
29
26
|
const ownerState = {
|
|
30
|
-
isFocus: !isSkeleton ? isFocus : false,
|
|
31
|
-
isTabSelected: !isSkeleton ? isTabSelected : false,
|
|
32
|
-
sizeCheck: !isDesktop ? "medium" : sizeCheck,
|
|
33
27
|
disabled,
|
|
34
|
-
error: errors[name] ? true : false
|
|
28
|
+
error: errors[name] ? true : false,
|
|
29
|
+
name,
|
|
30
|
+
size: adjustedSize,
|
|
31
|
+
paletteColor: "default"
|
|
35
32
|
};
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
helperMessage,
|
|
73
|
-
htmlFor: name
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
error?.message && /* @__PURE__ */ jsx(HelperError, { message: error?.message + "" })
|
|
79
|
-
] });
|
|
33
|
+
const htmlForId = useId();
|
|
34
|
+
const hookId = useId();
|
|
35
|
+
const finalId = id || hookId;
|
|
36
|
+
return /* @__PURE__ */ jsx(RHFCheckboxRoot, { ownerState, children: /* @__PURE__ */ jsx(
|
|
37
|
+
Controller,
|
|
38
|
+
{
|
|
39
|
+
name,
|
|
40
|
+
control,
|
|
41
|
+
render: ({ field: { onChange, value }, fieldState: { error } }) => {
|
|
42
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
LabelComponent,
|
|
45
|
+
{
|
|
46
|
+
ownerState: { ...ownerState },
|
|
47
|
+
size: adjustedSize,
|
|
48
|
+
label: label || "",
|
|
49
|
+
mandatory,
|
|
50
|
+
mandatoryMessage,
|
|
51
|
+
helperMessage,
|
|
52
|
+
helperText
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ jsx(ContainerCheckTypography, { children: /* @__PURE__ */ jsx(
|
|
56
|
+
CheckBoxStyled,
|
|
57
|
+
{
|
|
58
|
+
ownerState: { ownerState, error: !!error },
|
|
59
|
+
size: adjustedSize,
|
|
60
|
+
onChange,
|
|
61
|
+
checked: value,
|
|
62
|
+
disabled: disabled ? true : false,
|
|
63
|
+
disableRipple: true,
|
|
64
|
+
inlineText,
|
|
65
|
+
htmlFor: finalId,
|
|
66
|
+
error: !!error,
|
|
67
|
+
id: htmlForId,
|
|
68
|
+
ref
|
|
80
69
|
}
|
|
81
|
-
}
|
|
82
|
-
|
|
70
|
+
) }),
|
|
71
|
+
error?.message && /* @__PURE__ */ jsx(HelperError, { htmlFor: htmlForId, size: adjustedSize, message: error?.message + "" })
|
|
72
|
+
] });
|
|
83
73
|
}
|
|
84
|
-
|
|
85
|
-
);
|
|
86
|
-
}
|
|
74
|
+
}
|
|
75
|
+
) });
|
|
76
|
+
});
|
|
87
77
|
export {
|
|
88
78
|
RHFCheckbox as R
|
|
89
79
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { R as RHFCheckBoxSlots } from "./slots/RHFCheckBoxEnum.js";
|
|
3
|
+
const RHF_CHECKBOX_KEY_COMPONENT = "M4LRHFCheckbox";
|
|
4
|
+
getComponentClasses(RHF_CHECKBOX_KEY_COMPONENT, RHFCheckBoxSlots);
|
|
5
|
+
export {
|
|
6
|
+
RHF_CHECKBOX_KEY_COMPONENT as R
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var RHFCheckBoxSlots = /* @__PURE__ */ ((RHFCheckBoxSlots2) => {
|
|
2
|
+
RHFCheckBoxSlots2["root"] = "root";
|
|
3
|
+
RHFCheckBoxSlots2["checkBox"] = "checkBox";
|
|
4
|
+
RHFCheckBoxSlots2["containerCheckTypography"] = "containerCheckTypography";
|
|
5
|
+
RHFCheckBoxSlots2["labelComponent"] = "labelComponent";
|
|
6
|
+
return RHFCheckBoxSlots2;
|
|
7
|
+
})(RHFCheckBoxSlots || {});
|
|
8
|
+
export {
|
|
9
|
+
RHFCheckBoxSlots as R
|
|
10
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const RHFCheckboxRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
2
|
+
export declare const CheckBoxStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../mui_extended/CheckBox/types').CheckboxProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "children" | "value" | "title" | "component" | "size" | "name" | "error" | "id" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "mandatory" | "disabled" | "translate" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "form" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "checked" | "readOnly" | "required" | "htmlFor" | "skeletonWidth" | keyof import('react').RefAttributes<HTMLButtonElement> | "indeterminate" | "helperText" | "inputProps" | "inputRef" | "helperMessage" | "mandatoryMessage" | "checkedIcon" | "indeterminateIcon" | "inlineText"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
|
|
3
|
+
export declare const ContainerCheckTypography: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
4
|
+
export declare const LabelComponent: import('@emotion/styled').StyledComponent<Pick<import('../../../Label/types').LabelProps, keyof import('../../../Label/types').LabelProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { r as rhfCheckBoxStyles } from "../RHFCheckBox.styles.js";
|
|
3
|
+
import { R as RHFCheckBoxSlots } from "./RHFCheckBoxEnum.js";
|
|
4
|
+
import { R as RHF_CHECKBOX_KEY_COMPONENT } from "../constants.js";
|
|
5
|
+
import { C as CheckBox } from "../../../mui_extended/CheckBox/CheckBox.js";
|
|
6
|
+
import { L as Label } from "../../../Label/Label.js";
|
|
7
|
+
const RHFCheckboxRoot = styled("div", {
|
|
8
|
+
name: RHF_CHECKBOX_KEY_COMPONENT,
|
|
9
|
+
slot: RHFCheckBoxSlots.root
|
|
10
|
+
})(rhfCheckBoxStyles?.root);
|
|
11
|
+
const CheckBoxStyled = styled(CheckBox, {
|
|
12
|
+
name: RHF_CHECKBOX_KEY_COMPONENT,
|
|
13
|
+
slot: RHFCheckBoxSlots.checkBox
|
|
14
|
+
})(rhfCheckBoxStyles?.checkBox);
|
|
15
|
+
const ContainerCheckTypography = styled("div", {
|
|
16
|
+
name: RHF_CHECKBOX_KEY_COMPONENT,
|
|
17
|
+
slot: RHFCheckBoxSlots.containerCheckTypography
|
|
18
|
+
})(rhfCheckBoxStyles?.containerCheckTypography);
|
|
19
|
+
const LabelComponent = styled(Label, {
|
|
20
|
+
name: RHF_CHECKBOX_KEY_COMPONENT,
|
|
21
|
+
slot: RHFCheckBoxSlots.labelComponent
|
|
22
|
+
})(rhfCheckBoxStyles?.labelComponent);
|
|
23
|
+
export {
|
|
24
|
+
ContainerCheckTypography as C,
|
|
25
|
+
LabelComponent as L,
|
|
26
|
+
RHFCheckboxRoot as R,
|
|
27
|
+
CheckBoxStyled as a
|
|
28
|
+
};
|
|
@@ -1,16 +1,44 @@
|
|
|
1
1
|
import { FormControlLabelProps } from '@mui/material';
|
|
2
2
|
import { LabelProps } from '../../Label/types';
|
|
3
|
+
import { ComponentPalletColor } from '@m4l/styles';
|
|
4
|
+
import { RHFCheckBoxSlots } from './slots';
|
|
5
|
+
import { Theme } from '@mui/material/styles';
|
|
6
|
+
import { RHF_CHECKBOX_KEY_COMPONENT } from './constants';
|
|
7
|
+
import { M4LOverridesStyleRules } from '../../../@types/augmentations';
|
|
8
|
+
/** Propiedades del componente RHFCheckbox. */
|
|
3
9
|
export interface RHFCheckboxProps extends Omit<FormControlLabelProps, 'control' | 'label'>, Omit<LabelProps, 'label'> {
|
|
10
|
+
/** El nombre del campo de formulario. */
|
|
4
11
|
name: string;
|
|
12
|
+
/** El tamaño del CheckBox. */
|
|
5
13
|
sizeCheck?: 'small' | 'medium';
|
|
14
|
+
/** La etiqueta de texto principal del componente. */
|
|
6
15
|
label?: string;
|
|
16
|
+
/** Indica si hay un error en el campo asociado al CheckBox. */
|
|
17
|
+
error?: boolean;
|
|
18
|
+
/** El texto que se muestra en línea con el CheckBox. */
|
|
19
|
+
inlineText?: string;
|
|
20
|
+
/** El tamaño del CheckBox. */
|
|
21
|
+
size?: 'small' | 'medium';
|
|
22
|
+
/** Texto de ayuda adicional. */
|
|
23
|
+
helperText?: string;
|
|
7
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Propiedades del componente RHFMultiCheckbox.
|
|
27
|
+
*/
|
|
8
28
|
export interface RHFMultiCheckboxProps extends Omit<FormControlLabelProps, 'control' | 'label'> {
|
|
9
29
|
name: string;
|
|
10
30
|
options: string[];
|
|
11
31
|
}
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
32
|
+
export type RHFCheckBoxOwnerState = RHFCheckboxProps & {
|
|
33
|
+
paletteColor: ComponentPalletColor;
|
|
34
|
+
error?: boolean;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Tipos de slots del RHFCheckBox.
|
|
39
|
+
*/
|
|
40
|
+
export type RHFCheckBoxSlotsType = keyof typeof RHFCheckBoxSlots;
|
|
41
|
+
/**
|
|
42
|
+
* Estilos del RHFCheckBox.
|
|
43
|
+
*/
|
|
44
|
+
export type RHFCheckBoxStyles = M4LOverridesStyleRules<RHFCheckBoxSlotsType, typeof RHF_CHECKBOX_KEY_COMPONENT, Theme>;
|
|
@@ -17,4 +17,4 @@ export declare const SelectStyled: import('@emotion/styled').StyledComponent<Pic
|
|
|
17
17
|
* Elemento HelperError construido a través de styled,
|
|
18
18
|
* sirve para mostrar el mensaje de error del componente `RHFSelect`
|
|
19
19
|
*/
|
|
20
|
-
export declare const HelperErrorStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../HelperError').HelperErrorProps
|
|
20
|
+
export declare const HelperErrorStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../HelperError').HelperErrorProps & import('react').RefAttributes<HTMLLabelElement>, keyof import('../../../HelperError').HelperErrorProps | keyof import('react').RefAttributes<HTMLLabelElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown>, {}, {}>;
|
|
@@ -7,6 +7,6 @@ export declare const LabelStyled: import('@emotion/styled').StyledComponent<Pick
|
|
|
7
7
|
export declare const TextFieldStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../mui_extended/TextField/types').TextFieldProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "children" | "value" | "title" | "component" | "size" | "name" | "error" | "select" | "rows" | "id" | "type" | "hidden" | "content" | "style" | "disabled" | "variant" | "margin" | "translate" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "label" | keyof import('react').RefAttributes<HTMLDivElement> | "autoComplete" | "placeholder" | "required" | "dataTestId" | "maxRows" | "fullWidth" | "focused" | "hiddenLabel" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "inputProps" | "inputRef" | "multiline" | "minRows" | "SelectProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
|
|
8
8
|
ownerState: Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown>;
|
|
9
9
|
}, {}, {}>;
|
|
10
|
-
export declare const HelperErrorStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../HelperError').HelperErrorProps
|
|
10
|
+
export declare const HelperErrorStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../HelperError').HelperErrorProps & import('react').RefAttributes<HTMLLabelElement>, keyof import('../../../HelperError').HelperErrorProps | keyof import('react').RefAttributes<HTMLLabelElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
|
|
11
11
|
ownerState: Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown>;
|
|
12
12
|
}, {}, {}>;
|
|
@@ -7,9 +7,9 @@ import { u as useStateRef } from "../../../../../../../../../../../../hooks/useS
|
|
|
7
7
|
import { m as mapClasses } from "../../../../../../../../classes/index.js";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
import { M as MAP_ICONS } from "../../../../../../../../icons.js";
|
|
10
|
-
import { C as CheckBox } from "../../../../../../../../../../../mui_extended/CheckBox/CheckBox.js";
|
|
11
10
|
import { u as useMapStore } from "../../../../../../../../hooks/useMapStore/index.js";
|
|
12
11
|
import { I as Icon } from "../../../../../../../../../../../Icon/Icon.js";
|
|
12
|
+
import { C as CheckBox } from "../../../../../../../../../../../mui_extended/CheckBox/CheckBox.js";
|
|
13
13
|
function MapSourcesTool() {
|
|
14
14
|
const { getLabel } = useModuleDictionary();
|
|
15
15
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CheckboxProps } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* Componente CheckBox
|
|
3
|
+
* Componente CheckBox 🟦
|
|
4
4
|
*
|
|
5
5
|
* Este componente representa un checkbox personalizado que puede ser utilizado en formularios y otros lugares donde se necesite una opción de selección.
|
|
6
6
|
* @param {CheckboxProps} props - Las propiedades del componente.
|
|
7
|
-
* @param {React.Ref<
|
|
7
|
+
* @param {React.Ref<HTMLButtonElement>} ref - La referencia al elemento raíz del componente.
|
|
8
8
|
* @returns {JSX.Element} El componente CheckBox renderizado.
|
|
9
9
|
* @example
|
|
10
10
|
* ```tsx
|
|
@@ -7,7 +7,7 @@ import clsx from "clsx";
|
|
|
7
7
|
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
8
8
|
import { C as CheckBoxRootStyled, M as MUICheckboxStyled, I as IconCheckedStyled, a as IconStyled, T as TypographyStyled, S as SkeletonStyled } from "./slots/CheckBoxSlots.js";
|
|
9
9
|
import { C as CheckBoxSlots } from "./slots/CheckBoxEnum.js";
|
|
10
|
-
const CheckBox = forwardRef((props) => {
|
|
10
|
+
const CheckBox = forwardRef((props, ref) => {
|
|
11
11
|
const {
|
|
12
12
|
className,
|
|
13
13
|
size = "medium",
|
|
@@ -43,6 +43,7 @@ const CheckBox = forwardRef((props) => {
|
|
|
43
43
|
/* @__PURE__ */ jsx(
|
|
44
44
|
MUICheckboxStyled,
|
|
45
45
|
{
|
|
46
|
+
ref,
|
|
46
47
|
ownerState: { ...ownerState },
|
|
47
48
|
disableRipple: true,
|
|
48
49
|
id: finalId,
|
|
@@ -67,8 +68,8 @@ const CheckBox = forwardRef((props) => {
|
|
|
67
68
|
}
|
|
68
69
|
)
|
|
69
70
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70
|
-
/* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "rounded",
|
|
71
|
-
inlineText ? /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "
|
|
71
|
+
/* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "rounded", className: "checkSkeleton" }),
|
|
72
|
+
inlineText ? /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "rectangular", className: "checkSkeletonInlineText" }) : null
|
|
72
73
|
] }) });
|
|
73
74
|
});
|
|
74
75
|
export {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { g as getHeightSizeStyles } from "../../../utils/getHeightSizeStyles.js";
|
|
1
2
|
const checkBoxStyles = {
|
|
2
3
|
/**
|
|
3
|
-
* Estilos generales para el checkbox
|
|
4
|
+
* Estilos generales para el checkbox 🟦
|
|
5
|
+
* @param {object} theme - El tema de MUI.
|
|
6
|
+
* @returns {object} - Los estilos aplicados al root del checkbox.
|
|
4
7
|
*/
|
|
5
8
|
root: ({ theme }) => {
|
|
6
9
|
return {
|
|
@@ -11,11 +14,13 @@ const checkBoxStyles = {
|
|
|
11
14
|
overflow: "visible",
|
|
12
15
|
boxSizing: "border-box",
|
|
13
16
|
gap: theme.vars.size.baseSpacings.sp1
|
|
14
|
-
// height: theme.vars.size[device][size].action,
|
|
15
17
|
};
|
|
16
18
|
},
|
|
17
19
|
/**
|
|
18
|
-
* Componente MuiCheckBox, FocusVisible para cuando
|
|
20
|
+
* Componente MuiCheckBox, FocusVisible para cuando está seleccionado el CheckBox 🟩
|
|
21
|
+
* @param {object} theme - El tema de MUI.
|
|
22
|
+
* @param {object} ownerState - El estado del componente.
|
|
23
|
+
* @returns {object} - Los estilos aplicados al MuiCheckBox.
|
|
19
24
|
*/
|
|
20
25
|
muiCheckBox: ({ theme, ownerState }) => {
|
|
21
26
|
const color = ownerState.error ? "error" : "primary";
|
|
@@ -51,7 +56,7 @@ const checkBoxStyles = {
|
|
|
51
56
|
outline: `1px solid ${theme.vars.palette["primary"].focusVisible}`,
|
|
52
57
|
outlineOffset: 2
|
|
53
58
|
},
|
|
54
|
-
// Historia Disabled para CheckBox
|
|
59
|
+
// Historia Disabled para CheckBox 😶🌫️
|
|
55
60
|
...ownerState.disabled && {
|
|
56
61
|
pointerEvents: ownerState.disabled ? "none" : "auto",
|
|
57
62
|
"&:hover": {
|
|
@@ -61,24 +66,68 @@ const checkBoxStyles = {
|
|
|
61
66
|
};
|
|
62
67
|
},
|
|
63
68
|
/**
|
|
64
|
-
* Estilos para el inline-text del CheckBox
|
|
69
|
+
* Estilos para el inline-text del CheckBox 📝
|
|
70
|
+
* @param {object} theme - El tema de MUI.
|
|
71
|
+
* @param {object} ownerState - El estado del componente.
|
|
72
|
+
* @returns {object} - Los estilos aplicados al skeletonStyled.
|
|
65
73
|
*/
|
|
66
|
-
skeletonStyled: ({ theme }) =>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
skeletonStyled: ({ theme, ownerState }) => {
|
|
75
|
+
const device = theme.generalSettings.isMobile ? "mobile" : "desktop";
|
|
76
|
+
const size = ownerState.size ?? "medium";
|
|
77
|
+
return {
|
|
78
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
79
|
+
backgroundColor: theme.vars.palette?.skeleton.transition,
|
|
80
|
+
"&.checkSkeleton": {
|
|
81
|
+
width: theme.vars.size[device][size].action,
|
|
82
|
+
...getHeightSizeStyles(
|
|
83
|
+
theme.generalSettings.isMobile,
|
|
84
|
+
ownerState.size || "medium",
|
|
85
|
+
"action",
|
|
86
|
+
(val) => {
|
|
87
|
+
return {
|
|
88
|
+
width: val
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
...getHeightSizeStyles(
|
|
93
|
+
theme.generalSettings.isMobile,
|
|
94
|
+
ownerState.size || "small",
|
|
95
|
+
"action",
|
|
96
|
+
(val) => {
|
|
97
|
+
return {
|
|
98
|
+
width: val
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
},
|
|
103
|
+
"&.checkSkeletonInlineText": {
|
|
104
|
+
width: theme.vars.size.baseSpacings.sp12,
|
|
105
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
106
|
+
...getHeightSizeStyles(
|
|
107
|
+
theme.generalSettings.isMobile,
|
|
108
|
+
ownerState.size || "medium",
|
|
109
|
+
"base"
|
|
110
|
+
),
|
|
111
|
+
...getHeightSizeStyles(
|
|
112
|
+
theme.generalSettings.isMobile,
|
|
113
|
+
ownerState.size || "small",
|
|
114
|
+
"base"
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
},
|
|
70
119
|
/**
|
|
71
|
-
*
|
|
120
|
+
* Estilos para el inline-text del CheckBox 📝
|
|
72
121
|
*/
|
|
73
|
-
|
|
122
|
+
typographyStyled: {},
|
|
74
123
|
/**
|
|
75
|
-
* El estilado de este slot, se hace en muiCheckBox, debido a que el input
|
|
124
|
+
* El estilado de este slot, se hace en muiCheckBox, debido a que el input absorbe los pseudo selectores, entonces hay que hacerlos desde el nodo padre. 🟨
|
|
76
125
|
*/
|
|
77
|
-
|
|
126
|
+
icon: {},
|
|
78
127
|
/**
|
|
79
|
-
*
|
|
128
|
+
* El estilado de este slot, se hace en muiCheckBox, debido a que el input absorbe los pseudo selectores, entonces hay que hacerlos desde el nodo padre. 🟨
|
|
80
129
|
*/
|
|
81
|
-
|
|
130
|
+
iconChecked: {}
|
|
82
131
|
};
|
|
83
132
|
export {
|
|
84
133
|
checkBoxStyles as c
|
|
@@ -4,37 +4,62 @@ import { ComponentPalletColor, Sizes } from '@m4l/styles';
|
|
|
4
4
|
import { CheckBoxSlots } from './slots';
|
|
5
5
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
6
6
|
import { CHECK_BOX_KEY_COMPONENT } from './constants';
|
|
7
|
+
/**
|
|
8
|
+
* Propiedades del estado del propietario del CheckBox.
|
|
9
|
+
* size - El tamaño del CheckBox.
|
|
10
|
+
* disabled - Indica si el CheckBox está deshabilitado.
|
|
11
|
+
*/
|
|
7
12
|
export type OwnerState = Pick<CheckboxProps, 'size' | 'disabled'>;
|
|
8
13
|
/**
|
|
9
|
-
*
|
|
14
|
+
* Variantes para el componente CheckBox.
|
|
10
15
|
*/
|
|
11
16
|
export type CheckBoxVariants = 'standard';
|
|
17
|
+
/**
|
|
18
|
+
* Propiedades del componente CheckBox.
|
|
19
|
+
* [size] - El tamaño del CheckBox.
|
|
20
|
+
* [color] - El color del CheckBox.
|
|
21
|
+
* [inlineText] - El texto que se muestra en línea con el CheckBox.
|
|
22
|
+
*/
|
|
12
23
|
export interface CheckboxProps extends MUICheckboxProps, Omit<LabelProps, 'label' | 'size'> {
|
|
13
24
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
14
25
|
color?: Extract<ComponentPalletColor, 'default'>;
|
|
15
26
|
inlineText?: string;
|
|
16
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Estado del propietario del CheckBox.
|
|
30
|
+
* [checked] - Indica si el CheckBox está marcado.
|
|
31
|
+
* [disabled] - Indica si el CheckBox está deshabilitado.
|
|
32
|
+
* size - El tamaño del CheckBox.
|
|
33
|
+
* [error] - Indica si hay un error en el CheckBox.
|
|
34
|
+
* color - El color del CheckBox.
|
|
35
|
+
*/
|
|
17
36
|
export interface CheckBoxOwnerState {
|
|
18
37
|
/**
|
|
19
|
-
*
|
|
38
|
+
* Indica si el CheckBox está marcado.
|
|
20
39
|
*/
|
|
21
40
|
checked?: boolean;
|
|
22
41
|
/**
|
|
23
|
-
* Indica si el
|
|
42
|
+
* Indica si el CheckBox está deshabilitado.
|
|
24
43
|
*/
|
|
25
44
|
disabled?: boolean;
|
|
26
45
|
/**
|
|
27
|
-
*
|
|
46
|
+
* El tamaño del CheckBox.
|
|
28
47
|
*/
|
|
29
48
|
size: Extract<Sizes, 'small' | 'medium'>;
|
|
30
49
|
/**
|
|
31
|
-
* Indica si
|
|
50
|
+
* Indica si hay un error en el CheckBox.
|
|
32
51
|
*/
|
|
33
52
|
error?: boolean;
|
|
34
53
|
/**
|
|
35
|
-
*
|
|
54
|
+
* El color del CheckBox.
|
|
36
55
|
*/
|
|
37
56
|
color: Extract<ComponentPalletColor, 'default'>;
|
|
38
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Tipos de slots del CheckBox.
|
|
60
|
+
*/
|
|
39
61
|
export type CheckBoxSlotsType = keyof typeof CheckBoxSlots;
|
|
62
|
+
/**
|
|
63
|
+
* Estilos del CheckBox.
|
|
64
|
+
*/
|
|
40
65
|
export type CheckBoxStyles = OverridesStyleRules<CheckBoxSlotsType, typeof CHECK_BOX_KEY_COMPONENT, Theme>;
|
package/index.js
CHANGED
|
@@ -43,7 +43,7 @@ import { R as R12 } from "./components/hook-form/RHFTextFieldPassword/RHFTextFie
|
|
|
43
43
|
import { R as R13 } from "./components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.js";
|
|
44
44
|
import { B } from "./components/formatters/BooleanFormatter/BooleanFormatter.js";
|
|
45
45
|
import { D as D2, u as u4 } from "./components/formatters/DateFormatter/DateFormatter.js";
|
|
46
|
-
import { U, g as g7 } from "./components/formatters/UncertaintyFormatter/
|
|
46
|
+
import { U, g as g7 } from "./components/formatters/UncertaintyFormatter/UncertaintyFormatter.js";
|
|
47
47
|
import { P as P2, g as g8 } from "./components/formatters/PointsFormatter/PointsFormatter.js";
|
|
48
48
|
import { C, g as g9 } from "./components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
|
|
49
49
|
import { P as P3, u as u5 } from "./components/formatters/PeriodFormatter/PeriodFormatter.js";
|