@trackunit/react-components 0.1.317 → 0.1.320
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/index.cjs.js
CHANGED
|
@@ -1741,6 +1741,32 @@ const Collapsible = ({ children, expanded, id }) => {
|
|
|
1741
1741
|
return (jsxRuntime.jsx("div", { className: cvaCollapseAnimated({ expanded }), id: id, style: { height: expanded ? height : "0" }, children: jsxRuntime.jsx("div", { ref: ref, children: jsxRuntime.jsx("div", { className: cvaCollapsible(), children: children }) }) }));
|
|
1742
1742
|
};
|
|
1743
1743
|
|
|
1744
|
+
/**
|
|
1745
|
+
* A component that displays a visual indicator based on the completion status.
|
|
1746
|
+
*
|
|
1747
|
+
* @example
|
|
1748
|
+
* <CompletionStatusIndicator loading={true} />
|
|
1749
|
+
* <CompletionStatusIndicator error={true} />
|
|
1750
|
+
* <CompletionStatusIndicator success={true} />
|
|
1751
|
+
* @param {CompletionStatusIndicatorProps} props - The properties for the indicator.
|
|
1752
|
+
* @param {boolean} props.loading - Indicates if the process is in a loading state.
|
|
1753
|
+
* @param {boolean} props.error - Indicates if an error has occurred.
|
|
1754
|
+
* @param {boolean} props.success - Indicates if the process was successful.
|
|
1755
|
+
*/
|
|
1756
|
+
const CompletionStatusIndicator = (_a) => {
|
|
1757
|
+
var { loading, error, success } = _a, rest = __rest(_a, ["loading", "error", "success"]);
|
|
1758
|
+
if (loading) {
|
|
1759
|
+
return jsxRuntime.jsx(Spinner, Object.assign({ className: "h-[22px] w-[22px]", containerClassName: "w-min" }, rest));
|
|
1760
|
+
}
|
|
1761
|
+
if (error) {
|
|
1762
|
+
return jsxRuntime.jsx(Icon, Object.assign({ color: "danger", name: "XCircle", type: "solid" }, rest));
|
|
1763
|
+
}
|
|
1764
|
+
if (success) {
|
|
1765
|
+
return jsxRuntime.jsx(Icon, Object.assign({ color: "success", name: "CheckCircle", type: "solid" }, rest));
|
|
1766
|
+
}
|
|
1767
|
+
return null;
|
|
1768
|
+
};
|
|
1769
|
+
|
|
1744
1770
|
const cvaCopyableText = cssClassVarianceUtilities.cvaMerge([
|
|
1745
1771
|
"py-1",
|
|
1746
1772
|
"px-2",
|
|
@@ -4660,6 +4686,7 @@ exports.CardBody = CardBody;
|
|
|
4660
4686
|
exports.CardFooter = CardFooter;
|
|
4661
4687
|
exports.CardHeader = CardHeader;
|
|
4662
4688
|
exports.Collapse = Collapse;
|
|
4689
|
+
exports.CompletionStatusIndicator = CompletionStatusIndicator;
|
|
4663
4690
|
exports.CopyableText = CopyableText;
|
|
4664
4691
|
exports.DayPicker = DayPicker;
|
|
4665
4692
|
exports.DayRangePicker = DayRangePicker;
|
package/index.esm.js
CHANGED
|
@@ -1709,6 +1709,32 @@ const Collapsible = ({ children, expanded, id }) => {
|
|
|
1709
1709
|
return (jsx("div", { className: cvaCollapseAnimated({ expanded }), id: id, style: { height: expanded ? height : "0" }, children: jsx("div", { ref: ref, children: jsx("div", { className: cvaCollapsible(), children: children }) }) }));
|
|
1710
1710
|
};
|
|
1711
1711
|
|
|
1712
|
+
/**
|
|
1713
|
+
* A component that displays a visual indicator based on the completion status.
|
|
1714
|
+
*
|
|
1715
|
+
* @example
|
|
1716
|
+
* <CompletionStatusIndicator loading={true} />
|
|
1717
|
+
* <CompletionStatusIndicator error={true} />
|
|
1718
|
+
* <CompletionStatusIndicator success={true} />
|
|
1719
|
+
* @param {CompletionStatusIndicatorProps} props - The properties for the indicator.
|
|
1720
|
+
* @param {boolean} props.loading - Indicates if the process is in a loading state.
|
|
1721
|
+
* @param {boolean} props.error - Indicates if an error has occurred.
|
|
1722
|
+
* @param {boolean} props.success - Indicates if the process was successful.
|
|
1723
|
+
*/
|
|
1724
|
+
const CompletionStatusIndicator = (_a) => {
|
|
1725
|
+
var { loading, error, success } = _a, rest = __rest(_a, ["loading", "error", "success"]);
|
|
1726
|
+
if (loading) {
|
|
1727
|
+
return jsx(Spinner, Object.assign({ className: "h-[22px] w-[22px]", containerClassName: "w-min" }, rest));
|
|
1728
|
+
}
|
|
1729
|
+
if (error) {
|
|
1730
|
+
return jsx(Icon, Object.assign({ color: "danger", name: "XCircle", type: "solid" }, rest));
|
|
1731
|
+
}
|
|
1732
|
+
if (success) {
|
|
1733
|
+
return jsx(Icon, Object.assign({ color: "success", name: "CheckCircle", type: "solid" }, rest));
|
|
1734
|
+
}
|
|
1735
|
+
return null;
|
|
1736
|
+
};
|
|
1737
|
+
|
|
1712
1738
|
const cvaCopyableText = cvaMerge([
|
|
1713
1739
|
"py-1",
|
|
1714
1740
|
"px-2",
|
|
@@ -4617,4 +4643,4 @@ const cvaClickable = cvaMerge([
|
|
|
4617
4643
|
},
|
|
4618
4644
|
});
|
|
4619
4645
|
|
|
4620
|
-
export { Alert, Badge, Breadcrumb, BreadcrumbContainer, BreadcrumbItem, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CopyableText, DayPicker, DayRangePicker, Drawer, EmptyState, ExternalLink, Heading, Icon, IconButton, Indicator, KPICard, MenuItem, MenuList, Modal, ModalBackdrop, MoreMenu, Notice, PackageNameStoryComponent, Page, PageContent, PageHeader, Pagination, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Prompt, ROLE_CARD, SectionHeader, Sidebar, SkeletonLines, Spacer, Spinner, StarButton, Tab, TabContent, TabList, Tabs, Tag, Text, Timeline, TimelineElement, Tooltip, ValueBar, VirtualizedList, WidgetBody, cvaButton, cvaButtonPrefixSuffix, cvaButtonSpinner, cvaButtonSpinnerContainer, cvaClickable, cvaIconButton, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemSuffix, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, setLocalStorage, useClickOutside, useContainerProps, useContinuousTimeout, useDebounce, useDevicePixelRatio, useGeometry, useHover, useIsFirstRender, useIsFullscreen, useIsTextCutOff, useLocalStorage, useLocalStorageReducer, useModal, useOptionallyElevatedState, useOverflowItems, usePopoverContext, usePrompt, useResize, useSelfUpdatingRef, useTimeout, useVisibilityChange };
|
|
4646
|
+
export { Alert, Badge, Breadcrumb, BreadcrumbContainer, BreadcrumbItem, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CompletionStatusIndicator, CopyableText, DayPicker, DayRangePicker, Drawer, EmptyState, ExternalLink, Heading, Icon, IconButton, Indicator, KPICard, MenuItem, MenuList, Modal, ModalBackdrop, MoreMenu, Notice, PackageNameStoryComponent, Page, PageContent, PageHeader, Pagination, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Prompt, ROLE_CARD, SectionHeader, Sidebar, SkeletonLines, Spacer, Spinner, StarButton, Tab, TabContent, TabList, Tabs, Tag, Text, Timeline, TimelineElement, Tooltip, ValueBar, VirtualizedList, WidgetBody, cvaButton, cvaButtonPrefixSuffix, cvaButtonSpinner, cvaButtonSpinnerContainer, cvaClickable, cvaIconButton, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemSuffix, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, setLocalStorage, useClickOutside, useContainerProps, useContinuousTimeout, useDebounce, useDevicePixelRatio, useGeometry, useHover, useIsFirstRender, useIsFullscreen, useIsTextCutOff, useLocalStorage, useLocalStorageReducer, useModal, useOptionallyElevatedState, useOverflowItems, usePopoverContext, usePrompt, useResize, useSelfUpdatingRef, useTimeout, useVisibilityChange };
|
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export interface CompletionStatusIndicatorProps extends CommonProps {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
success: boolean;
|
|
6
|
+
error: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A component that displays a visual indicator based on the completion status.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <CompletionStatusIndicator loading={true} />
|
|
13
|
+
* <CompletionStatusIndicator error={true} />
|
|
14
|
+
* <CompletionStatusIndicator success={true} />
|
|
15
|
+
* @param {CompletionStatusIndicatorProps} props - The properties for the indicator.
|
|
16
|
+
* @param {boolean} props.loading - Indicates if the process is in a loading state.
|
|
17
|
+
* @param {boolean} props.error - Indicates if an error has occurred.
|
|
18
|
+
* @param {boolean} props.success - Indicates if the process was successful.
|
|
19
|
+
*/
|
|
20
|
+
export declare const CompletionStatusIndicator: ({ loading, error, success, ...rest }: CompletionStatusIndicatorProps) => JSX.Element | null;
|
|
@@ -3,6 +3,7 @@ export * from "./Badge";
|
|
|
3
3
|
export * from "./Breadcrumb/Breadcrumb";
|
|
4
4
|
export * from "./Card";
|
|
5
5
|
export * from "./Collapse";
|
|
6
|
+
export * from "./CompletionStatusIndicator/CompletionStatusIndicator";
|
|
6
7
|
export * from "./CopyableText";
|
|
7
8
|
export * from "./DayPicker";
|
|
8
9
|
export * from "./Drawer/Drawer";
|