@m4l/components 9.3.6 → 9.3.8-BE190825-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/@types/types.d.ts +25 -0
  2. package/components/DataGrid/Datagrid.styles.js +2 -2
  3. package/components/DragResizeWindowRND/constants.d.ts +44 -0
  4. package/components/DragResizeWindowRND/constants.js +46 -1
  5. package/components/DragResizeWindowRND/index.d.ts +1 -0
  6. package/components/DynamicFilter/DynamicFilter.styles.js +8 -4
  7. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +3 -0
  8. package/components/DynamicSort/DynamicSort.styles.js +8 -4
  9. package/components/FormContainer/FormContainer.d.ts +7 -0
  10. package/components/FormContainer/FormContainer.js +21 -0
  11. package/components/FormContainer/FormContainer.styles.d.ts +2 -0
  12. package/components/FormContainer/FormContainer.styles.js +27 -0
  13. package/components/FormContainer/constants.d.ts +2 -0
  14. package/components/FormContainer/constants.js +8 -0
  15. package/components/FormContainer/index.d.ts +1 -0
  16. package/components/FormContainer/index.js +1 -0
  17. package/components/FormContainer/slots/FormContainerEnum.d.ts +5 -0
  18. package/components/FormContainer/slots/FormContainerEnum.js +9 -0
  19. package/components/FormContainer/slots/FormContainerSlots.d.ts +9 -0
  20. package/components/FormContainer/slots/FormContainerSlots.js +22 -0
  21. package/components/FormContainer/test/FormContainer.test.d.ts +1 -0
  22. package/components/FormContainer/types.d.ts +11 -0
  23. package/components/ImageText/ImageText.d.ts +7 -0
  24. package/components/ImageText/ImageText.js +62 -0
  25. package/components/ImageText/ImageText.styles.d.ts +2 -0
  26. package/components/ImageText/ImageText.styles.js +79 -0
  27. package/components/ImageText/constants.d.ts +16 -0
  28. package/components/ImageText/constants.js +10 -0
  29. package/components/ImageText/index.d.ts +1 -0
  30. package/components/ImageText/index.js +1 -0
  31. package/components/ImageText/slots/ImageTextEnum.d.ts +8 -0
  32. package/components/ImageText/slots/ImageTextEnum.js +12 -0
  33. package/components/ImageText/slots/ImageTextSlots.d.ts +18 -0
  34. package/components/ImageText/slots/ImageTextSlots.js +38 -0
  35. package/components/ImageText/types.d.ts +40 -0
  36. package/components/NoItemPrivileges/NoItemPrivileges.d.ts +7 -0
  37. package/components/NoItemPrivileges/NoItemPrivileges.js +33 -0
  38. package/components/NoItemPrivileges/NoItemPrivilegesStyles.d.ts +5 -0
  39. package/components/NoItemPrivileges/NoItemPrivilegesStyles.js +6 -0
  40. package/components/NoItemPrivileges/constants.d.ts +3 -0
  41. package/components/NoItemPrivileges/constants.js +10 -0
  42. package/components/NoItemPrivileges/dictionary.d.ts +5 -0
  43. package/components/NoItemPrivileges/dictionary.js +12 -0
  44. package/components/NoItemPrivileges/index.d.ts +3 -0
  45. package/components/NoItemPrivileges/index.js +1 -0
  46. package/components/NoItemPrivileges/slots/NoItemPrivilegesEnum.d.ts +3 -0
  47. package/components/NoItemPrivileges/slots/NoItemPrivilegesEnum.js +7 -0
  48. package/components/NoItemPrivileges/slots/NoItemPrivilegesSlots.d.ts +3 -0
  49. package/components/NoItemPrivileges/slots/NoItemPrivilegesSlots.js +12 -0
  50. package/components/NoItemPrivileges/test/NoItemPrivileges.test.d.ts +1 -0
  51. package/components/NoItemPrivileges/types.d.ts +36 -0
  52. package/components/NoItemSelected/NoItemSelected.js +16 -59
  53. package/components/NoItemSelected/NoItemSelected.styles.js +1 -100
  54. package/components/NoItemSelected/constant.d.ts +2 -2
  55. package/components/NoItemSelected/constant.js +4 -4
  56. package/components/NoItemSelected/dictionary.d.ts +0 -2
  57. package/components/NoItemSelected/dictionary.js +4 -3
  58. package/components/NoItemSelected/slots/NoItemSelectedEnum.d.ts +1 -7
  59. package/components/NoItemSelected/slots/NoItemSelectedEnum.js +0 -6
  60. package/components/NoItemSelected/slots/NoItemSelectedSlots.d.ts +1 -19
  61. package/components/NoItemSelected/slots/NoItemSelectedSlots.js +5 -37
  62. package/components/NoItemSelected/test/NoItemSelected.test.d.ts +1 -0
  63. package/components/NoItemSelected/types.d.ts +5 -6
  64. package/components/ObjectLogs/helpers/Fields/filterFields.d.ts +5 -0
  65. package/components/ObjectLogs/helpers/Fields/filterFields.js +81 -0
  66. package/components/ObjectLogs/hooks/useDetailFormatter.js +2 -2
  67. package/components/ObjectLogs/hooks/useFilterAndSort.d.ts +15 -0
  68. package/components/ObjectLogs/hooks/useFilterAndSort.js +52 -0
  69. package/components/ObjectLogs/slots/ObjectLogsSlots.js +1 -2
  70. package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +39 -88
  71. package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +30 -104
  72. package/components/PaperForm/PaperForm.js +6 -4
  73. package/components/PaperForm/index.js +1 -0
  74. package/components/PaperForm/styles.js +21 -10
  75. package/components/PaperForm/types.d.ts +3 -2
  76. package/components/PropertyValue/PropertyValue.styles.js +2 -1
  77. package/components/SideBar/subcomponents/ContentComponent/style.js +3 -0
  78. package/components/SideBar/subcomponents/TreeGroupItems/styles.js +1 -1
  79. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +1 -1
  80. package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -0
  81. package/components/hook-form/RHFTextField/RHFTextField.js +5 -3
  82. package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
  83. package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js +63 -55
  84. package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +1 -1
  85. package/components/index.d.ts +4 -1
  86. package/components/mui_extended/Autocomplete/Autocomplete.js +2 -1
  87. package/components/mui_extended/Autocomplete/hooks/useEndAdornments.d.ts +1 -0
  88. package/components/mui_extended/Autocomplete/hooks/useEndAdornments.js +4 -2
  89. package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.js +1 -1
  90. package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +1 -1
  91. package/components/mui_extended/Tab/Tab.styles.js +7 -7
  92. package/components/mui_extended/TabContent/TabContent.styles.js +1 -1
  93. package/components/mui_extended/TextField/TextField.js +13 -2
  94. package/components/mui_extended/TextField/TextField.styles.js +40 -3
  95. package/components/mui_extended/TextField/constants.d.ts +4 -0
  96. package/components/mui_extended/TextField/index.d.ts +1 -0
  97. package/components/mui_extended/TextField/slots/TextFieldEnum.d.ts +5 -1
  98. package/components/mui_extended/TextField/slots/TextFieldEnum.js +4 -0
  99. package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +18 -0
  100. package/components/mui_extended/TextField/slots/TextFieldSlots.js +22 -2
  101. package/components/mui_extended/TextField/types.d.ts +9 -0
  102. package/hooks/index.d.ts +1 -0
  103. package/hooks/useDynamicFilterAndSort/types.d.ts +2 -0
  104. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +5 -3
  105. package/hooks/useIsVisible/constants.d.ts +1 -0
  106. package/hooks/useIsVisible/constants.js +4 -0
  107. package/hooks/useIsVisible/index.d.ts +1 -0
  108. package/hooks/useIsVisible/index.js +1 -0
  109. package/hooks/useIsVisible/useIsVisible.d.ts +28 -0
  110. package/hooks/useIsVisible/useIsVisible.js +25 -0
  111. package/index.js +44 -32
  112. package/package.json +1 -1
  113. package/storybook/components/FormContainer/FormContainer.stories.d.ts +13 -0
  114. package/storybook/components/NoItemPrivileges/NoItemPrivileges.stories.d.ts +12 -0
  115. package/storybook/components/NoItemSelect/NoItemSelect.stories.d.ts +1 -1
  116. package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +7 -0
  117. package/storybook/components/paperForm/PaperForm.stories.d.ts +5 -0
  118. package/storybook/hook-form/RHFTextField/RHFTextField.stories.d.ts +4 -0
  119. package/storybook/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.stories.d.ts +19 -0
  120. package/utils/getLimitCharacters/getLimitCharacters.d.ts +7 -0
  121. package/utils/getLimitCharacters/getLimitCharacters.js +11 -0
  122. package/utils/getLimitCharacters/index.d.ts +1 -0
  123. package/utils/getLimitCharacters/index.js +1 -0
  124. package/utils/getLimitCharacters/test/getLimitCharacters.test.d.ts +1 -0
  125. package/utils/getLimitCharacters/types.d.ts +11 -0
