@cloudwick/astral-ui 3.0.4 → 3.0.6
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
+
import type { Placement } from "@floating-ui/react";
|
|
2
3
|
import { type IconType } from "../adpIcon";
|
|
3
4
|
export declare const colors: readonly ["primary", "secondary", "success", "warning", "error"];
|
|
4
5
|
export declare const variants: readonly ["filled", "outline", "shade", "text"];
|
|
@@ -62,6 +63,19 @@ export interface Props extends Omit<React.ComponentPropsWithoutRef<"button">, "c
|
|
|
62
63
|
* - If a ReactNode is provided, it will be rendered as-is.
|
|
63
64
|
*/
|
|
64
65
|
suffixIcon?: IconType | ReactNode;
|
|
66
|
+
/**
|
|
67
|
+
* Tooltip to be displayed on hover of the button.
|
|
68
|
+
* @description
|
|
69
|
+
* This prop accepts a ReactNode, if this is passed then the button will render
|
|
70
|
+
* tooltip on hover of the button.
|
|
71
|
+
* This tooltip is only on hover and not on click.
|
|
72
|
+
*/
|
|
73
|
+
tooltip?: ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* Placement of the tooltip
|
|
76
|
+
* @default "bottom-end"
|
|
77
|
+
*/
|
|
78
|
+
tooltipPlacement?: Placement;
|
|
65
79
|
/**
|
|
66
80
|
* Callback function to be called when the button is clicked
|
|
67
81
|
*/
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
2
|
import { EmptyStateContentProps } from "./emptyStateContent";
|
|
3
3
|
import { EmptyStateCTAProps } from "./emptyStateCta";
|
|
4
|
-
export declare const imageVariants: readonly ["notifications", "no-access", "forgot-password", "otp", "login", "analytics", "file-upload", "searching", "dashboard", "workspaces", "favorite", "empty-data", "data-upload", "no-connection"];
|
|
4
|
+
export declare const imageVariants: readonly ["notifications", "no-access", "forgot-password", "otp", "login", "analytics", "file-upload", "searching", "dashboard", "workspaces", "favorite", "empty-data", "data-upload", "no-connection", "no-files", "datapipeline", "empty-data-2", "empty-data-3", "empty-data-4", "waiting", "check-list"];
|
|
5
5
|
type ImageVariantType = typeof imageVariants[number];
|
|
6
6
|
export interface EmptyStateProps {
|
|
7
7
|
/**
|
|
8
8
|
* Set a supported Empty State Image variant
|
|
9
9
|
*/
|
|
10
|
-
imageVariant
|
|
10
|
+
imageVariant?: ImageVariantType;
|
|
11
11
|
/**
|
|
12
12
|
* The alt text for the EmptyState component image.
|
|
13
13
|
* The alt text will on be applied if there is no EmptyStateContent.
|
|
14
14
|
* @default ""
|
|
15
15
|
*/
|
|
16
16
|
imageAltText?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Pass a custom image to the EmptyState component,
|
|
19
|
+
* must be a valid HTML image element
|
|
20
|
+
* @default null
|
|
21
|
+
*/
|
|
22
|
+
customImage?: ReactElement<HTMLImageElement>;
|
|
17
23
|
/**
|
|
18
24
|
* Override the default classes by providing a custom class
|
|
19
25
|
*/
|
|
@@ -21,7 +27,7 @@ export interface EmptyStateProps {
|
|
|
21
27
|
children?: ReactElement<EmptyStateContentProps> | ReactElement<EmptyStateCTAProps> | [ReactElement<EmptyStateContentProps>, ReactElement<EmptyStateCTAProps>];
|
|
22
28
|
}
|
|
23
29
|
export declare const EmptyState: {
|
|
24
|
-
({ className, imageVariant, imageAltText, children }: EmptyStateProps): ReactElement | null;
|
|
30
|
+
({ className, imageVariant, imageAltText, customImage, children }: EmptyStateProps): ReactElement | null;
|
|
25
31
|
Content: ({ className, title, children }: EmptyStateContentProps) => ReactElement | null;
|
|
26
32
|
CTA: ({ className, children }: EmptyStateCTAProps) => ReactElement | null;
|
|
27
33
|
};
|