@topconsultnpm/sdkui-react-beta 6.9.47 → 6.9.48

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.
@@ -13,7 +13,7 @@ const StyledCheckBoxContainer = styled.div `
13
13
  const StyledCheckBoxLabel = styled.div `
14
14
  margin-right: ${props => props.$labelPosition === 'left' ? '5px' : '0'};
15
15
  margin-left: ${props => props.$labelPosition === 'right' ? '5px' : '0'};
16
- color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.text_normal : TMColors.disabled};
16
+ color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : props.$labelColor ? props.$labelColor : TMColors.text_normal : TMColors.disabled};
17
17
  font-size: ${props => props.$fontSize};
18
18
  user-select: none;
19
19
  &:focus{
@@ -29,7 +29,7 @@ const StyledCheckbox = styled.input `
29
29
  height: 14px;
30
30
  cursor: ${props => !props.$disabled && 'pointer'};
31
31
  `;
32
- const TMCheckBox = ({ isModifiedWhen, elementStyle, disabled = false, label, value, labelPosition = 'right', fontSize = FontSize.defaultFontSize, onValueChanged }) => {
32
+ const TMCheckBox = ({ labelColor, isModifiedWhen, elementStyle, disabled = false, label, value, labelPosition = 'right', fontSize = FontSize.defaultFontSize, onValueChanged }) => {
33
33
  const [initialValue, setInitialValue] = useState(value);
34
34
  const [currentValue, setCurrentValue] = useState(value);
35
35
  useEffect(() => { setInitialValue(value); }, []);
@@ -83,7 +83,7 @@ const TMCheckBox = ({ isModifiedWhen, elementStyle, disabled = false, label, val
83
83
  return myBool;
84
84
  };
85
85
  const renderedCheckbox = () => {
86
- return (_jsxs(StyledCheckBoxContainer, { "$disabled": disabled, "$labelPosition": labelPosition, onKeyDown: (e) => e.code === 'Space' && !disabled && onValueChanged && onValueChanged(currentValue), onClick: () => { !disabled && onValueChanged && onValueChanged(currentValue); }, children: [label && _jsx(StyledCheckBoxLabel, { tabIndex: 0, "$isModifiedWhen": isModifiedWhen, "$disabled": disabled, "$labelPosition": labelPosition, "$fontSize": fontSize, children: label }), _jsx(StyledCheckbox, { tabIndex: -1, "$isModifiedWhen": isModifiedWhen, "$disabled": disabled, type: 'checkbox', checked: !isChecked(), onChange: () => { } })] }));
86
+ return (_jsxs(StyledCheckBoxContainer, { "$disabled": disabled, "$labelPosition": labelPosition, onKeyDown: (e) => e.code === 'Space' && !disabled && onValueChanged && onValueChanged(currentValue), onClick: () => { !disabled && onValueChanged && onValueChanged(currentValue); }, children: [label && _jsx(StyledCheckBoxLabel, { "$labelColor": labelColor, tabIndex: 0, "$isModifiedWhen": isModifiedWhen, "$disabled": disabled, "$labelPosition": labelPosition, "$fontSize": fontSize, children: label }), _jsx(StyledCheckbox, { tabIndex: -1, "$isModifiedWhen": isModifiedWhen, "$disabled": disabled, type: 'checkbox', checked: !isChecked(), onChange: () => { } })] }));
87
87
  };
88
88
  return (_jsx("div", { style: elementStyle, children: renderedCheckbox() }));
89
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.9.47",
3
+ "version": "6.9.48",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",