@luscii-healthtech/web-ui 30.3.0 → 30.4.0

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.
@@ -27,6 +27,8 @@ export declare const allowedColors: {
27
27
  readonly red: "ui-text-red-800";
28
28
  readonly green: "ui-text-green-800";
29
29
  readonly amber: "ui-text-yellow-800";
30
+ readonly orange: "ui-text-yellow-800";
31
+ readonly grey: "ui-text-slate-500";
30
32
  readonly white: "ui-text-white";
31
33
  readonly "blue-800": "ui-text-primary";
32
34
  readonly current: "ui-text-current";
@@ -973,6 +973,8 @@ const allowedColors = {
973
973
  red: "ui-text-red-800",
974
974
  green: "ui-text-green-800",
975
975
  amber: "ui-text-yellow-800",
976
+ orange: "ui-text-yellow-800",
977
+ grey: "ui-text-slate-500",
976
978
  white: "ui-text-white",
977
979
  "blue-800": "ui-text-primary",
978
980
  current: "ui-text-current",
@@ -5369,13 +5371,13 @@ const ImageCategory = (props) => {
5369
5371
  React__namespace.default.createElement("div", { className: "ui-flex ui-flex-row ui-flex-wrap" }, props.images.map((option, index) => {
5370
5372
  const isSelected = option === props.highlightedImage;
5371
5373
  return React__namespace.default.createElement(
5372
- "div",
5373
- { "data-test-id": `image-from-selector-${index.toString().padStart(2, "0")}`, key: option, role: "button", className: classNames__default.default("ui-m-2 ui-rounded ui-border ui-border-solid ui-border-slate-300 ui-p-2", {
5374
+ "button",
5375
+ { "data-test-id": `image-from-selector-${index.toString().padStart(2, "0")}`, key: option, "data-index": index, "data-src": option, onClick: props.handleImageClick, className: classNames__default.default("ui-m-2 ui-rounded ui-border ui-border-solid ui-border-slate-300 ui-p-2", {
5374
5376
  "ui-outline ui-outline-primary": isSelected,
5375
5377
  "ui-h-11 ui-w-11": props.isTypeCompact,
5376
5378
  "ui-h-22 ui-w-36": !props.isTypeCompact
5377
5379
  }) },
5378
- React__namespace.default.createElement(Image$2, { className: "ui-h-full ui-w-full ui-rounded", onClick: props.handleImageClick, src: option, "data-index": index, wrapperClassName: classNames__default.default({
5380
+ React__namespace.default.createElement(Image$2, { className: "ui-h-full ui-w-full ui-rounded", src: option, wrapperClassName: classNames__default.default({
5379
5381
  "ui-h-full ui-w-full": !props.isTypeCompact
5380
5382
  }) })
5381
5383
  );
@@ -5438,8 +5440,11 @@ const ImagePickerInner = ({
5438
5440
  if (datasetIndex && parseInt(datasetIndex, 10) === clearImageIndex) {
5439
5441
  handleDeleteClick();
5440
5442
  }
5441
- setHighlightedImage(event.currentTarget.src);
5442
- setError(null);
5443
+ const src = event.currentTarget.dataset["src"];
5444
+ if (src) {
5445
+ setHighlightedImage(src);
5446
+ setError(null);
5447
+ }
5443
5448
  };
5444
5449
  const handleDeleteClick = () => {
5445
5450
  handleChange({ target: { name, value: "" } });