@topconsultnpm/sdkui-react-beta 6.8.19 → 6.8.20

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.
@@ -41,4 +41,5 @@ export declare const StyledTextareaEditor: import("styled-components/dist/types"
41
41
  $isMobile?: boolean;
42
42
  $maxHeight?: string;
43
43
  $borderRadius?: string;
44
+ $resize?: boolean;
44
45
  }>> & string;
@@ -97,6 +97,7 @@ export const StyledTextareaEditor = styled.textarea `
97
97
  border-radius: ${props => props.$borderRadius ?? TMEditorsDefaultBorderRadius}; /* Slightly increased radius for smoother corners */
98
98
  min-width: ${props => (props.$isMobile ? '70px' : '100%')}; /* Adjust for mobile */
99
99
  max-height: ${props => props.$maxHeight || 'auto'};
100
+ resize: ${props => (props.$resize === false ? 'none' : 'both')};
100
101
  &:focus {
101
102
  outline: none;
102
103
  background-image: linear-gradient(white, #E4E9F7);
@@ -11,6 +11,7 @@ interface ITMTextArea extends ITMEditorBase {
11
11
  maxHeight?: string;
12
12
  rows?: number;
13
13
  maxLength?: number;
14
+ resize?: boolean;
14
15
  }
15
16
  declare const TMTextArea: React.FunctionComponent<ITMTextArea>;
16
17
  export default TMTextArea;
@@ -11,7 +11,7 @@ import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
11
11
  // Define the TMTextArea component
12
12
  const TMTextArea = (props) => {
13
13
  // Extract properties from the props object
14
- const { label = '', value = '', width = '100%', height = 'auto', autoFocus = false, validationItems = [], disabled = false, isModifiedWhen = false, fontSize = FontSize.defaultFontSize, elementStyle = {}, icon = null, labelPosition = 'left', readOnly = false, onValueChanged, onBlur, placeHolder, formulaItems = [], buttons = [], maxHeight = 'auto', rows, maxLength } = props;
14
+ const { label = '', value = '', width = '100%', height = 'auto', autoFocus = false, validationItems = [], disabled = false, isModifiedWhen = false, fontSize = FontSize.defaultFontSize, elementStyle = {}, icon = null, labelPosition = 'left', readOnly = false, onValueChanged, onBlur, placeHolder, formulaItems = [], buttons = [], maxHeight = 'auto', rows, maxLength, resize = true } = props;
15
15
  // Reference to the textarea DOM element
16
16
  const inputRef = useRef(null);
17
17
  // Stores the textarea is focused
@@ -108,7 +108,7 @@ const TMTextArea = (props) => {
108
108
  const y = e.clientY - bounds.top;
109
109
  // set the x and y coordinates of our users right click
110
110
  setPoints({ x, y });
111
- }, "$isMobile": deviceType === DeviceType.MOBILE, "$maxHeight": maxHeight, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$width": width }), buttons.map((buttonItem, index) => {
111
+ }, "$isMobile": deviceType === DeviceType.MOBILE, "$maxHeight": maxHeight, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$width": width, "$resize": resize }), buttons.map((buttonItem, index) => {
112
112
  return (_jsx(StyledEditorButtonIcon, { onClick: buttonItem.onClick, "$index": index, "$transform": '-26px', children: _jsx(TMTooltip, { content: buttonItem.text, children: buttonItem.icon }) }, index));
113
113
  }), formulaItems.length > 0 && clicked && (_jsx(TMContextMenu, { menuData: formulaMenuItems, top: points.y, left: points.x, onMenuItemClick: (formula) => insertText(formula) })), _jsx(TMVilViewer, { vil: validationItems })] });
114
114
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.8.19",
3
+ "version": "6.8.20",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",