@luscii-healthtech/web-ui 2.2.0 → 2.4.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/Icons/WarningIcon.d.ts +3 -0
- package/dist/components/Icons/types/IconProps.type.d.ts +1 -0
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.types.d.ts +1 -0
- package/dist/components/List/ListItemSkeleton.d.ts +2 -0
- package/dist/components/List/ListSkeleton.d.ts +7 -0
- package/dist/components/Toaster/Toaster.d.ts +17 -0
- package/dist/components/Toaster/toast-elements-getter.d.ts +22 -0
- package/dist/components/Toaster/toast-progress-animator.d.ts +12 -0
- package/dist/components/Toaster/toast.d.ts +12 -0
- package/dist/index.d.ts +2 -1
- package/dist/web-ui-tailwind.css +45 -0
- package/dist/web-ui.cjs.development.js +411 -147
- 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 +409 -146
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +5 -8
- package/src/components/Icons/CheckIcon.tsx +1 -0
- package/src/components/Icons/CrossIcon.tsx +1 -0
- package/src/components/Icons/WarningIcon.tsx +24 -0
- package/src/components/Icons/types/IconProps.type.ts +1 -0
- package/src/components/List/List.tsx +13 -9
- package/src/components/List/List.types.ts +1 -0
- package/src/components/List/ListItemSkeleton.tsx +26 -0
- package/src/components/List/ListSkeleton.scss +5 -0
- package/src/components/List/ListSkeleton.tsx +30 -0
- package/src/components/Toaster/Toaster.scss +53 -0
- package/src/components/Toaster/Toaster.tsx +100 -0
- package/src/components/Toaster/toast-elements-getter.ts +72 -0
- package/src/components/Toaster/toast-progress-animator.ts +53 -0
- package/src/components/Toaster/toast.ts +112 -0
- package/src/index.tsx +6 -4
- package/src/styles/_skeleton.scss +63 -0
- package/dist/components/Acknowledgement/Acknowledgement.d.ts +0 -22
- package/src/components/Acknowledgement/Acknowledgement.js +0 -61
- package/src/components/Acknowledgement/Acknowledgement.scss +0 -49
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ListProps, ListItemProps, OnAssetLoadErrorPayload } from "./List.types";
|
|
3
3
|
export { ListProps, ListItemProps, OnAssetLoadErrorPayload };
|
|
4
|
-
export declare const List: ({ title, headerButton, headerTransparent, items, onAssetLoadError, onDragEnd, emptyStateMessage, }: ListProps) => JSX.Element;
|
|
4
|
+
export declare const List: ({ title, headerButton, headerTransparent, items, onAssetLoadError, onDragEnd, emptyStateMessage, isLoading, }: ListProps) => JSX.Element;
|
|
5
5
|
export default List;
|
|
@@ -30,6 +30,7 @@ export declare type ListProps = {
|
|
|
30
30
|
onAssetLoadError?: (payload: OnAssetLoadErrorPayload) => void;
|
|
31
31
|
onDragEnd?: (itemId: string | number, newIndex: number) => void;
|
|
32
32
|
emptyStateMessage?: string;
|
|
33
|
+
isLoading?: boolean;
|
|
33
34
|
};
|
|
34
35
|
export interface Dragula {
|
|
35
36
|
destroy?: () => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Toaster.scss";
|
|
3
|
+
export interface ToasterProps {
|
|
4
|
+
type: "success" | "failure";
|
|
5
|
+
message: string;
|
|
6
|
+
title: string;
|
|
7
|
+
isVisible?: boolean;
|
|
8
|
+
/** if you need to reposition the toaster for whatever reason you can use these props */
|
|
9
|
+
styleOverwrite?: Pick<React.CSSProperties, "top" | "bottom" | "left" | "right">;
|
|
10
|
+
}
|
|
11
|
+
export declare const TOASTER_TYPE_OPTIONS: {
|
|
12
|
+
readonly SUCCESS: "success";
|
|
13
|
+
readonly FAILURE: "failure";
|
|
14
|
+
};
|
|
15
|
+
export declare type ToasterType = typeof TOASTER_TYPE_OPTIONS[keyof typeof TOASTER_TYPE_OPTIONS];
|
|
16
|
+
declare const Toaster: React.VoidFunctionComponent<ToasterProps>;
|
|
17
|
+
export default Toaster;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
interface GetToasterElementsParams {
|
|
3
|
+
timeoutId: NodeJS.Timeout;
|
|
4
|
+
progressBarAnimationFrameHandler: number;
|
|
5
|
+
}
|
|
6
|
+
interface GetToasterElementsReturn {
|
|
7
|
+
toasterElementMessage: HTMLElement;
|
|
8
|
+
toasterProgressBar: HTMLElement;
|
|
9
|
+
toasterElementTitle: HTMLElement;
|
|
10
|
+
toasterElementSuccessIcon: HTMLElement;
|
|
11
|
+
toasterElementFailureIcon: HTMLElement;
|
|
12
|
+
toasterElementContainer: HTMLElement;
|
|
13
|
+
toasterCloseButton: HTMLElement;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param params.timeoutId - the timeoutId (that makes the toaster vanish), in case of a shortcut
|
|
18
|
+
* @param params.progressBarAnimationFrameHandler - animation frame id to be canceled in case of a shortcut
|
|
19
|
+
* @returns a collection of html elements to be manipulated by the animation
|
|
20
|
+
*/
|
|
21
|
+
export declare const getToasterElements: (params: GetToasterElementsParams) => GetToasterElementsReturn;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface AnimateProgressParams {
|
|
2
|
+
animationDuration: number;
|
|
3
|
+
progressBarElement: HTMLElement;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Reference: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
7
|
+
* @param params.animationDuration - the amount of seconds the duration will take
|
|
8
|
+
* @param params.progressBarElement - the html element for the progress bar
|
|
9
|
+
* @returns the animation frame id
|
|
10
|
+
*/
|
|
11
|
+
export declare const animateProgress: (params: AnimateProgressParams) => number;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare type ToastParams = {
|
|
2
|
+
message: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
showIcon?: boolean;
|
|
5
|
+
type: "success" | "failure";
|
|
6
|
+
} | string;
|
|
7
|
+
export declare const toast: {
|
|
8
|
+
(params: ToastParams): void;
|
|
9
|
+
error(message: string): void;
|
|
10
|
+
info(message: string): void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as Toaster, TOASTER_TYPE_OPTIONS, } from "./components/Toaster/Toaster";
|
|
2
|
+
export { toast } from "./components/Toaster/toast";
|
|
2
3
|
export { default as Avatar } from "./components/Avatar/Avatar";
|
|
3
4
|
export { default as Badge } from "./components/Badge/Badge";
|
|
4
5
|
export { BaseButtonProps as NonPrimaryButtonProps, ButtonWithPendingStateProps as PrimaryButtonProps, ButtonDefinition, } from "./components/ButtonV2/ButtonProps.type";
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -651,6 +651,18 @@ video {
|
|
|
651
651
|
margin-left: calc(1.5rem * calc(1 - var(--space-x-reverse)));
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
+
.divide-y > :not(template) ~ :not(template) {
|
|
655
|
+
--divide-y-reverse: 0;
|
|
656
|
+
border-top-width: calc(1px * calc(1 - var(--divide-y-reverse)));
|
|
657
|
+
border-bottom-width: calc(1px * var(--divide-y-reverse));
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.divide-slate-200 > :not(template) ~ :not(template) {
|
|
661
|
+
--divide-opacity: 1;
|
|
662
|
+
border-color: #e2e8f0;
|
|
663
|
+
border-color: rgba(226, 232, 240, var(--divide-opacity));
|
|
664
|
+
}
|
|
665
|
+
|
|
654
666
|
.appearance-none {
|
|
655
667
|
appearance: none;
|
|
656
668
|
}
|
|
@@ -957,6 +969,10 @@ video {
|
|
|
957
969
|
border-radius: 0.25rem;
|
|
958
970
|
}
|
|
959
971
|
|
|
972
|
+
.rounded-md {
|
|
973
|
+
border-radius: 0.375rem;
|
|
974
|
+
}
|
|
975
|
+
|
|
960
976
|
.rounded-lg {
|
|
961
977
|
border-radius: 0.5rem;
|
|
962
978
|
}
|
|
@@ -989,6 +1005,11 @@ video {
|
|
|
989
1005
|
border-bottom-left-radius: 0.25rem;
|
|
990
1006
|
}
|
|
991
1007
|
|
|
1008
|
+
.rounded-b-md {
|
|
1009
|
+
border-bottom-right-radius: 0.375rem;
|
|
1010
|
+
border-bottom-left-radius: 0.375rem;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
992
1013
|
.rounded-b-lg {
|
|
993
1014
|
border-bottom-right-radius: 0.5rem;
|
|
994
1015
|
border-bottom-left-radius: 0.5rem;
|
|
@@ -1437,6 +1458,10 @@ video {
|
|
|
1437
1458
|
margin-right: 0;
|
|
1438
1459
|
}
|
|
1439
1460
|
|
|
1461
|
+
.max-h-19 {
|
|
1462
|
+
max-height: 4.75rem;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1440
1465
|
.max-h-78 {
|
|
1441
1466
|
max-height: 19.5rem;
|
|
1442
1467
|
}
|
|
@@ -1449,6 +1474,10 @@ video {
|
|
|
1449
1474
|
max-width: 48rem;
|
|
1450
1475
|
}
|
|
1451
1476
|
|
|
1477
|
+
.min-h-13 {
|
|
1478
|
+
min-height: 3.25rem;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1452
1481
|
.min-w-24 {
|
|
1453
1482
|
min-width: 1.5rem;
|
|
1454
1483
|
}
|
|
@@ -1681,6 +1710,10 @@ video {
|
|
|
1681
1710
|
right: 0;
|
|
1682
1711
|
}
|
|
1683
1712
|
|
|
1713
|
+
.bottom-0 {
|
|
1714
|
+
bottom: 0;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1684
1717
|
.left-0 {
|
|
1685
1718
|
left: 0;
|
|
1686
1719
|
}
|
|
@@ -1733,6 +1766,10 @@ video {
|
|
|
1733
1766
|
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
1734
1767
|
}
|
|
1735
1768
|
|
|
1769
|
+
.shadow {
|
|
1770
|
+
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1736
1773
|
.shadow-md {
|
|
1737
1774
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
1738
1775
|
}
|
|
@@ -2025,6 +2062,10 @@ video {
|
|
|
2025
2062
|
width: 20rem;
|
|
2026
2063
|
}
|
|
2027
2064
|
|
|
2065
|
+
.w-104 {
|
|
2066
|
+
width: 26rem;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2028
2069
|
.w-200 {
|
|
2029
2070
|
width: 50rem;
|
|
2030
2071
|
}
|
|
@@ -2092,6 +2133,10 @@ video {
|
|
|
2092
2133
|
transition-property: opacity;
|
|
2093
2134
|
}
|
|
2094
2135
|
|
|
2136
|
+
.transition-transform {
|
|
2137
|
+
transition-property: transform;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2095
2140
|
.ease-in {
|
|
2096
2141
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
2097
2142
|
}
|