@luscii-healthtech/web-ui 2.55.0 → 2.56.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.
@@ -4,15 +4,17 @@ export declare type DropzonePresentationProps = {
4
4
  message?: string;
5
5
  icon?: IconKey;
6
6
  isHighlighted?: boolean;
7
+ isClickable?: boolean;
7
8
  ref?: Ref<HTMLDivElement>;
8
9
  children?: ReactNode;
9
10
  className?: string;
10
11
  dataTestId?: string;
11
12
  horizontal?: boolean;
12
13
  };
13
- export declare type DropzoneProps = Omit<DropzonePresentationProps, "isHighlighted"> & {
14
+ export declare type DropzoneProps = Omit<DropzonePresentationProps, "isHighlighted" | "isClickable"> & {
14
15
  draggableIdentifier: string | number;
15
16
  disabled?: boolean;
16
17
  data?: Record<string, unknown>;
17
18
  dataTestId?: string;
19
+ onClick?: React.HTMLAttributes<HTMLButtonElement>["onClick"];
18
20
  };
@@ -837,6 +837,12 @@ video {
837
837
  background-color: rgba(242, 250, 253, var(--bg-opacity));
838
838
  }
839
839
 
840
+ .hover\:bg-blue-100:hover {
841
+ --bg-opacity: 1;
842
+ background-color: #DFF6FF;
843
+ background-color: rgba(223, 246, 255, var(--bg-opacity));
844
+ }
845
+
840
846
  .hover\:bg-blue-900:hover {
841
847
  --bg-opacity: 1;
842
848
  background-color: #045BAA;
@@ -2538,7 +2538,7 @@ var DraggableBaseList = function DraggableBaseList(_ref) {
2538
2538
  }));
2539
2539
  };
2540
2540
 
2541
- var _excluded$4 = ["draggableIdentifier", "disabled", "data", "dataTestId"];
2541
+ var _excluded$4 = ["draggableIdentifier", "disabled", "data", "dataTestId", "onClick"];
2542
2542
 
2543
2543
  var DefaultState = function DefaultState(_ref) {
2544
2544
  var icon = _ref.icon,
@@ -2574,13 +2574,15 @@ var DropzonePresentation = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
2574
2574
  var message = _ref2.message,
2575
2575
  icon = _ref2.icon,
2576
2576
  isHighlighted = _ref2.isHighlighted,
2577
+ isClickable = _ref2.isClickable,
2577
2578
  className = _ref2.className,
2578
2579
  dataTestId = _ref2.dataTestId,
2579
2580
  children = _ref2.children,
2580
2581
  horizontal = _ref2.horizontal;
2581
2582
  var classes = classNames("bg-blue-50 border-2 border-blue-800 rounded flex items-center justify-center", {
2582
2583
  "border-dashed": !isHighlighted,
2583
- "border-solid": isHighlighted
2584
+ "border-solid": isHighlighted,
2585
+ "hover:bg-blue-100 transition-colors ease-in-out duration-300": isClickable
2584
2586
  }, className);
2585
2587
  return /*#__PURE__*/React__default.createElement("div", {
2586
2588
  className: classes,
@@ -2597,6 +2599,7 @@ var Dropzone = function Dropzone(_ref3) {
2597
2599
  disabled = _ref3.disabled,
2598
2600
  data = _ref3.data,
2599
2601
  dataTestId = _ref3.dataTestId,
2602
+ onClick = _ref3.onClick,
2600
2603
  props = _objectWithoutPropertiesLoose(_ref3, _excluded$4);
2601
2604
 
2602
2605
  var _useDroppable = core.useDroppable({
@@ -2607,12 +2610,23 @@ var Dropzone = function Dropzone(_ref3) {
2607
2610
  setNodeRef = _useDroppable.setNodeRef,
2608
2611
  isOver = _useDroppable.isOver;
2609
2612
 
2610
- return /*#__PURE__*/React__default.createElement(DropzonePresentation, _extends({
2613
+ var presentation = /*#__PURE__*/React__default.createElement(DropzonePresentation, _extends({
2611
2614
  ref: setNodeRef,
2612
- isHighlighted: isOver
2615
+ isHighlighted: isOver,
2616
+ isClickable: onClick && !disabled
2613
2617
  }, props, {
2614
2618
  dataTestId: dataTestId != null ? dataTestId : "dropzone-" + identifier
2615
2619
  }));
2620
+
2621
+ if (onClick) {
2622
+ return /*#__PURE__*/React__default.createElement("button", {
2623
+ onClick: onClick,
2624
+ disabled: disabled,
2625
+ className: "block w-full"
2626
+ }, presentation);
2627
+ }
2628
+
2629
+ return presentation;
2616
2630
  };
2617
2631
 
2618
2632
  var SortableBaseListItem = function SortableBaseListItem(props) {