diff --git a/src/components/DataItem/styles.module.scss b/src/components/DataItem/styles.module.scss index 6c69f358..cf2750e1 100644 --- a/src/components/DataItem/styles.module.scss +++ b/src/components/DataItem/styles.module.scss @@ -30,4 +30,5 @@ font-weight: 500; margin-top: 2px; text-align: left; + word-break: break-all; } diff --git a/src/components/DateInput/index.jsx b/src/components/DateInput/index.jsx index 93484e84..916080e1 100644 --- a/src/components/DateInput/index.jsx +++ b/src/components/DateInput/index.jsx @@ -8,14 +8,16 @@ import PT from "prop-types"; import DatePicker from "react-datepicker"; import "./styles.module.scss"; -const DateInput = ({ value, onChange, placeholder }) => { +const DateInput = (props) => { return (
); @@ -25,6 +27,8 @@ DateInput.propTypes = { value: PT.string, onChange: PT.func.isRequired, placeholder: PT.string, + onBlur: PT.func, + onFocus: PT.func, }; export default DateInput; diff --git a/src/components/FormField/index.jsx b/src/components/FormField/index.jsx index 1e89a552..e7b281cc 100644 --- a/src/components/FormField/index.jsx +++ b/src/components/FormField/index.jsx @@ -18,26 +18,28 @@ const FormField = ({ field, isGroupField }) => { {({ input, meta }) => (
- + { !field.readonly && ( + + )} {field.type === FORM_FIELD_TYPE.TEXT && ( { - input.onChange(v); - }} - className={meta.error ? "error" : ""} + className={meta.error && meta.touched ? "error" : ""} readonly={field.readonly} + onChange={input.onChange} + onBlur={input.onBlur} + onFocus={input.onFocus} /> )} {field.type === FORM_FIELD_TYPE.NUMBER && ( @@ -47,7 +49,9 @@ const FormField = ({ field, isGroupField }) => { type="number" minValue={field.minValue} onChange={input.onChange} - className={meta.error ? "error" : ""} + onBlur={input.onBlur} + onFocus={input.onFocus} + className={meta.error && meta.touched ? "error" : ""} /> )} {field.type === FORM_FIELD_TYPE.TEXTAREA && ( @@ -55,29 +59,31 @@ const FormField = ({ field, isGroupField }) => { placeholder={field.placeholder} value={input?.value ?? ""} onChange={input.onChange} - className={meta.error ? "error" : ""} + onBlur={input.onBlur} + onFocus={input.onFocus} + className={meta.error && meta.touched ? "error" : ""} /> )} {field.type === FORM_FIELD_TYPE.DATE && ( { - input.onChange(date); - }} + onChange={input.onChange} + onBlur={input.onBlur} + onFocus={input.onFocus} /> )} {field.type === FORM_FIELD_TYPE.SELECT && ( { - input.onChange(val); - }} options={field.selectOptions} isMulti={field.isMulti} + onChange={input.onChange} + onBlur={input.onBlur} + onFocus={input.onFocus} /> )} - {field.isRequired && meta.error && ( + {field.isRequired && meta.error && meta.touched && (
{meta.error}
)}
diff --git a/src/components/FormField/styles.module.scss b/src/components/FormField/styles.module.scss index 715a47d0..4409651e 100644 --- a/src/components/FormField/styles.module.scss +++ b/src/components/FormField/styles.module.scss @@ -12,6 +12,7 @@ top: 12px; background: white; z-index: 1; + padding: 0 3px; } .job-field-no-label { @@ -21,6 +22,15 @@ input:not([type="checkbox"]), textarea { margin-bottom: 0px; + &::placeholder { + color: #AAAAAA; + font-family: Roboto; + font-size: 14px; + font-weight: 400; + line-height: 22px; + text-align: left; + text-transform: none; + } } input:read-only { diff --git a/src/components/ReactSelect/index.jsx b/src/components/ReactSelect/index.jsx index 16e35318..25a226a2 100644 --- a/src/components/ReactSelect/index.jsx +++ b/src/components/ReactSelect/index.jsx @@ -8,53 +8,74 @@ import PT from "prop-types"; import Select from "react-select"; import "./styles.module.scss"; -const ReactSelect = ({ - value, - onChange, - placeholder, - error, - isMulti, - options, -}) => { +const ReactSelect = (props) => { const customStyles = { control: (provided, state) => ({ ...provided, - minHeight: "36px", + minHeight: "40px", + border: "1px solid #aaaaab", + borderColor: state.isFocused ? "#55a5ff" : "#aaaaab", + boxShadow: state.isFocused ? "0 0 2px 1px #cee6ff" : provided.boxShadow }), - menu: (provided, state) => ({ + menu: (provided) => ({ ...provided, - minHeight: "36px", + minHeight: "40px", zIndex: 10, }), - valueContainer: (provided, state) => ({ + valueContainer: (provided) => ({ ...provided, - padding: "0 6px", + padding: "2px 6px", }), - input: (provided, state) => ({ + input: (provided) => ({ ...provided, margin: "0px", - height: "36px", + height: "auto", + padding: "0", + }), - indicatorSeparator: (state) => ({ + indicatorSeparator: () => ({ display: "none", }), - indicatorsContainer: (provided, state) => ({ + indicatorsContainer: (provided) => ({ ...provided, - height: "40px", + height: "auto", }), + option: (provided) => ({ + ...provided, + minHeight: "32px" + }), + placeholder: (provided) => ({ + ...provided, + color: "#AAAAAA", + fontFamily: "Roboto", + fontSize: "14px", + lineHeight: "22px", + textAlign: "left", + fontWeight: "400" + }), + multiValue: (provided) => ({ + ...provided, + margin: "3px 3px", + color: "#AAAAAA", + fontFamily: "Roboto", + fontSize: "14px", + lineHeight: "22px", + textAlign: "left", + borderRadius: "5px" + }) }; return (