@@ -44,10 +44,11 @@ const propertyValueStyles = {
44
44
  containerType: "inline-size",
45
45
  display: "flex",
46
46
  flexDirection: ownerState?.isForm ? "column" : "row",
47
- justifyContent: ownerState?.isForm ? "space-between" : "left",
47
+ justifyContent: "flex-start",
48
48
  alignItems: "center",
49
49
  gap: theme.vars.size.baseSpacings["sp1"],
50
50
  width: ownerState?.semanticWidth ? "auto" : "200px",
51
+ height: ownerState?.valueHeight ? ownerState?.valueHeight : "auto",
51
52
  overflow: "hidden",
52
53
  color: theme.vars.palette.text.primary,
53
54
  paddingTop: !ownerState?.isForm ? theme.vars.size.baseSpacings.sp1 : void 0,
@@ -142,6 +142,9 @@ const contentComponentStyles = {
142
142
  [`&.${CLASS_NAME_IS_ROOT}.${CLASS_NAME_MENU_ACTIVE}.${CLASS_NAME_ITEM_IN_TREE_ACTIVE} > .M4LSideBar-wrapperMenuItem`]: {
143
143
  backgroundColor: theme.vars.palette.primary.opacity
144
144
  },
145
+ [`&.${CLASS_NAME_IS_ROOT}.${CLASS_NAME_MENU_ACTIVE} > .M4LSideBar-wrapperMenuItem`]: {
146
+ backgroundColor: theme.vars.palette.primary.opacity
147
+ },
145
148
  [`&.${CLASS_NAME_IS_ROOT} > .M4LSideBar-wrapperMenuItem`]: {
146
149
  paddingRight: "7px",
147
150
  paddingTop: theme.vars.size.baseSpacings.sp1,
@@ -116,7 +116,7 @@ const contentGroupStyles = {
116
116
  ...getSizeStyles(
117
117
  theme,
118
118
  ownerState?.size || "medium",
119
- "case",
119
+ "base",
120
120
  (sizeValue) => ({
121
121
  width: `${sizeValue}!important`,
122
122
  height: `${sizeValue}!important`,
@@ -46,7 +46,7 @@ function NodeMenuItem(props) {
46
46
  ),
47
47
  label: item.title,
48
48
  selected: item.active,
49
- startIcon: /* @__PURE__ */ jsx(AdornmentIcon, { icon: `${urlIconPrefix}${item.iconUrl}`, variant: isRoot && item.itemInTreeActive ? "root" : item.active ? "itemActive" : "normal" }),
49
+ startIcon: /* @__PURE__ */ jsx(AdornmentIcon, { icon: `${urlIconPrefix}${item.iconUrl}`, variant: isRoot && item.itemInTreeActive || isRoot && item.active ? "root" : item.active ? "itemActive" : "normal" }),
50
50
  endIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: isOpen, active: item.active }) : null,
51
51
  onClick: () => handlerClick(),
52
52
  size: currentSize
@@ -50,6 +50,7 @@ function BooleanFormatter(props) {
50
50
  ownerState,
51
51
  className: clsx(getComponentSlotRoot(BOOLEAN_FORMATTER_KEY_COMPONENT), className),
52
52
  color: value ? "primary" : "default",
53
+ opacity: true,
53
54
  variant: "contained"
54
55
  }
55
56
  );
@@ -9,6 +9,7 @@ import clsx from "clsx";
9
9
  import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
10
10
  import { R as RHFTextFieldRootStyled, L as LabelStyled, T as TextFieldStyled, H as HelperErrorStyled } from "./slots/RHFTextFieldSlots.js";
11
11
  import { R as RHFTextFieldSlots } from "./slots/RHFTextFieldEnum.js";
12
+ import { g as getLimitCharacters } from "../../../utils/getLimitCharacters/getLimitCharacters.js";
12
13
  const RHFTextField = forwardRef((props, ref) => {
13
14
  const {
14
15
  name,
@@ -61,8 +62,9 @@ const RHFTextField = forwardRef((props, ref) => {
61
62
  control,
62
63
  render: ({ field: { onChange, value, ref: inputRef }, fieldState: { error } }) => {
63
64
  const onInternalChange = (event) => {
64
- const newValue = event.target.value;
65
- onChange(newValue);
65
+ const finalValue = other.maxLength ? getLimitCharacters({ limitCharacters: other.maxLength, value: event.target.value }) : event.target.value;
66
+ const stringValue = String(finalValue || "");
67
+ onChange(stringValue);
66
68
  };
67
69
  return /* @__PURE__ */ jsxs(Fragment, { children: [
68
70
  label && /* @__PURE__ */ jsx(
@@ -88,7 +90,7 @@ const RHFTextField = forwardRef((props, ref) => {
88
90
  autoComplete,
89
91
  onChange: onInternalChange,
90
92
  variant,
91
- value: type === "number" ? isNaN(parseFloat(value)) ? "" : value : value || "",
93
+ value: String(value || ""),
92
94
  fullWidth: true,
93
95
  error: !!error,
94
96
  type,
@@ -4,7 +4,7 @@ export declare const RHFTextFieldRootStyled: import('@emotion/styled').StyledCom
4
4
  export declare const LabelStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Label').LabelProps, keyof import('../../../Label').LabelProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
5
5
  ownerState: Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown>;
6
6
  }, {}, {}>;
7
- export declare const TextFieldStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../mui_extended/TextField/types').TextFieldProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "value" | "size" | "children" | "title" | "component" | "name" | "error" | "select" | "rows" | "id" | "type" | "disabled" | "hidden" | "content" | "style" | "variant" | "margin" | "translate" | "className" | "classes" | "sx" | "label" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "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" | "dataTestId" | "autoComplete" | "placeholder" | "required" | keyof import('react').RefAttributes<HTMLDivElement> | "maxRows" | "fullWidth" | "inputProps" | "inputRef" | "multiline" | "minRows" | "hiddenLabel" | "focused" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "SelectProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
7
+ export declare const TextFieldStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../mui_extended/TextField/types').TextFieldProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "value" | "size" | "children" | "title" | "component" | "name" | "error" | "select" | "rows" | "id" | "type" | "disabled" | "hidden" | "content" | "style" | "variant" | "margin" | "translate" | "className" | "classes" | "sx" | "label" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "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" | "dataTestId" | "autoComplete" | "maxLength" | "placeholder" | "required" | keyof import('react').RefAttributes<HTMLDivElement> | "maxRows" | "fullWidth" | "inputProps" | "inputRef" | "multiline" | "minRows" | "hiddenLabel" | "focused" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "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
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> & {
@@ -6,6 +6,7 @@ import { useFormContext, Controller } from "react-hook-form";
6
6
  import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
7
7
  import { R as RHFTextFieldPasswordRoot, L as LabelStyled, T as TextFieldStyled, I as IconButtonStyled } from "./slots/RHFTextFieldPasswordSlots.js";
8
8
  import { H as HelperError } from "../../HelperError/HelperError.js";
9
+ import { g as getLimitCharacters } from "../../../utils/getLimitCharacters/getLimitCharacters.js";
9
10
  const RHFTextFieldPassword = (props) => {
10
11
  const {
11
12
  name,
@@ -27,62 +28,69 @@ const RHFTextFieldPassword = (props) => {
27
28
  {
28
29
  name,
29
30
  control,
30
- render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */ jsxs(Fragment, { children: [
31
- label && /* @__PURE__ */ jsx(
32
- LabelStyled,
33
- {
34
- ownerState: { error: !!error },
35
- size: adjustedSize,
36
- label,
37
- htmlFor: name,
38
- mandatory,
39
- mandatoryMessage,
40
- helperMessage
41
- }
42
- ),
43
- /* @__PURE__ */ jsx(
44
- TextFieldStyled,
45
- {
46
- ownerState: { error: !!error },
47
- name,
48
- id: name,
49
- type: showPassword ? "text" : "password",
50
- size,
51
- error: !!error,
52
- disabled,
53
- inputProps: {
54
- role: "textbox",
55
- "aria-label": name,
56
- disabled,
31
+ render: ({ field: { onChange, value, ref }, fieldState: { error } }) => {
32
+ const onInternalChange = (event) => {
33
+ const finalValue = other.maxLength ? getLimitCharacters({ limitCharacters: other.maxLength, value: event.target.value }) : event.target.value;
34
+ const stringValue = String(finalValue || "");
35
+ onChange(stringValue);
36
+ };
37
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
38
+ label && /* @__PURE__ */ jsx(
39
+ LabelStyled,
40
+ {
41
+ ownerState: { error: !!error },
42
+ size: adjustedSize,
43
+ label,
44
+ htmlFor: name,
45
+ mandatory,
46
+ mandatoryMessage,
47
+ helperMessage
48
+ }
49
+ ),
50
+ /* @__PURE__ */ jsx(
51
+ TextFieldStyled,
52
+ {
53
+ ownerState: { error: !!error },
57
54
  name,
58
- type: showPassword ? "text" : "password"
59
- },
60
- InputProps: {
61
- /* InputAdornment: Componente de la librería externa material ui, permite agregar un elemento gráfico
62
- personalizado dentro del campo de texto*/
63
- endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
64
- IconButtonStyled,
65
- {
66
- ownerState: { error: !!error },
67
- onClick: () => setShowPassword(!showPassword),
68
- icon: showPassword ? `${host_static_assets}/${environment_assets}/frontend/components/rhftextfieldpassword/assests/icons/view.svg` : `${host_static_assets}/${environment_assets}/frontend/components/rhftextfieldpassword/assests/icons/view_off.svg`
69
- }
70
- ) })
71
- },
72
- onChange,
73
- value: value || "",
74
- inputRef: ref,
75
- ...other
76
- }
77
- ),
78
- error?.message && /* @__PURE__ */ jsx(
79
- HelperError,
80
- {
81
- message: error.message,
82
- size
83
- }
84
- )
85
- ] })
55
+ id: name,
56
+ type: showPassword ? "text" : "password",
57
+ size,
58
+ error: !!error,
59
+ disabled,
60
+ inputProps: {
61
+ role: "textbox",
62
+ "aria-label": name,
63
+ disabled,
64
+ name,
65
+ type: showPassword ? "text" : "password"
66
+ },
67
+ InputProps: {
68
+ /* InputAdornment: Componente de la librería externa material ui, permite agregar un elemento gráfico
69
+ personalizado dentro del campo de texto*/
70
+ endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
71
+ IconButtonStyled,
72
+ {
73
+ ownerState: { error: !!error },
74
+ onClick: () => setShowPassword(!showPassword),
75
+ icon: showPassword ? `${host_static_assets}/${environment_assets}/frontend/components/rhftextfieldpassword/assests/icons/view.svg` : `${host_static_assets}/${environment_assets}/frontend/components/rhftextfieldpassword/assests/icons/view_off.svg`
76
+ }
77
+ ) })
78
+ },
79
+ onChange: onInternalChange,
80
+ value: String(value || ""),
81
+ inputRef: ref,
82
+ ...other
83
+ }
84
+ ),
85
+ error?.message && /* @__PURE__ */ jsx(
86
+ HelperError,
87
+ {
88
+ message: error.message,
89
+ size
90
+ }
91
+ )
92
+ ] });
93
+ }
86
94
  }
87
95
  ) });
88
96
  };
@@ -1,7 +1,7 @@
1
1
  export declare const RHFTextFieldPasswordRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
2
2
  ownerState?: (Partial<import('../..').RHFTextFieldOwnerState> & Record<string, unknown>) | undefined;
3
3
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
4
- export declare const TextFieldStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../mui_extended/TextField/types').TextFieldProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "value" | "size" | "children" | "title" | "component" | "name" | "error" | "select" | "rows" | "id" | "type" | "disabled" | "hidden" | "content" | "style" | "variant" | "margin" | "translate" | "className" | "classes" | "sx" | "label" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "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" | "dataTestId" | "autoComplete" | "placeholder" | "required" | keyof import('react').RefAttributes<HTMLDivElement> | "maxRows" | "fullWidth" | "inputProps" | "inputRef" | "multiline" | "minRows" | "hiddenLabel" | "focused" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "SelectProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
4
+ export declare const TextFieldStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../mui_extended/TextField/types').TextFieldProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "value" | "size" | "children" | "title" | "component" | "name" | "error" | "select" | "rows" | "id" | "type" | "disabled" | "hidden" | "content" | "style" | "variant" | "margin" | "translate" | "className" | "classes" | "sx" | "label" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "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" | "dataTestId" | "autoComplete" | "maxLength" | "placeholder" | "required" | keyof import('react').RefAttributes<HTMLDivElement> | "maxRows" | "fullWidth" | "inputProps" | "inputRef" | "multiline" | "minRows" | "hiddenLabel" | "focused" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "SelectProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
5
5
  ownerState?: (Partial<import('../..').RHFTextFieldOwnerState> & Record<string, unknown>) | undefined;
6
6
  }, {}, {}>;
7
7
  export declare const IconButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "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" | "instaceDataTestId" | "placement" | "rotationAngle" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
@@ -18,6 +18,7 @@ export * from './mui_extended';
18
18
  export * from './formatters';
19
19
  export * from './formatters/dictionary';
20
20
  export * from './formatters/types';
21
+ export * from './FormContainer';
21
22
  export * from './GridLayout';
22
23
  export * from './HelmetPage';
23
24
  export * from './HelperError';
@@ -32,9 +33,11 @@ export * from './LoadingError';
32
33
  export * from './MenuActions';
33
34
  export * from './MFIsolationApp';
34
35
  export * from './MFLoader';
36
+ export * from './ImageText';
35
37
  export * from './NoItemSelected';
38
+ export * from './NoItemPrivileges';
36
39
  export * from './ObjectLogs';
37
- export * from './PaperForm/PaperForm';
40
+ export * from './PaperForm';
38
41
  export * from './PDFViewer';
39
42
  export * from './popups';
40
43
  export * from './PrintingSystem';
@@ -65,7 +65,8 @@ const Autocomplete = forwardRef(function Autocomplete2(props, ref) {
65
65
  refresh,
66
66
  handleRefresh,
67
67
  disabled,
68
- onOpenLocal
68
+ onOpenLocal,
69
+ open
69
70
  });
70
71
  if (isSkeleton) {
71
72
  return /* @__PURE__ */ jsx(
@@ -7,6 +7,7 @@ export type UseAdornmentsProps = {
7
7
  handleRefresh: () => void;
8
8
  disabled?: boolean;
9
9
  onOpenLocal: (event: React.MouseEvent<HTMLButtonElement>) => void;
10
+ open: boolean;
10
11
  };
11
12
  /**
12
13
  * Hook para el componente Autocomplete local
@@ -10,7 +10,8 @@ function useEndAdornments(props) {
10
10
  refresh,
11
11
  handleRefresh,
12
12
  disabled,
13
- onOpenLocal
13
+ onOpenLocal,
14
+ open
14
15
  } = props;
15
16
  const { host_static_assets, environment_assets } = useEnvironment();
16
17
  return /* @__PURE__ */ jsxs(AdormentsStyled, { children: [
@@ -37,7 +38,8 @@ function useEndAdornments(props) {
37
38
  icon: `${host_static_assets}/${environment_assets}/${icons.chevronDown}`,
38
39
  onClick: (event) => onOpenLocal(event),
39
40
  disabled,
40
- size: adjustedSize
41
+ size: adjustedSize,
42
+ rotationAngle: open ? 180 : 0
41
43
  }
42
44
  )
43
45
  ] });
@@ -85,7 +85,7 @@ function useValuesAndHandlers(props) {
85
85
  }
86
86
  };
87
87
  const onOpenLocal = useCallback((event) => {
88
- setOpen(true);
88
+ setOpen((currentState) => !currentState);
89
89
  if (onOpen) {
90
90
  onOpen(event);
91
91
  }
@@ -18,7 +18,7 @@ export declare const MenuListStyled: import('@emotion/styled').StyledComponent<P
18
18
  export declare const CircularProgressStyled: import('@emotion/styled').StyledComponent<Pick<import('../../CircularProgress/types').CircularProgressProps, keyof import('../../CircularProgress/types').CircularProgressProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
19
19
  ownerState?: (Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>) | undefined;
20
20
  }, {}, {}>;
21
- export declare const RenderInputStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../TextField/types').TextFieldProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "value" | "size" | "children" | "title" | "component" | "name" | "error" | "select" | "rows" | "id" | "type" | "disabled" | "hidden" | "content" | "style" | "variant" | "margin" | "translate" | "className" | "classes" | "sx" | "label" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "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" | "dataTestId" | "autoComplete" | "placeholder" | "required" | keyof import('react').RefAttributes<HTMLDivElement> | "maxRows" | "fullWidth" | "inputProps" | "inputRef" | "multiline" | "minRows" | "hiddenLabel" | "focused" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "SelectProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
21
+ export declare const RenderInputStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../TextField/types').TextFieldProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "value" | "size" | "children" | "title" | "component" | "name" | "error" | "select" | "rows" | "id" | "type" | "disabled" | "hidden" | "content" | "style" | "variant" | "margin" | "translate" | "className" | "classes" | "sx" | "label" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "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" | "dataTestId" | "autoComplete" | "maxLength" | "placeholder" | "required" | keyof import('react').RefAttributes<HTMLDivElement> | "maxRows" | "fullWidth" | "inputProps" | "inputRef" | "multiline" | "minRows" | "hiddenLabel" | "focused" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "SelectProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
22
22
  ownerState?: (Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>) | undefined;
23
23
  }, {}, {}>;
24
24
  export declare const TypographyStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Typography/types').TypographyProps, keyof import('../../Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
@@ -22,8 +22,8 @@ const tabStyles = {
22
22
  // Padding
23
23
  paddingTop: 0,
24
24
  paddingBottom: 0,
25
- paddingLeft: theme.vars.size.baseSpacings.sp2,
26
- paddingRight: theme.vars.size.baseSpacings.sp2,
25
+ paddingLeft: theme.vars.size.baseSpacings.sp3,
26
+ paddingRight: theme.vars.size.baseSpacings.sp3,
27
27
  position: "relative",
28
28
  // Altura para vista móvil y de escritorio basada en el tamaño
29
29
  ...getSizeStyles(
@@ -49,10 +49,10 @@ const tabStyles = {
49
49
  },
50
50
  //Default
51
51
  "&:not(.Mui-selected)": {
52
- ".M4LTab-icon div": {
53
- backgroundColor: theme.vars.palette.text.secondary
52
+ "& .M4LIcon-icon": {
53
+ backgroundColor: `${theme.vars.palette.text.secondary} !important`
54
54
  },
55
- ".M4LTab-tipography": {
55
+ "& .M4LTab-tipography": {
56
56
  color: theme.vars.palette.text.secondary
57
57
  }
58
58
  },
@@ -74,10 +74,10 @@ const tabStyles = {
74
74
  "&.Mui-selected": {
75
75
  background: theme.vars.palette.background.default,
76
76
  border: "unset",
77
- ".M4LTab-icon div": {
77
+ "& .M4LIcon-icon": {
78
78
  backgroundColor: ownerState?.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.primary.semanticText
79
79
  },
80
- ".M4LTab-tipography": {
80
+ "& .M4LTab-tipography": {
81
81
  color: ownerState?.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.primary.semanticText
82
82
  },
83
83
  // Efecto ripple en estado seleccionado`
@@ -24,7 +24,7 @@ const tabContentStyles = {
24
24
  zIndex: "0",
25
25
  top: "-1px",
26
26
  ...ownerState?.hasBackground ? {
27
- backgroundColor: theme.vars.palette.background.base,
27
+ backgroundColor: theme.vars.palette?.background.base,
28
28
  paddingLeft: theme.vars.size.baseSpacings.sp2,
29
29
  paddingRight: theme.vars.size.baseSpacings.sp2,
30
30
  paddingBottom: theme.vars.size.baseSpacings.sp2
@@ -1,7 +1,7 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useModuleSkeleton } from "@m4l/core";
3
3
  import clsx from "clsx";
4
- import { S as SkeletonStyled, T as TextFieldRootStyled } from "./slots/TextFieldSlots.js";
4
+ import { S as SkeletonStyled, T as TextFieldRootStyled, L as LimitContainerStyled, a as LimitTextFirstStyled, b as LimitTextSeparatorStyled, c as LimitTextSecondStyled } from "./slots/TextFieldSlots.js";
5
5
  import { g as getPropDataTestId } from "../../../test/getNameDataTestId.js";
6
6
  import { T as TEXT_FIELD_CLASSES, a as TEXT_FIELD_KEY_COMPONENT } from "./constants.js";
7
7
  import { T as TextFieldSlots } from "./slots/TextFieldEnum.js";
@@ -20,12 +20,14 @@ const TextField = forwardRef(function TextField2(props, ref) {
20
20
  autoComplete = "off",
21
21
  className,
22
22
  inputProps,
23
+ maxLength,
23
24
  ...others
24
25
  } = props;
25
26
  const { currentSize } = useComponentSize(size);
26
27
  const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
27
28
  const theme = useTheme();
28
29
  const paletteColor = error && theme.vars.palette.error || theme.vars.palette.primary;
30
+ const percent = maxLength ? value.length / maxLength * 100 : 0;
29
31
  const ownerState = {
30
32
  size: adjustedSize,
31
33
  disabled,
@@ -63,8 +65,17 @@ const TextField = forwardRef(function TextField2(props, ref) {
63
65
  "aria-invalid": error ? "true" : void 0,
64
66
  ...inputProps
65
67
  },
68
+ maxLength,
66
69
  InputProps: {
67
70
  ...InputProps,
71
+ ...maxLength && {
72
+ endAdornment: /* @__PURE__ */ jsxs(LimitContainerStyled, { children: [
73
+ /* @__PURE__ */ jsx(LimitTextFirstStyled, { role: "text", "aria-label": "current characters", variant: "body", color: "text.secondary", ownerState: { percent }, children: value.length }),
74
+ /* @__PURE__ */ jsx(LimitTextSeparatorStyled, { variant: "body", color: "text.secondary", ownerState: { percent }, children: "/" }),
75
+ /* @__PURE__ */ jsx(LimitTextSecondStyled, { role: "text", "aria-label": "limit characters", variant: "body", color: "text.secondary", ownerState: { percent }, children: maxLength }),
76
+ InputProps?.endAdornment
77
+ ] })
78
+ },
68
79
  disabled,
69
80
  type: InputProps?.type || "text"
70
81
  },
@@ -1,6 +1,15 @@
1
1
  import { g as getTypographyStyles } from "../../../utils/getTypographyStyles.js";
2
2
  import { a as getHeightSizeStyles, g as getSizeStyles } from "../../../utils/getSizeStyles/getSizeStyles.js";
3
3
  import { T as TEXT_FIELD_CLASSES } from "./constants.js";
4
+ const getLimitTextColor = (percent, theme) => {
5
+ if (percent && percent > 79 && percent < 100) {
6
+ return theme.vars.palette.warning.semanticText;
7
+ }
8
+ if (percent === 100) {
9
+ return theme.vars.palette.chips.forest.outlined.colorTone;
10
+ }
11
+ return theme.vars.palette.text.secondary;
12
+ };
4
13
  const textFieldStyles = {
5
14
  /**
6
15
  * Estilos personalizados para el componente TextField.
@@ -9,7 +18,7 @@ const textFieldStyles = {
9
18
  width: "100%",
10
19
  height: "auto",
11
20
  padding: 0,
12
- borderRadius: theme.vars.size.borderRadius.r1,
21
+ borderRadius: theme.vars.size.borderRadius["r1-5"],
13
22
  display: "flex",
14
23
  "& .MuiInputBase-root": {
15
24
  // Estilos globales del TextField 🌎
@@ -18,11 +27,12 @@ const textFieldStyles = {
18
27
  paddingRight: 0,
19
28
  paddingTop: 0,
20
29
  paddingBottom: 0,
30
+ overflow: "hidden",
21
31
  // Estilo de los bordes
22
32
  border: theme.vars.size.borderStroke.actionInput,
23
- borderColor: ownerState?.error && !ownerState?.readOnly ? `${ownerState?.paletteColor?.enabled}!important` : `${theme.vars.palette.border.default}!important`,
33
+ borderColor: ownerState?.error && !ownerState?.readOnly ? `${ownerState?.paletteColor?.enabled}!important` : `${theme.vars.palette.border.secondary}!important`,
24
34
  // Redondeado de los bordes
25
- borderRadius: theme.vars.size.borderRadius.r1,
35
+ borderRadius: theme.vars.size.borderRadius["r1-5"],
26
36
  // Altura
27
37
  height: "100%",
28
38
  // transición
@@ -152,6 +162,33 @@ const textFieldStyles = {
152
162
  "action"
153
163
  )
154
164
  }
165
+ }),
166
+ /**
167
+ * Estilos personalizados para el contenedor de limite de caracteres.
168
+ */
169
+ limitContainer: ({ theme }) => ({
170
+ display: "flex",
171
+ alignItems: "center",
172
+ paddingLeft: theme.vars.size.baseSpacings.sp1,
173
+ paddingRight: theme.vars.size.baseSpacings.sp1
174
+ }),
175
+ /**
176
+ * Estilos personalizados para el texto de limite de caracteres.
177
+ */
178
+ limitTextFirst: ({ ownerState, theme }) => ({
179
+ color: getLimitTextColor(ownerState?.percent || 0, theme)
180
+ }),
181
+ /**
182
+ * Estilos personalizados para el texto de limite de caracteres.
183
+ */
184
+ limitTextSeparator: ({ ownerState, theme }) => ({
185
+ color: getLimitTextColor(ownerState?.percent || 0, theme)
186
+ }),
187
+ /**
188
+ * Estilos personalizados para el texto de limite de caracteres.
189
+ */
190
+ limitTextSecond: ({ ownerState, theme }) => ({
191
+ color: getLimitTextColor(ownerState?.percent || 0, theme)
155
192
  })
156
193
  };
157
194
  export {