@m4l/components 9.1.77 → 9.1.79
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/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 +70 -13
- package/components/Label/types.d.ts +1 -0
- package/components/NumberInput/NumberInput.js +124 -0
- package/components/NumberInput/NumberInput.styles.js +199 -0
- package/components/NumberInput/constants.js +4 -0
- package/components/NumberInput/hooks/useNumberInput/NumberInputActions.js +12 -0
- package/components/NumberInput/hooks/useNumberInput/NumberInputReducer.js +106 -0
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +364 -0
- package/components/NumberInput/slots/NumberInputEnum.js +13 -0
- package/components/NumberInput/slots/NumberInputSlots.js +43 -0
- package/components/NumberInput/utils.js +23 -0
- package/components/PropertyValue/PropertyValue.d.ts +1 -1
- package/components/PropertyValue/PropertyValue.js +5 -17
- package/components/PropertyValue/PropertyValue.styles.js +6 -6
- 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/RHFNumberInput/RHFNumberInput.js +89 -0
- package/components/hook-form/RHFNumberInput/RHFNumberInput.styles.js +16 -0
- package/components/hook-form/RHFNumberInput/constants.js +4 -0
- package/components/hook-form/RHFNumberInput/slots/RHFNumberInputEnum.js +7 -0
- package/components/hook-form/RHFNumberInput/slots/RHFNumberInputSlots.js +11 -0
- 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/index.d.ts +1 -0
- 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 +22 -20
- package/package.json +1 -1
- package/components/HelperError/HelperError.stories.d.ts +0 -13
- 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
|
@@ -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
|
}, {}, {}>;
|
|
@@ -13,4 +13,5 @@ export * from './RHFTextFieldPassword';
|
|
|
13
13
|
export { RHFPeriod } from './RHFPeriod/RHFPeriod';
|
|
14
14
|
export { getPeriodComponetsDictionary } from '../Period/dictionary';
|
|
15
15
|
export { RHFRadioGroup } from './RHFRadioGroup';
|
|
16
|
+
export { RHFNumberInput } from './RHFNumberInput/RHFNumberInput';
|
|
16
17
|
export * from './RHFUpload';
|
|
@@ -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
|
@@ -36,11 +36,12 @@ import { R as R6 } from "./components/hook-form/RHFHelperError/index.js";
|
|
|
36
36
|
import { R as R7 } from "./components/hook-form/RHFPeriod/RHFPeriod.js";
|
|
37
37
|
import { g as g6 } from "./components/Period/dictionary.js";
|
|
38
38
|
import { R as R8 } from "./components/hook-form/RHFRadioGroup/RHFRadioGroup.js";
|
|
39
|
-
import { R as R9 } from "./components/hook-form/
|
|
40
|
-
import { R as R10 } from "./components/hook-form/
|
|
41
|
-
import { R as R11 } from "./components/hook-form/
|
|
42
|
-
import { R as R12 } from "./components/hook-form/
|
|
43
|
-
import { R as R13 } from "./components/hook-form/
|
|
39
|
+
import { R as R9 } from "./components/hook-form/RHFNumberInput/RHFNumberInput.js";
|
|
40
|
+
import { R as R10 } from "./components/hook-form/RHFColorPicker/RFHColorPicker.js";
|
|
41
|
+
import { R as R11 } from "./components/hook-form/RHFCheckbox/RHFCheckbox.js";
|
|
42
|
+
import { R as R12 } from "./components/hook-form/RHFTextField/RHFTextField.js";
|
|
43
|
+
import { R as R13 } from "./components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js";
|
|
44
|
+
import { R as R14 } from "./components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.js";
|
|
44
45
|
import { B } from "./components/formatters/BooleanFormatter/BooleanFormatter.js";
|
|
45
46
|
import { D as D2, u as u4 } from "./components/formatters/DateFormatter/DateFormatter.js";
|
|
46
47
|
import { U, g as g7 } from "./components/formatters/UncertaintyFormatter/UncertaintyFormatter.js";
|
|
@@ -73,7 +74,7 @@ import { d, g as g13 } from "./components/CommonActions/dictionary.js";
|
|
|
73
74
|
import { D as D5 } from "./components/DragResizeWindow/DragResizeWindow.js";
|
|
74
75
|
import { d as d2 } from "./components/DragResizeWindow/classes/index.js";
|
|
75
76
|
import { G } from "./components/GridLayout/GridLayout.js";
|
|
76
|
-
import { R as
|
|
77
|
+
import { R as R15 } from "./components/GridLayout/subcomponents/Responsive/index.js";
|
|
77
78
|
import { c as c3, d as d3, e } from "./components/GridLayout/subcomponents/Responsive/responsiveUtils.js";
|
|
78
79
|
import { i, k } from "./components/GridLayout/utils.js";
|
|
79
80
|
import { w } from "./components/GridLayout/subcomponents/withSizeProvider/index.js";
|
|
@@ -127,8 +128,8 @@ import { H as H4 } from "./components/HelmetPage/index.js";
|
|
|
127
128
|
import { P as P11 } from "./components/PropertyValue/PropertyValue.js";
|
|
128
129
|
import { a as a9 } from "./components/MenuActions/dictionary.js";
|
|
129
130
|
import { a as a10, M as M11 } from "./components/MenuActions/MenuActions.js";
|
|
130
|
-
import { R as
|
|
131
|
-
import { R as
|
|
131
|
+
import { R as R16 } from "./components/extended/React-Resizable/Resizable/Resizable.js";
|
|
132
|
+
import { R as R17 } from "./components/extended/React-Resizable/ResizableBox/ResizableBox.js";
|
|
132
133
|
import { S as S3 } from "./components/ScrollBar/index.js";
|
|
133
134
|
import { S as S4 } from "./components/SplitLayout/SplitLayout.js";
|
|
134
135
|
import { T as T3 } from "./components/ToastContainer/ToastContainer.js";
|
|
@@ -182,12 +183,12 @@ import { T as T17 } from "./components/mui_extended/ToggleIconButton/constants.j
|
|
|
182
183
|
import { T as T18 } from "./components/mui_extended/ToggleIconButton/slots/ToggleIconButtonEnum.js";
|
|
183
184
|
import { T as T19 } from "./components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.js";
|
|
184
185
|
import { a as a13, D as D6, M as M13 } from "./components/areas/contexts/DynamicMFParmsContext/index.js";
|
|
185
|
-
import { F, R as
|
|
186
|
+
import { F, R as R18, u as u9 } from "./components/hook-form/RHFormContext/index.js";
|
|
186
187
|
import { g as g26 } from "./components/hook-form/RHFormContext/dictionary.js";
|
|
187
188
|
import { u as u10 } from "./contexts/AppearanceComponentContext/useAppearanceComponentStore.js";
|
|
188
189
|
import { A as A16 } from "./contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
189
190
|
import { a as a14, M as M14 } from "./contexts/ModalContext/index.js";
|
|
190
|
-
import { a as a15, R as
|
|
191
|
+
import { a as a15, R as R19 } from "./contexts/RealTimeContext/RealTimeContext.js";
|
|
191
192
|
import { u as u11 } from "./hooks/useFormAddEdit/index.js";
|
|
192
193
|
import { u as u12 } from "./hooks/useModal/index.js";
|
|
193
194
|
import { u as u13 } from "./hooks/useTab/index.js";
|
|
@@ -310,23 +311,24 @@ export {
|
|
|
310
311
|
P11 as PropertyValue,
|
|
311
312
|
R as RHFAutocomplete,
|
|
312
313
|
R2 as RHFAutocompleteAsync,
|
|
313
|
-
|
|
314
|
-
|
|
314
|
+
R11 as RHFCheckbox,
|
|
315
|
+
R10 as RHFColorPicker,
|
|
315
316
|
R3 as RHFDateTime,
|
|
316
317
|
R6 as RHFHelperError,
|
|
317
318
|
R4 as RHFMultiCheckbox,
|
|
319
|
+
R9 as RHFNumberInput,
|
|
318
320
|
R7 as RHFPeriod,
|
|
319
321
|
R8 as RHFRadioGroup,
|
|
320
322
|
R5 as RHFSelect,
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
R12 as RHFTextField,
|
|
324
|
+
R13 as RHFTextFieldPassword,
|
|
325
|
+
R14 as RHFUploadImage,
|
|
326
|
+
R18 as RHFormProvider,
|
|
325
327
|
a15 as RealTimeContext,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
R19 as RealTimeProvider,
|
|
329
|
+
R16 as Resizable,
|
|
330
|
+
R17 as ResizableBox,
|
|
331
|
+
R15 as Responsive,
|
|
330
332
|
S3 as ScrollBar,
|
|
331
333
|
S as ScrollToTop,
|
|
332
334
|
S6 as SectionCommercial,
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { HelperError } from './HelperError';
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
declare const meta: Meta<typeof HelperError>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof HelperError>;
|
|
6
|
-
/** Base HelperError component */
|
|
7
|
-
export declare const ErrorBase: Story;
|
|
8
|
-
/** Small HelperError component */
|
|
9
|
-
export declare const small: Story;
|
|
10
|
-
/** Medium HelperError component */
|
|
11
|
-
export declare const medium: Story;
|
|
12
|
-
/** Skeleton HelperError component */
|
|
13
|
-
export declare const Skeleton: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RHFCheckboxClassesType } from './types';
|
|
2
|
-
import { OwnerState } from '../types';
|
|
3
|
-
export declare const RHFCheckboxClasses: RHFCheckboxClassesType;
|
|
4
|
-
export declare function getRHFCheckboxUtilityClass(slot: string): string;
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Documentar
|
|
7
|
-
*/
|
|
8
|
-
export declare const useUtilityClasses: (ownerState: OwnerState) => {
|
|
9
|
-
skeleton: string;
|
|
10
|
-
root: string;
|
|
11
|
-
checkTypography: string;
|
|
12
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
generateUtilityClasses("M4LRHFCheckbox", [
|
|
4
|
-
/* elements */
|
|
5
|
-
"root",
|
|
6
|
-
"checkTypography",
|
|
7
|
-
"skeleton",
|
|
8
|
-
/* states or variants of elements */
|
|
9
|
-
"small",
|
|
10
|
-
"medium",
|
|
11
|
-
"stateDisabled",
|
|
12
|
-
"stateError",
|
|
13
|
-
"isFocus",
|
|
14
|
-
"isTabSelected"
|
|
15
|
-
]);
|
|
16
|
-
function getRHFCheckboxUtilityClass(slot) {
|
|
17
|
-
return generateUtilityClass("M4LRHFCheckbox", slot);
|
|
18
|
-
}
|
|
19
|
-
const useUtilityClasses = (ownerState) => {
|
|
20
|
-
const slots = {
|
|
21
|
-
root: [
|
|
22
|
-
"root",
|
|
23
|
-
ownerState.isFocus && "isFocus",
|
|
24
|
-
ownerState.isTabSelected && "isTabSelected",
|
|
25
|
-
ownerState.sizeCheck === "small" && "small",
|
|
26
|
-
ownerState.sizeCheck === "medium" && "medium",
|
|
27
|
-
ownerState.disabled && "stateDisabled",
|
|
28
|
-
ownerState.error && "stateError"
|
|
29
|
-
],
|
|
30
|
-
skeleton: ["skeleton"],
|
|
31
|
-
checkTypography: [
|
|
32
|
-
"checkTypography",
|
|
33
|
-
ownerState.sizeCheck === "small" ? "small" : "medium",
|
|
34
|
-
ownerState.disabled && "stateDisabled"
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
const composedClasses = unstable_composeClasses(slots, getRHFCheckboxUtilityClass, {});
|
|
38
|
-
return {
|
|
39
|
-
...composedClasses
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
useUtilityClasses as u
|
|
44
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface RHFCheckboxClassesType {
|
|
2
|
-
root: string;
|
|
3
|
-
checkTypography: string;
|
|
4
|
-
skeleton: string;
|
|
5
|
-
small: string;
|
|
6
|
-
medium: string;
|
|
7
|
-
stateDisabled: string;
|
|
8
|
-
stateError: string;
|
|
9
|
-
isFocus: string;
|
|
10
|
-
isTabSelected: string;
|
|
11
|
-
}
|
|
12
|
-
export type RHFCheckboxClassesKey = keyof RHFCheckboxClassesType;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const RHFCheckboxRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
|
-
export declare const WrapperSKTRHFCheckbox: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
-
export declare const SKTCheckSkeleton: import('@emotion/styled').StyledComponent<import('@mui/material').SkeletonOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
4
|
-
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;
|
|
5
|
-
}, "children" | "style" | "variant" | "width" | "height" | "animation" | "sx" | "classes" | "className"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
6
|
-
export declare const ContainerCheckTypography: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material/styles";
|
|
2
|
-
import { Skeleton } from "@mui/material";
|
|
3
|
-
const RHFCheckboxRoot = styled("div")(({ theme }) => ({
|
|
4
|
-
...theme.components?.M4LRHFCheckbox?.styleOverrides || {}
|
|
5
|
-
}));
|
|
6
|
-
styled("div")(() => ({
|
|
7
|
-
display: "flex",
|
|
8
|
-
justifyContent: "center",
|
|
9
|
-
alignItems: "center",
|
|
10
|
-
padding: "8px"
|
|
11
|
-
}));
|
|
12
|
-
styled(Skeleton)(() => ({
|
|
13
|
-
width: "20px",
|
|
14
|
-
height: "20px",
|
|
15
|
-
borderRadius: "4px"
|
|
16
|
-
}));
|
|
17
|
-
const ContainerCheckTypography = styled("div")(() => ({
|
|
18
|
-
display: "flex",
|
|
19
|
-
alignItems: "center"
|
|
20
|
-
}));
|
|
21
|
-
export {
|
|
22
|
-
ContainerCheckTypography as C,
|
|
23
|
-
RHFCheckboxRoot as R
|
|
24
|
-
};
|