shared-uicomponents-library 1.0.72 → 1.0.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-uicomponents-library",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -68,6 +68,7 @@
68
68
  "@storybook/react-webpack5": "^8.2.9",
69
69
  "@storybook/test": "^8.2.9",
70
70
  "@svgr/rollup": "^8.1.0",
71
+ "@types/lodash": "^4.17.17",
71
72
  "@types/react": "^18.3.3",
72
73
  "eslint": "^9.23.0",
73
74
  "eslint-plugin-justinanastos": "^1.3.1",
@@ -28,36 +28,38 @@ export const HelpTextContainer = styled('div')<{
28
28
  },
29
29
  }));
30
30
 
31
- export const StyledTextField = styled(TextField)<{ isEnglish?: boolean }>(
32
- ({ isEnglish, theme }) => ({
33
- '& input[type="number"]::-webkit-outer-spin-button': {
34
- '-webkit-appearance': 'none',
35
- margin: 0,
36
- },
37
- '& input[type="number"]::-webkit-inner-spin-button': {
38
- '-webkit-appearance': 'none',
39
- margin: 0,
40
- },
41
- '& .MuiInputBase-input': {
42
- height: 'unset',
43
- ...theme.typography.body_large_regular_lh_s_desktop,
44
- },
45
- '& .MuiInputLabel-root': {
46
- transformOrigin: isEnglish ? 'top left' : 'top right',
47
- right: 0,
48
- transition: 'transform 0.2s ease-in',
49
- ...theme.typography.body_large_regular_lh_s_desktop,
50
- },
51
- '& .MuiInputLabel-shrink': theme.typography.label_XMedium_regular_desktop,
52
- '& .Mui-focused': {
53
- color: 'inherit !important',
54
- },
55
- '& .MuiInput-underline:after': {
56
- borderBottom: 'none',
57
- },
58
- ...(isEnglish && { direction: 'ltr' }),
59
- }),
60
- );
31
+ export const StyledTextField = styled(TextField)<{
32
+ isEnglish?: boolean;
33
+ isErrorShown: boolean;
34
+ }>(({ isEnglish, theme, isErrorShown }) => ({
35
+ '& input[type="number"]::-webkit-outer-spin-button': {
36
+ '-webkit-appearance': 'none',
37
+ margin: 0,
38
+ },
39
+ '& input[type="number"]::-webkit-inner-spin-button': {
40
+ '-webkit-appearance': 'none',
41
+ margin: 0,
42
+ },
43
+ '& .MuiInputBase-input': {
44
+ height: 'unset',
45
+ ...(isErrorShown && { color: `${theme.palette.text.error} !important` }),
46
+ ...theme.typography.body_large_regular_lh_s_desktop,
47
+ },
48
+ '& .MuiInputLabel-root': {
49
+ transformOrigin: isEnglish ? 'top left' : 'top right',
50
+ right: 0,
51
+ transition: 'transform 0.2s ease-in',
52
+ ...theme.typography.body_large_regular_lh_s_desktop,
53
+ },
54
+ '& .MuiInputLabel-shrink': theme.typography.label_XMedium_regular_desktop,
55
+ '& .Mui-focused': {
56
+ color: 'inherit !important',
57
+ },
58
+ '& .MuiInput-underline:after': {
59
+ borderBottom: 'none',
60
+ },
61
+ ...(isEnglish && { direction: 'ltr' }),
62
+ }));
61
63
 
62
64
  export const InputLabelPropsStyle: CSSProperties | undefined = {
63
65
  transformOrigin: 'top right',
@@ -135,6 +135,7 @@ const Input = <T extends FieldValues>({
135
135
  },
136
136
  }),
137
137
  }}
138
+ isErrorShown={isErrorShown}
138
139
  label={label || placeholder}
139
140
  aria-label={inputAriaLabel}
140
141
  aria-required={required}