@luscii-healthtech/web-ui 2.50.0 → 2.50.2
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.d.ts +5 -0
- package/dist/components/Dropzone/Dropzone.types.d.ts +17 -0
- package/dist/components/Dropzone/index.d.ts +2 -0
- package/dist/components/Form/form.types.d.ts +10 -1
- package/dist/components/Icons/MouseIcon.d.ts +3 -0
- package/dist/components/Icons/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/web-ui-tailwind.css +4 -0
- package/dist/web-ui.cjs.development.js +91 -1
- 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 +91 -3
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DropzoneProps, DropzonePresentationProps } from "./Dropzone.types";
|
|
3
|
+
export declare const DropzonePresentation: React.FC<DropzonePresentationProps>;
|
|
4
|
+
export declare const Dropzone: React.FC<DropzoneProps>;
|
|
5
|
+
export default Dropzone;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode, Ref } from "react";
|
|
2
|
+
import type { IconKey } from "../Icons/types/IconProps.type";
|
|
3
|
+
export declare type DropzonePresentationProps = {
|
|
4
|
+
message?: string;
|
|
5
|
+
icon?: IconKey;
|
|
6
|
+
isHighlighted?: boolean;
|
|
7
|
+
ref?: Ref<HTMLDivElement>;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
dataTestId?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type DropzoneProps = Omit<DropzonePresentationProps, "isHighlighted"> & {
|
|
13
|
+
draggableIdentifier: string | number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
data?: Record<string, unknown>;
|
|
16
|
+
dataTestId?: string;
|
|
17
|
+
};
|
|
@@ -22,7 +22,16 @@ export interface FormFieldLabelerProps {
|
|
|
22
22
|
*/
|
|
23
23
|
decoratorClassname?: string;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* This is an empty entry in the field form. To be used
|
|
27
|
+
* when there's logic to add/remove fields from the array.
|
|
28
|
+
*
|
|
29
|
+
* Using this makes life easier and avoids having to splice/push/concat fields.
|
|
30
|
+
*/
|
|
31
|
+
interface FieldVoidConfiguration extends Partial<FormFieldBaseConfiguration<never>> {
|
|
32
|
+
type: "void";
|
|
33
|
+
}
|
|
34
|
+
export declare type FormFieldConfiguration<TFieldValues> = FieldInputConfiguration | FieldSelectConfiguration | FieldImagePickerConfiguration | FieldRadioGroupConfiguration | FieldRowConfiguration<TFieldValues> | FieldCheckboxConfiguration | FieldCheckboxListConfiguration | FieldVoidConfiguration;
|
|
26
35
|
/**
|
|
27
36
|
* @backwardscompatibility
|
|
28
37
|
* @deprecated - this is an alias for `FormFieldConfiguration`, for backwards compatibility the name can remain for now, but
|
|
@@ -30,6 +30,7 @@ export { default as LightBulbIcon } from "./LightBulbIcon";
|
|
|
30
30
|
export { default as LinkIcon } from "./LinkIcon";
|
|
31
31
|
export { default as LockIcon } from "./LockIcon";
|
|
32
32
|
export { default as MessagesIcon } from "./MessagesIcon";
|
|
33
|
+
export { default as MouseIcon } from "./MouseIcon";
|
|
33
34
|
export { default as NotesIcon } from "./NotesIcon";
|
|
34
35
|
export { default as PinIcon } from "./PinIcon";
|
|
35
36
|
export { default as PrintIcon } from "./PrintIcon";
|
package/dist/index.d.ts
CHANGED
|
@@ -78,3 +78,4 @@ export * from "./components/Icons";
|
|
|
78
78
|
export { Divider } from "./components/Divider/Divider";
|
|
79
79
|
export { FullPageModal } from "./components/Modal/FullPageModal";
|
|
80
80
|
export { Card, type CardProps } from "./components/Card/Card";
|
|
81
|
+
export { Dropzone, DropzoneProps } from "./components/Dropzone";
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -30,6 +30,7 @@ var htmlToDraft = _interopDefault(require('html-to-draftjs'));
|
|
|
30
30
|
require('react-draft-wysiwyg/dist/react-draft-wysiwyg.css');
|
|
31
31
|
var pick = _interopDefault(require('lodash/pick'));
|
|
32
32
|
var index_ie11 = require('react-hook-form/dist/index.ie11');
|
|
33
|
+
var core = require('@dnd-kit/core');
|
|
33
34
|
|
|
34
35
|
function _regeneratorRuntime() {
|
|
35
36
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
@@ -1553,6 +1554,21 @@ var SvgMessagesIcon = function SvgMessagesIcon(props) {
|
|
|
1553
1554
|
|
|
1554
1555
|
var MessagesIcon = /*#__PURE__*/iconWrapper(SvgMessagesIcon);
|
|
1555
1556
|
|
|
1557
|
+
var SvgMouseIcon = function SvgMouseIcon(props) {
|
|
1558
|
+
return /*#__PURE__*/React__default.createElement("svg", _extends({
|
|
1559
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1560
|
+
width: 15,
|
|
1561
|
+
height: 20,
|
|
1562
|
+
fill: "none",
|
|
1563
|
+
viewBox: "0 0 15 20"
|
|
1564
|
+
}, props), /*#__PURE__*/React__default.createElement("path", {
|
|
1565
|
+
fill: "currentColor",
|
|
1566
|
+
d: "M7.5 20c-1.933 0-3.583-.683-4.95-2.05C1.183 16.583.5 14.933.5 13V7c0-1.933.683-3.583 2.05-4.95C3.917.683 5.567 0 7.5 0c1.933 0 3.583.683 4.95 2.05C13.817 3.417 14.5 5.067 14.5 7v6c0 1.933-.683 3.583-2.05 4.95C11.083 19.317 9.433 20 7.5 20Zm1-13h4c0-1.2-.379-2.258-1.137-3.175C10.604 2.908 9.65 2.333 8.5 2.1V7Zm-6 0h4V2.1c-1.15.233-2.104.808-2.863 1.725A4.837 4.837 0 0 0 2.5 7Zm5 11c1.383 0 2.563-.487 3.538-1.462.975-.975 1.462-2.155 1.462-3.538V9h-10v4c0 1.383.488 2.563 1.463 3.538C4.938 17.513 6.117 18 7.5 18Z"
|
|
1567
|
+
}));
|
|
1568
|
+
};
|
|
1569
|
+
|
|
1570
|
+
var MouseIcon = /*#__PURE__*/iconWrapper(SvgMouseIcon);
|
|
1571
|
+
|
|
1556
1572
|
var SvgNotesIcon = function SvgNotesIcon(props) {
|
|
1557
1573
|
return /*#__PURE__*/React__default.createElement("svg", _extends({
|
|
1558
1574
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1821,6 +1837,7 @@ var Icons = {
|
|
|
1821
1837
|
LinkIcon: LinkIcon,
|
|
1822
1838
|
LockIcon: LockIcon,
|
|
1823
1839
|
MessagesIcon: MessagesIcon,
|
|
1840
|
+
MouseIcon: MouseIcon,
|
|
1824
1841
|
NotesIcon: NotesIcon,
|
|
1825
1842
|
PinIcon: PinIcon,
|
|
1826
1843
|
PrintIcon: PrintIcon,
|
|
@@ -8143,8 +8160,11 @@ function FormFieldMapper(formFieldProps, useFormReturn) {
|
|
|
8143
8160
|
}));
|
|
8144
8161
|
}
|
|
8145
8162
|
|
|
8163
|
+
case "void":
|
|
8164
|
+
return null;
|
|
8165
|
+
|
|
8146
8166
|
default:
|
|
8147
|
-
return
|
|
8167
|
+
return null;
|
|
8148
8168
|
}
|
|
8149
8169
|
}
|
|
8150
8170
|
|
|
@@ -8207,6 +8227,74 @@ var Card = function Card(_ref) {
|
|
|
8207
8227
|
}), children);
|
|
8208
8228
|
};
|
|
8209
8229
|
|
|
8230
|
+
var _excluded$u = ["draggableIdentifier", "disabled", "data", "dataTestId"];
|
|
8231
|
+
|
|
8232
|
+
var DefaultState = function DefaultState(_ref) {
|
|
8233
|
+
var icon = _ref.icon,
|
|
8234
|
+
message = _ref.message;
|
|
8235
|
+
|
|
8236
|
+
if (!icon && !message) {
|
|
8237
|
+
return null;
|
|
8238
|
+
}
|
|
8239
|
+
|
|
8240
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8241
|
+
className: "p-4 flex flex-col items-center justify-center"
|
|
8242
|
+
}, icon && /*#__PURE__*/React__default.createElement(Icon, {
|
|
8243
|
+
name: icon,
|
|
8244
|
+
className: classNames("text-blue-800", {
|
|
8245
|
+
"mb-2": message
|
|
8246
|
+
})
|
|
8247
|
+
}), message && /*#__PURE__*/React__default.createElement(Text, {
|
|
8248
|
+
type: "base",
|
|
8249
|
+
color: "blue-800",
|
|
8250
|
+
className: "text-center",
|
|
8251
|
+
text: message
|
|
8252
|
+
}));
|
|
8253
|
+
};
|
|
8254
|
+
|
|
8255
|
+
var DropzonePresentation = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
8256
|
+
var message = _ref2.message,
|
|
8257
|
+
icon = _ref2.icon,
|
|
8258
|
+
isHighlighted = _ref2.isHighlighted,
|
|
8259
|
+
className = _ref2.className,
|
|
8260
|
+
dataTestId = _ref2.dataTestId,
|
|
8261
|
+
children = _ref2.children;
|
|
8262
|
+
var classes = classNames("bg-blue-50 border-2 border-blue-800 rounded flex items-center justify-center", {
|
|
8263
|
+
"border-dashed": !isHighlighted,
|
|
8264
|
+
"border-solid": isHighlighted
|
|
8265
|
+
}, className);
|
|
8266
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8267
|
+
className: classes,
|
|
8268
|
+
ref: ref,
|
|
8269
|
+
"data-test-id": dataTestId
|
|
8270
|
+
}, children ? children : /*#__PURE__*/React__default.createElement(DefaultState, {
|
|
8271
|
+
icon: icon,
|
|
8272
|
+
message: message
|
|
8273
|
+
}));
|
|
8274
|
+
});
|
|
8275
|
+
var Dropzone = function Dropzone(_ref3) {
|
|
8276
|
+
var identifier = _ref3.draggableIdentifier,
|
|
8277
|
+
disabled = _ref3.disabled,
|
|
8278
|
+
data = _ref3.data,
|
|
8279
|
+
dataTestId = _ref3.dataTestId,
|
|
8280
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded$u);
|
|
8281
|
+
|
|
8282
|
+
var _useDroppable = core.useDroppable({
|
|
8283
|
+
id: identifier,
|
|
8284
|
+
disabled: disabled,
|
|
8285
|
+
data: data
|
|
8286
|
+
}),
|
|
8287
|
+
setNodeRef = _useDroppable.setNodeRef,
|
|
8288
|
+
isOver = _useDroppable.isOver;
|
|
8289
|
+
|
|
8290
|
+
return /*#__PURE__*/React__default.createElement(DropzonePresentation, _extends({
|
|
8291
|
+
ref: setNodeRef,
|
|
8292
|
+
isHighlighted: isOver
|
|
8293
|
+
}, props, {
|
|
8294
|
+
dataTestId: dataTestId != null ? dataTestId : "dropzone-" + identifier
|
|
8295
|
+
}));
|
|
8296
|
+
};
|
|
8297
|
+
|
|
8210
8298
|
exports.AccordionList = AccordionList;
|
|
8211
8299
|
exports.AddIcon = AddIcon;
|
|
8212
8300
|
exports.AlertsIcon = AlertsIcon;
|
|
@@ -8236,6 +8324,7 @@ exports.Divider = Divider;
|
|
|
8236
8324
|
exports.DownArrowIcon = DownArrowIcon;
|
|
8237
8325
|
exports.DragIcon = DragIcon;
|
|
8238
8326
|
exports.Dropdown = Dropdown;
|
|
8327
|
+
exports.Dropzone = Dropzone;
|
|
8239
8328
|
exports.EditIcon = EditIcon;
|
|
8240
8329
|
exports.EmptyIcon = EmptyIcon;
|
|
8241
8330
|
exports.EmptyListMessage = EmptyListMessage;
|
|
@@ -8272,6 +8361,7 @@ exports.LockIcon = LockIcon;
|
|
|
8272
8361
|
exports.Menu = Menu;
|
|
8273
8362
|
exports.MessagesIcon = MessagesIcon;
|
|
8274
8363
|
exports.Modal = Modal;
|
|
8364
|
+
exports.MouseIcon = MouseIcon;
|
|
8275
8365
|
exports.MultiSelect = MultiSelect;
|
|
8276
8366
|
exports.NavLayout = NavLayout;
|
|
8277
8367
|
exports.NavMenu = NavMenu;
|