@m4l/components 9.4.18 → 9.4.19-BE20260129-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/types.d.ts +24 -16
- package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +3 -3
- package/components/ActionsGroup/slots/ActionsGroupSlots.d.ts +1 -1
- package/components/CheckableList/slots/styled.d.ts +4 -4
- package/components/Chip/slots/ChipSlots.d.ts +1 -1
- package/components/DaysOfWeekPicker/DaysOfWeekPicker.d.ts +33 -0
- package/components/DaysOfWeekPicker/DaysOfWeekPicker.js +81 -0
- package/components/DaysOfWeekPicker/DaysOfWeekPicker.styles.d.ts +2 -0
- package/components/DaysOfWeekPicker/DaysOfWeekPicker.styles.js +99 -0
- package/components/DaysOfWeekPicker/DaysOfWeekPicker.test.d.ts +1 -0
- package/components/DaysOfWeekPicker/constants.d.ts +12 -0
- package/components/DaysOfWeekPicker/constants.js +11 -0
- package/components/DaysOfWeekPicker/dictionary.d.ts +1 -0
- package/components/DaysOfWeekPicker/dictionary.js +6 -0
- package/components/DaysOfWeekPicker/helpers/getDaysOfWeekFromDictionary.d.ts +29 -0
- package/components/DaysOfWeekPicker/helpers/getDaysOfWeekFromDictionary.js +12 -0
- package/components/DaysOfWeekPicker/helpers/getDaysOfWeekFromDictionary.test.d.ts +1 -0
- package/components/DaysOfWeekPicker/helpers/index.d.ts +1 -0
- package/components/DaysOfWeekPicker/helpers/index.js +1 -0
- package/components/DaysOfWeekPicker/hooks/index.d.ts +2 -0
- package/components/DaysOfWeekPicker/hooks/types.d.ts +29 -0
- package/components/DaysOfWeekPicker/hooks/useDaysOfWeekPicker.d.ts +9 -0
- package/components/DaysOfWeekPicker/hooks/useDaysOfWeekPicker.js +71 -0
- package/components/DaysOfWeekPicker/hooks/useDaysOfWeekPicker.test.d.ts +1 -0
- package/components/DaysOfWeekPicker/index.d.ts +3 -0
- package/components/DaysOfWeekPicker/index.js +1 -0
- package/components/DaysOfWeekPicker/slots/DaysOfWeekPickerEnum.d.ts +5 -0
- package/components/DaysOfWeekPicker/slots/DaysOfWeekPickerEnum.js +9 -0
- package/components/DaysOfWeekPicker/slots/DaysOfWeekPickerSlots.d.ts +9 -0
- package/components/DaysOfWeekPicker/slots/DaysOfWeekPickerSlots.js +23 -0
- package/components/DaysOfWeekPicker/slots/index.d.ts +3 -0
- package/components/DaysOfWeekPicker/slots/index.js +1 -0
- package/components/DaysOfWeekPicker/types.d.ts +70 -0
- package/components/EditLabel/slots/EditLabelSlots.d.ts +1 -1
- package/components/HelperError/slots/HelperErrorSlots.d.ts +1 -1
- package/components/ImageText/slots/ImageTextSlots.d.ts +2 -2
- package/components/Label/slots/LabelSlots.d.ts +2 -2
- package/components/LoadingError/slots/LoadingErrorSlots.d.ts +1 -1
- package/components/MFIsolationApp/slots/MFIsolationAppSlots.d.ts +2 -2
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +1 -1
- package/components/Pager/slots/PagerSlots.d.ts +3 -3
- package/components/PaperForm/slots/PaperFormSlots.d.ts +1 -1
- package/components/PropertyValue/PropertyValue.js +23 -12
- package/components/PropertyValue/PropertyValue.styles.js +133 -15
- package/components/PropertyValue/slots/PropertyValueEnum.d.ts +4 -1
- package/components/PropertyValue/slots/PropertyValueEnum.js +3 -0
- package/components/PropertyValue/slots/PropertyValueSlots.d.ts +9 -0
- package/components/PropertyValue/slots/PropertyValueSlots.js +17 -1
- package/components/PropertyValue/types.d.ts +117 -5
- package/components/SettingsLayout/slots/SettingsLayoutSlots.d.ts +1 -1
- package/components/Stepper/slots/StepperSlot.d.ts +4 -4
- package/components/TabsNavigator/slots/TabsNavigatorSlots.d.ts +2 -2
- package/components/ToastContainer/slots/toastContainerSlots.d.ts +2 -2
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +2 -2
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +1 -1
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.d.ts +1 -1
- package/components/formatters/ConcatenatedFormatter/slots/ConcatenatedFormatterSlots.d.ts +1 -1
- package/components/formatters/DateFormatter/slots/DateFormatterSlots.d.ts +1 -1
- package/components/formatters/DistanceToNowFormatter/slots/DistanceToNowFormatterSlots.d.ts +1 -1
- package/components/formatters/ImageFormatter/slots/ImageFormatterSlots.d.ts +1 -1
- package/components/formatters/PeriodFormatter/slots/PeriodFormatterSlots.d.ts +1 -1
- package/components/formatters/PointsFormatter/slots/ointsFormatterSlots.d.ts +1 -1
- package/components/formatters/PriceFormatter/slots/PriceFormatterSlots.d.ts +1 -1
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterSlots.d.ts +1 -1
- package/components/hook-form/RHFDaysOfWeekPicker/RHFDaysOfWeekPicker.d.ts +26 -0
- package/components/hook-form/RHFDaysOfWeekPicker/RHFDaysOfWeekPicker.js +6 -0
- package/components/hook-form/RHFDaysOfWeekPicker/index.d.ts +1 -0
- package/components/hook-form/RHFDaysOfWeekPicker/index.js +1 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/slots/RHFUploadImageSlots.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/slots/RHFUploadSingleFileSlots.d.ts +5 -5
- package/components/hook-form/index.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +1 -1
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +2 -2
- package/components/mui_extended/Button/slots/ButtonSlots.d.ts +1 -1
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +1 -1
- package/components/mui_extended/NavLink/slots/NavLinkSlots.d.ts +1 -1
- package/components/mui_extended/Radio/slots/styled.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +3 -3
- package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +3 -3
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/hocs/index.d.ts +2 -0
- package/hocs/withRHFController/constants.d.ts +8 -0
- package/hocs/withRHFController/constants.js +8 -0
- package/hocs/withRHFController/index.d.ts +37 -0
- package/hocs/withRHFController/index.js +95 -0
- package/hocs/withRHFController/slots/WithRHFControllerEnum.d.ts +3 -0
- package/hocs/withRHFController/slots/WithRHFControllerEnum.js +7 -0
- package/hocs/withRHFController/slots/WithRHFControllerSlots.d.ts +5 -0
- package/hocs/withRHFController/slots/WithRHFControllerSlots.js +11 -0
- package/hocs/withRHFController/slots/index.d.ts +2 -0
- package/hocs/withRHFController/slots/index.js +1 -0
- package/hocs/withRHFController/types.d.ts +70 -0
- package/hocs/withRHFController/withRHFController.styles.d.ts +5 -0
- package/hocs/withRHFController/withRHFController.styles.js +14 -0
- package/hocs/withRHFController/withRHFController.test.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.d.ts +3 -3
- package/index.js +111 -105
- package/package.json +1 -1
|
@@ -9,12 +9,12 @@ export declare const SkeletonStyled: import('@emotion/styled').StyledComponent<P
|
|
|
9
9
|
export declare const LimitContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
10
10
|
ownerState?: (Partial<import('../types').TextFieldOwnerState> & Record<string, unknown>) | undefined;
|
|
11
11
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
12
|
-
export declare const LimitTextFirstStyled: 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" | "
|
|
12
|
+
export declare const LimitTextFirstStyled: 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> & {
|
|
13
13
|
ownerState?: (Partial<import('../types').TextFieldOwnerState> & Record<string, unknown>) | undefined;
|
|
14
14
|
}, {}, {}>;
|
|
15
|
-
export declare const LimitTextSeparatorStyled: 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" | "
|
|
15
|
+
export declare const LimitTextSeparatorStyled: 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> & {
|
|
16
16
|
ownerState?: (Partial<import('../types').TextFieldOwnerState> & Record<string, unknown>) | undefined;
|
|
17
17
|
}, {}, {}>;
|
|
18
|
-
export declare const LimitTextSecondStyled: 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" | "
|
|
18
|
+
export declare const LimitTextSecondStyled: 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> & {
|
|
19
19
|
ownerState?: (Partial<import('../types').TextFieldOwnerState> & Record<string, unknown>) | undefined;
|
|
20
20
|
}, {}, {}>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const StyledMUITypography: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
5
5
|
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;
|
|
6
|
-
}, "children" | "zIndex" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "
|
|
6
|
+
}, "children" | "zIndex" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "variant" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "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" | "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" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "variantMapping">, "children" | "ref" | "title" | "zIndex" | "id" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "variant" | "color" | "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" | "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" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
7
7
|
ownerState?: (Partial<import('../types').TypographyOwnerState> & Record<string, unknown>) | undefined;
|
|
8
8
|
}, {}, {}>;
|
|
9
9
|
/**
|
package/hocs/index.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { W as WithRHFControllerSlots } from "./slots/WithRHFControllerEnum.js";
|
|
3
|
+
const WITH_RHF_CONTROLLER_KEY = "withRHFController";
|
|
4
|
+
const WITH_RHF_CONTROLLER_CLASSES = getComponentClasses(WITH_RHF_CONTROLLER_KEY, WithRHFControllerSlots);
|
|
5
|
+
export {
|
|
6
|
+
WITH_RHF_CONTROLLER_CLASSES as W,
|
|
7
|
+
WITH_RHF_CONTROLLER_KEY as a
|
|
8
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
import { BaseRHFProps, ComponentWithRHFControllerProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* HOC que envuelve un componente con la funcionalidad de Controller de react-hook-form.
|
|
6
|
+
*
|
|
7
|
+
* Este HOC automatiza la integración con react-hook-form proporcionando:
|
|
8
|
+
* - Acceso automático al control del formulario mediante useFormContext
|
|
9
|
+
* - Wrapper con Controller que maneja el estado del campo
|
|
10
|
+
* - Props del field, fieldState y formState pasadas automáticamente al componente envuelto
|
|
11
|
+
* - Props estándar de RHF (value, onChange, onBlur, name, error) extraídas del field y fieldState para compatibilidad
|
|
12
|
+
* @template TComponentProps - Props del componente que será envuelto
|
|
13
|
+
* @template TFieldValues - Tipo de los valores del formulario
|
|
14
|
+
* @param Component - Componente a envolver
|
|
15
|
+
* @returns Componente envuelto con funcionalidad RHF
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* // Componente base sin RHF - puede usar field completo o props individuales
|
|
19
|
+
* const MyInput = ({ field, fieldState, value, onChange, ...props }) => (
|
|
20
|
+
* <input {...field} {...props} />
|
|
21
|
+
* );
|
|
22
|
+
*
|
|
23
|
+
* // O usar props estándar de RHF directamente
|
|
24
|
+
* const MyTextField = ({ value, onChange, onBlur, error, ...props }) => (
|
|
25
|
+
* <TextField value={value} onChange={onChange} onBlur={onBlur} error={error} {...props} />
|
|
26
|
+
* );
|
|
27
|
+
*
|
|
28
|
+
* // Componente envuelto con HOC
|
|
29
|
+
* const RHFMyInput = withRHFController(MyInput);
|
|
30
|
+
* const RHFMyTextField = withRHFController(MyTextField);
|
|
31
|
+
*
|
|
32
|
+
* // Uso en formulario
|
|
33
|
+
* <RHFMyInput name="email" label="Email" />
|
|
34
|
+
* <RHFMyTextField name="email" label="Email" />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function withRHFController<TComponentProps extends Record<string, any> = {}, TFieldValues extends FieldValues = FieldValues>(Component: React.ComponentType<ComponentWithRHFControllerProps<TComponentProps, TFieldValues>>): React.ForwardRefExoticComponent<React.PropsWithoutRef<TComponentProps & BaseRHFProps<TFieldValues>> & React.RefAttributes<any>>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useId } from "react";
|
|
3
|
+
import { useFormContext, Controller } from "react-hook-form";
|
|
4
|
+
import { W as WITH_RHF_CONTROLLER_CLASSES } from "./constants.js";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import { R as RootStyled } from "./slots/WithRHFControllerSlots.js";
|
|
7
|
+
import { L as Label } from "../../components/Label/Label.js";
|
|
8
|
+
import { H as HelperError } from "../../components/HelperError/HelperError.js";
|
|
9
|
+
function withRHFController(Component) {
|
|
10
|
+
const WrappedComponent = forwardRef((props, ref) => {
|
|
11
|
+
const {
|
|
12
|
+
name,
|
|
13
|
+
control: controlProp,
|
|
14
|
+
// Puede permitir que el componente se use fuera de un FormProvider
|
|
15
|
+
label,
|
|
16
|
+
mandatory,
|
|
17
|
+
mandatoryMessage,
|
|
18
|
+
helperMessage,
|
|
19
|
+
size = "medium",
|
|
20
|
+
disabled,
|
|
21
|
+
id,
|
|
22
|
+
htmlFor,
|
|
23
|
+
...componentProps
|
|
24
|
+
} = props;
|
|
25
|
+
const hookId = useId();
|
|
26
|
+
const htmlForId = id || htmlFor || hookId;
|
|
27
|
+
const contextControl = useFormContext()?.control;
|
|
28
|
+
const control = controlProp || contextControl;
|
|
29
|
+
if (!control) {
|
|
30
|
+
console.warn(
|
|
31
|
+
`withRHFController: No se encontró un control de formulario para el campo "${name}". Asegúrate de que el componente esté dentro de un FormProvider o proporciona el control como prop.`
|
|
32
|
+
);
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
Controller,
|
|
37
|
+
{
|
|
38
|
+
name,
|
|
39
|
+
control,
|
|
40
|
+
render: ({ field, fieldState, formState }) => {
|
|
41
|
+
const { value, onChange, onBlur, name: fieldName } = field;
|
|
42
|
+
const isDisabled = disabled || formState.isSubmitting;
|
|
43
|
+
const controllerProps = {
|
|
44
|
+
...componentProps,
|
|
45
|
+
// Props estándar de RHF (value, onChange, onBlur, name, error)
|
|
46
|
+
// Útiles para componentes que prefieren props individuales explícitas
|
|
47
|
+
value,
|
|
48
|
+
onChange,
|
|
49
|
+
onBlur,
|
|
50
|
+
name: fieldName,
|
|
51
|
+
error: !!fieldState.error,
|
|
52
|
+
// Props del HOC que también deben pasarse al componente (size, disabled, id)
|
|
53
|
+
size,
|
|
54
|
+
disabled: isDisabled,
|
|
55
|
+
id: htmlForId,
|
|
56
|
+
// Props del Controller (field completo, fieldState, formState)
|
|
57
|
+
field,
|
|
58
|
+
fieldState,
|
|
59
|
+
formState
|
|
60
|
+
};
|
|
61
|
+
return /* @__PURE__ */ jsxs(RootStyled, { ref, className: clsx(WITH_RHF_CONTROLLER_CLASSES.root), children: [
|
|
62
|
+
label && /* @__PURE__ */ jsx(
|
|
63
|
+
Label,
|
|
64
|
+
{
|
|
65
|
+
size,
|
|
66
|
+
label,
|
|
67
|
+
htmlFor: htmlForId,
|
|
68
|
+
mandatory,
|
|
69
|
+
mandatoryMessage,
|
|
70
|
+
helperMessage,
|
|
71
|
+
disabled: isDisabled,
|
|
72
|
+
error: !!fieldState.error
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ jsx(Component, { ...controllerProps, ref: field.ref, size, disabled: isDisabled }),
|
|
76
|
+
fieldState.error?.message && /* @__PURE__ */ jsx(
|
|
77
|
+
HelperError,
|
|
78
|
+
{
|
|
79
|
+
message: fieldState.error.message,
|
|
80
|
+
size,
|
|
81
|
+
htmlFor: htmlForId
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
] });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
});
|
|
89
|
+
const componentName = Component.displayName || Component.name || "Component";
|
|
90
|
+
WrappedComponent.displayName = `withRHFController(${componentName})`;
|
|
91
|
+
return WrappedComponent;
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
withRHFController as w
|
|
95
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elemento div de react construido a través de styled,
|
|
3
|
+
* sirve para agrupar el contenido del HOC `withRHFController`
|
|
4
|
+
*/
|
|
5
|
+
export declare const RootStyled: 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').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { a as WITH_RHF_CONTROLLER_KEY } from "../constants.js";
|
|
3
|
+
import { W as WithRHFControllerSlots } from "./WithRHFControllerEnum.js";
|
|
4
|
+
import { w as withRHFControllerStyles } from "../withRHFController.styles.js";
|
|
5
|
+
const RootStyled = styled("div", {
|
|
6
|
+
name: WITH_RHF_CONTROLLER_KEY,
|
|
7
|
+
slot: WithRHFControllerSlots.root
|
|
8
|
+
})(withRHFControllerStyles?.root);
|
|
9
|
+
export {
|
|
10
|
+
RootStyled as R
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Control, FieldPath, FieldValues, ControllerRenderProps, ControllerFieldState, FormState } from 'react-hook-form';
|
|
2
|
+
import { Theme } from '@mui/material';
|
|
3
|
+
import { M4LOverridesStyleRules } from '../../@types/augmentations';
|
|
4
|
+
import { WithRHFControllerSlots } from './slots/WithRHFControllerEnum';
|
|
5
|
+
import { WITH_RHF_CONTROLLER_KEY } from './constants';
|
|
6
|
+
import { LabelPropsBase } from '../../components/Label/types';
|
|
7
|
+
import { Sizes } from '@m4l/styles';
|
|
8
|
+
/**
|
|
9
|
+
* Props que el componente envuelto recibirá del Controller de react-hook-form
|
|
10
|
+
*/
|
|
11
|
+
export interface RHFControllerRenderProps<TFieldValues extends FieldValues = FieldValues> {
|
|
12
|
+
/** Props del field del Controller */
|
|
13
|
+
field: ControllerRenderProps<TFieldValues, FieldPath<TFieldValues>>;
|
|
14
|
+
/** Estado del field (error, invalid, etc.) */
|
|
15
|
+
fieldState: ControllerFieldState;
|
|
16
|
+
/** Estado del formulario completo */
|
|
17
|
+
formState: FormState<TFieldValues>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Props base que todos los componentes RHF deben tener
|
|
21
|
+
*/
|
|
22
|
+
export interface BaseRHFProps<TFieldValues extends FieldValues = FieldValues> extends LabelPropsBase {
|
|
23
|
+
/** Nombre del campo en el formulario */
|
|
24
|
+
name: FieldPath<TFieldValues>;
|
|
25
|
+
/** Control del formulario (opcional, se obtiene automáticamente de useFormContext si no se proporciona) */
|
|
26
|
+
control?: Control<TFieldValues>;
|
|
27
|
+
/** Tamaño del componente */
|
|
28
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
29
|
+
/** Indica si el componente está deshabilitado */
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/** Identificador único para el campo */
|
|
32
|
+
id?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Props que el HOC añade al componente envuelto
|
|
36
|
+
*/
|
|
37
|
+
export interface WithRHFControllerProps<TFieldValues extends FieldValues = FieldValues> extends BaseRHFProps<TFieldValues> {
|
|
38
|
+
/** Props del render del Controller */
|
|
39
|
+
renderProps?: RHFControllerRenderProps<TFieldValues>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Props adicionales que el HOC pasa al componente envuelto
|
|
43
|
+
*/
|
|
44
|
+
export interface WithRHFControllerAdditionalProps {
|
|
45
|
+
/** Valor del campo */
|
|
46
|
+
value?: any;
|
|
47
|
+
/** Función de cambio de valor */
|
|
48
|
+
onChange?: (...event: any[]) => void;
|
|
49
|
+
/** Función de blur (puede ser de diferentes tipos según el componente) */
|
|
50
|
+
onBlur?: (...args: any[]) => void;
|
|
51
|
+
/** Nombre del campo */
|
|
52
|
+
name?: string;
|
|
53
|
+
/** Indica si hay error */
|
|
54
|
+
error?: boolean;
|
|
55
|
+
/** Tamaño del componente */
|
|
56
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
57
|
+
/** Indica si el componente está deshabilitado */
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
/** Identificador único para el campo */
|
|
60
|
+
id?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Tipo para el componente que será envuelto por el HOC
|
|
64
|
+
*/
|
|
65
|
+
export type ComponentWithRHFControllerProps<TComponentProps extends Record<string, any> = {}, TFieldValues extends FieldValues = FieldValues> = TComponentProps & RHFControllerRenderProps<TFieldValues> & Partial<WithRHFControllerAdditionalProps>;
|
|
66
|
+
/**
|
|
67
|
+
* Define los estilos del HOC `withRHFController`. Permite la personalización parcial
|
|
68
|
+
* de las reglas de estilo mediante `M4LOverridesStyleRules`.
|
|
69
|
+
*/
|
|
70
|
+
export type WithRHFControllerStyles = M4LOverridesStyleRules<WithRHFControllerSlots, typeof WITH_RHF_CONTROLLER_KEY, Theme>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const withRHFControllerStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Estilos para el contenedor principal del componente.
|
|
4
|
+
*/
|
|
5
|
+
root: ({ theme }) => ({
|
|
6
|
+
display: "flex",
|
|
7
|
+
flexDirection: "column",
|
|
8
|
+
gap: theme.vars.size.baseSpacings.sp1,
|
|
9
|
+
width: "100%"
|
|
10
|
+
})
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
withRHFControllerStyles as w
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|