@luscii-healthtech/web-ui 2.11.0 → 2.12.1
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/Image/Image.d.ts +10 -0
- package/dist/components/ImagePicker/ImageCategory.d.ts +14 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +24 -0
- package/dist/utils/string.utils.d.ts +1 -0
- package/dist/web-ui-tailwind.css +22 -0
- package/dist/web-ui.cjs.development.js +20 -3
- 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 +20 -3
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { MouseEventHandler } from "react";
|
|
2
|
+
interface ImageProps {
|
|
3
|
+
src: string;
|
|
4
|
+
className: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
onClick?: MouseEventHandler<HTMLSpanElement>;
|
|
7
|
+
showIconOnFailure?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const Image: React.VFC<ImageProps>;
|
|
10
|
+
export default Image;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface CategoryProps {
|
|
3
|
+
folder: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}
|
|
6
|
+
interface ImageCategoryProps {
|
|
7
|
+
category: CategoryProps;
|
|
8
|
+
images: string[];
|
|
9
|
+
highlightedImage: string | null;
|
|
10
|
+
handleImageClick: (event: React.FormEvent<HTMLInputElement>) => void;
|
|
11
|
+
isTypeCompact: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const ImageCategory: (props: ImageCategoryProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CategoryProps } from "./ImageCategory";
|
|
3
|
+
interface TargetProps {
|
|
4
|
+
target: {
|
|
5
|
+
name: string | null | undefined;
|
|
6
|
+
value: string | null | undefined;
|
|
7
|
+
file?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface ImagePickerProps {
|
|
11
|
+
name: string;
|
|
12
|
+
images: string[];
|
|
13
|
+
categories: CategoryProps[];
|
|
14
|
+
preselectedImage?: string;
|
|
15
|
+
clearImageIndex?: number;
|
|
16
|
+
type: "normal" | "compact";
|
|
17
|
+
isDisabled: boolean;
|
|
18
|
+
handleChange: (target: TargetProps) => void;
|
|
19
|
+
isUploadButtonVisible?: boolean;
|
|
20
|
+
isClearButtonVisible?: boolean;
|
|
21
|
+
localisation: Record<"openModalButton" | "selectButton" | "error" | "uploadImage" | "clearSelection" | "cancel" | "search" | "modalTitle", string>;
|
|
22
|
+
}
|
|
23
|
+
export declare const ImagePicker: React.VFC<ImagePickerProps>;
|
|
24
|
+
export {};
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -755,6 +755,12 @@ video {
|
|
|
755
755
|
background-color: rgba(0, 116, 221, var(--bg-opacity));
|
|
756
756
|
}
|
|
757
757
|
|
|
758
|
+
.bg-secondary {
|
|
759
|
+
--bg-opacity: 1;
|
|
760
|
+
background-color: #F3F4F6;
|
|
761
|
+
background-color: rgba(243, 244, 246, var(--bg-opacity));
|
|
762
|
+
}
|
|
763
|
+
|
|
758
764
|
.bg-negative {
|
|
759
765
|
--bg-opacity: 1;
|
|
760
766
|
background-color: #FFF1F1;
|
|
@@ -1179,6 +1185,10 @@ video {
|
|
|
1179
1185
|
flex-grow: 1;
|
|
1180
1186
|
}
|
|
1181
1187
|
|
|
1188
|
+
.flex-shrink-0 {
|
|
1189
|
+
flex-shrink: 0;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1182
1192
|
.order-1 {
|
|
1183
1193
|
order: 1;
|
|
1184
1194
|
}
|
|
@@ -1231,6 +1241,14 @@ video {
|
|
|
1231
1241
|
height: 3.25rem;
|
|
1232
1242
|
}
|
|
1233
1243
|
|
|
1244
|
+
.h-22 {
|
|
1245
|
+
height: 5.5rem;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
.h-44 {
|
|
1249
|
+
height: 11rem;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1234
1252
|
.h-56 {
|
|
1235
1253
|
height: 14rem;
|
|
1236
1254
|
}
|
|
@@ -1473,6 +1491,10 @@ video {
|
|
|
1473
1491
|
max-height: 19.5rem;
|
|
1474
1492
|
}
|
|
1475
1493
|
|
|
1494
|
+
.max-h-120 {
|
|
1495
|
+
max-height: 30rem;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1476
1498
|
.max-h-screen {
|
|
1477
1499
|
max-height: 100vh;
|
|
1478
1500
|
}
|
|
@@ -1150,7 +1150,7 @@ var ButtonV2 = function ButtonV2(_ref) {
|
|
|
1150
1150
|
return /*#__PURE__*/React__default.createElement("span", null, "Invalid props passed to this component.");
|
|
1151
1151
|
}
|
|
1152
1152
|
|
|
1153
|
-
var buttonClassName = classNames(["h-11", "relative flex flex-row justify-center items-center", "border", "transition-outline transition-colors duration-300 ease-in-out", "rounded-full", "leading-none", "shadow-sm", "cursor-pointer", "focus:outline-primary", "group"], {
|
|
1153
|
+
var buttonClassName = classNames(["h-11", "relative flex flex-row justify-center items-center", "border", "transition-outline transition-colors duration-300 ease-in-out", "rounded-full", "leading-none", "shadow-sm", "cursor-pointer", "focus:outline-primary", "group", "flex-shrink-0"], {
|
|
1154
1154
|
"w-11": !text && icon,
|
|
1155
1155
|
"pl-4 pr-6": text && icon,
|
|
1156
1156
|
"px-4": text && !icon
|
|
@@ -2031,7 +2031,24 @@ function Modal(_ref) {
|
|
|
2031
2031
|
"no-title-bar": !showTitleBar
|
|
2032
2032
|
});
|
|
2033
2033
|
ReactModal.setAppElement("body");
|
|
2034
|
-
|
|
2034
|
+
/**
|
|
2035
|
+
* There's a known issue with react-modal:
|
|
2036
|
+
*
|
|
2037
|
+
* https://github.com/reactjs/react-modal/issues/939
|
|
2038
|
+
*
|
|
2039
|
+
* Where it doesn't stop propagating the click event from the overlay or the modal element itsef.
|
|
2040
|
+
* This function prevents clicks from propagating outside the modal element.
|
|
2041
|
+
* @param event
|
|
2042
|
+
*/
|
|
2043
|
+
|
|
2044
|
+
var handleModalClick = function handleModalClick(event) {
|
|
2045
|
+
event.stopPropagation();
|
|
2046
|
+
};
|
|
2047
|
+
|
|
2048
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2049
|
+
"data-test-id": "clicking-propagation-preventer",
|
|
2050
|
+
onClick: handleModalClick
|
|
2051
|
+
}, /*#__PURE__*/React__default.createElement(ReactModal, {
|
|
2035
2052
|
isOpen: isOpen,
|
|
2036
2053
|
contentLabel: title,
|
|
2037
2054
|
portalClassName: "cweb-modal-portal",
|
|
@@ -2062,7 +2079,7 @@ function Modal(_ref) {
|
|
|
2062
2079
|
className: classNames("cweb-modal-content", {
|
|
2063
2080
|
"px-6 py-4": withPadding
|
|
2064
2081
|
})
|
|
2065
|
-
}, children) : null);
|
|
2082
|
+
}, children) : null));
|
|
2066
2083
|
}
|
|
2067
2084
|
|
|
2068
2085
|
var _excluded$7 = ["buttons", "buttonsAlignment", "children"];
|