@arquimedes.co/eureka-forms 3.0.4-refactor → 3.0.6-refactor

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.
@@ -77,6 +77,10 @@ const StyledDialog = styled(MuiDialog)(({ theme }) => ({
77
77
  borderRadius: '5px',
78
78
  backgroundColor: 'transparent',
79
79
  },
80
+ '& .Erk-MuiPickersLayout-root': {
81
+ display: 'flex',
82
+ flexDirection: 'column',
83
+ },
80
84
  '& .Erk-MuiDialogActions-root': {
81
85
  '& .Erk-MuiButtonBase-root': { fontWeight: 700 },
82
86
  },
@@ -98,7 +102,7 @@ const StyledDay = styled(MuiPickerDay)(({ theme }) => ({
98
102
  }));
99
103
  function CustomDatePicker({ error, required, disabled, readOnly, helperText, size = 'small', pickTime = false, ...others }) {
100
104
  if (pickTime) {
101
- return (_jsx(StyledDateTimePicker, { ampm: true, ...others, disabled: disabled ?? readOnly, defaultValue: required ? new Date() : undefined, showDaysOutsideCurrentMonth: true, slotProps: {
105
+ return (_jsx(StyledDateTimePicker, { ampm: true, reduceAnimations: true, ...others, disabled: disabled ?? readOnly, defaultValue: required ? new Date() : undefined, showDaysOutsideCurrentMonth: true, slotProps: {
102
106
  actionBar: {
103
107
  actions: ['clear', 'accept'],
104
108
  },
@@ -159,7 +163,7 @@ function CustomDatePicker({ error, required, disabled, readOnly, helperText, siz
159
163
  } }));
160
164
  }
161
165
  else {
162
- return (_jsx(StyledDatePicker, { ...others, readOnly: readOnly, disabled: disabled ?? readOnly, defaultValue: required ? new Date() : undefined, showDaysOutsideCurrentMonth: true, views: ['year', 'month', 'day'], slotProps: {
166
+ return (_jsx(StyledDatePicker, { ...others, reduceAnimations: true, readOnly: readOnly, disabled: disabled ?? readOnly, defaultValue: required ? new Date() : undefined, showDaysOutsideCurrentMonth: true, views: ['year', 'month', 'day'], slotProps: {
163
167
  actionBar: {
164
168
  actions: ['clear', 'accept'],
165
169
  },
@@ -6,7 +6,6 @@ interface ErkPhoneInputProps {
6
6
  onChange: (value: string) => void;
7
7
  inputRef?: any;
8
8
  readOnly?: boolean;
9
- defaultCountry?: string;
10
9
  }
11
10
  /**
12
11
  * Generic phoneinput with apps designs. Is class due to the use in the react-hook-forms library
@@ -7,6 +7,7 @@ import es from 'i18n-iso-countries/langs/es.json';
7
7
  import { InputAdornment, Select, styled } from '@mui/material';
8
8
  import { MenuItem } from '@mui/material';
9
9
  import { StyledTextField } from '../ErkTextField/ErkTextField';
10
+ import { useAppSelector } from '../../hooks';
10
11
  isoCountries.registerLocale(es);
11
12
  const StyledSelect = styled(Select)(({ theme }) => ({
12
13
  padding: 0,
@@ -29,7 +30,8 @@ const StyledSelect = styled(Select)(({ theme }) => ({
29
30
  borderBottom: 'none',
30
31
  },
31
32
  }));
32
- function CustomPhoneInput({ value, onChange, inputRef, readOnly = false, disabled = false, defaultCountry, ...others }) {
33
+ function CustomPhoneInput({ value, onChange, inputRef, readOnly = false, disabled = false, ...others }) {
34
+ const defaultCountry = useAppSelector((state) => state.global.countryCode);
33
35
  const { inputValue, handlePhoneValueChange, inputRef: phoneRef, country, setCountry, } = usePhoneInput({
34
36
  value: '+' + value,
35
37
  inputRef,
@@ -4,4 +4,3 @@ import * as StepFunctions from './FormSteps/StepFunctions';
4
4
  export type { StepProps, EurekaFormProps };
5
5
  export { EurekaForm, StepFunctions };
6
6
  export default EurekaForm;
7
- export { default as ReactFromModule } from 'react';
package/dist/index.lib.js CHANGED
@@ -2,4 +2,3 @@ import EurekaForm from './App/App';
2
2
  import * as StepFunctions from './FormSteps/StepFunctions';
3
3
  export { EurekaForm, StepFunctions };
4
4
  export default EurekaForm;
5
- export { default as ReactFromModule } from 'react';
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":"3.0.4-refactor",
4
+ "version":"3.0.6-refactor",
5
5
  "scripts": {
6
6
  "watch": "tsc --noEmit --watch --project tsconfig.app.json",
7
7
  "start": "vite",