@topconsultnpm/sdkui-react-beta 6.9.55 → 6.9.57

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.
@@ -68,38 +68,21 @@ export const StyledTextareaEditor = styled.textarea `
68
68
  border: 1px solid;
69
69
  border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
70
70
  border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid;
71
- border-bottom-color: ${props => props.$vil.length === 0
72
- ? !props.$isModified
73
- ? TMColors.border_normal
74
- : TMColors.isModified
75
- : editorColorManager(props.$vil)};
76
- color: ${props => !props.$disabled
77
- ? props.$vil.length === 0
78
- ? !props.$isModified
79
- ? 'black'
80
- : TMColors.isModified
81
- : editorColorManager(props.$vil)
82
- : TMColors.disabled};
71
+ border-bottom-color: ${props => props.$vil.length === 0 ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
72
+ color: ${props => props.readOnly ? '#525252' : !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
73
+ background: ${props => props.readOnly ? 'linear-gradient(white 20%, #d6d6d6 80%)' : 'white'};
83
74
  border-radius: ${props => props.$borderRadius ?? TMEditorsDefaultBorderRadius}; /* Slightly increased radius for smoother corners */
84
75
  min-width: ${props => (props.$isMobile ? '70px' : '100%')}; /* Adjust for mobile */
85
76
  max-height: ${props => props.$maxHeight ?? 'auto'};
86
77
  resize: ${props => (props.$resize === false ? 'none' : 'both')};
87
78
  &:focus {
88
- outline: none;
89
- background-image: linear-gradient(white, #E4E9F7);
90
- border: ${props => props.$isModified
91
- ? `1px solid ${TMColors.isModified}`
92
- : '1px solid rgb(180,180,180)'};
93
- border-bottom: 2px solid;
94
- border-bottom-color: ${props => props.$vil.length === 0
95
- ? !props.$isModified
96
- ? TMColors.primary
97
- : TMColors.isModified
98
- : editorColorManager(props.$vil)};
79
+ outline: none;
80
+ background-image: linear-gradient(white, #E4E9F7);
81
+ border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
82
+ border-bottom: 2px solid;
83
+ border-bottom-color: ${props => props.$vil.length === 0 ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
99
84
  }
100
-
101
85
  font-size: ${props => props.$fontSize};
102
-
103
86
  &::placeholder {
104
87
  color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)};
105
88
  font-size: ${props => props.$fontSize};
@@ -59,7 +59,7 @@ const TMTextBox = ({ autoFocus, maxLength, labelColor, precision, scale, showCle
59
59
  }, [maxValue, currentValue, currentType]);
60
60
  // Handle autofocus behavior on mount
61
61
  useEffect(() => {
62
- if (autoFocus && inputRef.current) {
62
+ if ((!disabled || !readOnly) && autoFocus && inputRef.current) {
63
63
  inputRef.current.focus(); // Focus the input field
64
64
  }
65
65
  }, [autoFocus]); // This effect runs when the autoFocus prop changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.9.55",
3
+ "version": "6.9.57",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",