@luscii-healthtech/web-ui 2.54.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.
- package/dist/components/Dropzone/Dropzone.types.d.ts +4 -1
- package/dist/web-ui-tailwind.css +6 -0
- package/dist/web-ui.cjs.development.js +33 -10
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +33 -10
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,14 +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;
|
|
12
|
+
horizontal?: boolean;
|
|
11
13
|
};
|
|
12
|
-
export declare type DropzoneProps = Omit<DropzonePresentationProps, "isHighlighted"> & {
|
|
14
|
+
export declare type DropzoneProps = Omit<DropzonePresentationProps, "isHighlighted" | "isClickable"> & {
|
|
13
15
|
draggableIdentifier: string | number;
|
|
14
16
|
disabled?: boolean;
|
|
15
17
|
data?: Record<string, unknown>;
|
|
16
18
|
dataTestId?: string;
|
|
19
|
+
onClick?: React.HTMLAttributes<HTMLButtonElement>["onClick"];
|
|
17
20
|
};
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -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,22 +2538,29 @@ 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,
|
|
2545
|
-
message = _ref.message
|
|
2545
|
+
message = _ref.message,
|
|
2546
|
+
_ref$horizontal = _ref.horizontal,
|
|
2547
|
+
horizontal = _ref$horizontal === void 0 ? false : _ref$horizontal;
|
|
2546
2548
|
|
|
2547
2549
|
if (!icon && !message) {
|
|
2548
2550
|
return null;
|
|
2549
2551
|
}
|
|
2550
2552
|
|
|
2553
|
+
var className = classNames("p-4 flex items-center", {
|
|
2554
|
+
"flex-col justify-center": !horizontal,
|
|
2555
|
+
"flex-row w-full ": horizontal
|
|
2556
|
+
});
|
|
2551
2557
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2552
|
-
className:
|
|
2558
|
+
className: className
|
|
2553
2559
|
}, icon && /*#__PURE__*/React__default.createElement(Icon, {
|
|
2554
2560
|
name: icon,
|
|
2555
2561
|
className: classNames("text-blue-800", {
|
|
2556
|
-
"mb-2": message
|
|
2562
|
+
"mb-2": message && !horizontal,
|
|
2563
|
+
"mr-2": horizontal
|
|
2557
2564
|
})
|
|
2558
2565
|
}), message && /*#__PURE__*/React__default.createElement(Text, {
|
|
2559
2566
|
type: "base",
|
|
@@ -2567,20 +2574,24 @@ var DropzonePresentation = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
2567
2574
|
var message = _ref2.message,
|
|
2568
2575
|
icon = _ref2.icon,
|
|
2569
2576
|
isHighlighted = _ref2.isHighlighted,
|
|
2577
|
+
isClickable = _ref2.isClickable,
|
|
2570
2578
|
className = _ref2.className,
|
|
2571
2579
|
dataTestId = _ref2.dataTestId,
|
|
2572
|
-
children = _ref2.children
|
|
2580
|
+
children = _ref2.children,
|
|
2581
|
+
horizontal = _ref2.horizontal;
|
|
2573
2582
|
var classes = classNames("bg-blue-50 border-2 border-blue-800 rounded flex items-center justify-center", {
|
|
2574
2583
|
"border-dashed": !isHighlighted,
|
|
2575
|
-
"border-solid": isHighlighted
|
|
2584
|
+
"border-solid": isHighlighted,
|
|
2585
|
+
"hover:bg-blue-100 transition-colors ease-in-out duration-300": isClickable
|
|
2576
2586
|
}, className);
|
|
2577
2587
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2578
2588
|
className: classes,
|
|
2579
2589
|
ref: ref,
|
|
2580
2590
|
"data-test-id": dataTestId
|
|
2581
|
-
}, children
|
|
2591
|
+
}, children || /*#__PURE__*/React__default.createElement(DefaultState, {
|
|
2582
2592
|
icon: icon,
|
|
2583
|
-
message: message
|
|
2593
|
+
message: message,
|
|
2594
|
+
horizontal: horizontal
|
|
2584
2595
|
}));
|
|
2585
2596
|
});
|
|
2586
2597
|
var Dropzone = function Dropzone(_ref3) {
|
|
@@ -2588,6 +2599,7 @@ var Dropzone = function Dropzone(_ref3) {
|
|
|
2588
2599
|
disabled = _ref3.disabled,
|
|
2589
2600
|
data = _ref3.data,
|
|
2590
2601
|
dataTestId = _ref3.dataTestId,
|
|
2602
|
+
onClick = _ref3.onClick,
|
|
2591
2603
|
props = _objectWithoutPropertiesLoose(_ref3, _excluded$4);
|
|
2592
2604
|
|
|
2593
2605
|
var _useDroppable = core.useDroppable({
|
|
@@ -2598,12 +2610,23 @@ var Dropzone = function Dropzone(_ref3) {
|
|
|
2598
2610
|
setNodeRef = _useDroppable.setNodeRef,
|
|
2599
2611
|
isOver = _useDroppable.isOver;
|
|
2600
2612
|
|
|
2601
|
-
|
|
2613
|
+
var presentation = /*#__PURE__*/React__default.createElement(DropzonePresentation, _extends({
|
|
2602
2614
|
ref: setNodeRef,
|
|
2603
|
-
isHighlighted: isOver
|
|
2615
|
+
isHighlighted: isOver,
|
|
2616
|
+
isClickable: onClick && !disabled
|
|
2604
2617
|
}, props, {
|
|
2605
2618
|
dataTestId: dataTestId != null ? dataTestId : "dropzone-" + identifier
|
|
2606
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;
|
|
2607
2630
|
};
|
|
2608
2631
|
|
|
2609
2632
|
var SortableBaseListItem = function SortableBaseListItem(props) {
|