@topconsultnpm/sdkui-react-beta 6.7.106 → 6.7.108
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.
|
@@ -17,28 +17,29 @@ export const StyledEditorContainer = styled.div `
|
|
|
17
17
|
position: relative;
|
|
18
18
|
`;
|
|
19
19
|
export const StyledEditor = styled.input `
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
20
|
+
width: ${props => props.$width};
|
|
21
|
+
padding: ${props => props.$type === 'password' ? '5px 10px 5px 13px' : '5px 13px'};
|
|
22
|
+
border: 1px solid;
|
|
23
|
+
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
24
|
+
border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid ;
|
|
25
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
26
|
+
color: ${props => props.readOnly ? '#525252' : !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
27
|
+
border-radius: ${props => props.$borderRadius ?? TMEditorsDefaultBorderRadius};
|
|
28
|
+
min-width: ${props => props.$isMobile && '70px'};
|
|
29
|
+
background: ${props => props.readOnly ? 'linear-gradient(white 20%, #d6d6d6 80%)' : 'transparent'};
|
|
30
|
+
&:focus{
|
|
31
|
+
outline: none;
|
|
32
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
33
|
+
border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
34
|
+
border-bottom: 2px solid ;
|
|
35
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
36
|
+
}
|
|
36
37
|
|
|
38
|
+
font-size: ${props => props.$fontSize};
|
|
39
|
+
&::placeholder {
|
|
40
|
+
color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)};
|
|
37
41
|
font-size: ${props => props.$fontSize};
|
|
38
|
-
|
|
39
|
-
color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)};
|
|
40
|
-
font-size: ${props => props.$fontSize};
|
|
41
|
-
}
|
|
42
|
+
}
|
|
42
43
|
`;
|
|
43
44
|
export const StyledEditorIcon = styled.div `
|
|
44
45
|
color: ${props => !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'rgb(80,80,80)' : TMColors.tertiary : editorColorManager(props.$vil) : 'rgb(180,180,180)'};
|
|
@@ -21,7 +21,6 @@ const StyledShowPasswordIcon = styled.div `
|
|
|
21
21
|
`;
|
|
22
22
|
const StyledTextBoxEditorButton = styled.div `
|
|
23
23
|
color: ${TMColors.button_icon};
|
|
24
|
-
background: ${props => props.$readOnly ? 'linear-gradient(white, #b0b0b0)' : 'transparent'} ;
|
|
25
24
|
display: flex;
|
|
26
25
|
align-items: center;
|
|
27
26
|
position: relative;
|
|
@@ -144,11 +143,11 @@ const TMTextBox = ({ autoFocus, maxLength, labelColor, precision, scale, showCle
|
|
|
144
143
|
}
|
|
145
144
|
}, "$isMobile": deviceType === DeviceType.MOBILE, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$maxValue": maxValue, "$width": width, "$type": currentType, "$borderRadius": borderRadius }), initialType === 'password' && currentValue && _jsx(StyledShowPasswordIcon, { onClick: toggleShowPassword, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: showPasswordIcon() }), initialType !== 'password' &&
|
|
146
145
|
_jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'absolute', right: '6px', top: label.length > 0 ? '20px' : '7px', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [showClearButton && currentValue &&
|
|
147
|
-
_jsx(StyledTextBoxEditorButton, {
|
|
146
|
+
_jsx(StyledTextBoxEditorButton, { onClick: () => {
|
|
148
147
|
onValueChanged?.({ target: { value: undefined } });
|
|
149
148
|
onBlur?.(undefined);
|
|
150
149
|
}, children: _jsx(IconClearButton, {}) }), buttons.map((buttonItem, index) => {
|
|
151
|
-
return (_jsx(StyledTextBoxEditorButton, {
|
|
150
|
+
return (_jsx(StyledTextBoxEditorButton, { onClick: buttonItem.onClick, children: _jsx(TMTooltip, { content: buttonItem.text, children: buttonItem.icon }) }, buttonItem.text));
|
|
152
151
|
})] }), formulaItems.length > 0 && (_jsx(ContextMenu, { dataSource: formulaMenuItems, target: `#text-${id}`, onItemClick: (e) => { insertText(e.itemData?.text ?? ''); } })), _jsx(TMVilViewer, { vil: validationItems })] }));
|
|
153
152
|
};
|
|
154
153
|
const renderedLeftLabelTextBox = () => {
|