@sphereon/ui-components.ssi-react 0.4.1-unstable.133 → 0.4.1-unstable.139

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.
@@ -1,4 +1,4 @@
1
- import { FC, MouseEventHandler } from 'react';
1
+ import { CSSProperties, FC, MouseEventHandler } from 'react';
2
2
  import { ButtonIcon } from '@sphereon/ui-components.core';
3
3
  type Props = {
4
4
  icon: ButtonIcon;
@@ -6,6 +6,7 @@ type Props = {
6
6
  onClick: MouseEventHandler;
7
7
  disabled?: boolean | (() => boolean);
8
8
  iconColor?: string;
9
+ style?: CSSProperties;
9
10
  };
10
11
  declare const IconButton: FC<Props>;
11
12
  export default IconButton;
@@ -3,7 +3,7 @@ import { fontColors, OpacityStyleEnum } from '@sphereon/ui-components.core';
3
3
  import { getIcon } from '../../../utils';
4
4
  import { IconButtonContainerStyled as Container, SSITextH3Styled as Caption } from '../../../styles';
5
5
  const IconButton = (props) => {
6
- const { caption, icon, iconColor = fontColors.dark } = props;
6
+ const { caption, icon, iconColor = fontColors.dark, style } = props;
7
7
  const disabled = typeof props.disabled === 'function' ? props.disabled() : props.disabled ?? false;
8
8
  const onClick = async (event) => {
9
9
  if (!disabled) {
@@ -11,6 +11,7 @@ const IconButton = (props) => {
11
11
  }
12
12
  };
13
13
  return (_jsxs(Container, { style: {
14
+ ...style,
14
15
  ...(disabled && { opacity: OpacityStyleEnum.DISABLED }),
15
16
  }, onClick: onClick, children: [getIcon(icon, iconColor), caption && _jsx(Caption, { children: caption })] }));
16
17
  };
@@ -5,7 +5,7 @@ import { elementColors } from '@sphereon/ui-components.core';
5
5
  import { MuiColorInput, MuiColorInputButton } from 'mui-color-input';
6
6
  import { JsonFormsCustomControlKey } from '../../../../types';
7
7
  const ColorPickerControl = (props) => {
8
- const { data, handleChange, path, format = 'hex', isAlphaHidden = true, label } = props;
8
+ const { data, handleChange, path, format = 'hex', isAlphaHidden = true, label, errors } = props;
9
9
  const onValueChange = async (value) => {
10
10
  handleChange(path, value);
11
11
  };
@@ -17,7 +17,7 @@ const ColorPickerControl = (props) => {
17
17
  border: `1px solid ${elementColors.lightGrey}`
18
18
  } });
19
19
  };
20
- return (_jsx(MuiColorInput, { label: label, format: format, value: data, onChange: onValueChange, isAlphaHidden: isAlphaHidden, Adornment: getAdornmentElement, style: { display: 'flex' } }));
20
+ return (_jsx(MuiColorInput, { label: label, format: format, value: data, error: errors.length > 0, onChange: onValueChange, placeholder: label, isAlphaHidden: isAlphaHidden, Adornment: getAdornmentElement, style: { display: 'flex' } }));
21
21
  };
22
22
  export const colorPickerControlTester = rankWith(4, optionIs('type', JsonFormsCustomControlKey.COLOR_PICKER));
23
23
  export default withJsonFormsControlProps(ColorPickerControl);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.ssi-react",
3
3
  "private": false,
4
- "version": "0.4.1-unstable.133+90bddc9",
4
+ "version": "0.4.1-unstable.139+a42a116",
5
5
  "description": "SSI UI components for React",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -50,7 +50,7 @@
50
50
  "@mui/x-date-pickers": "^8.18.0",
51
51
  "@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.45.94",
52
52
  "@sphereon/ssi-types": "0.34.1-feature.SSISDK.45.94",
53
- "@sphereon/ui-components.core": "0.4.1-unstable.133+90bddc9",
53
+ "@sphereon/ui-components.core": "0.4.1-unstable.139+a42a116",
54
54
  "@tanstack/react-table": "^8.9.3",
55
55
  "ajv": "^8.17.1",
56
56
  "ajv-formats": "^3.0.1",
@@ -72,5 +72,5 @@
72
72
  "peerDependencies": {
73
73
  "react": ">= 18"
74
74
  },
75
- "gitHead": "90bddc958fb2625419be8cd9f38cf9f61ed750f7"
75
+ "gitHead": "a42a1168bf8cae518d2ab5dfa2ced647d2948d8d"
76
76
  }