@luscii-healthtech/web-ui 46.5.0 → 47.0.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/index.development.js +13 -46
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/Dropzone/Dropzone.d.ts +6 -5
- package/dist/src/generated/components/Dropzone/Dropzone.d.ts +6 -5
- package/dist/src/generated/index.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/stories/DraggableList.stories.d.ts +0 -1
- package/dist/stories/Dropzone.stories.d.ts +9 -9
- package/dist/web-ui-tailwind.css +0 -7
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/components/Dropzone/Dropzone.types.d.ts +0 -33
- package/dist/src/components/Dropzone/index.d.ts +0 -2
- package/dist/src/generated/components/Dropzone/Dropzone.types.d.ts +0 -33
- package/dist/src/generated/components/Dropzone/index.d.ts +0 -2
|
@@ -235,8 +235,8 @@ function styleInject(css, ref) {
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
var css_248z$
|
|
239
|
-
styleInject(css_248z$
|
|
238
|
+
var css_248z$f = "/* https://stackoverflow.com/a/13924997 */\n.ui\\:text-two-lines-max {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n /* number of lines to show */\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n";
|
|
239
|
+
styleInject(css_248z$f);
|
|
240
240
|
|
|
241
241
|
const newVariants = /* @__PURE__ */ new Set([
|
|
242
242
|
"body-base-light",
|
|
@@ -1003,8 +1003,8 @@ toast.info = (message) => {
|
|
|
1003
1003
|
showToaster({ message, type: "success", showIcon: true, title: "" });
|
|
1004
1004
|
};
|
|
1005
1005
|
|
|
1006
|
-
var css_248z$
|
|
1007
|
-
styleInject(css_248z$
|
|
1006
|
+
var css_248z$e = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n/** Load Avenir fonts for titles */\n@font-face {\n font-family: \"AvenirNextLTPro-Regular\";\n src: url(\"../../../public/fonts/avenir/3A0AF8_1_0.eot\");\n src: url(\"../../../public/fonts/avenir/3A0AF8_1_0.eot\") format(\"embedded-opentype\"), url(\"../../../public/fonts/avenir/3A0AF8_1_0.woff2\") format(\"woff2\"), url(\"../../../public/fonts/avenir/3A0AF8_1_0.woff\") format(\"woff\"), url(\"../../../public/fonts/avenir/3A0AF8_1_0.ttf\") format(\"truetype\");\n}\n@font-face {\n font-family: \"AvenirNextLTPro-Bold\";\n src: url(\"../../../public/fonts/avenir/3A0AF8_0_0.eot\");\n src: url(\"../../../public/fonts/avenir/3A0AF8_0_0.eot\") format(\"embedded-opentype\"), url(\"../../../public/fonts/avenir/3A0AF8_0_0.woff2\") format(\"woff2\"), url(\"../../../public/fonts/avenir/3A0AF8_0_0.woff\") format(\"woff\"), url(\"../../../public/fonts/avenir/3A0AF8_0_0.ttf\") format(\"truetype\");\n}\n.title-avenir {\n font-family: \"AvenirNextLTPro-Bold\", \"Roboto\", sans-serif;\n}\n\n.title-inter {\n font-family: \"Inter\", \"Roboto\", \"Helvetica\", sans-serif;\n}";
|
|
1007
|
+
styleInject(css_248z$e);
|
|
1008
1008
|
|
|
1009
1009
|
const Title = (props) => {
|
|
1010
1010
|
const { variant: variantFromProps = "base", type, className, text, children, color, level, ref } = props, rest = __rest(props, ["variant", "type", "className", "text", "children", "color", "level", "ref"]);
|
|
@@ -1080,8 +1080,8 @@ const isSubstring = (string, searchTerm, caseSensitive = false) => {
|
|
|
1080
1080
|
return (stringToSearch === null || stringToSearch === void 0 ? void 0 : stringToSearch.indexOf(searchTermWithCase)) > -1;
|
|
1081
1081
|
};
|
|
1082
1082
|
|
|
1083
|
-
var css_248z$
|
|
1084
|
-
styleInject(css_248z$
|
|
1083
|
+
var css_248z$d = ".list-skeleton .skeleton-box {\n display: inline-block;\n height: 1em;\n position: relative;\n overflow: hidden;\n background-color: #cbd5e1;\n border-radius: 3px;\n}\n.list-skeleton .skeleton-box::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0));\n animation: shimmer 800ms infinite;\n content: \"\";\n}\n.list-skeleton .skeleton-box.is-circle {\n border-radius: 50%;\n}\n.list-skeleton .skeleton-box.is-button::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(90deg, rgba(221, 221, 221, 0) 0, rgba(221, 221, 221, 0.2) 20%, rgba(221, 221, 221, 0.5) 60%, rgba(221, 221, 221, 0));\n animation: shimmer 800ms infinite;\n content: \"\";\n}\n@keyframes shimmer {\n 100% {\n transform: translateX(100%);\n }\n}";
|
|
1084
|
+
styleInject(css_248z$d);
|
|
1085
1085
|
|
|
1086
1086
|
const ListItemSkeleton = () => {
|
|
1087
1087
|
return jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-row ui:items-center ui:p-4", children: [jsxRuntime.jsx("div", { className: "skeleton-box is-circle ui:mr-2", style: { width: `${32}px`, height: `${32}px` } }), jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-col", children: [jsxRuntime.jsx("div", { className: "skeleton-box ui:mb-1", style: { width: `${160}px`, height: `${14}px` } }), jsxRuntime.jsx("div", { className: "skeleton-box", style: { width: `${110}px`, height: `${14}px` } })] }), jsxRuntime.jsx("div", { className: "skeleton-box is-button ui:ml-auto ui:rounded-full", style: { width: `${24}px`, height: `${24}px` } })] });
|
|
@@ -1546,47 +1546,14 @@ const DraggableBaseList = (_a) => {
|
|
|
1546
1546
|
return jsxRuntime.jsx(BaseList, Object.assign({}, props, { items, itemComponent: DraggableBaseListItem }));
|
|
1547
1547
|
};
|
|
1548
1548
|
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
return null;
|
|
1555
|
-
}
|
|
1556
|
-
const alignLeft = horizontal || alignMessage === "left";
|
|
1557
|
-
const className = classNames__default.default("ui:p-4 ui:flex ui:items-center", {
|
|
1558
|
-
"ui:flex-col ui:justify-center": !alignLeft,
|
|
1559
|
-
"ui:flex-row ui:w-full ": alignLeft
|
|
1560
|
-
});
|
|
1561
|
-
return jsxRuntime.jsxs("div", { className, children: [icon && jsxRuntime.jsx(Icon, { name: icon, className: classNames__default.default("ui:text-slate-500", {
|
|
1562
|
-
"ui:mb-2": message && !alignLeft,
|
|
1563
|
-
"ui:mr-2": alignLeft
|
|
1564
|
-
}) }), message && jsxRuntime.jsx(Text, { type: "base", color: "slate-500", className: "ui:text-center", text: message })] });
|
|
1565
|
-
};
|
|
1566
|
-
const DropzonePresentation = React.forwardRef(({ message, icon, isHighlighted, isClickable, className, dataTestId, children, horizontal, alignMessage }, ref) => {
|
|
1567
|
-
const classes = classNames__default.default("ui:border ui:flex ui:items-center ui:justify-center ui:border-primary", {
|
|
1568
|
-
"dropzone-dashed-border": !isHighlighted,
|
|
1569
|
-
"ui:bg-white": !isHighlighted,
|
|
1570
|
-
"ui:bg-blue-50": isHighlighted,
|
|
1571
|
-
"ui:border-dashed": !isHighlighted,
|
|
1572
|
-
"ui:border-solid": isHighlighted,
|
|
1573
|
-
"ui:hover:bg-blue-100 ui:transition-colors ui:ease-in-out ui:duration-300": isClickable
|
|
1549
|
+
const Dropzone = React.forwardRef((props, ref) => {
|
|
1550
|
+
const { isHighlighted = false, className, children } = props, rest = __rest(props, ["isHighlighted", "className", "children"]);
|
|
1551
|
+
const classes = classNames__default.default("ui:border ui:items-center ui:border-primary", {
|
|
1552
|
+
"ui:bg-surface ui:border-dashed": !isHighlighted,
|
|
1553
|
+
"ui:bg-primary-background ui:border-solid": isHighlighted
|
|
1574
1554
|
}, className);
|
|
1575
|
-
return jsxRuntime.jsx("div", { className: classes, ref
|
|
1555
|
+
return jsxRuntime.jsx("div", Object.assign({ className: classes, ref }, rest, { children }));
|
|
1576
1556
|
});
|
|
1577
|
-
const Dropzone = (_a) => {
|
|
1578
|
-
var { draggableIdentifier: identifier, disabled, data, dataTestId, onClick } = _a, props = __rest(_a, ["draggableIdentifier", "disabled", "data", "dataTestId", "onClick"]);
|
|
1579
|
-
const { setNodeRef, isOver } = core.useDroppable({
|
|
1580
|
-
id: identifier,
|
|
1581
|
-
disabled,
|
|
1582
|
-
data
|
|
1583
|
-
});
|
|
1584
|
-
const presentation = jsxRuntime.jsx(DropzonePresentation, Object.assign({ ref: setNodeRef, isHighlighted: isOver, isClickable: onClick && !disabled }, props, { dataTestId: dataTestId !== null && dataTestId !== void 0 ? dataTestId : `dropzone-${identifier}` }));
|
|
1585
|
-
if (onClick) {
|
|
1586
|
-
return jsxRuntime.jsx("button", { onClick, disabled, className: "ui:block ui:w-full ui:rounded ui:focus:outline-primary", children: presentation });
|
|
1587
|
-
}
|
|
1588
|
-
return presentation;
|
|
1589
|
-
};
|
|
1590
1557
|
|
|
1591
1558
|
const SortableBaseListItem = (_a) => {
|
|
1592
1559
|
var { draggableData } = _a, props = __rest(_a, ["draggableData"]);
|
|
@@ -1600,7 +1567,7 @@ const SortableBaseListItem = (_a) => {
|
|
|
1600
1567
|
});
|
|
1601
1568
|
const styleTransform = utilities.CSS.Transform.toString(transform);
|
|
1602
1569
|
if (isDragging) {
|
|
1603
|
-
return jsxRuntime.jsxs("div", { style: { transform: styleTransform, position: "relative" }, children: [jsxRuntime.jsx(
|
|
1570
|
+
return jsxRuntime.jsxs("div", { style: { transform: styleTransform, position: "relative" }, children: [jsxRuntime.jsx(Dropzone, { className: "ui:absolute ui:h-full ui:w-full" }), jsxRuntime.jsx("div", { className: "ui:invisible", children: jsxRuntime.jsx(BaseListItem, Object.assign({}, props, { ref: setNodeRef, htmlProps: { style: { transform: styleTransform } }, isDraggable: props.__isNested ? false : true, renderDragHandle: () => jsxRuntime.jsx(DragHandle, Object.assign({}, attributes, listeners, { disabled: !props.isDraggable, grabbing: isDragging })) })) })] });
|
|
1604
1571
|
}
|
|
1605
1572
|
return jsxRuntime.jsx(BaseListItem, Object.assign({}, props, { ref: setNodeRef, htmlProps: { style: { transform: styleTransform } }, isDraggable: props.__isNested ? false : true, renderDragHandle: () => jsxRuntime.jsx(DragHandle, Object.assign({}, attributes, listeners, { disabled: !props.isDraggable, grabbing: isDragging })) }));
|
|
1606
1573
|
};
|