@arquimedes.co/eureka-forms 1.9.120 → 1.9.122

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.
@@ -137,7 +137,11 @@ function AYFStepMapper(props) {
137
137
  case AYFFormStepTypes.AYF_YEAR:
138
138
  return (_jsx(TextInputStep, __assign({}, props, { step: props.step, defaultValue: new Date().getFullYear().toString() })));
139
139
  case AYFFormStepTypes.AYF_BILL_NUM:
140
- return (_jsx(TextInputStep, __assign({}, props, { step: props.step, maxLength: 50, icon: _jsx(DescriptionIcon, { style: { color: '#757575', fontSize: 23 } }) })));
140
+ return (_jsx(TextInputStep, __assign({}, props, { step: props.step, validation: {
141
+ value: '^\\S*$',
142
+ type: 'OTHER',
143
+ message: 'No se permiten espacios',
144
+ }, maxLength: 30, icon: _jsx(DescriptionIcon, { style: { color: '#757575', fontSize: 23 } }) })));
141
145
  case AYFFormStepTypes.AYF_CUT_OFF_DATE:
142
146
  return (_jsx(DatePickerStep, __assign({}, props, { step: props.step, defaultValue: new Date() })));
143
147
  case AYFFormStepTypes.AYF_ICA_CITY:
@@ -35,7 +35,7 @@ var __rest = (this && this.__rest) || function (s, e) {
35
35
  }
36
36
  return t;
37
37
  };
38
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
38
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
39
39
  import React from 'react';
40
40
  import { makeStyles } from '@material-ui/core/styles';
41
41
  import TextField from '@material-ui/core/TextField';
@@ -103,6 +103,7 @@ var useTextfieldStyles = function (props) {
103
103
  },
104
104
  '& .EF-MuiFormHelperText-root': {
105
105
  color: props.helperTextColor,
106
+ position: 'relative',
106
107
  marginRight: props.maxLength ? 40 : 14,
107
108
  },
108
109
  '& .EF-MuiFormHelperText-root.Mui-error': {
@@ -142,22 +143,20 @@ function CustomTextfield(_a) {
142
143
  if (maxLength) {
143
144
  inputProps.inputProps = { maxLength: maxLength };
144
145
  }
145
- return (_jsxs("div", __assign({ style: { position: 'relative', width: '100%', maxWidth: '100%' } }, { children: [_jsx(TextField, __assign({ classes: classes }, others, { value: value !== null && value !== void 0 ? value : '', multiline: multiline, variant: "outlined", size: "small", fullWidth: true, InputProps: inputProps })), length !== null && (_jsxs("div", __assign({ style: others.helperText
146
- ? {
147
- position: 'absolute',
148
- bottom: '3px',
149
- right: '8px',
150
- fontSize: '12px',
151
- color: helperTextColor,
152
- }
153
- : {
154
- fontSize: '12px',
155
- color: helperTextColor,
156
- textAlign: 'right',
157
- paddingRight: '8px',
158
- paddingTop: '2px',
159
- paddingBottom: '2px',
160
- } }, { children: [length, "/", maxLength] })))] })));
146
+ return (_jsxs("div", __assign({ style: { position: 'relative', width: '100%', maxWidth: '100%' } }, { children: [_jsx(TextField, __assign({ classes: classes }, others, { value: value !== null && value !== void 0 ? value : '', multiline: multiline, variant: "outlined", size: "small", fullWidth: true, InputProps: inputProps, helperText: others.helperText ? (_jsxs(React.Fragment, { children: [others.helperText, length !== null && (_jsxs("div", __assign({ style: {
147
+ position: 'absolute',
148
+ top: '-3px',
149
+ right: '-32px',
150
+ fontSize: '12px',
151
+ color: helperTextColor,
152
+ } }, { children: [length, "/", maxLength] })))] })) : undefined })), length !== null && !others.helperText && (_jsxs("div", __assign({ style: {
153
+ fontSize: '12px',
154
+ color: helperTextColor,
155
+ textAlign: 'right',
156
+ paddingRight: '8px',
157
+ paddingTop: '2px',
158
+ paddingBottom: '2px',
159
+ } }, { children: [length, "/", maxLength] })))] })));
161
160
  }
162
161
  /**
163
162
  * Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version": "1.9.120",
4
+ "version": "1.9.122",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",